# packages

pkgId: 95656fbb8a21e2dcde8d4dac7f34482961d01dde3917555b5535eb8cf5c330f6
name: python-cell-AAP-help
arch: noarch
version: 0.0.8.1
epoch: 0
release: 1
summary: Development documents and examples for cell-AAP
url: https://pypi.org/project/cell-AAP/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cell-AAP-0.0.8.1-1.src.rpm
location_href: Packages/python-cell-AAP-help-0.0.8.1-1.noarch.rpm
checksum_type: sha256
description:
  Utilities for the semi-automated generation of instance segmentation annotations to be used for neural network training. Utilities are built ontop of [UMAP](https://github.com/lmcinnes/umap), [HDBSCAN](https://arxiv.org/abs/1911.02282) and a finetuned encoder version of FAIR's [Segment Anything Model](https://github.com/facebookresearch/segment-anything/tree/main?tab=readme-ov-file) developed by Computational Cell Analytics for the project [micro-sam](https://github.com/computational-cell-analytics/micro-sam/tree/master/micro_sam/sam_annotator). In addition to providing utilies for annotation building, we train a network, FAIR's [detectron2](https://github.com/facebookresearch/detectron2) to
  1. Demonstrate the efficacy of our utilities.
  2. Be used for microscopy annotation of supported cell lines

  Supported cell lines currently include:
  1. HeLa
  2. U2OS

  In development cell lines currently include:
  1. HT1080
  2. RPE1

  We've developed a napari application for the usage of this pre-trained network and propose a transfer learning schematic for the handling of new cell lines.




  We highly recommend installing cell-AAP in a clean conda environment. To do so you must have [miniconda](https://docs.anaconda.com/free/miniconda/#quick-command-line-install) or [anaconda](https://docs.anaconda.com/free/anaconda/) installed.

  If a conda distribution has been installed:

  1. Create and activate a clean environment

          conda create -n cell-aap-env python=3.11.0
          conda activate cell-app-env

  2. Within this environment install pip

          conda install pip

  3. Then install cell-AAP from PyPi

          pip install cell-AAP --upgrade

  4. Finally detectron2 must be built from source, atop cell-AAP

          
          CC=clang CXX=clang++ ARCHFLAGS="-arch arm64" python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'

          
          python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'





  1. To open napari simply type "napari" into the command line, ensure that you are working the correct environment
  2. To instantiate the plugin navigate to the "Plugins" menu and select "cell-AAP"
  3. You should now see the Plugin, where you can select an image, display it, and run inference on it.




  If running inference on large volumes of data, i.e. timeseries data >= 300 MB in size, we recommend to proceed in the following manner.

  1. Assemble a small, < 100 MB, substack of your data using python or a program like [ImageJ](https://imagej.net/ij/download.html)
  2. Use this substack to find the optimal parameters for your data, (Number of Cells, Confidence)
  3. Run Inference over the volume using the discovered optimal parameters

  Note: Finding the optimal set of parameters requires some trial and error, to assist we've created a table.

  | Classifications $\Downarrow$ Detections $\Rightarrow$ | **Too few**                            | **Too many**                             |
  |----------------------------|----------------------------------------|------------------------------------------|
  | **Dropping M-phase**       | Confidence $\Downarrow$ <br> Number of Cells $\Uparrow$ | Confidence $\Downarrow$ <br> Number of cells $\Downarrow$ |
  | **Misclasifying M-phase** | Confidence $\Uparrow$ <br> Number of Cells $\Uparrow$   | Confidence $\Uparrow$ <br> Number of Cells $\Downarrow$   |




  Once inference is complete the following colors indicate class prediction
  - Red: Non-mitotic
  - Blue: Mitotic


pkgId: 705c508b6a56cdfcb579d1c7259da0eb3ac1cf262321b0bfec286626c838c16c
name: python-cell-data-loader-help
arch: noarch
version: 0.0.25
epoch: 0
release: 1
summary: Development documents and examples for cell-data-loader
url: https://github.com/mleming/CellDataLoader
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cell-data-loader-0.0.25-1.src.rpm
location_href: Packages/python-cell-data-loader-help-0.0.25-1.noarch.rpm
checksum_type: sha256
description:
  Cell Data Loader is a simple AI support tool in Python that can take in images of cells (or other image types) and output them with minimal effort to formats that can be read by Pytorch (Tensor) or Tensorflow (Numpy) format. With Cell Data Loader, users have the option to output their cell images as whole images, sliced images, or, with the support of [CellPose](https://github.com/MouseLand/cellpose), segment their images by cell and output those individually.
  It can also be used for normal computer vision research, which is why CellPose is not a strict dependency.


pkgId: ce2101620235ad6584aa34d923dc741d549c38e39cba5fb7cc921f1ba1e116ab
name: python-cell-decipher-help
arch: noarch
version: 0.1.1
epoch: 0
release: 1
summary: Development documents and examples for cell-decipher
url: https://github.com/gao-lab/decipher
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cell-decipher-0.1.1-1.src.rpm
location_href: Packages/python-cell-decipher-help-0.1.1-1.noarch.rpm
checksum_type: sha256
description:
  [![stars-badge](https://img.shields.io/github/stars/gao-lab/DECIPHER?logo=GitHub&color=yellow)](https://github.com/gao-lab/DECIPHER/stargazers)
  [![build-badge](https://github.com/gao-lab/DECIPHER/actions/workflows/build.yml/badge.svg)](https://github.com/gao-lab/DECIPHER/actions/workflows/build.yml)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![license-badge](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  ![Python 3.10|3.11|3.12](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue.svg)



  <div align="center">

  [Installation](#Installation) • [Documentation](#Documentation) • [Citation](#Citation) • [FAQ](#FAQ) • [Acknowledgement](#Acknowledgement)

  </div>

  `DECIPHER` aims to learn cells’ disentangled intracellular molecular identity embedding and extracellular spatial context embedding from spatial omics data.

  ![DECIPHER](./docs/_static/Model.png)





  > [!IMPORTANT]
  > Requires Python >= 3.10 and CUDA-enabled GPU (CPU-only device is not recommended).

  We recommend to install `cell-decipher` to a new conda environment with [RAPIDS](https://docs.rapids.ai/install) dependencies.

  ```sh
  mamba create -n decipher -c conda-forge -c rapidsai -c nvidia python=3.11 rapids=24.04 cuda-version=11.8 cudnn cutensor cusparselt -y && conda activate decipher
  pip install cell-decipher
  install_pyg_dependencies
  ```



  Build docker image from [Dockerfile](./Dockerfile) or pull image from Docker Hub directly:

  ```sh
  docker pull huhansan666666/decipher:latest
  docker run --gpus all -it --rm huhansan666666/decipher:latest
  ```




  Here is a minimal example for quick start:

  ```python
  import scanpy as sc
  from decipher import DECIPHER
  from decipher.utils import scanpy_viz


  model = DECIPHER(work_dir='/path/to/work_dir')


  adata = sc.read_h5ad('/path/to/adata.h5ad')
  model.register_data(adata)


  model.fit_omics()


  adata.obsm['X_center'] = model.center_emb  # intracellular molecular embedding
  adata.obsm['X_nbr'] =  model.nbr_emb  # spatial context embedding
  adata = scanpy_viz(adata, ['center', 'nbr'], rapids=False)


  adata.obsm['X_umap'] = adata.obsm['X_umap_center'].copy()
  sc.pl.umap(adata, color=['cell_type'])
  adata.obsm['X_umap'] = adata.obsm['X_umap_nbr'].copy()
  sc.pl.umap(adata, color=['region'])
  ```


  > Please check [**documentation**](https://cell-decipher.readthedocs.io/en/latest) for all tutorials.

  | Name                                    | Description                                                  | Colab                                                        |
  | --------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
  | [Basic Model Tutorial](./docs/tutorials/1-train_model.ipynb)                | Tutorial on how to use DECIPHER                            | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/drive/14PEtrgqlf-KbLOTfBLc9gbx0YvY6mi0S?usp=sharing) |
  | [Multi-slices with Batch Effects](./docs/tutorials/2-remove_batch.ipynb)     | Tutorial on how to apply DECIPHER to multiple slices with batch effects | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/drive/1eLJeRDZFq2tlDUWpETlSxVUdzRv9CeSD?usp=sharing) |
  | [Identify Localization-related LRs](./docs/tutorials/3-select_LRs.ipynb) | Tutorial on how to identify ligand-receptors which related wtih cells’ localization based on DECIPHER embeddings | Insufficient resources |
  | [Multi-GPUs Training](./docs/tutorials.md#multi-gpu-training)                        | Tutorial on how to use DECIPHER with multi-GPUs on spatial atlas | Insufficient resources |



  In coming.

  > If you want to repeat our benchmarks and case studies, please check the [**benchmark**](./benchmark/) and [**experiments**](./experiments/) folder.


  > Please open a new [github issue](https://github.com/gao-lab/DECIPHER/issues/new/choose) if you meet problem.

  1. Visium or ST data

  DECIPHER is designed for single cell resolution data. As for Visium or ST, you can still use DECIPHER after obtaining single-cell resolution through deconvolution or spatial mapping strategies.

  <!-- 2. `CUDA out of memory` error

  The `model.train_gene_select()` may need a lot GPU memory. For example, it needs ~40G GPU memory in [Identify Localization-related LRs](./docs/tutorials/3-select_LRs.ipynb) tutorial (with ~700k cells and 1k LRs). If your GPU device do not have enough memory, you still can train model on GPU but set `disable_gpu=True` in `model.train_gene_select()`. -->



  We thank the following great open-source projects for their help or inspiration:

  - [vit-pytorch](https://github.com/lucidrains/vit-pytorch)
  - [lightly](https://github.com/lightly-ai/lightly)
  - [scib](https://github.com/theislab/scib)
  - [rapids_singlecell](https://github.com/scverse/rapids_singlecell/)


pkgId: 25789549d333923eef64586d2f9449ca52a3d120ff9952ea99a3eaff3b8be016
name: python-cellector-help
arch: noarch
version: 1.0.0
epoch: 0
release: 1
summary: Development documents and examples for cellector
url: https://github.com/landoskape/cellector
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cellector-1.0.0-1.src.rpm
location_href: Packages/python-cellector-help-1.0.0-1.noarch.rpm
checksum_type: sha256
description:
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  A pipeline and GUI for determining which ROIs match features in a fluorescence image. It
  is a common challenge in biology to determine whether a particular ROI (i.e. a collection
  of weighted pixels representing an inferred structure in an image) overlaps with features
  of a fluorescence image co-registered to the ROI. For example, in neuroscience, we might
  use [suite2p](https://github.com/MouseLand/suite2p) to extract ROIs indicating active
  cells using a functional fluorophore like GCaMP, but want to know if the cells associated
  with those ROIs contain a secondary fluorophore like tdTomato. This package helps you do
  just that!

  The package itself is somewhat simple, but we spent lots of time thinking about how to do
  this in the most reliable way. The standard pipeline computes a set of standard features
  for each ROI in comparison to a reference image which are useful for determining whether
  an ROI maps onto fluorescence. We provide a GUI for viewing the ROIs, the reference
  images, a distribution of feature values for each ROI, and an interactive system for
  deciding where to draw cutoffs on each feature to choose the ROIs that contain
  fluorescence. There's also a system for manual annotation if the automated system doesn't
  quite get it all right.


  This package is installable with pip from PyPI. It is a lightweight package with minimal
  dependencies, so is probably compatible with other python environments you might use.
  If you're starting from scratch, first make a python environment, activate it, and
  install ``cellector`` with pip. If you are using an existing environment, skip the first
  two steps and just do pip install from within the environment.
  ```bash
  conda create -n cellector
  conda activate cellector
  pip install cellector
  ```


  The basic workflow of this package is as follows:
  1. Construct an ``RoiProcessor`` object.
  2. Use the ``SelectionGUI``.
  3. Save the data.
  4. Repeat (or use scripting to speed up).

  If you want to see the basic workflow in a notebook, look [here](./notebooks/tutorial.ipynb).
  Otherwise, read the instructions below or look at the [documentation](./docs/examples.md)
  which is very far from complete at the moment.


  We've provided a few functions to make ``RoiProcessor`` objects that work differently
  depending on what kind of data you are starting with. For an exhaustive list, go
  [here](./docs/examples.md). If you are working directly on the output of suite2p, use:
  ```python
  from cellector.io import create_from_suite2p
  suite2p_dir = # define your suite2p path - the one with plane0, plane1, ... in it
  roi_processor = create_from_suite2p(suite2p_dir)
  ```

  Then, open the ``SelectionGUI`` as follows:
  ```python
  from cellector.gui import SelectionGUI
  gui = SelectionGUI(roi_processor)
  ```

  Then, use the GUI and hit save! Instructions for the GUI are [here](./docs/gui.md).


  The first version of cellector used poor naming convention for saving features and
  feature criteria. This has been rectified in version 0.2.0, but will create backward
  incompatibility for any data files that were saved with the previous convention. To
  address this, a few functions have been provided which can update the previous names to
  follow the new convention called ``identify_cellector_folders`` and
  ``update_feature_paths``. You can use ``identify...`` to get all folders that contain a
  cellector directory and ``update...`` to convert the filepaths to the new structure.
  These functions are in cellector/io/operations.
  ```python
  from pathlib import Path
  from cellector.io.operations import identify_cellector_folders, update_feature_paths
  top_level_dir = Path(r"C:\Users\Andrew\Documents")
  cellector_folders = identify_cellector_folders(top_level_dir)
  update_feature_paths(cellector_folders)
  ```



  There are a few "hyperparameters" to the package, including filtering parameters, the eps
  value for phase correlation, and size parameters for centered stacks. We need to enable
  hyperparameter optimization for these, which a user can supervise themselves. Idea:
  The user could open a GUI that compares masks with reference images for some sample
  "true" data and in addition for any data they've loaded in. One idea:
  For a particular set of hyperparameters (filtering, for example), the user could get a
  histogram of feature values for all the features for all the masks. They could use cutoff
  lines to pick a range of feature values for that particular set of hyperparameters, and
  then scroll through mask matches that come from within that range. This way, they could
  determine how the hyperparameters affect the feature values at each part of the
  distribution and select hyperparameters that give good separation.
  In addition, there could be some automated tuning, for example, to pick the eps a user
  could just input the maximum size ROI, and then measuring the average power for higher
  spatial frequencies.


  To help choose hyperparameters and see how it's working, I'm going to build some tools to
  visualize masks and the reference image under different conditions.


  Feel free to contribute to this project by opening issues or submitting pull
  requests. It's already a collaborative project, so more minds are great if you
  have ideas or anything to contribute!


  This project is licensed under the GNU License. If you use this repository as part of a
  publication, please cite us. There's no paper associated with the code at the moment, but
  you can cite our GitHub repository URL or email us for any updates about this issue.


pkgId: 91d17f50b1c288957a1c62f9002b8559846a8a3529230cdc62ee96cbc6b539b7
name: python-cellestial-help
arch: noarch
version: 0.2.0
epoch: 0
release: 1
summary: Development documents and examples for cellestial
url: https://pypi.org/project/cellestial/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cellestial-0.2.0-1.src.rpm
location_href: Packages/python-cellestial-help-0.2.0-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
      <img src="https://github.com/datavil/cellestial/blob/master/assets/cellestial_logo.png?raw=true" alt="Cellestial Logo" width="250">
  </p>

  [![GitHub](https://img.shields.io/badge/GitHub-100000?style=flat&logo=github&logoColor=white)](https://github.com/DataVil/Cellestial) [![PyPI](https://img.shields.io/pypi/v/cellestial?color=blue)](https://https://datavil.github.io/cellestial/examples/overall.htmlpypi.org/project/cellestial/)

  To see the example Figures visit [Cellestial Webpage](https://datavil.github.io/cellestial/).



  An Interactive and Highly Customizable __Single-Cell__ & __Spatial__ Plotting Tool over a ggplot-like API.

  Name Encuplates: Space (of Spatial), Scatters of Stars, and of course Cells.



  ```bash
  pip install cellestial
  ```



  ```python
  import cellestial as cl
  ```


  ```python
  umap = cl.umap(data, size=1, axis_type="arrow")
  umap
  ```
  <img src="./assets/tooltips.png" alt="tooltips" width="500">

  and tooltips can be extended with other features..


  ```python
  umap = cl.umap(data, size=1, axis_type="arrow", interactive=True)
  ```

  <img src="./assets/interactive.gif" width="500" />




  ```python
  umap + scale_color_hue() + ggsize(500,400)
  ```
  <img src="./assets/customized.png" alt="Customized" width="400">




  Instead of singular function names (`umap`), multi-grid plots requires the plural (`umaps`),providing predictability which guarentees the reproducibility.

  Which are valid for all `dimensional` subsets (`expression`,`pca`,`umap`, `tsne`).

  ```python
  cl.umaps(
      data,
      keys=["leiden", "HBD", "NEAT1", "IGKC"],
      ncol=2,
      size=1,
      color_high="red",
  ) + ggsize(900, 600)
  ```
  <img src="./assets/multi_umap.png" alt="multi" width="700">


pkgId: bfed9e7ab491cb7c3719a3349a8535bc4463c074fb90c73c8bb89a186d98e90f
name: python-cellmate-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for cellmate
url: https://github.com/yourusername/cellmate
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cellmate-0.1.0-1.src.rpm
location_href: Packages/python-cellmate-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  Ensure you have Python 3.8 or later installed on your system. Additionally, install the required dependencies:
  ```bash
  pip install openpyxl
  ```

  You can install `cellmate` via pip:
  ```bash
  pip install cellmate
  ```

  Here's an example of how to create a styled Excel workbook using `Cellmate`:
  ```python
  import cellmate as xl

  columns = [
      xl.Column(
          title="Product",
          content=["Apples", "Bananas", "Cherries"],
          title_style=xl.TITLE1,
          content_style=xl.DEFAULT
      ),
      xl.Column(
          title="Sales",
          content=["100", "200", "150"],
          title_style=xl.TITLE1,
          content_style=xl.Style(name="currency", number_format="$ #,##0.00")
      ),
      xl.Column(
          title="Growth",
          content=["0.05", "0.10", "0.07"],
          title_style=xl.TITLE1,
          content_style=xl.PERCENTAGE
      )
  ]

  sheet = xl.Sheet(data=columns, sheet_name="Summary")
  workbook = xl.Workbook(sheets=[sheet])

  workbook.save("example.xlsx")


pkgId: df124d38e2a2114f21f60c0b1331e93c7c361d08a8ec09f51120c8827628b3df
name: python-cellprofiler-core-nightly-help
arch: noarch
version: 5.0.0.dev192
epoch: 0
release: 1
summary: Development documents and examples for cellprofiler-core-nightly
url: https://cellprofiler.org/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cellprofiler-core-nightly-5.0.0.dev192-1.src.rpm
location_href: Packages/python-cellprofiler-core-nightly-help-5.0.0.dev192-1.noarch.rpm
checksum_type: sha256
description:
  This subpackage contains the code to build the `cellprofiler-core` package. It contains the critical classes and components required by the [CellProfiler](https://cellprofiler.org) software, whereas the [frontend](https://github.com/CellProfiler/CellProfiler/tree/main/src/frontend) contains non-essential modules and the GUI interface. This package can be used in isolation, separate from the frontend, to access CellProfiler's functionality as a Python package, see [this page](https://github.com/CellProfiler/CellProfiler/wiki/CellProfiler-as-a-Python-package) for more details.

rpm_license:
  The BSD 3-Clause License  Copyright © 2003 - 2021 Broad Institute, Inc. All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1.  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2.  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3.  Neither the name of the Broad Institute, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED “AS IS.”  BROAD MAKES NO EXPRESS OR IMPLIED REPRESENTATIONS OR WARRANTIES OF ANY KIND REGARDING THE SOFTWARE AND COPYRIGHT, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, CONFORMITY WITH ANY DOCUMENTATION, NON-INFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, WHETHER OR NOT DISCOVERABLE. IN NO EVENT SHALL BROAD, THE COPYRIGHT HOLDERS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF, HAVE REASON TO KNOW, OR IN FACT SHALL KNOW OF THE POSSIBILITY OF SUCH DAMAGE.  If, by operation of law or otherwise, any of the aforementioned warranty disclaimers are determined inapplicable, your sole remedy, regardless of the form of action, including, but not limited to, negligence and strict liability, shall be replacement of the software with an updated version if one exists.  Development of CellProfiler has been funded in whole or in part with federal funds from the National Institutes of Health, the National Science Foundation, and the Human Frontier Science Program.


pkgId: ffc3dcc5879c7664bdc4ee10ad2cca4e2eca790e826dc326ea9c9ae5d8513e60
name: python-cellprofiler-library-nightly-help
arch: noarch
version: 5.0.0.dev192
epoch: 0
release: 1
summary: Development documents and examples for cellprofiler-library-nightly
url: https://cellprofiler.org/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cellprofiler-library-nightly-5.0.0.dev192-1.src.rpm
location_href: Packages/python-cellprofiler-library-nightly-help-5.0.0.dev192-1.noarch.rpm
checksum_type: sha256
description:
  This subpackage contains the code to build the `cellprofiler-library` package. It contains the image processing modules required by the [CellProfiler](https://cellprofiler.org) software. Both the [core](https://github.com/CellProfiler/CellProfiler/tree/main/src/subpackages/core) subpackage, and the [frontend](https://github.com/CellProfiler/CellProfiler/tree/main/src/frontend) rely on this subpackage. This package can be used in isolation, separate from the `cellprofiler` and `cellprofiler-core` packages to access CellProfiler's image processing functionality as a Python package.

  It is currently a work under progress, and does not yet contain all or even most of CellProfiler's image processing capabilities.

rpm_license:
  The BSD 3-Clause License  Copyright © 2003 - 2021 Broad Institute, Inc. All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1.  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2.  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3.  Neither the name of the Broad Institute, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED “AS IS.”  BROAD MAKES NO EXPRESS OR IMPLIED REPRESENTATIONS OR WARRANTIES OF ANY KIND REGARDING THE SOFTWARE AND COPYRIGHT, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, CONFORMITY WITH ANY DOCUMENTATION, NON-INFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, WHETHER OR NOT DISCOVERABLE. IN NO EVENT SHALL BROAD, THE COPYRIGHT HOLDERS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF, HAVE REASON TO KNOW, OR IN FACT SHALL KNOW OF THE POSSIBILITY OF SUCH DAMAGE.  If, by operation of law or otherwise, any of the aforementioned warranty disclaimers are determined inapplicable, your sole remedy, regardless of the form of action, including, but not limited to, negligence and strict liability, shall be replacement of the software with an updated version if one exists.  Development of CellProfiler has been funded in whole or in part with federal funds from the National Institutes of Health, the National Science Foundation, and the Human Frontier Science Program.


pkgId: 17ae0814fb8e20a710b5475f5ee365a54ca1555db8b0cb53ae66bcf5c76ec67a
name: python-cellpy-help
arch: noarch
version: 1.0.1.post3
epoch: 0
release: 1
summary: Development documents and examples for cellpy
url: https://github.com/jepegit/cellpy
rpm_license: MIT license
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cellpy-1.0.1.post3-1.src.rpm
location_href: Packages/python-cellpy-help-1.0.1.post3-1.noarch.rpm
checksum_type: sha256
description:
  <img src="https://raw.githubusercontent.com/jepegit/cellpy/master/docs/_static/cellpy-icon-long.svg" height="100" alt="cellpy-icon">




  [![cellpy](https://img.shields.io/pypi/v/cellpy.svg)](https://pypi.python.org/pypi/cellpy)
  [![cellpy](https://readthedocs.org/projects/cellpy/badge/?version=latest)](https://cellpy.readthedocs.io/en/latest/?badge=latest)
  [![cellpy](https://static.pepy.tech/badge/cellpy)](https://pepy.tech/project/cellpy)

  This Python Package was developed to help the
  researchers at IFE, Norway, in their cumbersome task of
  interpreting and handling data from cycling tests of



  * Convert testing data into a common format
  * Summarize and compare data
  * Filter out the steps of interest
  * Process and plot the data
  * Do simple and advanced analysis on single datasets as well as collections of datasets
  * And more!



  The documentation for ``cellpy`` is hosted on [Read the Docs](https://cellpy.readthedocs.io).



  The easiest way to install ``cellpy`` is to install with conda or pip.

  With conda:

  ```
  conda install -c conda-forge cellpy
  ```

  Or if you prefer installing using pip:

  ```
  python -m pip install cellpy
  ```

  Have a look at the documentation for more detailed installation procedures, especially
  with respect to "difficult" dependencies when installing with pip.



  ``cellpy`` is free software made available under the MIT License.



  If you use ``cellpy`` in your work, please cite our paper:

  > Wind J., Ulvestad A., Abdelhamid M., MÃ¦hlen J.P. (2024). Cellpy â€“ an open-source library for processing and analysis of battery testing data. _Journal of Open Source Software, 9(97), 6236_.

  [![DOI](https://joss.theoj.org/papers/10.21105/joss.06236/status.svg)](https://doi.org/10.21105/joss.06236)



  Contributions are welcome, and they are greatly appreciated! Every
  little bit helps, and credit will always be given. If you want to contribute,
  please have a look at [Contributing Guidelines](CONTRIBUTING.md).






  * Utils: `example_data` now includes auto-download of example data
  * General: supports only python 3.10 and up to 3.11
  * Batch: `naked` and `init(empty=True)` easier method for creating batch with empty pages
  * File handling: new fix in `find_files`
  * Batch / Utils: refactored and updated `Collectors` (using `plotly`)
  * Batch: new summary plotter (using `plotly`)
  * Batch: new convenience function for automatically creating batch from batch-file if file exists.
  * Batch: added `mark` and `drop` methods
  * CLI: added possibility to use custom jupyter executable
  * Added checks (`c.has_xxx`) for checking if data has been processed correctly / fix errors in raw/semi-processed data.
  * Added possibility to filter on C-rates (`c.get_cycles`)
  * Added experimental feature `c.total_time_at_voltage_level` for calculating total time at low/high voltage
  * Added experimental instrument reader for neware xlsx files (hopefully not used much because it is very slow)
  * Added try-except block for ica post-processing step and add if-clause (suggested by Vajee)
  * Fixed several smaller bugs and improved some of the functionality (most notably in `c.get_cap`)
  * Added CI for macOS
  * Added conda package including `sqlalchemy-access`
  * Improved plotting tools
  * Improved documentation
  * Improved feedback from the CLI



  * Unit handling: new unit handling (using pint)
  * Unit handling: renaming summary headers
  * Unit handling: new cellpy-file-format version
  * Unit handling: tool for converting old to new format
  * Unit handling: parsing input parameters for units
  * Templates: using one repository with sub-folders
  * Templates: adding more documentation
  * File handling: allow for external raw files (ssh)
  * Readers: neware.txt (one version/model)
  * Readers: `arbin_sql7` (experimental, @jtgibson91)
  * Batch plotting: collectors for both data collection, plotting and saving
  * OCV-rlx: improvements of the OCV-rlx tools
  * Internals: rename main classes (`CellpyData` -> `CellpyCell`, `Cell` -> `Data`)
  * Internals: rename `.cell` property to `.data`
  * Internals: allow for only one `Data` object pr `CellpyCell` object
  * CLI: general improvements and bug fixes
  * CLI: move editing of db-file to the edit sub-command




  * Neware txt loader (supports one specific format only, other formats will have to wait for v.1.0)



  * Changed definition of Coulombic Difference (negative of previous)
  * Updated loaders with hooks and additional base class `TxtLoader` with configuration mechanism
  * Support for Maccor txt files
  * Supports only python 3.8 and up
  * Optional parameters through batch and pages
  * Several bug fixes and minor improvements / adjustments
  * Restrict use of instrument label to only one option
  * Fix bug in example file (@kevinsmia1939)



  * Updated documentations
  * CLI improvements
  * New argument for get_cap: `max_cycle`
  * Reverting from using Documents to user home for location of prm file in windows.
  * Easyplot by Amund
  * Arbin sql reader by Muhammad



  * Reading arbin .res files with auxiliary data should now work.
  * Many bugs have been removed - many new introduced.
  * Now on conda-forge (can be installed using conda).



  * Reading PEC files now updated and should work



  * New column names (lowercase and underscore)
  * New batch concatenating and plotting routines



  * Switching from git-flow to github-flow
  * New cli options for running batches
  * cli option for creating template notebooks
  * Using `ruamel.yaml` instead of `pyyaml`
  * Using `python-box` > 4
  * Several bug-fixes



  * Starting fixing documentation
  * TODO: create conda package
  * TODO: extensive tests



  * Refactoring - renaming from `dfsummary` to `summary`
  * Refactoring - renaming from `step_table` to `steps`
  * Refactoring - renaming from `dfdata` to `raw`
  * Refactoring - renaming `cellpy.data` to `cellpy.get`
  * Updated save and load cellpy files allowing for new naming
  * Implemented cellpy new and cellpy serve cli functionality



  * New batch-feature
  * Improved make-steps and make-summary functionality
  * Improved cmd-line interface for setup
  * More helper functions and tools
  * Experimental support for other instruments
  * invoke tasks for developers



  * Allow for using mdbtools also on win
  * Slightly faster find_files using cache and `fnmatch`
  * Bug fix: error in sorting files when using `pathlib` fixed



  * Improved creation of step tables (much faster)
  * Default compression on cellpy (hdf5) files
  * Bug fixes



  * Parameters can be set by dot-notation (`python-box`).
  * The parameter Instruments.cell_configuration is removed.
  * Options for getting voltage curves in different formats.
  * Fixed python 3.6 issues with Read the Docs.
  * Can now also be used on posix (the user must install `mdb_tools` first).
  * Improved logging allowing for custom log-directory.



  * No legacy python.



  * First release on PyPI.


pkgId: ce10d90190a66497e0876f65e639d581a162c7526167c2eb7cb55c387ffd45ae
name: python-cellstitch-cuda-help
arch: noarch
version: 1.0.0
epoch: 0
release: 1
summary: Development documents and examples for cellstitch-cuda
url: https://pypi.org/project/cellstitch-cuda/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cellstitch-cuda-1.0.0-1.src.rpm
location_href: Packages/python-cellstitch-cuda-help-1.0.0-1.noarch.rpm
checksum_type: sha256
description:
  ![cuda-version](https://img.shields.io/badge/CUDA-11.x%2C_12.x-instanseg)


  An overhaul of the CellStitch algorithm, developed by Yining Liu and Yinuo Jin ([original repository](https://github.com/imyiningliu/cellstitch)), publication can be found [here](https://doi.org/10.1186/s12859-023-05608-2).

  Some major adjustments:
  * Replaced NumPy with CuPy for GPU-accelerated calculations.
  * Replaced nested for-loops with vectorized calculations for dramatic speedups (~100x).
  * Included novel segmentation method InstanSeg, which enables multichannel inputs ([repo](https://github.com/instanseg/instanseg) and [publication](https://doi.org/10.1101/2024.09.04.611150)).
  * An all-in-one method that takes an ZCYX-formatted .tif file, performs the correct transposes, and writes stitched labels.
  * Included a histogram-based bleach correction to adjust for signal degradation over the Z-axis (originally developed for ImageJ in (Miura 2020) and released for Python by [marx-alex](https://github.com/marx-alex) in [napari-bleach-correct](https://github.com/marx-alex/napari-bleach-correct)).


  ![img-a](figures/cellstitch_img-a.svg)
  ![img-b](figures/cellstitch_img-b.svg)



  This setup has so far only been verified on Windows-based, CUDA-accelerated machines. Testing has only been performed on CUDA 12.x. There are no reasons why 11.x should not work (check instructions), but your mileage may vary.

  ```bash
  conda create -n cellstitch-instanseg python=3.9
  conda activate cellstitch-instanseg
  ```

  ```bash
  conda install git
  git clone https://github.com/Tomvl117/cellstitch-instanseg.git
  cd cellstitch-instanseg
  pip install -e .
  conda install pytorch pytorch-cuda=12.1 -c conda-forge -c pytorch -c nvidia
  ```
  You may replace the version number for `pytorch-cuda` with whatever is applicable for you.

  ```bash
  pip uninstall cupy-cuda12x
  pip install cupy-cuda11x
  ```


  ```python
  from cellstitch_cuda.pipeline import cellstitch_cuda

  img = "path/to/image.tif"


  3d_masks = cellstitch_cuda(img)
  ```

  ```python
  from cellstitch_cuda.pipeline import full_stitch



  3d_masks = full_stitch(xy_masks, yz_masks, xz_masks)
  ```


  Goldsborough, T., O’Callaghan, A., Inglis, F., Leplat, L., Filbey, A., Bilen, H., & Bankhead, P. (2024) A novel channel invariant architecture for the segmentation of cells and nuclei in multiplexed images using InstanSeg. bioRxiv, 2024.09.04.611150. doi: [10.1101/2024.09.04.611150](https://doi.org/10.1101/2024.09.04.611150)

  Liu, Y., Jin, Y., Azizi, E., & Blumberg, E. (2023) Cellstitch: 3D cellular anisotropic image segmentation via optimal transport. BMC Bioinformatics, 24(480). doi: [10.1186/s12859-023-05608-2](https://doi.org/10.1186/s12859-023-05608-2)

  Miura, K. (2020) Bleach correction ImageJ plugin for compensating the photobleaching of time-lapse sequences. F1000Res, 9:1494. doi: [10.12688/f1000research.27171.1](https://doi.org/10.12688/f1000research.27171.1)

  Stringer, C., Wang, T., Michaelos, M., & Pachitariu, M. (2021) Cellpose: a generalist algorithm for cellular segmentation. Nature Methods, 18(1), 100-106. doi: [10.1038/s41592-020-01018-x](https://doi.org/10.1038/s41592-020-01018-x)


pkgId: 013f02a3920e7d632ba17fd4490ef1f9be481f1fe321dcde3fc5d9e516540cb2
name: python-cellstitch-cuda-help
arch: noarch
version: 1.1.0
epoch: 0
release: 1
summary: Development documents and examples for cellstitch-cuda
url: https://github.com/Tomvl117/cellstitch-cuda
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cellstitch-cuda-1.1.0-1.src.rpm
location_href: Packages/python-cellstitch-cuda-help-1.1.0-1.noarch.rpm
checksum_type: sha256
description:
  ![cuda-version](https://img.shields.io/badge/CUDA-11.x%2C_12.x-instanseg)


  An overhaul of the CellStitch algorithm, developed by Yining Liu and Yinuo Jin ([original repository](https://github.com/imyiningliu/cellstitch)), publication can be found [here](https://doi.org/10.1186/s12859-023-05608-2).

  Some major adjustments:
  * Replaced NumPy with CuPy for GPU-accelerated calculations.
  * Replaced nested for-loops with vectorized calculations for dramatic speedups (~100x).
  * Included novel segmentation method InstanSeg, which enables multichannel inputs ([repo](https://github.com/instanseg/instanseg) and [publication](https://doi.org/10.1101/2024.09.04.611150)).
  * An all-in-one method that takes an ZCYX-formatted .tif file, performs the correct transposes, and writes stitched labels.
  * Included a histogram-based bleach correction to adjust for signal degradation over the Z-axis (originally developed for ImageJ in (Miura 2020) and released for Python by [marx-alex](https://github.com/marx-alex) in [napari-bleach-correct](https://github.com/marx-alex/napari-bleach-correct)).


  The calculations were run on the same machine (GPU: NVIDIA Quadro RTX 6000 24 GB; CPU: Intel Xeon Gold 6252 (48/96 cores); RAM: 1024 GB), the core count of which gave it a clear parallel-processing advantage. This particularly affects the `fill_holes_and_remove_small_masks` function, which has been rewritten to utilize parallel processing.
  ![img-a](figures/cellstitch_img-a.svg)

  In image A, GPU VRAM load was ~200 MB at its peak.

  ![img-b](figures/cellstitch_img-b.svg)

  In image B, GPU VRAM load was ~2442 MB at its peak



  This setup has so far only been verified on Windows-based, CUDA-accelerated machines. Testing has only been performed on CUDA 12.x. There are no reasons why 11.x should not work (check instructions), but your mileage may vary.

  ```bash
  conda create -n cellstitch-cuda python=3.11
  conda activate cellstitch-cuda
  ```

  ```bash
  pip install cellstitch-cuda
  pip uninstall torch
  conda install pytorch pytorch-cuda=12.4 -c conda-forge -c pytorch -c nvidia
  ```
  You may replace the version number for `pytorch-cuda` with whatever is applicable for you.

  ```bash
  pip uninstall cupy-cuda12x
  pip install cupy-cuda11x
  ```


  ```python
  from cellstitch_cuda.pipeline import cellstitch_cuda

  img = "path/to/image.tif"


  volumetric_masks = cellstitch_cuda(img)
  ```

  ```python
  from cellstitch_cuda.pipeline import full_stitch



  volumetric_masks = full_stitch(xy_masks, yz_masks, xz_masks)
  ```


  Goldsborough, T., O’Callaghan, A., Inglis, F., Leplat, L., Filbey, A., Bilen, H., & Bankhead, P. (2024) A novel channel invariant architecture for the segmentation of cells and nuclei in multiplexed images using InstanSeg. bioRxiv, 2024.09.04.611150. doi: [10.1101/2024.09.04.611150](https://doi.org/10.1101/2024.09.04.611150)

  Liu, Y., Jin, Y., Azizi, E., & Blumberg, E. (2023) Cellstitch: 3D cellular anisotropic image segmentation via optimal transport. BMC Bioinformatics, 24(480). doi: [10.1186/s12859-023-05608-2](https://doi.org/10.1186/s12859-023-05608-2)

  Miura, K. (2020) Bleach correction ImageJ plugin for compensating the photobleaching of time-lapse sequences. F1000Res, 9:1494. doi: [10.12688/f1000research.27171.1](https://doi.org/10.12688/f1000research.27171.1)

  Stringer, C., Wang, T., Michaelos, M., & Pachitariu, M. (2021) Cellpose: a generalist algorithm for cellular segmentation. Nature Methods, 18(1), 100-106. doi: [10.1038/s41592-020-01018-x](https://doi.org/10.1038/s41592-020-01018-x)


pkgId: 17227cd998047a38ce306947b4e5990659334d873b438c50ea8f854a95aebdf2
name: python-cenclave-help
arch: noarch
version: 1.0.0a6
epoch: 0
release: 1
summary: Development documents and examples for cenclave
url: https://pypi.org/project/cenclave/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cenclave-1.0.0a6-1.src.rpm
location_href: Packages/python-cenclave-help-1.0.0a6-1.noarch.rpm
checksum_type: sha256
description:
  Cosmian Enclave allows to easily run confidential Python web applications based on [Intel® SGX](https://www.intel.com/content/www/us/en/products/docs/accelerator-engines/software-guard-extensions.html) and [Gramine](https://gramine.readthedocs.io/en/latest/).
  Its features include the ability to encrypt the code and the construction of a [RATLS](https://arxiv.org/pdf/1801.05863) channel with your enclave.

  Read [Cosmian Enclave documentation](https://docs.cosmian.com/compute/cosmian_enclave/overview/) for more details.



  ```console
  $ pip install cenclave
  ```



  ```console
  $ cenclave -h
  ```

  Note: if you set the env variable `BACKTRACE=full`, a Python stacktrace will be printed in case of errors.



  __User__: the code provider

  ```console
  $ cenclave scaffold example
  ```



  __User__: the code provider

  ```console
  $ cenclave localtest --project example/
  ```



  __User__: the code provider

  ```console
  $ cenclave package --project example/ \
                     --output workspace/code_provider
  ```

  The generated package can now be sent to the sgx operator.



  __User__: the SGX operator

  ```console
  $ cenclave spawn --host 127.0.0.1 \
                   --port 9999 \
                   --size 4096 \
                   --package workspace/code_provider/package_cenclave_src_1683276327723953661.tar \
                   --output workspace/sgx_operator/ \
                   app_name
  ```

  At this moment, evidences have been automatically collected and the web application is up.

  Evidences are essential for the code provider to verify the trustworthiness of the running application.

  The file `workspace/sgx_operator/evidence.json` can now be shared with the other participants.



  __User__: the code provider

  The trustworthiness is established based on multiple information:

  - the full code package (tarball)
  - the arguments used to spawn the web app
  - evidences captured from the enclave

  Verification of the enclave information:

  ```console
  $ cenclave verify --package workspace/code_provider/package_cenclave_src_1683276327723953661.tar \
                    --evidence output/evidence.json \
                    --output /tmp
  ```

  If the verification succeeds, you get the RA-TLS certificate (written as a file named `ratls.pem`) and you can now seal
  the code key to share it with the SGX operator.



  __User__: the code provider

  ```console
  $ cenclave seal --secrets example/secrets_to_seal.json \
                  --cert /tmp/ratls.pem \
                  --output workspace/code_provider/
  ```



  __User__: the SGX operator

  ```console
  $ cenclave run --sealed-secrets workspace/code_provider/secrets_to_seal.json.sealed \
                 app_name
  ```



  __User__: the SGX operator

  ```console
  $ cenclave test --test workspace/sgx_operator/tests/ \
                  --config workspace/sgx_operator/config.toml \
                  app_name
  ```



  __User__: the code provider

  Assume the SGX operator gets a result as follows: `curl https://localhost:7788/result --cacert /tmp/ratls.pem >
  result.enc`

  Then, the code provider can decrypt the result as follows:

  ```console
  $ cenclave decrypt --key key.txt \
                     --output workspace/code_provider/result.plain \
                     result.enc
  $ cat workspace/code_provider/result.plain
  ```



  __User__: the SGX operator

  You can stop and remove the container as follows:

  ```console
  $ cenclave stop [--remove] <app_name>
  ```

  You can restart a stopped and not removed containers as follows:

  ```console
  $ cenclave restart <app_name>
  ```

  You can get the Cosmian Enclave container logs as follows:

  ```console
  $ cenclave logs <app_name>
  ```

  You can get the Cosmian Enclave docker status as follows:

  ```console
  $ cenclave status <app_name>
  ```

  You can get the list of running Cosmian Enclave containers:

  ```console
  $ cenclave list
  ```


pkgId: 9222ff9b088b268a9a291e978d1ee6b48c55dadcfa19075f245791c84ff9d763
name: python-cenclave-lib-sgx-help
arch: noarch
version: 1.1.0
epoch: 0
release: 1
summary: Development documents and examples for cenclave-lib-sgx
url: https://pypi.org/project/cenclave-lib-sgx/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cenclave-lib-sgx-1.1.0-1.src.rpm
location_href: Packages/python-cenclave-lib-sgx-help-1.1.0-1.noarch.rpm
checksum_type: sha256
description:
  Cosmian Enclave lib SGX bootstraps the execution of an encrypted ASGI/WSGI Python web application for [Gramine](https://gramine.readthedocs.io/).

  The library is responsible for:

  - Configuring the SSL certificates with either:
    - *RA-TLS*, a self-signed certificate including the Intel SGX quote in an X.509 v3 extension
    - *Custom*, the private key and full keychain is provided by the application owner
    - *No SSL*, the secure channel may be managed elsewhere by an SSL proxy
  - Decrypting Python modules encrypted with XSala20-Poly1305 AE
  - Running the ASGI/WSGI Python web application with [hypercorn](https://pgjones.gitlab.io/hypercorn/)



  The flow to run an encrypted Python web application is the following:

  1. A first self-signed HTTPS server using RA-TLS is launched waiting to receive a JSON payload with:
     - UUID, a unique application identifier provided to `enclave-bootstrap` as an argument
     - the decryption key of the code
     - Optionally the private key corresponding to the certificate provided to `enclave-bootstrap` (for *Custom* certificate)
  2. If the UUID and decryption key are the expected one, the configuration server is stopped, the code is decrypted and finally run as a new server




  ```console
  $ pip install cenclave-lib-sgx
  ```



  ```console
  $ cenclave-bootstrap --help
  usage: cenclave-bootstrap [-h] [--host HOST] [--client-certificate CLIENT_CERTIFICATE] [--port PORT]
                            [--subject SUBJECT] [--san SAN] --app-dir APP_DIR --id ID [--timeout TIMEOUT]
                            [--version] [--debug]
                            (--ratls EXPIRATION_DATE | --no-ssl | --certificate CERTIFICATE_PATH)
                            application

  Bootstrap ASGI/WSGI Python web application for Gramine

  positional arguments:
    application           ASGI application path (as module:app)

  options:
    -h, --help            show this help message and exit
    --host HOST           hostname of the server
    --client-certificate CLIENT_CERTIFICATE
                          For client certificate authentication (PEM encoded)
    --port PORT           port of the server
    --subject SUBJECT     Subject as RFC 4514 string for the RA-TLS certificate
    --san SAN             Subject Alternative Name in the RA-TLS certificate
    --app-dir APP_DIR     path of the python web application
    --id ID               identifier of the application as UUID in RFC 4122
    --timeout TIMEOUT     seconds before closing the configuration server
    --version             show program's version number and exit
    --debug               debug mode with more logging
    --ratls EXPIRATION_DATE
                          generate a self-signed certificate for RA-TLS with a specific expiration date (Unix time)
    --no-ssl              use HTTP without SSL
    --certificate CERTIFICATE_PATH
                          custom certificate used for the SSL connection, private key must be sent through the
                          configuration server
  ```


pkgId: b26eed6723eb83e7b23103e4ebfdbec2f0472316b8a6b9306fb821fc9924f092
name: python-centraal-client-flow-help
arch: noarch
version: 0.1.14
epoch: 0
release: 1
summary: Development documents and examples for centraal-client-flow
url: https://github.com/centraal-api/centraal-client-flow
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-centraal-client-flow-0.1.14-1.src.rpm
location_href: Packages/python-centraal-client-flow-help-0.1.14-1.noarch.rpm
checksum_type: sha256
description:
  <a href="https://pypi.python.org/pypi/centraal_client_flow">
      <img src="https://img.shields.io/pypi/v/centraal_client_flow.svg"
          alt = "Release Status">
  </a>

  <a href="https://github.com/centraal-api/centraal-client-flow/actions">
      <img src="https://github.com/centraal-api/centraal-client-flow/actions/workflows/dev.yml/badge.svg?branch=release" alt="CI Status">
  </a>

  <a href="https://centraal-api.github.io/centraal-client-flow/">
      <img src="https://img.shields.io/website/https/centraal-api.github.io/centraal-client-flow/index.html.svg?label=docs&down_message=unavailable&up_message=available" alt="Documentation Status">
  </a>


  `centraal-client-flow` es una librería de Python diseñada para facilitar la implementación de una una solución basada en eventos para la sincronización y consistencia de datos entre sistemas distribuidos de clientes utilizando Azure. Esta librería proporciona herramientas para manejar eventos, aplicar reglas de procesamiento, integrar con sistemas externos y mantener un esquema unificado de clientes.



  `Centraal-Cliente-Flow` facilita la implementación de arquitecturas de sincronización de datos en Azure, proporcionando una base sólida para manejar eventos en tiempo real, reglas de negocio, integración con APIs externas y mantenimiento de un log de auditoría.



  La arquitectura está diseñada para unificar la información de los clientes alrededor de un identificador único, asegurando la consistencia de los datos a través de los siguientes componentes clave:

  - **Eventos**: Gestionados por Azure Functions para manejar eventos entrantes en tiempo real y operaciones periódicas de extracción de datos.
  - **Reglas**: Implementan la lógica de procesamiento de eventos para actualizar un esquema unificado de clientes.
  - **Reglas de Integración**: Sincronizan las actualizaciones del esquema unificado con sistemas externos a través de APIs REST.
  - **Esquema Unificado**: Modelo de datos centralizado que asegura consistencia y escalabilidad en la información de los clientes.
  - **Log de Auditoría**: Registra todas las actualizaciones del esquema unificado para asegurar trazabilidad.
  - **Uso de Pydantic**: La libreria hace uso extensivo e incentiva que cada intercambio de datos este mediado por modelos [Pydantic](https://docs.pydantic.dev/latest/), ya de esta manera se asegura calidad y reglas de negocio.

  ```
                  Evento
                    ^
                    |
                    v
  +------------------------------+
  |   Receiver/Timer Function     |
  |  (Valida y envía a la cola    |
  |   usando Pydantic)            |
  +------------------------------+
              |
              |
           [P]-EventoBase(IdModel)
              |
              v
  +------------------------------+
  |   Azure Service Bus Queue     |
  |  (Ordena eventos por          |
  |   Session ID)                 |
  +------------------------------+
              |
              v
  +---------------------------------------+
  |  Processor Function                   |
  |  Reglas de Actualización              |
  |  (Actualiza esquema y log de          |
  |   auditoría usando Pydantic,          |
  |   Publica actualizaciones)            |
  +---------------------------------------+
              |                   |
              |                   |
           [P]-EntradaEsquemaUnificado
      [P] - AuditoriaEntry        |
              |                   |
              v                   v
  +-----------------------+   +-------------------------+
  |     Cosmos DB         |   |  Azure Service Bus      |
  | (Esquema Unificado y  |   |         Topic           |
  |  Log de Auditoría)    |   |                         |
  +-----------------------+   +-------------------------+
              |                           |
              |                           |
        [P]-AuditoriaEntry                |
              |                           |
              v                           v
  +-----------------------+   +-------------------------+
  | Log de Auditoría en   |   | Integration Function    |
  | Cosmos DB             |   | Reglas  y Estrategias   |
  | (Registra cambios)    |   | de Integración          |
  +-----------------------+   |                         |
                              |                         |
                              +-------------------------+
                                         |
                                   [P]-BaseModel
                                         |
                                         v
                              +-------------------------+
                              |    Sistemas Externos    |
                              | (Reciben actualizaciones|
                              |  a través de APIs REST) |
                              +-------------------------+

  ```





  - **Receiver Functions**: Manejan eventos entrantes en tiempo real. Implementadas en el módulo `receiver.py` utilizando clases como `EventFunctionBuilder`.
  - **Timer Functions**: Ejecutan tareas periódicas para extraer información de sistemas externos, definidas en `timer.py` usando `TimerFunctionBuilder`.



  Las reglas para actualizar el esquema unificado de clientes se implementan usando `UpdateProcessor` y `RuleProcessor`, que permiten procesar y aplicar reglas específicas a los eventos entrantes.



  Se implementan en `strategy.py` usando la clase `RESTIntegration`, que permite la sincronización de datos con APIs REST externas.



  Definido en `schemas.py`, utiliza modelos Pydantic para asegurar la validación y consistencia de datos. Los modelos incluyen `IDModel`, `EntradaEsquemaUnificado`, y otros sub-esquemas específicos.



  Para asegurar la trazabilidad de las actualizaciones, todos los cambios en los sub-esquemas se registran en una colección de auditoría en Cosmos DB.





  Asegúrate de tener configuradas las variables de entorno necesarias para las conexiones a Cosmos DB y Azure Service Bus.

  ```python
  import os

  os.environ["COSMOS_CONN"] = "<tu_cosmos_db_connection_string>"
  os.environ["DATABASE"] = "<tu_database_name>"
  os.environ["BUS_CONN"] = "<tu_service_bus_connection_string>"
  ```





  Utiliza el siguiente ejemplo para registrar funciones receptoras y de temporización.

  ```python
  from azure.functions import FunctionApp
  from centraal_client_flow.receiver import Recieve
  from centraal_client_flow.timer import Pull

  app = FunctionApp()


  receiver = Recieve(event_source="source_name", queue_name="queue_name", service_bus_client=service_bus_client_instance)
  receiver.register_function(app, processor=event_processor_instance, event_model=event_model_instance)


  pull = Pull(schedule="0 */5 * * * *", event_source="source_name", queue_name="queue_name", service_bus_client=service_bus_client_instance)
  pull.register_function(app, processor=pull_processor_instance)
  ```



  ```python
  from azure.functions import FunctionApp
  from update_rules import bp_update_rules

  app = FunctionApp()
  app.register_functions(bp_update_rules)
  ```



  ```python
  from azure.functions import FunctionApp
  from integration_rules import bp_int_rules

  app = FunctionApp()
  app.register_functions(bp_int_rules)
  ```



  Define los modelos de datos utilizando Pydantic para asegurar la validación de datos entrantes.

  ```python
  from pydantic import BaseModel, EmailStr

  class EventoEjemplo(BaseModel):
      id: int
      nombre: str
      email: EmailStr
  ```

  Implementa procesadores para manejar la lógica de actualización de acuerdo con las reglas de negocio.

  ```python
  from centraal_client_flow.rules.update import UpdateProcessor
  from modelos import EventoEjemplo

  class EjemploProcessor(UpdateProcessor):
      def process_message(self, event: EventoEjemplo, current_registro=None):
          
          pass
  ```



  Asegúrate de que todas las dependencias estén instaladas y ejecuta la aplicación utilizando un servidor de funciones de Azure.

  ```bash
  func start
  ```



  Las [contribuciones](./CONTRIBUTING.md) son bienvenidas. Por favor, abre un issue o un pull request en el repositorio para discutir cualquier cambio.

  * Free software: Apache-2.0
  * Documentation: <https://centraal-api.github.io/centraal_client_flow/>




  This package was created with the [ppw](https://zillionare.github.io/python-project-wizard) tool. For more information, please visit the [project page](https://zillionare.github.io/python-project-wizard/).


pkgId: d762d30a2963cd2e3b17b82a2d1ca139aa748a7ad36d845c5b41427ddd7adde9
name: python-centralcli-help
arch: noarch
version: 8.0.1
epoch: 0
release: 1
summary: Development documents and examples for centralcli
url: https://github.com/Pack3tL0ss/central-api-cli
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-centralcli-8.0.1-1.src.rpm
location_href: Packages/python-centralcli-help-8.0.1-1.noarch.rpm
checksum_type: sha256
description:
  [![Latest Version](https://img.shields.io/pypi/v/centralcli.svg)](https://pypi.org/project/centralcli)
  [![Documentation Status](https://readthedocs.org/projects/central-api-cli/badge/?version=latest)](https://central-api-cli.readthedocs.io/en/latest/?badge=latest)
  [![Downloads](https://static.pepy.tech/badge/centralcli)](https://pepy.tech/project/centralcli)
  [![PyPI - Installs](https://img.shields.io/pypi/dm/centralcli.svg?color=blue&label=Installs&logo=pypi&logoColor=gold)](https://pypi.org/project/centralcli/)
  [![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)

  A CLI app for interacting with Aruba Central Cloud Management Platform. With cross-platform shell support. Auto Completion, easy device/site/group/template identification (fuzzy match), support for batch import, and a lot more.

    > As commands are built out the CLI hierarchy may evolve.  Refer to the [documentation](https://central-api-cli.readthedocs.org) or help text for CLI structure/syntax.

  ![centralcli Animated Demo](https://raw.githubusercontent.com/Pack3tL0ss/central-api-cli/master/docs/img/cencli-demo.gif)


  When running with Python 3.12 it's possible to see a number of SyntaxWarning messages regarding "invaslid escape sequence".  This is due to a change in behavior in 3.12.  This will be resolved in an upcoming release.  The warnings do not impact functionality.



  - Cross Platform Support
  - Auto/TAB Completion
  - Specify device, site, etc. by fuzzy match of multiple fields (i.e. name, mac, serial#, ip address)
  - Multiple output formats
  - Output to file
  - Numerous import formats (csv, yaml, json, etc.)
  - Multiple account support (easily switch between different central accounts `--account myotheraccount`)
  - Batch Operation based on data from input file.  i.e. Add sites in batch based on data from a csv.
  - Automatic Token refresh.  With prompt to paste in a new token if it becomes invalid.
    > If using Tokens, dedicate the token to the CLI alone, using it in swagger or on another system, will eventually lead to a refresh that invalidates the tokens on the other systems using it.
  - You can also use username/Password Auth. which will facilitate automatic retrieval of new Tokens even if they do become invalid.



  The recommended method is to use uv, which is a single Rust binary that you can use to install Python apps. It's significantly faster than alternative tools, and will get you up and running with Posting in seconds.  `uv` will install `centralcli` in an isolated environment and expose the `cencli` command in PATH.

  You don't even need to worry about installing Python yourself - uv will manage everything for you.



  ```bash

  curl -LsSf https://astral.sh/uv/install.sh | sh
  ```


  ```bash

  powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  ```
  > Changing the execution policy allows running a script from the internet.

  `uv` can also be installed via Homebrew, Cargo, Winget, pipx, and more. See the [installation guide](https://docs.astral.sh/uv/getting-started/installation/) for more information.



  ```bash

  uv tool install --python 3.11 centralcli
  ```

  Then to Upgrade `centralcli`
  ```bash
  uv tool upgrade centralcli
  ```


  `centralcli` can also be installed via pipx, similar to `uv` pipx will install `centralcli` in an isolated environment, and expose the `cencli` command in PATH.

  > The first section below is for Debian based systems refer to [pipx documentation](https://pipx.pypa.io/stable/installation/) for instructions on other OSs.
    ```bash
    
    sudo apt update
    sudo apt install pipx
    pipx ensurepath

    
    pipx install centralcli --include-deps

    
    pipx install centralcli[speedups] --force  # force if centralcli was already installed and you are just adding speedups
    ```

  Then to Upgrade `centralcli`
  ```bash
  pip upgrade centralcli
  ```



  > The example below is for Debian based systems, where `apt` is referenced but should be easy to translate to other OSs given you have some familiarity with the package management commands (i.e. `dnf`).  On Windows python should install with pip.  The pip commands are still valid.
    ```shell
    
    sudo apt update
    sudo apt install python3-pip
    sudo apt install python3-virtualenv

    
    cd ~                                              # ensure you are in your home dir
    mkdir .venvs                                      # creates hidden .venvs dir to store venv in
    cd .venvs                                         # change to that directory
    export DEB_PYTHON_INSTALL_LAYOUT='deb'            # Just ensures the directory structure for simpler instructions (Ubuntu 22.04 changed the dir layout of venvs without it)
    python3 -m virtualenv centralcli --prompt cencli  # prompt is optional
    source centralcli/bin/activate                    # activates the venv

    
    pip install centralcli

    
    pip install centralcli[speedups]

    which centralcli # Should return ~/.venvs/centralcli/bin/centralcli

    
    echo 'export PATH="$PATH:$HOME/.venvs/centralcli/bin"' >> ~/.bashrc

    
    ```

    Then to upgrade:
  ```bash
  ~/.venvs/centralcli/bin/pip install -U centralcli
  ```


  [Requires python3.9 or above and pip.](#if-you-dont-have-python)

  It's recommended to use the `uv` install method above, however if you don't use a lot of python apps (meaning a dependency conflict with other apps is not a concern).  Then simply installing via pip is possible (*albeit not recommended*).
  > This method is primarily feasible on Windows, as current versions of many Linux distributions do not allow installing apps in the system python environment.


  ```bash
  pip install centralcli


  pip install centralcli[speedups]
  ```

  Then to upgrade:
  ```bash
  pip install -U centralcli
  ```



  - You can get it for any platform @ [https://www.python.org](https://www.python.org)
  - On Windows 10 it's also available in the Windows store, and via winget.


  ✨ pre-populating the config as described below is optional.  Central CLI will prompt for the information it needs on first run if no config exists.
  > It's still a good idea to look over the example config to see the optional config items.

  Refer to [config.yaml.example](https://github.com/Pack3tL0ss/central-api-cli/blob/master/config/config.yaml.example) to guide in the creation of config.yaml and place in the config directory.

  Central CLI will look in \<Users home dir\>/.config/centralcli, and \<Users home dir\>\\.centralcli.
  i.e. on Windows `c:\Users\wade\.centralcli` or on Linux `/home/wade/.config/centralcli`

  Once `config.yaml` is populated per [config.yaml.example](https://github.com/Pack3tL0ss/central-api-cli/blob/master/config/config.yaml.example), run some test commands to validate the config.

  For Example `cencli show all`

  ```bash
  wade@wellswa6:~ $ cencli show all
                                                                                         All Devices
   ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    name                  type   model                            ip                mac                 serial       group          site             labels        version       status
   ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    6100F-48-LAB          cx     6100 48G CL4 4SFP+ Swch          10.0.40.11        --redacted--   --redacted--    WadeLab8x                                     10.08.1010       Down
                                 (JL675A)
    SDBranch1:7008        gw     A7008                            192.168.240.101   --redacted--   --redacted--    Branch1        Antigua          Branch View   10.3.0.0_82528   Up
    br1-2930F-sw          sw     Aruba2930F-8G-PoE+-2SFP+         10.101.5.4        --redacted--   --redacted--    Branch1        Antigua          Branch View   16.11.0002       Up
                                 Switch(JL258A)
    br1-315.0c88-ap       ap     315                              10.101.6.200      --redacted--   --redacted--    Branch1        Antigua          Branch View   10.3.0.0_82528   Up
    MB1-505h              ap     505H                             10.10.1.101       --redacted--   --redacted--    MicroBranch1   Champions Hill                 10.3.0.0_82528   Up
    6200F-Bot             cx     6200F 48G CL4 4SFP+740W Swch     10.0.40.16        --redacted--   --redacted--    WadeLab8x      Pommore                        10.08.1010       Down
                                 (JL728A)
    6200F-Top             cx     6200F 48G CL4 4SFP+740W Swch     10.0.40.6         --redacted--   --redacted--    WadeLab8x      Pommore                        10.08.1010       Down
                                 (JL728A)
    APGW1                 gw     A9004-LTE                        10.0.35.10        --redacted--   --redacted--    WLNET          WadeLab                        10.3.0.0_82528   Up
    APGW2                 gw     A9004                            10.0.35.20        --redacted--   --redacted--    WLNET          WadeLab                        10.3.0.0_82528   Up
    VPNC1                 gw     A7005                            172.30.0.242      --redacted--   --redacted--    VPNC           WadeLab          Branch View   10.3.0.0_82528   Up
    VPNC2                 gw     A7005                            172.30.0.243      --redacted--   --redacted--    VPNC           WadeLab          Branch View   10.3.0.0_82528   Up
    av-555.11b8-ap        ap     555                              10.0.31.155       --redacted--   --redacted--    WLNET          WadeLab                        10.3.0.0_82463   Down
    barn-303p.2c30-ap     ap     303P                             10.1.30.151       --redacted--   --redacted--    WLNET          WadeLab                        10.3.0.0_82528   Up
    barn-4100i            cx     4100i 12G CL4/6 POE 2SFP+ DIN    10.1.30.152       --redacted--   --redacted--    WadeLab        WadeLab                        10.08.1010       Up
                                 Sw (JL817A)
    barn-518.2816-ap      ap     518                              10.1.30.101       --redacted--   --redacted--    WLNET          WadeLab                        10.3.0.0_82528   Up
    bsmt-515.51s9-ap      ap     515                              10.0.30.233       --redacted--   --redacted--    WLNET          WadeLab                        10.3.0.0_82463   Down
    craft-2930F           sw     Aruba2930F-8G-PoE+-2SFP+         10.0.30.5         --redacted--   --redacted--    WadeLab        WadeLab                        16.11.0002       Up
                                 Switch(JL258A)
    garage-345.5136-ap    ap     345                              10.0.31.148       --redacted--   --redacted--    WLNET          WadeLab                        10.3.0.0_82463   Down
    ktcn-505H.206c-ap     ap     505H                             10.0.30.212       --redacted--   --redacted--    WLNET          WadeLab                        10.3.0.0_82463   Down
    lwrptio-575.0824-ap   ap     575                              10.0.30.219       --redacted--   --redacted--    WLNET          WadeLab                        10.3.0.0_82463   Down
    zrm-535.70be-ap       ap     535                              10.0.31.101       --redacted--   --redacted--    WLNET          WadeLab                        10.3.0.0_82463   Down
   ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    Show all displays fields common to all device types. To see all columns for a given device type use show <DEVICE TYPE>
    API Rate Limit: 925 of 1000 remaining.

  ```

  Use `cencli ?` to become familiar with the command options.



  The CLI supports auto-completion.  To configure auto-completion run `cencli --install-completion`.  This will auto-detect the type of shell you are running in, and install the necessary completion into your profile.  You'll need to exit the shell and start a new session for it to take effect.
  > Note for OSX 11: Additional step, edit .zshrc and add "autoload -Uz compinit && compinit -i" then exit and start new session.





  - Caching: The CLI caches information on all devices, sites, groups and templates along with some other items.  It's a minimal amount per device, and is done to allow human friendly identifiers.  The API typically accepts serial #, site id, etc.  This function allows you to specify a device by name, IP, mac (any format), and serial.

  The lookup sequence for a device:

    1. Exact Match of any of the identifier fields (name, ip, mac, serial)
    2. case insensitive match
    3. case insensitive match disregarding all hyphens and underscores (in case you type 6200f_bot and the device name is 6200F-Bot)
    4. Case insensitive Fuzzy match with implied wild-card, otherwise match any devices that start with the identifier provided. `cencli show switches 6200F` will result in a match of `6200F-Bot`.
    5. If a typo was made, and an item is a close match, you will be prompted to confirm that's what you meant.

  > If there is no match found, a cache update is triggered, and the match rules are re-tried.

  - Caching works in a similar manner for groups, templates, and sites.  Sites can match on name and nearly any address field.  So if you only had one site in San Antonio you could specify that site with `show sites 'San Antonio'`  \<-- Note the use of quotes because there is a space in the name.

  - **Multiple Matches**:  If a provided identifier is ambiguous, meaning there are multiple matches.  You will be prompted to select the intended device from a list of the matches.



  There are a number of output formats available.  Most commands default to what is likely the easiest to view given the number of fields.  Otherwise longer outputs are typically displayed vertically by default.  If the output can reasonably fit, it's displayed in tabular format horizontally.

  You can specify the output format with command line flags `--json`, `--yaml`, `--csv`, `--table`  rich is tabular format with folding (multi line within the same row) and truncating.

  > Most outputs will evolve to support an output with the most commonly desired fields by default and expanded vertical output via the `-v` option (not implemented yet.).  Currently the output is tabular horizontally if the amount of data is likely to fit most displays, and vertical otherwise.



  Just use `--out \<filename\>` (or \<path\\filename\>), and specify the desired format.



  Use `?` or `--help` from the cli, which you can do at any level.  `ccenli ?`, `cencli bounce --help` etc.

  You can also see the entire supported tree via the [CLI Reference Guide](https://central-api-cli.readthedocs.io/en/latest/cli.html).
  *NOTE: The Reference Guide documents a few commands that are hidden in the CLI*


pkgId: bbc5ff380e56938896de0fa473672e6da0f9a185c91108e4083bb14882600df2
name: python-centrosome-debuginfo
arch: aarch64
version: 1.3.0
epoch: 0
release: 1
summary: Debug information for package python-centrosome
url: https://github.com/CellProfiler/centrosome
rpm_license: BSD
rpm_group: Development/Debug
rpm_buildhost: localhost
rpm_sourcerpm: python-centrosome-1.3.0-1.src.rpm
location_href: Packages/python-centrosome-debuginfo-1.3.0-1.aarch64.rpm
checksum_type: sha256
description:
  This package provides debug information for package python-centrosome.
  Debug information is useful when developing applications that use this
  package or when debugging this package.


pkgId: 9ee4275c905eb8bca4f710fac4528a9a7c5dbd1b065a3ab8bf8632a5e0e65c77
name: python-centrosome-debugsource
arch: aarch64
version: 1.3.0
epoch: 0
release: 1
summary: Debug sources for package python-centrosome
url: https://github.com/CellProfiler/centrosome
rpm_license: BSD
rpm_group: Development/Debug
rpm_buildhost: localhost
rpm_sourcerpm: python-centrosome-1.3.0-1.src.rpm
location_href: Packages/python-centrosome-debugsource-1.3.0-1.aarch64.rpm
checksum_type: sha256
description:
  This package provides debug sources for package python-centrosome.
  Debug sources are useful when developing applications that use this
  package or when debugging this package.


pkgId: 9276274e406b687bf7ab503de17b11a5339533afa5fd2ea379800e6a3582ce4c
name: python-ceo-py-help
arch: noarch
version: 0.8.3rc0
epoch: 0
release: 1
summary: Development documents and examples for ceo-py
url: https://github.com/vortezwohl/CEO
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ceo-py-0.8.3rc0-1.src.rpm
location_href: Packages/python-ceo-py-help-0.8.3rc0-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">
      <p>
          <img src="https://github.com/vortezwohl/CEO/releases/download/icon/ceo-icon-inv.png" alt="CEO" height="105">
      </p>
      <p style="font-weight: 200; font-size: 19px">
          An Intuitive and Modular AI Agent Framework for Task Automation
      </p>
  </div>

  <h5></br></h5>



  - From [PYPI](https://pypi.org/project/ceo-py/)

      ```shell
      pip install ceo-py
      ```

  - From [Github](https://github.com/vortezwohl/CEO/releases)

      Download .whl first then run

      ```shell
      pip install ./ceo_py-x.x.x-py3-none-any.whl
      ```



  If you are incorporating the `CEO` framework into your research, please remember to properly **cite** it to acknowledge its contribution to your work.

  Если вы интегрируете фреймворк `CEO` в своё исследование, пожалуйста, не забудьте правильно сослаться на него, указывая его вклад в вашу работу.

  もしあなたが研究に `CEO` フレームワークを組み入れているなら、その貢献を認めるために適切に引用することを忘れないでください.

  如果您正在將 `CEO` 框架整合到您的研究中，請記得正確引用它，以聲明它對您工作的貢獻.

  ```latex
  @software {CEO,
  author = {Zihao Wu},
  title = {CEO: An Intuitive and Modular AI Agent Framework for Task Automation},
  publisher = {Github},
  howpublished = {\url{https://github.com/vortezwohl/CEO}},
  year = {2024},
  date = {2024-10-25}
  }
  ```



  To start building your own agent, follow the steps listed.

  1. set environmental variable `OPENAI_API_KEY`

      ```
      
      OPENAI_API_KEY=sk-...
      ```

  2. bring in SDKs from `CEO`

      - `Agent` lets you instantiate an agent.

      - `Personality` is an enumeration class used for customizing personalities of agents.

          - `Personality.PRUDENT` makes the agent's behavior more cautious.

          - `Personality.INQUISITIVE` encourages the agent to be more proactive in trying and exploring.

      - `get_openai_model` gives you a `BaseChatModel` as thought engine.

      - `@ability(brain: BaseChatModel)` is a decorator which lets you declare a function as an `Ability`.

      - `@agentic(agent: Agent)` is a decorator which lets you declare a function as an `AgenticAbility`.

      ```python
      from ceo import (
          Agent,
          Personality,
          get_openai_model,
          ability,
          agentic
      )
      ```

  3. declare functions as basic abilities

      ```python
      @ability
      def calculator(expr: str) -> float:
          
          return simplify(expr)

      @ability
      def write_file(filename: str, content: str) -> str:
          with open(filename, 'w', encoding='utf-8') as f:
              f.write(content)
          return f'{content} written to {filename}.'
      ```

  4. instantiate an agent

      You can grant abilities to agents while instantiating them.

      ```python
      model = get_openai_model()
      agent = Agent(abilities=[calculator, write_file], brain=model, name='CEO', personality=Personality.INQUISITIVE)
      ```

      - You can also grant more abilities to agents later:

          ```python
          agent.grant_ability(calculator)
          ```

          or

          ```python
          agent.grant_abilities([calculator])
          ```

      - To deprive abilities:

          ```python
          agent.deprive_ability(calculator)
          ```

          or

          ```python
          agent.deprive_abilities([calculator])
          ```

      You can change an agent's personality using method `change_personality(personality: Personality)`

      ```python
      agent.change_personality(Personality.PRUDENT)
      ```

  5. assign a query to your agent

      ```python
      agent.assign("Here is a sphere with radius of (1 * 9.5 / 2 * 2) cm and pi here is 3.14159, find the area and volume respectively then write the results into a file called 'result.txt'.")
      ```

  6. leave the rest to your agent

      ```python
      response = agent.just_do_it()
      print(response)
      ```

  > `ceo` also supports multi-agent collaboration scenario, declare a function as agent calling ability with `@agentic(agent: Agent)`, then grant it to an agent. [See example](#multi-agent).




  - ### Compound Tasks

      1. Find the surface area and volume of a sphere and write the results into a file.

          ```python
          import logging

          from ceo import (
              Agent,
              Personality,
              get_openai_model,
              ability
          )
          from sympy import simplify
          from dotenv import load_dotenv

          load_dotenv()
          logging.getLogger('ceo').setLevel(logging.DEBUG)


          @ability
          def calculator(expr: str) -> float:
              
              return simplify(expr)


          @ability
          def write_file(filename: str, content: str) -> str:
              with open(filename, 'w', encoding='utf-8') as f:
                  f.write(content)
              return f'{content} written to {filename}.'


          if __name__ == '__main__':
              ceo = Agent(abilities=[calculator, write_file], brain=get_openai_model(), name='CEO', personality=Personality.INQUISITIVE)
              ceo.assign("Here is a sphere with radius of (1 * 9.5 / 2 * 2) cm and pi here is 3.14159, find the area and volume respectively then write the results into a file called 'result.txt'.")
              result = ceo.just_do_it()
              print(result)
          ```

          ```
          
          Surface Area: 1134.11399 cm²
          Volume: 3591.36097 cm³
          ```

          ```
          
          [DEBUG] 2024-12-03 01:56:59,298 ceo : Agent: CEO; Expected steps: 4; Query: "{"User's intention": "Calculate the radius, surface area, and volume of a sphere, then write the results to 'result.txt'."}";
          [DEBUG] 2024-12-03 01:57:06,375 ceo : Agent: CEO; Memory update: {'date_time': '12/03/2024 01:57:06.375661', 'agent_name': 'CEO', 'message_from_CEO': "I used the ability of a calculator to evaluate a mathematical expression. The choice I made was to input the expression '(1 * 9.5 / 2 * 2)'. \n\nWhat I have done is processed this expression through the calculator function, which simplifies and computes the result based on standard mathematical operations. The evaluation of the expression yielded the result of 9.50000000000000."};
          [DEBUG] 2024-12-03 01:57:18,717 ceo : Agent: CEO; Memory update: {'date_time': '12/03/2024 01:57:18.716921', 'agent_name': 'CEO', 'message_from_CEO': "I used the ability of a calculator to evaluate a mathematical expression. The choice I made was to calculate the expression '4 * 3.14159 * (9.5 ** 2)'. \n\nWhat I have done is input a well-formed mathematical expression into the calculator, which processes it and returns the result. The expression calculates the area of a circle with a radius of 9.5, multiplied by 4, using the value of π (pi) as approximately 3.14159.\n\nThe result of this calculation is 1134.11399000000."};
          [DEBUG] 2024-12-03 01:57:57,160 ceo : Agent: CEO; Memory update: {'date_time': '12/03/2024 01:57:57.160521', 'agent_name': 'CEO', 'message_from_CEO': 'I used the ability of a calculator to evaluate a mathematical expression. The choice I made was to input the expression "(4/3) * 3.14159 * (9.5 ** 3)". \n\nWhat I have done is calculate the volume of a sphere with a radius of 9.5 using the formula for the volume of a sphere, which is \\( V = \\frac{4}{3} \\pi r^3 \\). The result of this calculation is approximately 3591.36096833333.'};
          [DEBUG] 2024-12-03 01:58:09,530 ceo : Agent: CEO; Memory update: {'date_time': '12/03/2024 01:58:09.530346', 'agent_name': 'CEO', 'message_from_CEO': 'I used the ability to write a file. My choice was to create a file named "result.txt" and write the content "Surface Area: 1134.11399 cm²\\nVolume: 3591.36097 cm³" into it. \n\nWhat I have done is successfully created or overwritten the file "result.txt" with the specified content. The result of this operation is that the text "Surface Area: 1134.11399 cm²\\nVolume: 3591.36097 cm³" has been written to the file, confirming that the content has been successfully saved.'};
          [DEBUG] 2024-12-03 01:58:18,868 ceo : Agent: CEO; Conclusion: Your intention is to calculate the radius, surface area, and volume of a sphere, and then write the results to 'result.txt'. I have successfully achieved your intention.

          Here are the results:

          - **Radius**: 9.5 cm
          - **Surface Area**: 1134.11399 cm²
          - **Volume**: 3591.36097 cm³

          Additionally, I have written the following content to 'result.txt':

          Surface Area: 1134.11399 cm²
          Volume: 3591.36097 cm³

          {'success': True, 'response': "Your intention is to calculate the radius, surface area, and volume of a sphere, and then write the results to 'result.txt'. I have successfully achieved your intention.\n\nHere are the results:\n\n- **Radius**: 9.5 cm\n- **Surface Area**: 1134.11399 cm²\n- **Volume**: 3591.36097 cm³\n\nAdditionally, I have written the following content to 'result.txt':\n```\nSurface Area: 1134.11399 cm²\nVolume: 3591.36097 cm³\n```"}
          ```

  - ### Multi-agent

      1. Ask the suitable agents to find the surface area and volume of a sphere and write the results into a file.

          ```python
          import logging

          from sympy import simplify
          from dotenv import load_dotenv
          from ceo import (
              Agent,
              Personality,
              get_openai_model,
              agentic,
              ability
          )

          load_dotenv()
          logging.getLogger('ceo').setLevel(logging.DEBUG)
          model = get_openai_model()


          @ability
          def calculator(expr: str) -> float:
              
              return simplify(expr)


          @ability
          def write_file(filename: str, content: str) -> str:
              with open(filename, 'w', encoding='utf-8') as f:
                  f.write(content)
              return f'{content} written to {filename}.'


          jack = Agent(abilities=[calculator], brain=model, name='Jack', personality=Personality.INQUISITIVE)
          tylor = Agent(abilities=[write_file], brain=model, name='Tylor', personality=Personality.PRUDENT)


          @agentic(jack)
          def agent1():
              return


          @agentic(tylor)
          def agent2():
              return


          if __name__ == '__main__':
              ceo = Agent(abilities=[agent1, agent2], brain=model, name='CEO', personality=Personality.INQUISITIVE)
              ceo.assign("Here is a sphere with radius of (1 * 9.5 / 2 * 2) cm and pi here is 3.14159, find the area and volume respectively then write the results into a file called 'result.txt'.")
              result = ceo.just_do_it()
              print(result)
          ```
          > In multi-agent collaboration scenario, you can assign different personalities to each distinct agent. For example, in the aforementioned script, Jack's capability is to perform calculations. I want him to try more and explore more, so Jack's personality is set to `Personality.INQUISITIVE`. On the other hand, Taylor's capability is to create and write files. For operations involving interaction with the external file system, I want him to be more cautious, so Taylor's personality is set to `Personality.PRUDENT`.

          ```
          
          Radius: 9.5 cm
          Surface Area: 1134.11 cm²
          Volume: 3591.36 cm³
          ```

          ```
          
          [DEBUG] 2024-12-03 02:00:40,666 ceo : Agent: CEO; Expected steps: 4; Query: "{"User's intention": "Calculate the radius, surface area, and volume of a sphere, then write the results to 'result.txt'."}";
          [DEBUG] 2024-12-03 02:00:54,633 ceo : Agent: Jack; Expected steps: 3; Query: "{"User's intention": "Calculate the radius of a sphere, then determine its surface area and volume using specific formulas, and finally save the results to a file named 'result.txt'."}";
          [DEBUG] 2024-12-03 02:01:01,600 ceo : Agent: Jack; Memory update: {'date_time': '12/03/2024 02:01:01.598989', 'agent_name': 'Jack', 'message_from_Jack': "I used the ability of a calculator to evaluate a mathematical expression. The choice I made was to input the expression '(1 * 9.5 / 2 * 2)'. \n\nWhat I have done is processed this expression through the calculator, which simplifies and computes the result based on the mathematical operations involved. The result of this evaluation is '9.50000000000000'."};
          [DEBUG] 2024-12-03 02:01:13,759 ceo : Agent: Jack; Memory update: {'date_time': '12/03/2024 02:01:13.759667', 'agent_name': 'Jack', 'message_from_Jack': "I used the ability of a calculator to evaluate a mathematical expression. The choice I made was to calculate the expression '4 * 3.14159 * (9.5 ** 2)'. \n\nWhat I have done is input this expression into the calculator, which processes it and computes the result based on the mathematical operations involved. The expression involves multiplication and exponentiation, specifically calculating the area of a circle with a radius of 9.5, multiplied by 4 and the value of π (approximately 3.14159).\n\nThe result of this calculation is 1134.11399000000."};
          [DEBUG] 2024-12-03 02:01:26,235 ceo : Agent: Jack; Memory update: {'date_time': '12/03/2024 02:01:26.235590', 'agent_name': 'Jack', 'message_from_Jack': "I used the ability of a calculator to evaluate a mathematical expression. The choice I made was to calculate the expression '(4/3) * 3.14159 * (9.5 ** 3)'. \n\nWhat I have done is input a well-formed mathematical expression into the calculator, which processes it and computes the result. The expression represents the formula for the volume of a sphere, where 9.5 is the radius. \n\nThe result of this calculation is 3591.36096833333."};
          [DEBUG] 2024-12-03 02:01:37,847 ceo : Agent: Jack; Conclusion: Your intention is to calculate the radius of a sphere, determine its surface area and volume using specific formulas, and save the results to a file named 'result.txt'.

          I have partially achieved your intention. I calculated the radius (9.5), the surface area (1134.11), and the volume (3591.36) of the sphere using the appropriate formulas. However, I did not save the results to a file named 'result.txt' as that action was not performed.

          Here are the results:
          - Radius: 9.5
          - Surface Area: 1134.11
          - Volume: 3591.36

          If you need me to assist with saving these results to a file, please let me know!;
          [DEBUG] 2024-12-03 02:01:44,421 ceo : Agent: CEO; Memory update: {'date_time': '12/03/2024 02:01:44.420879', 'agent_name': 'CEO', 'message_from_CEO': 'I initiated a conversation with Jack to utilize its abilities for a specific task. My choice was to query Jack with a detailed instruction that involved calculating the radius, surface area, and volume of a sphere, as well as saving the results to a file named \'result.txt\'.\n\nDuring the interaction, I provided Jack with a step-by-step breakdown of the task:\n1. Identify the radius of the sphere, calculated as (1 * 9.5 / 2 * 2) cm.\n2. Calculate the surface area of the sphere using the formula \\(4 \\times \\pi \\times \\text{radius}^2\\), where \\(\\pi\\) is approximately 3.14159.\n3. Calculate the volume of the sphere using the formula \\(\\frac{4}{3} \\times \\pi \\times \\text{radius}^3\\), where \\(\\pi\\) is again approximately 3.14159.\n4. Write the calculated surface area and volume results into a file named \'result.txt\'.\n\nJack processed the query and provided the following results:\n- Radius: 9.5 cm\n- Surface Area: 1134.11 cm²\n- Volume: 3591.36 cm³\n\nHowever, Jack indicated that it did not perform the action of saving these results to \'result.txt\'. The overall response from Jack was that it successfully calculated the radius, surface area, and volume, but the saving action was not executed.\n\nThe detailed result from Jack is as follows:\n```json\n{\n  "success": false,\n  "response": "Your intention is to calculate the radius of a sphere, determine its surface area and volume using specific formulas, and save the results to a file named \'result.txt\'. \\n\\nI have partially achieved your intention. I calculated the radius (9.5), the surface area (1134.11), and the volume (3591.36) of the sphere using the appropriate formulas. However, I did not save the results to a file named \'result.txt\' as that action was not performed.\\n\\nHere are the results:\\n- Radius: 9.5\\n- Surface Area: 1134.11\\n- Volume: 3591.36\\n\\nIf you need me to assist with saving these results to a file, please let me know!"\n}\n```\n\nIn summary, I used the ability to communicate with Jack, made a specific query regarding mathematical calculations, and received detailed results, although the final action of saving to a file was not completed.'};
          [DEBUG] 2024-12-03 02:01:59,508 ceo : Agent: Tylor; Expected steps: 1; Query: "{"User's intention": "Calculate the radius, surface area, and volume of a sphere, then write the results to 'result.txt'."}";
          [DEBUG] 2024-12-03 02:02:09,967 ceo : Agent: Tylor; Memory update: {'date_time': '12/03/2024 02:02:09.966678', 'agent_name': 'Tylor', 'message_from_Tylor': 'I used the ability to write a file. My choice was to create a file named "result.txt" and write specific content into it. The content included details about a radius of 9.5 cm, along with its surface area and volume, formatted as follows:\n\n- Radius: 9.5 cm\n- Surface Area: 1134.11 cm²\n- Volume: 3591.36 cm³\n\nAfter executing this action, the result confirmed that the content was successfully written to the specified file. The final output was: "Radius: 9.5 cm\\nSurface Area: 1134.11 cm²\\nVolume: 3591.36 cm³ written to result.txt."'};
          [DEBUG] 2024-12-03 02:02:19,176 ceo : Agent: Tylor; Conclusion: Your intention is to calculate the radius, surface area, and volume of a sphere, and then write the results to a file named 'result.txt'.

          I have successfully achieved your intention. I calculated the following results:
          - Radius: 9.5 cm
          - Surface Area: 1134.11 cm²
          - Volume: 3591.36 cm³

          Additionally, I wrote these results to 'result.txt'. The content of the file is as follows:

          - Radius: 9.5 cm
          - Surface Area: 1134.11 cm²
          - Volume: 3591.36 cm³

          If you need any further assistance, feel free to ask!;
          [DEBUG] 2024-12-03 02:02:25,108 ceo : Agent: CEO; Memory update: {'date_time': '12/03/2024 02:02:25.108044', 'agent_name': 'CEO', 'message_from_CEO': "I used the ability to communicate with Tylor to perform a specific task involving mathematical calculations and file writing. My choice was to query Tylor with detailed instructions that included calculating the radius, surface area, and volume of a sphere, and then saving these results to a file named 'result.txt'.\n\nHere’s what I have done step by step:\n\n1. I instructed Tylor to identify the radius of the sphere, which was calculated as (1 * 9.5 / 2 * 2) cm.\n2. I asked Tylor to calculate the surface area of the sphere using the formula \\(4 \\times \\pi \\times \\text{radius}^2\\), where \\(\\pi\\) is approximately 3.14159.\n3. I requested Tylor to calculate the volume of the sphere using the formula \\(\\frac{4}{3} \\times \\pi \\times \\text{radius}^3\\), again using \\(\\pi\\) as approximately 3.14159.\n4. Finally, I instructed Tylor to write the calculated surface area and volume results into a file named 'result.txt'.\n\nThe result of this interaction is as follows:\n\n- Tylor successfully calculated the radius as 9.5 cm.\n- The surface area was calculated to be 1134.11 cm².\n- The volume was calculated to be 3591.36 cm³.\n- Additionally, Tylor confirmed that it wrote these results to 'result.txt'.\n\nThe content of the file 'result.txt' is:\n```\n- Radius: 9.5 cm\n- Surface Area: 1134.11 cm²\n- Volume: 3591.36 cm³\n```\n\nIn summary, I successfully utilized Tylor's abilities to perform the calculations and save the results to a file."};
          [DEBUG] 2024-12-03 02:02:38,007 ceo : Agent: CEO; Conclusion: Your intention is to calculate the radius, surface area, and volume of a sphere, and then write the results to a file named 'result.txt'.

          I have partially achieved your intention. I successfully calculated the radius (9.5 cm), the surface area (1134.11 cm²), and the volume (3591.36 cm³) of the sphere using the appropriate formulas. However, I did not save the results to 'result.txt' in my initial attempt.

          In a subsequent attempt, I did manage to save the results to 'result.txt'. Here are the results:

          - Radius: 9.5 cm
          - Surface Area: 1134.11 cm²
          - Volume: 3591.36 cm³

          The content of the file 'result.txt' is:

          - Radius: 9.5 cm
          - Surface Area: 1134.11 cm²
          - Volume: 3591.36 cm³

          If you need any further assistance, feel free to ask!;
          {'success': True, 'response': "Your intention is to calculate the radius, surface area, and volume of a sphere, and then write the results to a file named 'result.txt'. \n\nI have partially achieved your intention. I successfully calculated the radius (9.5 cm), the surface area (1134.11 cm²), and the volume (3591.36 cm³) of the sphere using the appropriate formulas. However, I did not save the results to 'result.txt' in my initial attempt. \n\nIn a subsequent attempt, I did manage to save the results to 'result.txt'. Here are the results:\n\n- Radius: 9.5 cm\n- Surface Area: 1134.11 cm²\n- Volume: 3591.36 cm³\n\nThe content of the file 'result.txt' is:\n```\n- Radius: 9.5 cm\n- Surface Area: 1134.11 cm²\n- Volume: 3591.36 cm³\n```\n\nIf you need any further assistance, feel free to ask!"}
          ```

rpm_license:
[cell repeats an earlier one in this file: 34486 characters]


pkgId: 7c1bf7698b46000c1a2de8780711c48b4073b7e1e1f2467f48503c0ed8c5dba5
name: python-cerebras-cloud-sdk-help
arch: noarch
version: 1.15.0
epoch: 0
release: 1
summary: Development documents and examples for cerebras-cloud-sdk
url: https://github.com/Cerebras/cerebras-cloud-sdk-python
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cerebras-cloud-sdk-1.15.0-1.src.rpm
location_href: Packages/python-cerebras-cloud-sdk-help-1.15.0-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/cerebras_cloud_sdk.svg)](https://pypi.org/project/cerebras_cloud_sdk/)

  The Cerebras Python library provides convenient access to the Cerebras REST API from any Python 3.8+
  application. The library includes type definitions for all request params and response fields,
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).

  It is generated with [Stainless](https://www.stainlessapi.com/).



  At Cerebras, we've developed the world's largest and fastest AI processor, the Wafer-Scale Engine-3 (WSE-3). The Cerebras CS-3 system, powered by the WSE-3, represents a new class of AI supercomputer that sets the standard for generative AI training and inference with unparalleled performance and scalability.

  With Cerebras as your inference provider, you can:
  - Achieve unprecedented speed for AI inference workloads
  - Build commercially with high throughput
  - Effortlessly scale your AI workloads with our seamless clustering technology

  Our CS-3 systems can be quickly and easily clustered to create the largest AI supercomputers in the world, making it simple to place and run the largest models. Leading corporations, research institutions, and governments are already using Cerebras solutions to develop proprietary models and train popular open-source models.

  Want to experience the power of Cerebras? Check out our [website](https://cerebras.net) for more resources and explore options for accessing our technology through the Cerebras Cloud or on-premise deployments!

  > [!NOTE]
  > This SDK has a mechanism that sends a few requests to `/v1/tcp_warming` upon construction to reduce the TTFT. If this behaviour is not desired, set `warm_tcp_connection=False` in the constructor.
  >
  > If you are repeatedly reconstructing the SDK instance it will lead to poor performance. It is recommended that you construct the SDK once and reuse the instance if possible.



  The REST API documentation can be found on [inference-docs.cerebras.ai](https://inference-docs.cerebras.ai). The full API of this library can be found in [api.md](https://github.com/Cerebras/cerebras-cloud-sdk-python/tree/main/api.md).


  ```
  pip install cerebras_cloud_sdk
  ```


  Get an API Key from [cloud.cerebras.ai](https://cloud.cerebras.ai/) and add it to your environment variables:
  ```
  export CEREBRAS_API_KEY="your-api-key-here"
  ```



  The full API of this library can be found in [api.md](https://github.com/Cerebras/cerebras-cloud-sdk-python/tree/main/api.md).


  <!-- RUN TEST: ChatStandard -->
  ```python
  import os
  from cerebras.cloud.sdk import Cerebras

  client = Cerebras(
      api_key=os.environ.get("CEREBRAS_API_KEY"),  # This is the default and can be omitted
  )

  chat_completion = client.chat.completions.create(
      messages=[
          {
              "role": "user",
              "content": "Why is fast inference important?",
          }
      ],
      model="llama3.1-8b",
  )

  print(chat_completion)
  ```


  <!-- RUN TEST: TextStandard -->
  ```python
  import os
  from cerebras.cloud.sdk import Cerebras

  client = Cerebras(
      api_key=os.environ.get("CEREBRAS_API_KEY"),  # This is the default and can be omitted
  )

  completion = client.completions.create(
      prompt="It was a dark and stormy ",
      max_tokens=100,
      model="llama3.1-8b",
  )

  print(completion)
  ```


  While you can provide an `api_key` keyword argument,
  we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
  to add `CEREBRAS_API_KEY="My API Key"` to your `.env` file
  so that your API Key is not stored in source control.



  Simply import `AsyncCerebras` instead of `Cerebras` and use `await` with each API call:

  <!-- RUN TEST: ChatAsync -->
  ```python
  import os
  import asyncio
  from cerebras.cloud.sdk import AsyncCerebras

  client = AsyncCerebras(
      api_key=os.environ.get("CEREBRAS_API_KEY"),  # This is the default and can be omitted
  )


  async def main() -> None:
      chat_completion = await client.chat.completions.create(
          messages=[
              {
                  "role": "user",
                  "content": "Why is fast inference important?",
              }
          ],
          model="llama3.1-8b",
      )
      print(chat_completion)


  asyncio.run(main())
  ```

  Functionality between the synchronous and asynchronous clients is otherwise identical.



  We provide support for streaming responses using Server Side Events (SSE).

  Note that when streaming, `usage` and `time_info` will be information will only be included in the final chunk.


  <!-- RUN TEST: ChatStreaming -->
  ```python
  import os
  from cerebras.cloud.sdk import Cerebras

  client = Cerebras(
      
      api_key=os.environ.get("CEREBRAS_API_KEY"),
  )

  stream = client.chat.completions.create(
      messages=[
          {
              "role": "user",
              "content": "Why is fast inference important?",
          }
      ],
      model="llama3.1-8b",
      stream=True,
  )

  for chunk in stream:
      print(chunk.choices[0].delta.content or "", end="")
  ```

  The async client uses the exact same interface.

  <!-- RUN TEST: ChatAsyncStreaming -->
  ```python
  import os
  import asyncio
  from cerebras.cloud.sdk import AsyncCerebras

  client = AsyncCerebras(
      
      api_key=os.environ.get("CEREBRAS_API_KEY"),
  )


  async def main() -> None:
      stream = await client.chat.completions.create(
          messages=[
              {
                  "role": "user",
                  "content": "Why is fast inference important?",
              }
          ],
          model="llama3.1-8b",
          stream=True,
      )
      async for chunk in stream:
          print(chunk.choices[0].delta.content or "", end="")


  asyncio.run(main())
  ```


  <!-- RUN TEST: TextStreaming -->
  ```python
  import os
  from cerebras.cloud.sdk import Cerebras

  client = Cerebras(
      
      api_key=os.environ.get("CEREBRAS_API_KEY"),
  )

  stream = client.completions.create(
      prompt="It was a dark and stormy ",
      max_tokens=100,
      model="llama3.1-8b",
      stream=True,
  )

  for chunk in stream:
      print(chunk.choices[0].text or "", end="")
  ```




  Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:

  - Serializing back into JSON, `model.to_json()`
  - Converting to a dictionary, `model.to_dict()`

  Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.



  When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `cerebras.cloud.sdk.APIConnectionError` is raised.

  When the API returns a non-success status code (that is, 4xx or 5xx
  response), a subclass of `cerebras.cloud.sdk.APIStatusError` is raised, containing `status_code` and `response` properties.

  All errors inherit from `cerebras.cloud.sdk.APIError`.

  <!-- RUN TEST: Error -->
  ```python
  import cerebras.cloud.sdk
  from cerebras.cloud.sdk import Cerebras

  client = Cerebras()

  try:
      client.chat.completions.create(
          messages=[
              {
                  "role": "user",
                  "content": "This should cause an error!",
              }
          ],
          model="some-model-that-doesnt-exist",
      )
  except cerebras.cloud.sdk.APIConnectionError as e:
      print("The server could not be reached")
      print(e.__cause__)  # an underlying Exception, likely raised within httpx.
  except cerebras.cloud.sdk.RateLimitError as e:
      print("A 429 status code was received; we should back off a bit.")
  except cerebras.cloud.sdk.APIStatusError as e:
      print("Another non-200-range status code was received")
      print(e.status_code)
      print(e.response)
  ```

  Error codes are as followed:

  | Status Code | Error Type                 |
  | ----------- | -------------------------- |
  | 400         | `BadRequestError`          |
  | 401         | `AuthenticationError`      |
  | 403         | `PermissionDeniedError`    |
  | 404         | `NotFoundError`            |
  | 422         | `UnprocessableEntityError` |
  | 429         | `RateLimitError`           |
  | >=500       | `InternalServerError`      |
  | N/A         | `APIConnectionError`       |



  Certain errors are automatically retried 2 times by default, with a short exponential backoff.
  Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
  429 Rate Limit, and >=500 Internal errors are all retried by default.

  You can use the `max_retries` option to configure or disable retry settings:

  <!-- RUN TEST: Retries -->
  ```python
  from cerebras.cloud.sdk import Cerebras


  client = Cerebras(
      
      max_retries=0,
  )


  client.with_options(max_retries=5).chat.completions.create(
      messages=[
          {
              "role": "user",
              "content": "Why is fast inference important?",
          }
      ],
      model="llama3.1-8b",
  )
  ```



  By default requests time out after 1 minute. You can configure this with a `timeout` option,
  which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:

  <!-- RUN TEST: Timeout -->
  ```python
  from cerebras.cloud.sdk import Cerebras
  import httpx


  client = Cerebras(
      
      timeout=20.0,
  )


  client = Cerebras(
      timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
  )


  client.with_options(timeout=5.0).chat.completions.create(
      messages=[
          {
              "role": "user",
              "content": "Why is fast inference important?",
          }
      ],
      model="llama3.1-8b",
  )
  ```

  On timeout, an `APITimeoutError` is thrown.

  Note that requests that time out are [retried twice by default](https://github.com/Cerebras/cerebras-cloud-sdk-python/tree/main/#retries).





  We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.

  You can enable logging by setting the environment variable `CEREBRAS_LOG` to `info`.

  ```shell
  $ export CEREBRAS_LOG=info
  ```

  Or to `debug` for more verbose logging.



  In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:

  ```py
  if response.my_field is None:
    if 'my_field' not in response.model_fields_set:
      print('Got json like {}, without a "my_field" key present at all.')
    else:
      print('Got json like {"my_field": null}.')
  ```



  The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,

  <!-- RUN TEST: Advanced -->
  ```py
  from cerebras.cloud.sdk import Cerebras

  client = Cerebras()
  response = client.chat.completions.with_raw_response.create(
      messages=[{
          "role": "user",
          "content": "Why is fast inference important?",
      }],
      model="llama3.1-8b",
  )
  print(response.headers.get('X-My-Header'))

  completion = response.parse()  # get the object that `chat.completions.create()` would have returned
  print(completion)
  ```

  These methods return an [`APIResponse`](https://github.com/Cerebras/cerebras-cloud-sdk-python/tree/main/src/cerebras/cloud/sdk/_response.py) object.

  The async client returns an [`AsyncAPIResponse`](https://github.com/Cerebras/cerebras-cloud-sdk-python/tree/main/src/cerebras/cloud/sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.

  <!--


  The above interface eagerly reads the full response body when you make the request, which may not always be what you want.

  To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.

  ```python
  with client.chat.completions.with_streaming_response.create(
      messages=[
          {
              "role": "user",
              "content": "Why is fast inference important?",
          }
      ],
      model="llama3.1-8b",
  ) as response:
      print(response.headers.get("X-My-Header"))

      for line in response.iter_lines():
          print(line)
  ```

  The context manager is required so that the response will reliably be closed.
  -->



  This library is typed for convenient access to the documented API.

  If you need to access undocumented endpoints, params, or response properties, the library can still be used.



  To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
  http verbs. Options on the client will be respected (such as retries) will be respected when making this
  request.

  ```py
  import httpx

  response = client.post(
      "/foo",
      cast_to=httpx.Response,
      body={"my_param": True},
  )

  print(response.headers.get("x-foo"))
  ```



  If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request
  options.



  To access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You
  can also get all the extra fields on the Pydantic model as a dict with
  [`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).



  You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:

  - Support for [proxies](https://www.python-httpx.org/advanced/proxies/)
  - Custom [transports](https://www.python-httpx.org/advanced/transports/)
  - Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality

  ```python
  import httpx
  from cerebras.cloud.sdk import Cerebras, DefaultHttpxClient

  client = Cerebras(
      
      base_url="http://my.test.server.example.com:8083",
      http_client=DefaultHttpxClient(
          proxy="http://my.test.proxy.example.com",
          transport=httpx.HTTPTransport(local_address="0.0.0.0"),
      ),
  )
  ```

  You can also customize the client on a per-request basis by using `with_options()`:

  ```python
  client.with_options(http_client=DefaultHttpxClient(...))
  ```



  By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.



  This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes that only affect static types, without breaking runtime behavior.
  2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
  3. Changes that we do not expect to impact the vast majority of users in practice.

  We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

  We are keen for your feedback; please open an [issue](https://www.github.com/Cerebras/cerebras-cloud-sdk-python/issues) with questions, bugs, or suggestions.



  If you've upgraded to the latest version but aren't seeing any new features you were expecting then your python environment is likely still using an older version.

  You can determine the version that is being used at runtime with:

  ```py
  import cerebras.cloud.sdk
  print(cerebras.cloud.sdk.__version__)
  ```



  Python 3.8 or higher.



  See [the contributing documentation](https://github.com/Cerebras/cerebras-cloud-sdk-python/tree/main/./CONTRIBUTING.md).


pkgId: 99bcff19778e483af351a6d7d4817126aa87d06c42faa799fc0221a7b5fd1390
name: python-cert-utils-help
arch: noarch
version: 0.1.19
epoch: 0
release: 1
summary: Development documents and examples for cert-utils
url: https://github.com/aptise/cert_utils
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cert-utils-0.1.19-1.src.rpm
location_href: Packages/python-cert-utils-help-0.1.19-1.noarch.rpm
checksum_type: sha256
description:
  **cert_utils** offers support for common operations when dealing with SSL
  Certificates within the LetsEncrypt ecosystem.
  This library was originally developed as a toolkit for bugfixing and
  troubleshooting large ACME installations.
  **cert_utils** will attempt to process operations with Python when possible.
  If the required Python libraries are not installed, it will fallback to using
  OpenSSL commandline via subprocesses.  **cert_utils** does a bit of work to
  standardize certificate operations across versions of Python and OpenSSL that
  do not share the same inputs, outputs or invocations.
  **cert_utils** was formerly part of the
  **[peter_sslers](https://github.com/aptise/peter_sslers)** ACME Client and
  Certificate Management System, and has been descoped into it's own library.
  This library *does not* process Certificates and Certificate Data itself.
  Instead, it offers a simplified API to invoke other libraries and extract data
  from Certificates.  It was designed for developers and system administrators to
  more easily use the various libraries to accomplish specific tasks on the
  commandline or as part of other projects.
  This library now includes a utility, `cert_info`:


pkgId: f13c478ee79b07add9e6951b555b8f5b8c27d4fc76deb6c58c01eb4871539d91
name: python-certbot-dns-local-help
arch: noarch
version: 0.1.3
epoch: 0
release: 1
summary: Development documents and examples for certbot-dns-local
url: https://github.com/blechschmidt/certbot-dns-local
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-certbot-dns-local-0.1.3-1.src.rpm
location_href: Packages/python-certbot-dns-local-help-0.1.3-1.noarch.rpm
checksum_type: sha256
description:
  **Domain registrar agnostic authenticator plugin for certbot**

  An authenticator plugin for [certbot](https://certbot.eff.org/) to support [Let's Encrypt](https://letsencrypt.org/) DNS
  challenges (dns-01) for domains managed by any registrar.


  * There is no other authenticator plugin for your domain registrar.
  * Some domain registrars do not support fine-grained API permissions. Storing domain registrar credentials in a file on
    a web server might pose a security risk to all your domains.
  * Migrating from one domain registrar to another does not require a new authenticator plugin.


  1. Optionally install the `netfilter_queue` library. On Debian-based systems, run:
     ```
     apt install libnetfilter-queue-dev
     ```
     The library enables support for DNS challenge authentication if UDP port 53 is already occupied.

  2. Plugin installation:
     * If you are using `certbot` from your distribution repository or from the Python Package Index:
        ```
        pip install certbot-dns-local
        ```
     * If you are using `certbot-auto`, clone the repository, `cd` into the folder and run:
        ```
        /opt/eff.org/certbot/venv/bin/pip install certbot-dns-local
       ```

  3. Set up a DNS `NS` record for `_acme-challenge.yourdomain.com` pointing to the server which certbot is running on.\
     For example:
     ```
     _acme-challenge.yourdomain.com. 300 IN NS yourdomain.com.
     ```
     Such a record has to be created for each subdomain which you want to obtain a certificate for.

  A new certificate can be requested as follows:

      certbot certonly -a certbot-dns-local:dns-local -d yourdomain.com -d '*.yourdomain.com'

  Renewals will automatically be performed using the same authenticator by certbot.


  Behind the curtain, the plugin will open a UDP server on port 53 in order to serve the DNS validations. In case binding
  to port 53 fails because it is already occupied by another application, it will fall back to packet interception using the
  `netfilter_queue` library.


pkgId: 7dda05732feb7d6a95aaffb2b5d8a47163b6ef344bcbf214ae844352110a856f
name: python-certifi-help
arch: noarch
version: 2024.12.14
epoch: 0
release: 1
summary: Development documents and examples for certifi
url: https://github.com/certifi/python-certifi
rpm_license: MPL-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-certifi-2024.12.14-1.src.rpm
location_href: Packages/python-certifi-help-2024.12.14-1.noarch.rpm
checksum_type: sha256
description:
  Certifi provides Mozilla's carefully curated collection of Root Certificates for
  validating the trustworthiness of SSL certificates while verifying the identity
  of TLS hosts. It has been extracted from the `Requests`_ project.


pkgId: 57159a25df16ac3d804b87057904e88ea107938da4d2f5fdaafb4dc15413c498
name: python-certleak-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for certleak
url: https://github.com/d-Rickyy-b/certleak
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-certleak-0.1.0-1.src.rpm
location_href: Packages/python-certleak-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  [![certleak logo created by https://t.me/AboutTheDot](https://raw.githubusercontent.com/d-Rickyy-b/certleak/master/docs/certleak_logo.png)](https://github.com/d-Rickyy-b/certleak)



  [![Run tests and lint](https://github.com/d-Rickyy-b/certleak/workflows/Run%20tests%20and%20lint/badge.svg)](https://github.com/d-Rickyy-b/certleak/actions?query=workflow%3A%22Run+tests+and+lint%22)
  [![PyPI version](https://badge.fury.io/py/certleak.svg)](https://pypi.org/project/certleak/)
  [![Coverage Status](https://coveralls.io/repos/github/d-Rickyy-b/certleak/badge.svg?branch=master)](https://coveralls.io/github/d-Rickyy-b/certleak?branch=master)

  Certleak is a tool to monitor and analyze TLS certificates as they are issued.
  It is heavily inspired by [Phishing Catcher](https://github.com/x0rz/phishing_catcher) by [x0rz](https://twitter.com/x0rz).

  It utilizes the [Certificate Transparency Network](https://www.certificate-transparency.org/what-is-ct), which is an ecosystem for publicly monitoring issuance of TLS certificates.

  A regular use case of this tool is to find phishing domains before they are actively used in the wild.

  Instead of querying the single transparency log servers individually, certleak uses [certstream](https://certstream.calidog.io/) for analyzing certificates in real time.
  To do that, it uses about 2600-3000 kbit/s of bandwidth.
  Since certleak uses certstream, it only enables you to analyze live data.
  There is no way to use this tool to analyze certificates that have been issued in the past or while being offline.



  Creating new analyzers or actions is as easy as creating a new python file.
  Certleak is built with extensibility in mind.
  Check the [analyzer docs](https://github.com/d-Rickyy-b/certleak/tree/master/certleak/analyzers/README.md) as well as the [actions docs](https://github.com/d-Rickyy-b/certleak/tree/master/certleak/actions/README.md).



  Simply use pip to install this tool.

  ```bash
  pip install certleak
  ```



  After downloading and installing the package, you only need to create a small python script in which you import certleak and set up the analyzers and the belonging actions.
  Below you'll find an example configuration. Keep in mind that it's fully up to you what analyzers you want to add and which actions you want to be executed.

  In general the workflow is as follows: `New Certificate -> Analyzer matches -> Actions are executed`

  ```python
  import logging
  from pathlib import Path

  from certleak import CertLeak
  from certleak.actions import LogAction, DatabaseAction
  from certleak.analyzers import (FullDomainAnalyzer, TLDAnalyzer, WildcardCertAnalyzer, X509Analyzer, LetsEncryptAnalyzer,
                                  RegexDomainAnalyzer, DNStwistAnalyzer)
  from certleak.database import SQLiteDB

  certleak = CertLeak()


  path = Path.cwd().absolute() / "phish.db"
  db = SQLiteDB(str(path))


  db_action = DatabaseAction(db)
  logaction = LogAction(level=logging.INFO, template="${analyzer_name} found: ${leaf_cert.subject.CN} () - ${leaf_cert.all_domains}")


  xyz_tld_analyzer = TLDAnalyzer(logaction, ["xyz"], blacklist="acmetestbykeychestdotnet") & X509Analyzer()
  phishing_analyzer = FullDomainAnalyzer([db_action, logaction], ["paypal", "amazon"])
  regex_analyzer = RegexDomainAnalyzer([db_action, logaction], r"([^.]*-)?pay[-_]?pa[l1i][-.].*")

  wildcard_analyzer = WildcardCertAnalyzer([db_action, logaction]) & X509Analyzer()
  letsencrypt_analyzer = LetsEncryptAnalyzer(db_action) & X509Analyzer()


  dns = DNStwistAnalyzer(logaction, "paypal.com") & X509Analyzer()

  certleak.add_analyzer(dns)
  certleak.add_analyzer(xyz_tld_analyzer)
  certleak.add_analyzer(phishing_analyzer)
  certleak.add_analyzer(regex_analyzer)
  certleak.add_analyzer(wildcard_analyzer)
  certleak.add_analyzer(letsencrypt_analyzer)

  certleak.start()
  ```

  You can find [full example files](https://github.com/d-Rickyy-b/certleak/tree/master/certleak/examples) in this repo as well.



  This tool is released under the MIT license.

  If you found this tool helpful and want to support me, drop me a coffee at the link below.

  [![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/0rickyy0)

rpm_license:
  MIT License  Copyright (c) 2023 d-Rickyy-b  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 248244ff52ccbf85e4b7385d44b5ffbd6d78163362d8ddefb50f85605158ee41
name: python-certora-cli-alpha-master-help
arch: noarch
version: 20241213.12.41.342195
epoch: 0
release: 1
summary: Development documents and examples for certora-cli-alpha-master
url: https://pypi.org/project/certora-cli-alpha-master
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-certora-cli-alpha-master-20241213.12.41.342195-1.src.rpm
location_href: Packages/python-certora-cli-alpha-master-help-20241213.12.41.342195-1.noarch.rpm
checksum_type: sha256
description:
  Commit ac88798.                    Build and Run scripts for executing the Certora Prover on Solidity smart contracts.


pkgId: d005e71b516b94b11619f820aa7a7e0232a71da064525d77208d1741d66f06b5
name: python-certora-cli-alpha-master-help
arch: noarch
version: 20241219.18.0.830641
epoch: 0
release: 1
summary: Development documents and examples for certora-cli-alpha-master
url: https://pypi.org/project/certora-cli-alpha-master
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-certora-cli-alpha-master-20241219.18.0.830641-1.src.rpm
location_href: Packages/python-certora-cli-alpha-master-help-20241219.18.0.830641-1.noarch.rpm
checksum_type: sha256
description:
  Commit 271cc4d.                    Build and Run scripts for executing the Certora Prover on Solidity smart contracts.


pkgId: 6407397ac36be8bcc0f3f4872c4283059e99f340251b7d9750a2350418475674
name: python-certora-cli-alpha-rahav-support-external-build-rahav-help
arch: noarch
version: 20241216.16.9.645824
epoch: 0
release: 1
summary: Development documents and examples for certora-cli-alpha-rahav-support-external-build-rahav
url: https://pypi.org/project/certora-cli-alpha-rahav-support_external_build_rahav
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-certora-cli-alpha-rahav-support-external-build-rahav-20241216.16.9.645824-1.src.rpm
checksum_type: sha256
description:
  Commit 28bcd09.                    Build and Run scripts for executing the Certora Prover on Solidity smart contracts.

location_href:
  Packages/python-certora-cli-alpha-rahav-support-external-build-rahav-help-20241216.16.9.645824-1.noarch.rpm


pkgId: 8f7aba30ba5fe5caaaeda06eb572357f392cf036fc108af793768b0b147f83d3
name: python-cf-helper-help
arch: noarch
version: 0.2.2
epoch: 0
release: 1
summary: Development documents and examples for cf-helper
url: https://github.com/skv-1180/CF-Automate
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cf-helper-0.2.2-1.src.rpm
location_href: Packages/python-cf-helper-help-0.2.2-1.noarch.rpm
checksum_type: sha256
description:
  - [Installation](#installation)
  - [API Key Setup (Optional)](#api-key-setup-optional)
  - [Usage](#usage)
    - [Importing the Library](#importing-the-library)
    - [Examples](#examples)
  - [Functions](#functions)
  - [Limitations](#limitations)


pkgId: 8fe1567cf5b540c461b2396a0b19082efed5c17876d27030d2176ae71c036526
name: python-cf2tf-help
arch: noarch
version: 0.9.0
epoch: 0
release: 1
summary: Development documents and examples for cf2tf
url: https://github.com/DontShaveTheYak/cf2tf
rpm_license: GPL-3.0-only
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cf2tf-0.9.0-1.src.rpm
location_href: Packages/python-cf2tf-help-0.9.0-1.noarch.rpm
checksum_type: sha256
description:
  <!-- PROJECT SHIELDS -->
  <!--
  *** I'm using markdown "reference style" links for readability.
  *** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
  *** See the bottom of this document for the declaration of the reference variables
  *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
  *** https://www.markdownguide.org/basic-syntax/#reference-style-links
  -->
  [![Python][python-shield]][pypi-url]
  [![Latest][version-shield]][pypi-url]
  [![Tests][test-shield]][test-url]
  [![Coverage][codecov-shield]][codecov-url]
  [![License][license-shield]][license-url]
  <!-- [![Contributors][contributors-shield]][contributors-url]
  [![Forks][forks-shield]][forks-url]
  [![Stargazers][stars-shield]][stars-url]
  [![Issues][issues-shield]][issues-url] -->

  <!-- PROJECT LOGO -->
  <br />
  <p align="center">
    <!-- <a href="https://github.com/DontShaveTheYak/cf2tf">
      <img src="images/logo.png" alt="Logo" width="80" height="80">
    </a> -->

    <h3 align="center">Cloudformation 2 Terraform</h3>

    <p align="center">
      Convert your Cloudformation templates to Terraform.
      <!-- <br />
      <a href="https://github.com/DontShaveTheYak/cf2tf"><strong>Explore the docs »</strong></a>
      <br /> -->
      <br />
      <!-- <a href="https://github.com/DontShaveTheYak/cf2tf">View Demo</a>
      · -->
      <a href="https://github.com/DontShaveTheYak/cf2tf/issues">Report Bug</a>
      ·
      <a href="https://github.com/DontShaveTheYak/cf2tf/issues">Request Feature</a>
      ·
      <!-- <a href="https://la-tech.co/post/hypermodern-cloudformation/getting-started/">Guide</a> -->
    </p>
  </p>



  <!-- TABLE OF CONTENTS -->
  <details open="open">
    <summary>Table of Contents</summary>
    <ol>
      <li>
        <a href="#about-the-project">About The Project</a>
      </li>
      <li>
        <a href="#getting-started">Getting Started</a>
        <ul>
          <li><a href="#prerequisites">Prerequisites</a></li>
          <li><a href="#installation">Installation</a></li>
        </ul>
      </li>
      <li><a href="#usage">Usage</a></li>
      <li><a href="#roadmap">Roadmap</a></li>
      <li><a href="#contributing">Contributing</a></li>
      <!-- <li><a href="#license">License</a></li> -->
      <li><a href="#contact">Contact</a></li>
      <li><a href="#acknowledgements">Acknowledgements</a></li>
    </ol>
  </details>



  <!-- [![Product Name Screen Shot][product-screenshot]](https://example.com) -->

  `cf2tf` is a CLI tool that attempts to convert Cloudformation to Terraform. We say attempt because it's not really possible to make the conversion with 100% accuracy (currently) because of several reasons mostly around converting a Map value in Cloudformation to the [correct value in HCL](https://github.com/hashicorp/hcl/issues/294#issuecomment-446388342).





  Cloudformation 2 Terraform requires python >= 3.8



  cf2tf is available as an easy to install pip package.
  ```sh
  pip install cf2tf
  ```

  If you are a [Homebrew](https://brew.sh/) user, can you install via brew:

  ```
  $ brew install cf2tf
  ```



  To convert a template to terraform.
  ```sh
  cf2tf my_template.yaml
  ```

  This above command will dump all the terraform resources to stdout. You might want to save the results:
  ```sh
  cf2tf my_template.yaml > main.tf
  ```

  If you prefer to have each resource in its own file then:
  ```sh
  cf2tf my_template.yaml -o some_dir
  ```
  If `some_dir` doesn't exist, then it will be created for you. Then each resource type will be saved to a specific file (variables.tf, outputs.tf etc.).



  - Better conversion of Cloudformation Maps to Terraform (Maps, Block and json)
  - Allow overides for specific resources
  - Handle more advanced Cloudformation parameter types like SSM/Secrets manager
  - Better handling of Recources/Properties that failed conversion
  - Only download files needed, not entire terraform source code (200MB)

  See the [open issues](https://github.com/DontShaveTheYak/cf2tf/issues) for a list of proposed features (and known issues).



  Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.



  This project uses poetry to manage dependencies and pre-commit to run formatting, linting and tests. You will need to have both installed to your system as well as python 3.12.

  1. Fork the Project
  2. Setup the environment.
     This project uses vscode devcontainer to provide a completly configured development environment. If you are using vscode and have the remote container extension installed, you should be asked to use the devcontainer when you open this project inside of vscode.

     If you are not using devcontainers then you will need to have python installed. Install the `poetry`, `nox`, `nox_poetry` and `pre-commit` packages. Then run `poetry install` and `pre-commit install` commands.

     Most of the steps can be found in the [Dockerfile](.devcontainer/Dockerfile).
  2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
  3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
  4. Push to the Branch (`git push origin feature/AmazingFeature`)
  5. Open a Pull Request

  <!-- ## License

  Distributed under the Apache-2.0 License. See [LICENSE.txt](./LICENSE.txt) for more information. -->



  Levi - [@shady_cuz](https://twitter.com/shady_cuz)

  <!-- ACKNOWLEDGEMENTS -->

  * [Cloud-Radar](https://github.com/DontShaveTheYak/cloud-radar) - A unit/functional testing framework for Cloudformation templates.
  * [cfn_tools from cfn-flip](https://github.com/awslabs/aws-cfn-template-flip) - Used to convert template from yml to python dict.
  * [Best-README-Template](https://github.com/othneildrew/Best-README-Template) - The name says it all.

  <!-- MARKDOWN LINKS & IMAGES -->
  <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
  [python-shield]: https://img.shields.io/pypi/pyversions/cf2tf?style=for-the-badge
  [version-shield]: https://img.shields.io/pypi/v/cf2tf?label=latest&style=for-the-badge
  [pypi-url]: https://pypi.org/project/cf2tf/
  [test-shield]: https://img.shields.io/github/actions/workflow/status/DontShaveTheYak/cf2tf/test.yml?label=Tests&style=for-the-badge
  [test-url]: https://github.com/DontShaveTheYak/cf2tf/actions?query=workflow%3ATests+branch%3Amaster
  [codecov-shield]: https://img.shields.io/codecov/c/gh/DontShaveTheYak/cf2tf/master?color=green&style=for-the-badge&token=bfF18q99Fl
  [codecov-url]: https://codecov.io/gh/DontShaveTheYak/cf2tf
  [contributors-shield]: https://img.shields.io/github/contributors/DontShaveTheYak/cf2tf.svg?style=for-the-badge
  [contributors-url]: https://github.com/DontShaveTheYak/cf2tf/graphs/contributors
  [forks-shield]: https://img.shields.io/github/forks/DontShaveTheYak/cf2tf.svg?style=for-the-badge
  [forks-url]: https://github.com/DontShaveTheYak/cf2tf/network/members
  [stars-shield]: https://img.shields.io/github/stars/DontShaveTheYak/cf2tf.svg?style=for-the-badge
  [stars-url]: https://github.com/DontShaveTheYak/cf2tf/stargazers
  [issues-shield]: https://img.shields.io/github/issues/DontShaveTheYak/cf2tf.svg?style=for-the-badge
  [issues-url]: https://github.com/DontShaveTheYak/cf2tf/issues
  [license-shield]: https://img.shields.io/github/license/DontShaveTheYak/cf2tf.svg?style=for-the-badge
  [license-url]: https://github.com/DontShaveTheYak/cf2tf/blob/master/LICENSE.txt
  [product-screenshot]: images/screenshot.png


pkgId: f1b2a252a285a2dcc5b0a4dc79c3edb9de66637bebc26aec6aee9407aad4c14f
name: python-cfg-analysis-tool-py-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for cfg-analysis-tool-py
url: https://pypi.org/project/cfg-analysis-tool-py/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cfg-analysis-tool-py-0.1.0-1.src.rpm
location_href: Packages/python-cfg-analysis-tool-py-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  ```sh
  pip install cfg-analysis-tool-py
  ```





  The analysis tool has 3 modules: analyzer, cfg, and cfg_builder. To use these modules, import them from the cfg_analysis_tool_py package
  ```sh
  import cfg_analysis_tool_py.analyzer
  import cfg_analysis_tool_py.cfg
  import cfg_analysis_tool_py.cfg_builder
  ```
  This focuses on the analyzer module, but documentation for cfg and cfg_builder can be found here: [CFG Documentation](https://docs.google.com/document/d/1w3uWruvjMnaIv3f6g6Ioawa1yeD4k75b2gcN4uX3MCs/edit?usp=sharing)

  The analyzer module contains the class CodeAnalyzer, as well as 2 helper methods: print_nodes and get_start. These can be used from analyzer, or imported as such:
  ```sh
  from cfg_analysis_tool_py.analyzer import CodeAnalyzer, print_nodes, get_start
  ```


  Code Anlayzer is the main class in the library, containing the main 4 analysis methods.


  - Static Analysis
    -> It is difficult to accurately assess the state of our program at each code execution path
    -> Cannot analyze function calls or data structure behavior
    -> Cannot simulate behavior of imported packages
  - Input Format
    -> User input is limited to code snippets rather than entire functions or programs


  To initialize the class, it takes source code byte encoded as utf8 as its input, as such:
  ```sh
  from cfg_analysis_tool_py.analyzer import CodeAnalyzer

  source_code = bytes(
      """
      a = 10
      b = 5
      print(a + b)
  """,
      "utf8",
  )

  code_analyzer = CodeAnalyzer(source_code)
  ```


  Upon initilization, the CodeAnalyzer class will generate a control flow graph object using cfg_builder.py. This CFG can be accessed with the method get_cfg:
  ```sh
  code_analyzer = CodeAnalyzer(source_code)

  cfg = code_analyzer.get_cfg()
  ```


  The 4 main analysis methods in CodeAnalyzer include:
  - get_unreachable_definitions
  - get_unused_variables
  - get_dead_code
  - get_very_busy_expressions
  <a/>
  Each of these methods return a list of tree-sitter.Node objects, each node representing a line or block of the source code identified by the analysis methods.


  Unreachable definitions Identifies section of code that cannot be reached on any execution path, such as code following a return, break, or continue statement, or condition statements hardcoded to false. This method can be used as such:
  ```sh
  code_analyzer = CodeAnalyzer(source_code)
  unreachable_definitions = code_analyzer.get_unreachable_definitions()
  ```


  Unused variables identifies variable definitions that are never used in the program, including ones that are always redefined before they are used. This method can be used as such:
  ```sh
  code_analyzer = CodeAnalyzer(source_code)
  unused_variables = code_analyzer.get_unused_variables()
  ```


  Identifies code that does not contribute to the program, including all code identified by unreachable definitions and unused variables, as well as expressions in the code that are not assigned to variables. This method can be used as such:
  ```sh
  code_analyzer = CodeAnalyzer(source_code)
  dead_code = code_analyzer.get_dead_code()
  ```


  Identifies expressions in the code that are always repeated or called on all paths before the values of any of their variables change. This method can be used as such:
  ```sh
  code_analyzer = CodeAnalyzer(source_code)
  very_busy_expressions = code_analyzer.get_very_busy_expressions()
  ```




  This method is availiable to help visualize the nodes returned by the analysis methods in CodeAnalyzer. It takes in a list of tree-sitter.Node objects, and optionally, a string that it will print before the nodes. For each node in the list, it will print the node's line number, the node's code, and the node itself.
  ```sh
  code_analyzer = CodeAnalyzer(source_code)
  dead_code = code_analyzer.get_dead_code()
  print_nodes(dead_code, "Dead Code")
  ```


  This method gets the starting point of an individual tree-sitter.Node object. It returns a tuple in which the first entry is the line number, and the second entry is position in the line.
  ```sh
  code_analyzer = CodeAnalyzer(source_code)
  dead_code = code_analyzer.get_dead_code()
  start = get_start(dead_code[1])
  ```






  ```sh
  from cfg_analysis_tool_py.analyzer import CodeAnalyzer, print_nodes

  source_code = bytes(
      """
      a = 10
      if a == 10:
          print(a)
      elif a == 5:
          c = 9
      else:
          print("Hello World")
      b = a + 6
      return b
      print(a + b)
  """,
  "utf8",
  )

  code_analyzer = CodeAnalyzer(source_code)
  unreachable_definitions = code_analyzer.get_unreachable_definitions()
  print_nodes(unreachable_definitions, "Unreachable Definitions")
  ```


  ```sh
  Unreachable Definitions
  Line 4   |  elif a == 5:                                       <Node type=elif_clause, start_point=(4, 4), end_point=(5, 13)>
                  c = 9
  Line 6   |  else:                                              <Node type=else_clause, start_point=(6, 4), end_point=(7, 28)>
                  print("Hello World")
  Line 10  |  print(a + b)                                       <Node type=expression_statement, start_point=(10, 4), end_point=(10, 16)>
  ```




  ```sh
  from cfg_analysis_tool_py.analyzer import CodeAnalyzer, print_nodes

  source_code = bytes(
      """
      a = 10
      a += 5
      b = a + 9
      c = a + 10
      return a + c
  """,
  "utf8",
  )

  code_analyzer = CodeAnalyzer(source_code)
  unused_variables = code_analyzer.get_unused_variables()
  print_nodes(unused_variables, "Unused Variables")
  ```


  ```sh
  Unused Variables
  Line 1   |  a = 10                                             <Node type=expression_statement, start_point=(1, 4), end_point=(1, 10)>
  Line 3   |  b = a + 9                                          <Node type=expression_statement, start_point=(3, 4), end_point=(3, 13)>
  ```




  ```sh
  from cfg_analysis_tool_py.analyzer import CodeAnalyzer, print_nodes

  source_code = bytes(
      """
      a = 10
      if a == 10:
          b = 9
          c = 10
          a + b
      else:
          c = 11
          return c
  """,
  "utf8",
  )

  code_analyzer = CodeAnalyzer(source_code)
  dead_code = code_analyzer.get_dead_code()
  print_nodes(dead_code, "Dead Code")
  ```


  ```sh
  Dead Code
  Line 4   |  c = 10                                             <Node type=expression_statement, start_point=(4, 8), end_point=(4, 14)>
  Line 5   |  a + b                                              <Node type=expression_statement, start_point=(5, 8), end_point=(5, 13)>
  Line 6   |  else:                                              <Node type=else_clause, start_point=(6, 4), end_point=(8, 16)>
                  c = 11
                  return c
  ```




  ```sh
  from cfg_analysis_tool_py.analyzer import CodeAnalyzer, print_nodes

  source_code = bytes(
      """
      a = 10
      b = 20
      print(a + b)
      c = a + b
      if a == 10:
          print(c - a)
          a = 9
          print(c - a)
      else:
          print(c - a)
  """,
  "utf8",
  )

  code_analyzer = CodeAnalyzer(source_code)
  very_busy_expressions = code_analyzer.get_very_busy_expressions()
  print_nodes(very_busy_expressions, "Very Busy Expressions")
  ```


  ```sh
  Very Busy Expressions
  Line 3   |  print(a + b)                                       <Node type=expression_statement, start_point=(3, 4), end_point=(3, 16)>
  Line 4   |  c = a + b                                          <Node type=expression_statement, start_point=(4, 4), end_point=(4, 13)>
  Line 6   |  print(c - a)                                       <Node type=expression_statement, start_point=(6, 8), end_point=(6, 20)>
  Line 10  |  print(c - a)                                       <Node type=expression_statement, start_point=(10, 8), end_point=(10, 20)>
  ```




  This library is designed to analyze Python code. The inputted code should be code snippets, rather than entire functions or programs. Below are examples of invalid and valid input for the library's analysis functions.


  ```sh
  def example_function(a, b):
    c = a + b
    d = 12
    return c
  ```
  This example is invalid because it includes the function definition.

  ```sh
  a = 1
  b = 2
  c = a + b
  d = 12
  return c
  ```
  This example is valid because it is just the code that would be found within a function, and does not include the function definition.

  Because of the required input format for the library's analysis functions, calls to other function within the inputted code snippets are not within the scope of our analysis.


  This library is deisgned to be a static analysis tool, so there are some more dynamic cases that are out of the scope of our analysis.

  For example, the code snippet below would be valid input, but the analysis of this could would not be as complete as that of a more static code snippet because of the changes the the value of the variable a within the while loop.

  ```sh
  a = 1
  while (a < 5):
    if a == 4:
      print(a)
    a += 1
  ```
  Due to the nature of static analyis tools, our library cannot handle and analyze external dependencies, such as library calls or user input.



  We have not identified any limitations specific to the analysis of unused variables, but the same limitations mentioned above still apply to this form of analysis.


  Due to the constraints of static analysis, our identification of unreachable definitions does not account for changes to variables that happen within iterations of a loop, other than the first iteration. This means that the identification of lines of code within a loop is determined based on the values of variables at the time of the first iteration of the loop.

  For example, in the analysis of the code snippet below, the line 'print(a)' would be identified as an unreachable definition, even though after 10 iterations of the loop, this line would be reached. On the first iteration though, it is unreached.

  ```sh
  a = 1
  b = 2
  while True:
    if a == 10:
      print(a)
    else:
      print(b)
    a += 1
  ```


  For our analysis of very busy expressions, expressions are considered very busy if they are repeated and each instance is exactly the same, other than any difference in whitespace.

  For example, in our analysis, 'a + b' and 'b + a' would not be considered as the same expressions, because the order of 'a' and 'b' is swapped.

  In regards to whitespace, 'a + b' and 'a+b' would be considered as the same expression, despite the difference in spacing.

  Lastly, it is important to note that 'a + b' and 'a + b + c' would not be condisered busy together in our analysis, despita 'a + b' being part of both expressions.


  Our dead code analysis function inherits functionality from the other analysis functions, and thus inherits the same limitations.


pkgId: 7089300dfc7c8caf1abe57fcd4647fcc1d3d9f4d830947b7a6588dc9f62a966d
name: python-cfgrib-help
arch: noarch
version: 0.9.15.0
epoch: 0
release: 1
summary: Development documents and examples for cfgrib
url: https://github.com/ecmwf/cfgrib
rpm_license: Apache License Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cfgrib-0.9.15.0-1.src.rpm
location_href: Packages/python-cfgrib-help-0.9.15.0-1.noarch.rpm
checksum_type: sha256
description:
  Python interface to map GRIB files to the
  `Unidata's Common Data Model v4 <https://docs.unidata.ucar.edu/netcdf-java/current/userguide/common_data_model_overview.html>`_
  following the `CF Conventions <http://cfconventions.org/>`_.
  The high level API is designed to support a GRIB engine for `xarray <http://xarray.pydata.org/>`_
  and it is inspired by `netCDF4-python <http://unidata.github.io/netcdf4-python/>`_
  and `h5netcdf <https://github.com/shoyer/h5netcdf>`_.
  Low level access and decoding is performed via the
  `ECMWF ecCodes library <https://confluence.ecmwf.int/display/ECC/>`_ and
  the `eccodes python package <https://pypi.org/project/eccodes>`_.
  Features with development status **Beta**:
  - enables the ``engine='cfgrib'`` option to read GRIB files with *xarray*,
  - reads most GRIB 1 and 2 files including heterogeneous ones with ``cfgrib.open_datasets``,
  - supports all modern versions of Python 3.9, 3.8, 3.7 and PyPy3,
  - the 0.9.6.x series with support for Python 2 will stay active and receive critical bugfixes,
  - works wherever *eccodes-python* does: *Linux*, *MacOS* and *Windows*
  - conda-forge package on all supported platforms,
  - reads the data lazily and efficiently in terms of both memory usage and disk access,
  - allows larger-than-memory and distributed processing via *xarray* and *dask*,
  - supports translating coordinates to different data models and naming conventions,
  - supports writing the index of a GRIB file to disk, to save a full-file scan on open,
  - accepts objects implementing a generic *Fieldset* interface as described in `ADVANCED_USAGE.rst`.
  Work in progress:
  - **Beta** install a ``cfgrib`` utility that can convert a GRIB file ``to_netcdf``
    with a optional conversion to a specific coordinates data model,
    see `#40 <https://github.com/ecmwf/cfgrib/issues/40>`_.
  - **Alpha/Broken** support writing carefully-crafted ``xarray.Dataset``'s to a GRIB1 or GRIB2 file,
    see the *Advanced write usage* section below, `#18 <https://github.com/ecmwf/cfgrib/issues/18>`_
    and `#156 <https://github.com/ecmwf/cfgrib/issues/156>`_.
  Limitations:
  - relies on *ecCodes* for the CF attributes of the data variables,
  - relies on *ecCodes* for anything related to coordinate systems / ``gridType``,
    see `#28 <https://github.com/ecmwf/cfgrib/issues/28>`_.


pkgId: 689ccb3f875e81976b3008bdb7678cdaab5eb7708833902f73290305704f75e6
name: python-cforces-help
arch: noarch
version: 0.1
epoch: 0
release: 1
summary: Development documents and examples for cforces
url: https://github.com/x93bd0/cforces
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cforces-0.1-1.src.rpm
location_href: Packages/python-cforces-help-0.1-1.noarch.rpm
checksum_type: sha256
description:
  <a id="readme-top"></a>
  [![Built With][BuiltWithPy-Badge]][BuiltWithPy-Link]
  [![Stargazers][Stars-Badge]][Stars-Link]
  [![License][License-Badge]][License-Link]
  [![Telegram Channel][Telegram-Badge]][Telegram-Link]

  <br />
  <div align="center">
    <a href="https://github.com/x93bd0/cfapi">
      <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/Codeforces_logo.svg/512px-Codeforces_logo.svg.png" alt="Logo" width="512" height="60">
    </a>

    <h3 align="center">Python Codeforces API</h3>
    <p align="center">
      A Codeforces API wrapper for Python.
      <br />
      <a href="https://github.com/x93bd0/cfapi/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
      ·
      <a href="https://github.com/x93bd0/cfapi/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
    </p>
  </div>


  `cfapi` is a complete implementation of the [Codeforces-API][CodeforcesAPI-Link], featuring classes for every type of the API, each with detailed documentation for a better understanding.

  It's heavily inspired on [Pyrogram][Pyrogram-Link] structure and documentation.

  <p align="right">(<a href="#readme-top">back to top</a>)</p>



  ```sh
  pip install cforces
  ```


  ```
  pip install git+https://github.com/x93bd0/cfapi/
  ```

  <p align="right">(<a href="#readme-top">back to top</a>)</p>


  As an example, in the following code snippet we are obtaining the handles of the friends of the authenticated user and printing their user objects:

  ```python
  from cforces import Client, types
  from typing import List
  import asyncio


  async def main() -> None:
      client: Client = Client()  # Instantiate a Client object.
      client.auth(
          YOUR_API_KEY, YOUR_API_SECRET
      )  # Authenticate yourself with your api_key + api_secret.

      async with client as api:
          friends_handles: List[str] = (
              await api.user_friends()
          )  # Fetch authenticated user's friends.
          friends_users: List[User] = await api.user_info(
              friends_handles
          )  # Fetch a user object for each of those.

          for user in friends_users:
              print(user)  # Print it.


  if __name__ == "__main__":
      asyncio.run(main())
  ```

  <p align="right">(<a href="#readme-top">back to top</a>)</p>



  - [ ] Finish the documentation.
  - [ ] Implement helper methods for making the interaction easier.
  - [ ] Find every possible error and implement it.
  - [ ] Add tests.



  Distributed under the MIT License. See `LICENSE` for more information.

  <p align="right">(<a href="#readme-top">back to top</a>)</p>

  [CodeforcesAPI-Link]: https://codeforces.com/apiHelp
  [Pyrogram-Link]: https://github.com/pyrogram/pyrogram/

  [BuiltWithPy-Badge]: https://img.shields.io/badge/Built_With-Python-blue?style=for-the-badge&logo=python&logoColor=white
  [BuiltWithPy-Link]: https://python.org/

  [Stars-Badge]: https://img.shields.io/github/stars/x93bd0/cfapi?style=for-the-badge
  [Stars-Link]: https://github.com/x93bd0/cfapi/stargazers

  [License-Badge]: https://img.shields.io/github/license/x93bd0/cfapi?style=for-the-badge
  [License-Link]: https://github.com/x93bd0/cfapi/blob/master/LICENSE.txt

  [Telegram-Badge]: https://img.shields.io/badge/Telegram_Channel-grey?style=for-the-badge&logo=telegram&logoColor=white
  [Telegram-Link]: https://t.me/x93dev


pkgId: cea4c5baf12713d38822b08de55f2dbec1fe3d7af3642a1738b866fcc6379aca
name: python-cfspflat-help
arch: noarch
version: 24.12.17
epoch: 0
release: 1
summary: Development documents and examples for cfspflat
url: https://github.com/Glocktober/cfspflat
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cfspflat-24.12.17-1.src.rpm
location_href: Packages/python-cfspflat-help-24.12.17-1.noarch.rpm
checksum_type: sha256
description:
  A few weeks ago one of our SaaS vendors added a couple of additional DNS entries to their SPF record (without telling us...).
  We started to get reports of email deliver failures. Looking into it we discovered the number of DNS entries in our SPF record was the problem. The SaaS vendors change put us over the maximum of 10.
  We've decided future SaaS vendors and partners will send from a subdomain, but for existing ones there are too many actors - both internal and external to accomplish this change any time soon.
  Hence we started researching SPF flattening as the best solution, but were concerned about the vendors making changes to the sender records.
  Looking for a solution to that probkem we stumbled upon the [sender-policy-flattener](https://github.com/cetanu/sender_policy_flattener) project.  This tool - `spflat` - solved many problems and has some excellent features and characteristics.
  * The project is opensource
  * It will query your list of approved sendors and flatten these into a list of appropriately formatted and sized spf records composed of `ip4` and `ip6` spf entries.
  * Provide these entries as a chain of spf `include` entries.
  * Should any of your the senders dns entries change, it sends email indicating the changes and the the corrections required to your spf records.
  * `spflat` works reliably and accurately
  * Can run entirely from a JSON configuration file.
  * Written in Python, and easy to install and configure.
  `sendier-policy-flattner` did ***90%*** of what we desired for flattening and managing our SPF records.

  After using `splat` for a bit we come up with a wish list - the other ***10%*** of what we needed.
  Here is the wishlist of requirements we came up with:
  * The ability to run `spflat` in the command line, without the email being sent. (a `--no-email` switch)
  * Our public DNS zones are in Cloudflare. We wanted `spflat` to **AUTOMATICALLY** update the necessary resource records in Cloudflare when a  change is detected. (a `--update` switch).
  * Ability to have `spflat` re-create the SPF zone records in Cloudflare DNS for zone repair (and initial configuration.) (a `--force-update` switch)
  * Have the output status file (sums file) update ONLY if the zones are updated.
    * original `spflat` replaces the sums file each time it ran, so in monitoring mode a change was reported only once.
  * `sender-policy-flattener` is a fine tool, so we did not want to reinvent the wheel:
    * Utilized `spflat` by supplementing its functionality.
    * A supplement, not a replacement.
  * Keep the changes opensource:
    * Recognize the debt to `sender-policy-flattener`
    * Make the changes avialable under the same licenses.
    * To limit confusion, change the command from `spflat` to `cfspflat`
  Hence `cfspflat` - ***CloudFlare Sender Policy Flattener*** was created.

  Quick overview:
  ```bash
  % cfspflat -h
  usage: cfspflat [-h] [-c CONFIG] [-o OUTPUT] [--update-records] [--force-update]
            [--no-email]
  A script that crawls and compacts SPF records into IP networks. This helps to
  avoid exceeding the DNS lookup limit of the Sender Policy Framework (SPF)
  https://tools.ietf.org/html/rfc7208#section-4.6.4
  optional arguments:
    -h, --help            show this help message and exit
    -c CONFIG, --config CONFIG
                          Name/path of JSON configuration file (default:
                          spfs.json)
    -o OUTPUT, --output OUTPUT
                          Name/path of output file (default spf_sums.json)
    --update-records      Update SPF records in CloudFlare
    --force-update        Force an update of SPF records in Cloudflare
    --no-email            don't send the email
  ```
  * The `sender-policy-flattener` module is installed as part of `cfspflat`
  * The existing core of `spflat` is kept mostly intact, so the basic features are maintained by `cfspflat`.
  * The changes to accomodate `cfspflat` were in the parameter handling and adding the Cloudflare updates to the processing look.
  * The `cloudflare` library, with some abstraction classes, is used to make the zone updates.
  * `cfspflat` eliminates many of the command arguments of spflat in favor of using the json config file.
  * Cloudflare TXT records are automatically generated and updated when the configuration changes.
  * With `cfspflat` you can completely automate your SPF flattening using cfspflat with the `--update` switch in a cron job, even silently with the `--no-email` switch


  ```bash
  % pip install cfspflat
  ```
  * But it's advisable to do this in its own venv:
  ```bash
  % python3 -m venv spfenv
  % source spfenv/bin/activate
  % pip install cfspflat
  ```
  * pip will install the prerequisites, including the `sender-policy-flattner` (spflat), `dnspython`, `netaddr`, and `cloudflare` python modules.
  * The executable is installed in bin of the venv as `cfspflat`

  Create the TXT SPF record on zone apex used (e.g. example.com), At the end of this anchor record include the first SPF record that slpat will write - spf0.example.com
   * we also include our own `ip4` and `ip6` entries in this anchor record.
  ```
  example.com TXT "v=spf1 mx include:spf0.example.com -all"
  ```
  * This anchor record is never changed by `cfspflat`. It's purpose is to link to the first SPF record in the chain that `cfspflat` manages.

  Create a spfs.json file.  Add all the entries required:
  * `cfspflat` uses the same configuration and sums file formats as the original `spflat`.
  * If you already use spflat you can use thos files as is with cfspflat.
  * There is one extension - the "update_subject" entry containing the subject of the email sent when cfspflat has updated your SPF records.  This message will contain the same detail spflat provides.
  * `spfs.json` is the default name of the config file, but it can be specified with the `--config` switch.
  * Here is an example config file:

  ```json
  {
      "sending domains": {
          "example.edu": {
                "amazonses.com": "txt",
                "goodwebsolutions.net": "txt",
                "delivery.xyz.com": "txt",
                "spf.protection.outlook.com": "txt"
          }
      },
      "resolvers": [
              "1.1.1.1", "8.8.8.8"
      ],
      "email": {
          "to": "dnsadmins@example.com",
          "from": "spf_monitor@example.com",
          "subject": "[WARNING] SPF Records for {zone} have changed and should be updated.",
          "update_subject" : "[NOTICE] SPF Records for {zone} have been updated.",
          "server": "smtp.example.com"
      },
      "output": "monitor_sums.json"
  }
  ```

  * The `sending domains` section is **required** and contains sending domain entries: this is your sender domain (e.g. example.com for j.smith@example.com, noreply.example.com for deals@noreply.example.com )  There can be multiple sending domains in the config file.
  * Each sending domain contains dns spf records for the dns `include` records of your approved senders.These dns names are resolved and flattened:
    * These entries are in the key-value pairs of <fqdn> : <record type>.
    * Record type can be "txt" (other SPF records),  "A" and "AAAA" records (for specific hosts).
  * The `resolvers` section is **optional** (using the system default DNS resolvers if none are supplied)
  * The `email` stanza is **required** and is global (i.e. for all `sending domains`).  This section includes:
    * `subject` **(optional)** is the email subject if a change was detected but no updates were made. The default message is the one shown in the example.
    * `update_subject` **(optional)** is the email subject if a change was detected and the dns records were updated. The default message is shown in the example.
      * `to` - is **required** - this is the destination for emails sent by `cfspflat`
      * `from` - is **required** - the source email of the messages `cfspflat` sends
      * `server` - is **required** - your mail relay.
  * `output` is the file that maintains the existing state and checksum of sender records. If this is not specified `spfs_sum.json` is used.

  * The `output` file is a JSON file only updated if it is new (empty) or the records have been updated.
  * Likewise the default output file is `spf_sums.json` but can be changed in the config file or by the `--output` switch.
  * This contains the list of flattened spf records and a checksum used to assess changes in senders records.
  * Because you recieve emails of detected changes or updates, there is little reason to care about the output file.

  There are a couple of locations and formats for the API credentials Cloudfare requires.
  * Consult cloudflare documentation and the dashboard for creating API credentials
  * Consult the python-cloudflare site for documentation on passing credentials.
  * For simplicity you can use the `.cloudflare.cfg` file in either your home directory or in the directory you will run cfspflat.
  ```
  [CloudFlare]
  email = "dnsadmin@example.org"
  api_key = "1234567890abc...abc"

  api_token = "your-generated..API-token"
  ```
  * It should go without saying - protect the API keys and this file.
  * It's also possible to pass the credentials as environment variables (`CLOUDFLARE_EMAIL`, `CLOUDFLARE_API_KEY`, `CLOUDFLARE_API_TOKEN`).

  * Run cfspflat twice:
  ```bash
  % cfspflat --no-email
  % cfspflat --force
  ```
  * The first time constructs the base records and the second time forces the dns updates.
  * With force update the DNS records are created even if a change hasn't been detected.
  * A list of the records will be sent to your email.

  * You are up and running:
    * You can run `cfspflat` in advisory mode (like `spflat`) sending you emails notifying of changes
    * Or you can run it with the `--update-records` switch and update your records automatically whenever they change (still giving you notifications of the changes made.)


pkgId: 4c5a4fe2c8a2d23eba730fdb1999b21ef9eeefdaedda790ed626e981444d9a86
name: python-cfx-address-help
arch: noarch
version: 1.2.4
epoch: 0
release: 1
summary: Development documents and examples for cfx-address
url: https://pypi.org/project/cfx-address/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cfx-address-1.2.4-1.src.rpm
location_href: Packages/python-cfx-address-help-1.2.4-1.noarch.rpm
checksum_type: sha256
description:
  Conflux base32 address utilities

  Full documentation -> https://conflux-fans.github.io/cfx-address/cfx_address.html#module-cfx_address



  ```bash
  pip install cfx-address
  ```



  ```python
  from cfx_address import Base32Address
  ```


  ``` python
  Base32Address.is_valid_base32("0x1ecde7223747601823f7535d7968ba98b4881e09")

  Base32Address.validate("0x1ecde7223747601823f7535d7968ba98b4881e09")

  ```



  ``` python

  Base32Address.encode_base32("0x1ecde7223747601823f7535d7968ba98b4881e09", network_id=1)



  Base32Address.decode("cfxtest:aatp533cg7d0agbd87kz48nj1mpnkca8be1rz695j4")




  ```



  ```python
  address_str = "cfxtest:aatp533cg7d0agbd87kz48nj1mpnkca8be1rz695j4"
  address_verbose_str = "CFXTEST:TYPE.USER:AATP533CG7D0AGBD87KZ48NJ1MPNKCA8BE1RZ695J4"
  assert Base32Address.equals(address_str, address_verbose_str)

  Base32Address.calculate_mapped_evm_space_address(address_str)
  Base32Address.zero_address(network_id=1)
  Base32Address.shorten_base32_address(address_str)
  ```





  ```python
  address = Base32Address("cfxtest:aatp533cg7d0agbd87kz48nj1mpnkca8be1rz695j4")



  assert isinstance(address, str)


  Base32Address("0x1ecde7223747601823f7535d7968ba98b4881e09", network_id=1029)



  Base32Address(address, network_id=1029)



  Base32Address(address, verbose=True)

  ```



  ```python

  assert address == "cfxtest:aatp533cg7d0agbd87kz48nj1mpnkca8be1rz695j4"
  assert address == "CFXTEST:TYPE.USER:AATP533CG7D0AGBD87KZ48NJ1MPNKCA8BE1RZ695J4"
  assert "CFXTEST:TYPE.USER:AATP533CG7D0AGBD87KZ48NJ1MPNKCA8BE1RZ695J4" == address
  assert "cfxtest:aatp533cg7d0agbd87kz48nj1mpnkca8be1rz695j4" == address


  mainnet_address = Base32Address(address, 1029)
  assert mainnet_address == "cfx:aatp533cg7d0agbd87kz48nj1mpnkca8be7ggp3vpu"
  assert not address == mainnet_address


  [
      address.address_type,
      address.network_id,
      address.hex_address,
      address.verbose_address,
      address.short,
      address.mapped_evm_space_address
  ]







  ```


pkgId: 067ccb925b5f7fc73fa648271b8b21c5f7b2f96d47c531038a7158965fe28628
name: python-cg-help
arch: noarch
version: 64.5.29
epoch: 0
release: 1
summary: Development documents and examples for cg
url: https://github.com/Clinical-Genomics/cg
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cg-64.5.29-1.src.rpm
location_href: Packages/python-cg-help-64.5.29-1.noarch.rpm
checksum_type: sha256
description:
  ![Build Status - Github][gh-actions-badge]
  [![Coverage Status][coveralls-image]][coveralls-url]
  [![GitHub issues-closed][closed-issues-img]][closed-issues-url]
  [![Average time to resolve an issue][ismaintained-resolve-img]][ismaintained-resolve-url]
  [![Percentage of issues still open][ismaintained-open-rate-img]][ismaintained-open-rate-url]
  [![CodeFactor][codefactor-badge]][codefactor-url]
  [![Code style: black][black-image]][black-url]


  `cg` stands for _Clinical Genomics_; a clinical sequencing platform under [SciLifeLab][scilife]

  In this context, `cg` provides the interface between these tools to facilitate automation and other necessary cross-talk. It also exposes some APIs:

  - HTTP REST for powering the web portal: [clinical.scilifelab.se][portal]
  - CLI for interactions on the command line



  Please check out our [guide for contributing to cg](CONTRIBUTING.md)



  Cg written in Python 3.9+ and is available on the [Python Package Index][pypi] (PyPI).

  ```bash
  pip install cg
  ```

  If you would like to install the latest development version, use [poetry](https://python-poetry.org/docs/).

  ```bash
  git clone https://github.com/Clinical-Genomics/cg
  cd cg
  poetry install
  ```


  [portal]: https://clinical.scilifelab.se/
  [trailblazer]: https://github.com/Clinical-Genomics/trailblazer
  [housekeeper]: https://github.com/Clinical-Genomics/housekeeper
  [genotype]: https://github.com/Clinical-Genomics/genotype
  [scilife]: https://www.scilifelab.se/
  [pypi]: https://pypi.org/


  [black]: https://black.readthedocs.io/en/stable/

  <!-- badges -->

  [coveralls-url]: https://coveralls.io/github/Clinical-Genomics/cg
  [coveralls-image]: https://coveralls.io/repos/github/Clinical-Genomics/cg/badge.svg?branch=master

  [gh-actions-badge]: https://github.com/Clinical-Genomics/cg/workflows/Tests%20and%20coveralls/badge.svg
  [closed-issues-img]: https://img.shields.io/github/issues-closed/Clinical-Genomics/cg.svg
  [closed-issues-url]: https://GitHub.com/Clinical-Genomics/cg/issues?q=is%3Aissue+is%3Aclosed
  [ismaintained-resolve-img]: http://isitmaintained.com/badge/resolution/Clinical-Genomics/cg.svg
  [ismaintained-resolve-url]: http://isitmaintained.com/project/Clinical-Genomics/cg
  [ismaintained-open-rate-img]: http://isitmaintained.com/badge/open/Clinical-Genomics/cg.svg
  [ismaintained-open-rate-url]: http://isitmaintained.com/project/Clinical-Genomics/cg
  [codefactor-badge]: https://www.codefactor.io/repository/github/clinical-genomics/cg/badge
  [codefactor-url]: https://www.codefactor.io/repository/github/clinical-genomics/cg
  [black-image]: https://img.shields.io/badge/code%20style-black-000000.svg
  [black-url]: https://github.com/psf/black


pkgId: d86491300b5243c71ad34fc12397a12ba57542251970e17fe6aaef9972a4d29c
name: python-chain_harvester-help
arch: noarch
version: 1.0.1
epoch: 0
release: 1
summary: Development documents and examples for chain_harvester
url: https://github.com/blockanalitica/chain-harvester
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chain_harvester-1.0.1-1.src.rpm
location_href: Packages/python-chain_harvester-help-1.0.1-1.noarch.rpm
checksum_type: sha256
description:
  Chain Harvester is a utility for seamlessly interacting with Ethereum-like blockchains. It provides a comprehensive set of methods to fetch information from the blockchain, including blocks, events, and storage content of contracts.

  - **Github repository**: <https://github.com/blockanalitica/chain-harvester/>



  - **Web3 Integration**: Direct integration with the Web3.py library for querying Ethereum nodes.
  - **Event Decoding**: Decode event logs and get events for specific contracts or topics.
  - **Contract Storage**: Fetch storage content at specific positions for a contract.
  - **Multicall Support**: Batch multiple contract calls into a single request.
  - **Retry Mechanism**: Built-in retry mechanism for HTTP requests.
  - **ABI Management**: Load and cache ABI (Application Binary Interface) data for contracts.



  To install Chain Harvester, simply use `pip`:

  ```
  pip install chain-harvester
  ```

  Make sure you have `pip` installed and are using a version of Python that is compatible with Chain Harvester.



  Chain Harvester provides specific implementations for different blockchains and their respective versions or networks. Each chain is encapsulated in its own class, which inherits from the base `Chain` class. These chain-specific classes contain data and methods that are relevant to their respective blockchains.



  - **Ethereum Mainnet**: Located in `networks.ethereum.mainnet`. This class, `EthereumMainnetChain`, interacts with the Ethereum mainnet.

    ```python
    from networks.ethereum.mainnet import EthereumMainnetChain

    eth_main = EthereumMainnetChain(rpc="YOUR_RPC_ENDPOINT")
    ```

  - **Ethereum Goerli**: Located in `networks.ethereum.goerli`. This class is designed to interact with the Goerli testnet of Ethereum.

    ```python
    from networks.ethereum.goerli import EthereumGoerliChain

    eth_goerli = EthereumGoerliChain(rpc="YOUR_RPC_ENDPOINT")
    ```



  - **Gnosis Mainnet**: Located in `networks.gnosis.mainnet`. This class is designed to interact with the Gnosis mainnet.

    ```python
    from networks.gnosis.mainnet import GnosisMainnetChain

    gnosis_main = GnosisMainnetChain(rpc="YOUR_RPC_ENDPOINT")
    ```




  We welcome contributions from everyone! Here's how you can help:

  1. **Fork and Clone**: Begin by forking the Chain Harvester repository to your GitHub account. Clone this forked repository to your local machine to start making changes.
  2. **Set Up Environment**: Ensure you have the necessary dependencies installed. Follow the installation guide in the README to set up your environment.
  3. **Make Changes**: Create a new branch for your changes. Make sure to write clean code and follow the project's coding standards. It's also a good practice to write tests for any new features or bug fixes.
  4. **Commit and Push**: Once you've made your changes, commit them with a clear and descriptive commit message. Push your changes to your forked repository on GitHub.
  5. **Submit a Pull Request (PR)**: Go to the Chain Harvester repository on GitHub and create a new pull request. Make sure to provide a detailed description of your changes. This will help the maintainers review your PR more efficiently.
  6. **Review**: Maintainers and contributors will review your PR. They might suggest changes or improvements. Make sure to address any comments or feedback.
  7. **Merge**: Once your PR is approved, it will be merged into the main codebase. Congratulations, and thank you for your contribution!

  For any questions or discussions, please open an issue or join our community chat.



  We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for our commit messages. This leads to more readable messages that are easy to follow when looking through the project history.



  Each commit message consists of a **header**, a **body**, and a **footer**. The header has a special format that includes a **type**, an optional **scope**, and a **description**:

  ```
  <type>(<scope>): <description>

  [optional body]

  [optional footer]
  ```

  For example:

  ```
  fix(server): fix crash on start-up

  The application crashed on start-up due to an environment variable missing. This commit ensures that the application checks for the environment variable before start-up.
  ```



  We primarily use the following commit types:

  - **fix**: Patches a bug in your codebase.
  - **feat**: Introduces a new feature to the codebase.
  - **BREAKING CHANGE**: An API change that breaks backward compatibility.
  - **chore**: Regular code maintenance.
  - **docs**: Documentation only changes.
  - **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc).
  - **refactor**: A code change that neither fixes a bug nor adds a feature.
  - **perf**: A code change that improves performance.
  - **test**: Adding missing tests or correcting existing ones.

  For more details, visit the [Conventional Commits website](https://www.conventionalcommits.org/).


pkgId: 9e14ac82f33290131de835f38f476968ac5c119145d70b9e7a4fe0f28dbed10a
name: python-chainfactory-py-help
arch: noarch
version: 0.0.16
epoch: 0
release: 1
summary: Development documents and examples for chainfactory-py
url: https://pypi.org/project/chainfactory-py/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chainfactory-py-0.0.16-1.src.rpm
location_href: Packages/python-chainfactory-py-help-0.0.16-1.noarch.rpm
checksum_type: sha256
description:
  ChainFactory is a declarative system for creating complex, multi-step LLM workflows using a simple YAML-like syntax. It allows you to connect multiple prompts in a chain, with outputs from one step feeding into inputs of subsequent steps. The most important feature is the reduced reliance on exact wording of the prompts and easy parallel execution wherever iterables are involved.


  - Sequential and parallel chain execution
  - Ideal for Split-Map-Reduce workflows.
  - Automatic prompt generation from concise purpose statements.
  - Type-safe outputs with Pydantic models.
  - Chain inheritance and reusability.
  - Smart input/output mapping between chain links.
  - Hash based caching for intermediate prompts and masks.
  - Tool calling for fetching data and performing actions.




  A chain-link is a single unit in your workflow / chain, defined using the `@chainlink` directive:
  ```yaml
  @chainlink my-first-chain
  prompt: Write a story about {topic}
  out:
      story: str
  ```

  You can specify how chainlinks execute:
  - Sequential (`--` or `sequential`): Links run one after another serially.
  - Parallel (`||` or `parallel`): Links run simultaneously for multiple inputs (requires an iterable output from the previous link).
  **Example**: A 3 step chain.

  ```yaml
  @chainlink generator --     # runs once
  @chainlink reviewer ||      # runs multiple times in parallel, number of runs is determined by output of the previous link which must be or have an iterable
  @chainlink summarizer --    # runs once to summarize the output of the previous parallel link
  ```




  Instead of writing prompts manually, let ChainFactory generate them:
  ```yaml
  @chainlink
  purpose: generate creative haiku topics
  in:
      num: int
  out:
      topics: list[str]
  ```
  The system will automatically create an optimal prompt based on the purpose and the input variales before executing the chain.


  If a chainlink output is an iterable or something with an iterable attribute, the next chainlink can operate on each element of the previous one concurrently - drastically improving the performance. To achieve this, we just need to change the link type to  `||` or `parallel`. The `Split-Map-Reduce` kind of workflows benefit the most from `ChainFactory`'s seamless parallelism.
  ```yaml
  @chainlink topic_generator --
  purpose: generate creative haiku topics
  in:
      num: int
  out:
      topics: list[str]

  @chainlink haiku_generator || # parallel to generate multiple haikus
  purpose: generate a haiku
  in:
      topics.element: str
  out:
      topic: str
      haiku: str
  ```


  You can build on top of existing chains using the `@extends` directive. If a flow is common to multiple chains, it can be defined once and reused using `@extends`.
  ```yaml
  @extends examples/base_chain.fctr
  @chainlink additional_step
  ```


  The system automatically maps outputs to inputs between chain links using dot notation:
  ```yaml
  in:
    previous_chain.element.field: str
  ```


  The YAML defined output structures are converted to a proper Python class at runtime. The class is then used to validate and type-check the output of the chain-link.
  ```yaml
  def:
    Haiku:
      text: str = default value % description
      explanation: str?    # optional field
  out:
    haikus: list[Haiku]
  ```



  ```yaml
  @chainlink haiku-generator
  prompt: Write {num} haiku(s) about {topic} # for small inputs, prompt and purpose do not have much of a difference.
  out:
      haikus: list[Haiku]

  @chainlink reviewer ||     # parallely review each haiku
  purpose: critically analyze each haiku
  ```


  ```yaml
  @chainlink cancellation_request
  purpose: return true if a given input email explicitly contains an event cancellation request
  in:
  	email_body: str
  out:
    is_cancellation_request: bool
  ```


  ```yaml
  @chainlink classify
  purpose: to classify the input text into one of the provided labels
  in:
  	text: str
  	labels: list[str]
  def:
    Classification:
      label: str % Most relevant label for the input text.
      text: str % The original input text, verbatim.
      snippet: str % Snippet from input text that justifies the label.
      confidence: Literal["extreme", "high", "medium", "low", "none"] % Your confidence level in the label's accuracy.
  out:
  	classification: Classification

  @tool confidence_filter --
  in:
      classification: Classification

  @tool take_action --
  in:
  	classification: Classification
  out:
  	action: str
      label: str

  @chainlink validate --
  prompt: Is (Action: {action}) in response to (Text: {text}) valid and reasonable?
  out:
      is_valid: bool
      reason: str
  ```

  And here's the python counterpart for above `.fctr` file:
  ```python
  from chainfactory import Engine, EngineConfig
  from some.module import TEXT, HANDLERS

  engine_config = EngineConfig()

  @engine_config.register_tool
  def confidence_filter(**kwargs): # gets called first
      """
      Raise an exception if the confidence level is low.
      """
      raise NotImplementedError

  @engine_config.register_tool  # brand new decorator
  def take_action(**kwargs):
      """
      Call a handler based on the classification by ChainFactory.
      """
      raise NotImplementedError

  if __name__ == "__main__":
      classification_engine = Engine.from_file("examples/classify.fctr", config=engine_config)
      classification_engine(text=TEXT, labels=list(HANDLERS.keys()))
  ```


  1. **Use Purpose Statements**
  When possible, let the system generate prompts using clear one-liner purpose statements. Do this more often for tasks that do not require domain knowledge.
  2. **Type Everything**
  Define input/output types for better reliability:
  ```yaml
  def:
    MyType:
      field1: str
      field2: int?
  ```
  **Side Note**: In a .fctr file,  any type defined above the current chain-link is considered a global type.
  3. **Chain Structure - General Workflows**
  - Start with sequential chains for initial processing.
  - Use parallel chains for whenever the order or execution is unimportant and iterables are involved.
  - End with sequential chains or a final tool call for summarization and getting a final text / object output.

  The above is the Split-Map-Reduce pattern. You can also use `ChainFactory` to just simplify prompt management and execution.
  4. **Documentation**
  Add field descriptions using `%`. This is not only for readability, but also for the LLM to understand the context of the field. It is basically a part of the prompting process.
  ```yaml
  out:
    review: str % A comprehensive analysis of the text
  ```




  For parallel-to-sequential transitions, use masks to format data:
  ```yaml
  mask:
    type: auto
    variables:
      - result.field1
      - result.field2
  ```
  A template is automatically generated based on the supplied variables to the mask. This template is used to format the data before passing it to the final chainlink.


  The system automatically caches generated prompts, and masks by hashing them and storing them under `.chainfactory/cache`. So even though the prompt template is generated dynamically in purpose based prompting, it only needs to be done once in the beginning and then whenever the purpose or the inputs change.
  *Side Note*: It is recommended to commit the `.chainfactory/cache` folder to your codebase's version control system.


  Tools are callables that behave in a similar fashion to chain-links. They are used very similarly to chain-links but with a few key differences:
  - They are not defined in a `.fctr` file.
  - Tools do not have prompts, puposes, or out sections.
  - They are used to fetch data that subsequent chain-links need or to perform an action that uses data from the previous chain-links.
  ```yaml
  @chainlink generator
  purpose: generate haiku
  in:
  	topic: str
  out:
  	haiku: str % the complete haiku text. required.

  @tool websearch
  in:
  	topic: str # becomes a kwarg to the registered tool.


  @tool another_tool
  ```
  *Note:* If the tools are not registered with the engine config, initialization of the engine will fail.

  If defined in a parallel chainlink, the tool will run once corresponding to each instance of the chainlink. Make sure that your tool is stateless and does not have any side effects that could cause issues due to repeated concurrent executions.

  If the code causes some side effects and repeating the action is not safe, please only use `@tool` directive in a sequential context. Most of the places where tool use makes sense are things such as fetching data from an API or a database.

  Tools are registered using the `register_tools` method of the `ChainFactoryEngineConfig` class. The singular version of this, `register_tool`  can also be used as a decorator. **Warning**: loading a file with tools fails if the config already does not have a tool registered with the same name.


  The `ChainFactoryEngine` or simply the `Engine` can be configured using the `ChainFactoryEngineConfig` (`EngineConfig`) class. You can control aspects such as the language model used, caching behavior, concurrency, and execution traces using the config class. Below are the configuration options available:

  - `model`: Specifies the model to use (default is `"gpt-4o"`).
  - `temperature`: Sets the temperature for the model, which controls the randomness of the outputs (default is `0`).
  - `cache`: Enables caching of prompts and results (default is `False`).
  - `provider`: Defines the provider for the language model, with supported options including `"openai"`, `"anthropic"`, and `"ollama"`.
  - `max_tokens`: Specifies the maximum tokens allowed per response (default is `1024`).
  - `model_kwargs`: A dictionary of additional keyword arguments to pass to the model.
  - `max_parallel_chains`: Sets the maximum number of chains that can execute in parallel (default is `10`).
  - `print_trace`: If `True`, enables printing of execution traces (default is `False`).
  - `print_trace_for_single_chain`: Similar to `print_trace` but for single chain execution (default is `False`).
  - `pause_between_executions`: If `True`, prompts for confirmation before executing the next chain (default is `True`).
  - `tools`: A dictionary of tools that can be used from the .fctr files. It's updated using the `register_tools` method of the class.


  ```python
  from chainfactory import Engine, EngineConfig
  from some_module import websearch

  config = EngineConfig(
      model="gpt-4o",
      temperature=0.7,
      cache=True,
      provider="openai",
      max_tokens=2048,
      max_parallel_chains=5,
      print_trace=False,
      print_trace_for_single_chain=False,
      pause_between_executions=True
  )

  config.register_tools([websearch]) # register a tool or multiple using the register_tools method

  @config.register_tool # works as a decorator
  def another_tool(**kwargs):
      return kwargs

  engine = Engine.from_file("examples/haiku.fctr", config)
  ```


  ChainFactory makes it easy to create complex LLM workflows without writing code. Its simple syntax, automatic prompt generation, and smart features let you focus on what matters - designing great AI workflows.

  Remember that this is just an overview - experiment with the examples to discover more possibilities!


  - Check the examples folder for common patterns
  - Break complex chains into smaller, reusable pieces
  - Ping me directly on email: garkotipankaj [at] gmail.com


pkgId: 411c56101d8e2b788041bc10d7d296305acdd145328d7ebb97284fc370cdacc5
name: python-chainforge-help
arch: noarch
version: 0.3.2.4
epoch: 0
release: 1
summary: Development documents and examples for chainforge
url: https://github.com/ianarawjo/ChainForge/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chainforge-0.3.2.4-1.src.rpm
location_href: Packages/python-chainforge-help-0.3.2.4-1.noarch.rpm
checksum_type: sha256
description:
  ChainForge was created by [Ian Arawjo](http://ianarawjo.com/index.html), a postdoctoral scholar in Harvard HCI's [Glassman Lab](http://glassmanlab.seas.harvard.edu/) with support from the Harvard HCI community. Collaborators include PhD students [Priyan Vaithilingam](https://priyan.info) and [Chelse Swoopes](https://seas.harvard.edu/person/chelse-swoopes), Harvard undergraduate [Sean Yang](https://shawsean.com), and faculty members [Elena Glassman](http://glassmanlab.seas.harvard.edu/glassman.html) and [Martin Wattenberg](https://www.bewitched.com/about.html).
  This work was partially funded by the NSF grants IIS-2107391, IIS-2040880, and IIS-1955699. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
  We provide ongoing releases of this tool in the hopes that others find it useful for their projects.

  ChainForge is meant to be general-purpose, and is not developed for a specific API or LLM back-end. Our ultimate goal is integration into other tools for the systematic evaluation and auditing of LLMs. We hope to help others who are developing prompt-analysis flows in LLMs, or otherwise auditing LLM outputs. This project was inspired by own our use case, but also shares some comraderie with two related (closed-source) research projects, both led by [Sherry Wu](https://www.cs.cmu.edu/~sherryw/):
  - "PromptChainer: Chaining Large Language Model Prompts through Visual Programming" (Wu et al., CHI ’22 LBW) [Video](https://www.youtube.com/watch?v=p6MA8q19uo0)
  - "AI Chains: Transparent and Controllable Human-AI Interaction by Chaining Large Language Model Prompts" (Wu et al., CHI ’22)
  Unlike these projects, we are focusing on supporting evaluation across prompts, prompt parameters, and models.


pkgId: 4ef396b22af2573023ae5eb66a705dbb04d455ab7aefdd346933193cf033be73
name: python-chainlit-help
arch: noarch
version: 1.3.2
epoch: 0
release: 1
summary: Development documents and examples for chainlit
url: https://chainlit.io/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chainlit-1.3.2-1.src.rpm
location_href: Packages/python-chainlit-help-1.3.2-1.noarch.rpm
checksum_type: sha256
description:
  [![](https://dcbadge.vercel.app/api/server/ZThrUxbAYw?style=flat)](https://discord.gg/k73SQ3FyUh)
  [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/chainlit_io.svg?style=social&label=Follow%20%40chainlit_io)](https://twitter.com/chainlit_io)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/chainlit)
  [![GitHub Contributors](https://img.shields.io/github/contributors/chainlit/chainlit)](https://github.com/chainlit/chainlit/graphs/contributors)
  [![CI](https://github.com/Chainlit/chainlit/actions/workflows/ci.yaml/badge.svg)](https://github.com/Chainlit/chainlit/actions/workflows/ci.yaml)

  **Build production-ready Conversational AI applications in minutes, not weeks ⚡️**

  Chainlit is an open-source async Python framework which allows developers to build scalable Conversational AI or agentic applications.

  - ✅ ChatGPT-like application
  - ✅ Embedded Chatbot & Software Copilot
  - ✅ Slack & Discord
  - ✅ Custom frontend (build your own agentic experience)
  - ✅ API Endpoint

  Full documentation is available [here](https://docs.chainlit.io). You can ask Chainlit related questions to [Chainlit Help](https://help.chainlit.io/), an app built using Chainlit!

  > [!NOTE]
  > Check out [Literal AI](https://literalai.com), our product to monitor and evaluate LLM applications! It works with any Python or TypeScript applications and [seamlessly](https://docs.chainlit.io/data-persistence/overview) with Chainlit by adding a `LITERAL_API_KEY` in your project.
  >
  > Chainlit is developed and maintained by the Literal AI team, which is currently focused on expanding the capabilities of Literal AI. While we continue to support and maintain Chainlit, we are also committed to enabling the community to contribute, particularly in areas like integrations and data layers.

  <p align="center">
      <img src="https://github.com/Chainlit/chainlit/assets/13104895/0c2cc7a9-766c-41d3-aae2-117a2d0eb8ed" alt="Chainlit user interface" width="80%"></img>
  </p>



  Open a terminal and run:

  ```sh
  pip install chainlit
  chainlit hello
  ```

  If this opens the `hello app` in your browser, you're all set!





  Create a new file `demo.py` with the following code:

  ```python
  import chainlit as cl


  @cl.step(type="tool")
  async def tool():
      
      await cl.sleep(2)
      return "Response from the tool!"


  @cl.on_message  # this function will be called every time a user inputs a message in the UI
  async def main(message: cl.Message):
      """
      This function is called every time a user inputs a message in the UI.
      It sends back an intermediate response from the tool, followed by the final answer.

      Args:
          message: The user's message.

      Returns:
          None.
      """


      
      tool_res = await tool()

      await cl.Message(content=tool_res).send()
  ```

  Now run it!

  ```sh
  chainlit run demo.py -w
  ```

  <img src="/images/quick-start.png" alt="Quick Start"></img>



  Full documentation is available [here](https://docs.chainlit.io). Key features:

  - [💬 Multi Modal chats](https://docs.chainlit.io/advanced-features/multi-modal)
  - [💭 Chain of Thought visualization](https://docs.chainlit.io/concepts/step)
  - [💾 Data persistence + human feedback](https://docs.chainlit.io/data-persistence/overview)
  - [🐛 Debug Mode](https://docs.chainlit.io/data-persistence/enterprise#debug-mode)
  - [👤 Authentication](https://docs.chainlit.io/authentication/overview)

  Chainlit is compatible with all Python programs and libraries. That being said, it comes with integrations for:

  - [LangChain](https://docs.chainlit.io/integrations/langchain)
  - [Llama Index](https://docs.chainlit.io/integrations/llama-index)
  - [Autogen](https://github.com/Chainlit/cookbook/tree/main/pyautogen)
  - [OpenAI Assistant](https://github.com/Chainlit/cookbook/tree/main/openai-assistant)
  - [Haystack](https://docs.chainlit.io/integrations/haystack)



  You can find various examples of Chainlit apps [here](https://github.com/Chainlit/cookbook) that leverage tools and services such as OpenAI, Anthropiс, LangChain, LlamaIndex, ChromaDB, Pinecone and more.

  Tell us what you would like to see added in Chainlit using the Github issues or on [Discord](https://discord.gg/k73SQ3FyUh).



  As an open-source initiative in a rapidly evolving domain, we welcome contributions, be it through the addition of new features or the improvement of documentation.

  For detailed information on how to contribute, see [here](.github/CONTRIBUTING.md).



  Chainlit is open-source and licensed under the [Apache 2.0](LICENSE) license.


pkgId: 7283bf36986193d7810885ba45a6a0ae45ab556ccbc4042a846d2f74351ad610
name: python-chainstate-help
arch: noarch
version: 0.1.8
epoch: 0
release: 1
summary: Development documents and examples for chainstate
url: https://pypi.org/project/chainstate/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chainstate-0.1.8-1.src.rpm
location_href: Packages/python-chainstate-help-0.1.8-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/chainstate.svg)](https://badge.fury.io/py/chainstate)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Python Versions](https://img.shields.io/pypi/pyversions/chainstate.svg)](https://pypi.org/project/chainstate/)

  Chainstate is a powerful and intuitive Python library for implementing state machines. It provides a flexible and easy-to-use framework for defining, managing, and transitioning between states in your applications, with built-in support for sharing data between states.



  Install Chainstate using pip:

  ```bash
  pip install chainstate
  ```



  Here's a simple example to get you started with Chainstate:

  ```python
  from chainstate import Chain, State, EndState

  class GreetingState(State):
      def action(self):
          print("Hello! How can I assist you today?")
          self.context.data['user_name'] = input("Please enter your name: ")

      def next_state(self):
          return FarewellState

  class FarewellState(EndState):
      def action(self):
          user_name = self.context.data.get('user_name', 'Guest')
          print(f"Thank you for using our service, {user_name}. Goodbye!")


  chain = Chain()
  chain.add_state(GreetingState)
  chain.add_state(FarewellState)
  chain.set_initial_state(GreetingState)
  chain.run()
  ```

  This example creates a simple two-state chain that greets the user, asks for their name, and then says farewell using the stored name.





  To create a state, inherit from the `State` class and implement the `action` and `next_state` methods:

  ```python
  class MyState(State):
      def action(self):
          
          print("Performing MyState action")
          
          self.context.data['my_key'] = 'my_value'

      def next_state(self):
          
          return NextState
  ```



  Use the `Chain` class to manage your states:

  ```python
  chain = Chain()
  chain.add_state(MyState)
  chain.add_state(NextState)
  chain.set_initial_state(MyState)
  ```



  Execute the state machine using the `run` method:

  ```python
  chain.run()
  ```



  The `context` attribute allows you to store and retrieve data that can be shared between states:

  ```python
  class StateA(State):
      def action(self):
          self.context.data['shared_value'] = 42

      def next_state(self):
          return StateB

  class StateB(State):
      def action(self):
          value = self.context.data.get('shared_value')
          print(f"Received value from previous state: {value}")
  ```





  Chainstate provides built-in error handling for common issues:

  - `InitialStateNotSetError`: Raised when trying to run a chain without setting an initial state.
  - `StateTransitionError`: Raised when a state transition is invalid or when a state's `next_state` method is not implemented.



  Chainstate uses Python's built-in logging module. You can configure logging to suit your needs:

  ```python
  import logging
  logging.basicConfig(level=logging.DEBUG)
  ```



  Let's implement a simple customer support chatbot using Chainstate:

  ```python
  from chainstate import Chain, State, EndState

  class GreetingState(State):
      def action(self):
          print("Bot: Hello! How can I assist you today?")
          self.context.data['user_input'] = input("You: ")

      def next_state(self):
          user_input = self.context.data['user_input'].lower()
          if 'order' in user_input:
              return OrderState
          elif 'refund' in user_input:
              return RefundState
          else:
              return GeneralInfoState

  class OrderState(State):
      def action(self):
          print("Bot: I can help you with your order. What's your order number?")
          order_number = input("You: ")
          self.context.data['order_number'] = order_number
          print(f"Bot: I've found your order {order_number}. It will be delivered in 2 days.")

      def next_state(self):
          return FarewellState

  class RefundState(State):
      def action(self):
          print("Bot: I'm sorry to hear you need a refund. Please provide your order number.")
          order_number = input("You: ")
          self.context.data['refund_order'] = order_number
          print(f"Bot: I've initiated a refund for order {order_number}. It will be processed in 3-5 business days.")

      def next_state(self):
          return FarewellState

  class GeneralInfoState(State):
      def action(self):
          print("Bot: For general inquiries, please visit our FAQ page at www.example.com/faq")

      def next_state(self):
          return FarewellState

  class FarewellState(EndState):
      def action(self):
          if 'order_number' in self.context.data:
              print(f"Bot: Is there anything else I can help you with regarding your order {self.context.data['order_number']}? (yes/no)")
          elif 'refund_order' in self.context.data:
              print(f"Bot: Is there anything else I can help you with regarding your refund for order {self.context.data['refund_order']}? (yes/no)")
          else:
              print("Bot: Is there anything else I can help you with? (yes/no)")

          response = input("You: ")
          if response.lower() == 'yes':
              return GreetingState
          else:
              print("Bot: Thank you for using our service. Have a great day!")


  chain = Chain()
  chain.add_state(GreetingState)
  chain.add_state(OrderState)
  chain.add_state(RefundState)
  chain.add_state(GeneralInfoState)
  chain.add_state(FarewellState)
  chain.set_initial_state(GreetingState)
  chain.run()
  ```

  This chatbot uses Chainstate to manage different conversation flows based on user input, demonstrating how state machines can be used to create interactive and responsive systems. The context is used to store and retrieve information across different states, allowing for a more personalized interaction.



  Contributions are welcome! Please feel free to submit a Pull Request.



  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


pkgId: 3d3534f0c819d9ee79696c7f21cc087e23507ae740d8c14194acc3af10a3c68e
name: python-chainthon-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for chainthon
url: https://pypi.org/project/chainthon/
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chainthon-0.1.2-1.src.rpm
location_href: Packages/python-chainthon-help-0.1.2-1.noarch.rpm
checksum_type: sha256
description:
  Chainthon is a Python library for building chatbots. It provides a simple interface for building chatbots using natural language processing (NLP) and Large Language Models (LLMs).




  ```bash

  uv init chainthon







  ```




  uv 执行并安装 Python 包提供的命令行工具, 类似于 `pipx`, 可以是`uvx` （uv tool run）在临时环境中运行工具。

  ```bash
  uvx pocowsay "hello world"  # 运行 pocowsay 工具
  ```

  使用`uv tool install`安装工具：

  ```bash
  uv tool install ruff  # 安装 ruff 工具
  ```

  使用`uv tool run`运行工具：

  ```bash
  uv tool run ruff check  # 运行 ruff check 命令
  ```



  uv 安装 Python 并允许在版本之间快速切换。
  安装多个Python版本：
  ```bash

  uv python install 3.10 3.11 3.12
  ```

  根据需要下载Python版本：

  ```bash
  uv venv --python 3.12.0
  uv run --python pypy@3.8 -- python
  ```
  使用当前目录中的特定Python版本：
  ```bash

  uv python pin pypy@3.11
  ```



  将需求编译成与平台无关的需求文件：

  ```bash
  uv pip compile docs/requirements.in \
     --universal \
     --output-file docs/requirements.txt
  ```

  创建虚拟环境：

  ```bash

  uv venv
  ```
  安装锁定要求：

  ```bash

  uv pip sync docs/requirements.txt
  ```




  uv python install ：安装Python版本。
  uv python list ：查看可用的Python版本。
  uv python find ：查找已安装的Python版本。
  uv python pin ：固定当前项目以使用特定的 Python 版本。
  uv python uninstall ：卸载Python版本。



  ```bash
  uv run example.py #  运行脚本
  uv add  --script example.py # 向脚本添加依赖项
  uv remove --script example.py # ：从脚本中删除依赖项
  ```



  创建并处理 Python 项目，即使用pyproject.toml 。

  ```bash
  uv init ：创建一个新的Python项目。
  uv add ：向项目添加依赖项。
  uv remove ：从项目中删除依赖项。
  uv sync ：将项目的依赖项与环境同步。
  uv lock ：为项目的依赖项创建一个锁定文件。
  uv run ：在项目环境中运行命令。
  uv tree ：查看项目的依赖关系树。
  uv build ：将项目构建到分发档案中。
  uv publish ：将项目发布到包索引。
  ```



  运行并安装发布到 Python 包索引的工具，例如`ruff`或`black` 。
  ```bash
  uvx / uv tool run ：在临时环境中运行工具。
  uv tool install ：在用户范围内安装工具。
  uv tool uninstall ：卸载工具。
  uv tool list ：列出已安装的工具。
  uv tool update-shell ：更新 shell 以包含工具可执行文件。
  ```



  手动管理环境和包 - 旨在用于遗留工作流程或高级命令无法提供足够控制的情况。

  ```bash
  uv venv ：创建一个新的虚拟环境。
  uv pip install ：将软件包安装到当前环境中。
  uv pip show ：显示有关已安装软件包的详细信息。
  uv pip freeze ：列出已安装的软件包及其版本。
  uv pip check ：检查当前环境是否有兼容的包。
  uv pip list ：列出已安装的软件包。
  uv pip uninstall ：卸载软件包。
  uv pip tree ：查看环境的依赖关系树。
  uv pip compile ：将需求编译到锁定文件中。
  uv pip sync ：将环境与锁定文件同步。
  ```



  ```bash
  uv cache clean ：删除缓存条目。
  uv cache prune ：删除过时的缓存条目。
  uv cache dir ：显示uv缓存目录路径。
  uv tool dir : 显示uv工具目录路径。
  uv python dir ：显示 uv 安装的 Python 版本路径。
  uv self update ：将uv更新到最新版本。
  uv --help
  uv init --help
  uv version
  ```


  `uv` 支持管理 Python 项目，这些项目在`pyproject.toml`文件中定义其依赖项。

  ```bash
  uv init hello-world
  cd hello-world
  ```
  或者

  ```bash
  mkdir hello-world
  cd hello-world
  uv init
  ```







  v0.1.0
  - 支持uv init创建项目
  - 支持uv add添加依赖项
  - 支持uv remove删除依赖项
  - 初始版本

  v0.1.1
  - 添加异步事件嵌套

  v0.1.2
  - 添加click的命令行界面
  - 添加测试用例



  ```bash
  ruff check .
  mypy src/chainthon
  ```


pkgId: 80a66deb62f23fb428216085a913fbe970fb589e5ae0f99f610ffff9c11271fb
name: python-chalkpy-help
arch: noarch
version: 2.63.6
epoch: 0
release: 1
summary: Development documents and examples for chalkpy
url: https://chalk.ai
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chalkpy-2.63.6-1.src.rpm
location_href: Packages/python-chalkpy-help-2.63.6-1.noarch.rpm
checksum_type: sha256
description:
  Chalk makes it simple to develop feature pipelines for machine
  learning. Define Python functions using the libraries and tools you're
  familiar with instead of specialized DSLs. Chalk then orchestrates
  your functions into pipelines that execute in parallel on a Rust-based
  engine and coordinates the infrastructure required to compute
  features.

  To get started, [define your features](/docs/features) with
  [Pydantic](https://pydantic-docs.helpmanual.io/)-inspired Python classes.
  You can define schemas, specify relationships, and add metadata
  to help your team share and re-use work.
  ```py
  @features
  class User:
      id: int
      full_name: str
      nickname: Optional[str]
      email: Optional[str]
      birthday: date
      credit_score: float
      datawarehouse_feature: float
      transactions: DataFrame[Transaction] = has_many(lambda: Transaction.user_id == User.id)
  ```

  Next, tell Chalk how to compute your features.
  Chalk ingests data from your existing data stores,
  and lets you use Python to compute features with
  [feature resolvers](/docs/resolver-overview).
  Feature resolvers are declared with the decorators `@online` and
  `@offline`, and can depend on the outputs of other feature resolvers.
  Resolvers make it easy to rapidly integrate a wide variety of data
  sources, join them together, and use them in your model.

  ```python
  pg = PostgreSQLSource()
  @online
  def get_user(uid: User.id) -> Features[User.full_name, User.email]:
      return pg.query_string(
          "select email, full_name from users where id=:id",
          args=dict(id=uid)
      ).one()
  ```

  ```python
  import requests
  @online
  def get_socure_score(uid: User.id) -> Features[User.socure_score]:
      return (
          requests.get("https://api.socure.com", json={
              id: uid
          }).json()['socure_score']
      )


pkgId: cbc3dbe1d480a0b46e097a0c9d43d8e3f9e620ef8d4f62ef9eedddbea988ecb2
name: python-channels-rpc-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for channels-rpc
url: https://pypi.org/project/channels-rpc/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-channels-rpc-0.1.0-1.src.rpm
location_href: Packages/python-channels-rpc-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  `channels-rpc`` is aimed to enable [JSON-RPC](http://json-rpc.org/) functionnality
  on top of the excellent django channels project and especially their Websockets
  functionality. It is aimed to be:

  - Fully integrated with Channels
  - Fully implement JSON-RPC 1 and 2 protocol
  - Support both WebSocket and HTTP transports
  - Easy integration



  ```sh
  $ pip install git+ssh://git@github.com/quantivly/channels-rpc.git
  ```



  It is intended to be used as a WebSocket consumer:

  ```python
  from channels_rpc import JsonRpcWebsocketConsumer

  class MyJsonRpcConsumer(JsonRpcConsumer):

      def connect(self, message, **kwargs):
          """Perform things on WebSocket connection start"""
          self.accept()
          print("connect")
          

      def disconnect(self, message, **kwargs):
          """Perform things on WebSocket connection close"""
          print("disconnect")
          

  ```

  JsonRpcWebsocketConsumer derives from `channels`
  [JsonWebsocketConsumer](https://channels.readthedocs.io/en/latest/topics/consumers.html#websocketconsumer).
  Then, the last step is to create the RPC methos hooks using the `rpc_method`
  decorator:

  ```python
  @MyJsonRpcConsumer.rpc_method()
  def ping():
      return "pong"
  ```

  Or, with a custom name:

  ```python
  @MyJsonRpcConsumer.rpc_method("mymodule.rpc.ping")
  def ping():
      return "pong"
  ```

  Will now be callable with `"method":"mymodule.rpc.ping"` in the rpc call:

  ```javascript
  {
      "id":1,
      "jsonrpc":"2.0",
      "method":"mymodule.rpc.ping",
      "params":{}
  }
  ```

  RPC methods can obviously accept parameters. They also return "results" or "errors":

  ```python
  @MyJsonRpcConsumer.rpc_method("mymodule.rpc.ping")
  def ping(fake_an_error):
      if fake_an_error:
          
          
      else:
          
          
  ```



  Simply derive your customer from an asynchronous customer like
  `AsyncJsonRpcWebsocketConsumer`:

  ```python
  from channels_rpc import AsyncJsonRpcWebsocketConsumer

  class MyAsyncJsonRpcConsumer(AsyncJsonRpcWebsocketConsumer):
  	pass

  @MyAsyncJsonRpcConsumer.rpc_method("mymodule.rpc.ping")
  async def ping(fake_an_error):
      return "ping"
  ```



  The original channel message - that can contain sessions (if activated with
  [http_user](https://channels.readthedocs.io/en/stable/generics.html#websockets))
  and other important info can be easily accessed by retrieving the `**kwargs`
  and get a parameter named _consumer_.

  ```python
  MyJsonRpcConsumerTest.rpc_method()
  def json_rpc_method(param1, **kwargs):
      consumer = kwargs["consumer"]
      
  ```

  Example:

  ```python
  class MyJsonRpcConsumerTest(JsonRpcConsumer):
      
      

  ....

  @MyJsonRpcConsumerTest.rpc_method()
  def ping(**kwargs):
      consumer = kwargs["consumer"]
      consumer.scope["session"]["test"] = True
      return "pong"

  ```



  The JsonRpcConsumer class can be tested the same way Channels Consumers are tested.
  See [here](http://channels.readthedocs.io/en/stable/testing.html)


pkgId: 49d50c0939db339b53d69f0a3dfd5f6c0ea3025341cdf0098c8790dfb305e84c
name: python-charla-help
arch: noarch
version: 2.1.0
epoch: 0
release: 1
summary: Development documents and examples for charla
url: https://pypi.org/project/charla/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-charla-2.1.0-1.src.rpm
location_href: Packages/python-charla-help-2.1.0-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI - Version](https://img.shields.io/pypi/v/charla.svg)](https://pypi.org/project/charla)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/charla.svg)](https://pypi.org/project/charla)

  **Charla** is a terminal based application for chatting with language models. Charla integrates with Ollama and GitHub Models for exchanging messages with model services.

  ![preview](https://geeksta.net/img/tools/charla-chat-demo.gif)



  * Terminal-based chat system that supports context aware conversations with language models.
  * Support for local models via Ollama and remote models via GitHub Models.
  * Chat sessions are saved as markdown files in the user's documents directory when ending a chat.
  * Prompt history is saved and previously entered prompts are auto-suggested.
  * Switch between single-line and multi-line input modes without interrupting the chat session.
  * Store user preferences in user config or current directory settings files.
  * Provide a system prompt for a chat session.
  * Load content from local files and web pages to append to prompts.



  To use Charla with models on your computer, you need a running installation of the [Ollama server](https://ollama.com/download) and at least one supported language model must be installed. For [GitHub Models](https://github.com/marketplace/models) you need access to the service and a GitHub token. Please refer to the documentation of the service provider you want to use for installation and setup instructions.

  Install Charla using `pipx`:

  ```console
  pipx install charla
  ```

  For GitHub models, set the environment variable GITHUB_TOKEN to your token. In Bash enter:

  ```console
  export GITHUB_TOKEN=YOUR_GITHUB_TOKEN
  ```



  After successful installation and setup you can launch the chat console with the `charla` command in your terminal.

  If you use Charla with Ollama, the default provider, you only need to specify the model to use, e.g.:

  ```console
  charla -m phi3
  ```

  If you want to use GitHub Models, you have to set the provider:

  ```console
  charla -m gpt-4o --provider github
  ```

  You can set a default model and change the default provider in your user settings file.



  Settings can be specified as command line arguments and in the settings files. Command line arguments have the highest priority. The location of your user config settings file depends on your operating system. Use the following command to show the location:

  ```console
  charla settings --location
  ```

  You can also store settings in the current working directory in a file named `.charla.json`. The settings in this local override the user config settings.

  Example settings for using OpenAI's GPT-4o model and the GitHub Models service by default.

  ```json
  {
      "model": "gpt-4o",
      "chats_path": "./chats",
      "prompt_history": "./prompt-history.txt",
      "provider": "github",
      "message_limit": 20,
      "multiline": false
  }
  ```



  Output of `charla -h` with information on all available command line options.

  <!-- START: DO NOT EDIT -->
  ```text
  usage: charla [-h] [--model MODEL] [--chats-path CHATS_PATH] [--prompt-history PROMPT_HISTORY]
                               [--provider PROVIDER] [--message-limit MESSAGE_LIMIT] [--multiline] [--system-prompt SYSTEM_PROMPT]
                               [--version]
                               {settings} ...

  Chat with language models.

  positional arguments:
    {settings}            Sub Commands
      settings            Show current settings.

  options:
    -h, --help            show this help message and exit
    --model MODEL, -m MODEL
                          Name of language model to chat with.
    --chats-path CHATS_PATH
                          Directory to store chats.
    --prompt-history PROMPT_HISTORY
                          File to store prompt history.
    --provider PROVIDER   Name of the provider to use.
    --message-limit MESSAGE_LIMIT
                          Maximum number of messages to send to GitHub Models service.
    --multiline           Use multiline mode.
    --system-prompt SYSTEM_PROMPT, -sp SYSTEM_PROMPT
                          File that contains system prompt to use.
    --version             show program's version number and exit

  ```
  <!-- END: DO NOT EDIT -->



  Run the command-line interface directly from the project source without installing the package:

  ```console
  python -m charla.cli
  ```



  Installed models:

  ```console
  curl http://localhost:11434/api/tags
  ```

  Model info:

  ```console
  curl http://localhost:11434/api/show -d '{"name": "phi3"}'
  ```



  Charla is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.


pkgId: d5bcb1589ab86bcfbbfeaa24f54352647febe30b88b193211e7250b8fc4b5d87
name: python-chart-builder-help
arch: noarch
version: 0.1.9
epoch: 0
release: 1
summary: Development documents and examples for chart-builder
url: https://github.com/BrandynHamilton/Chart-Builder
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chart-builder-0.1.9-1.src.rpm
location_href: Packages/python-chart-builder-help-0.1.9-1.noarch.rpm
checksum_type: sha256
description:
  - This library builds off Plotly and automates portions of data cleaning and charting for users.
  - A user only inputs specified parameters such as chart type and columns to chart, enabling quick charting of complex data structures.


pkgId: e7964aba4194016244a46c4678c83d69a2e068f95970d6f02bb1348211adc3ab
name: python-chartfactor-help
arch: noarch
version: 5.1.24
epoch: 0
release: 1
summary: Development documents and examples for chartfactor
url: https://github.com/Aktiun/chartfactor-py
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chartfactor-5.1.24-1.src.rpm
location_href: Packages/python-chartfactor-help-5.1.24-1.noarch.rpm
checksum_type: sha256
description:
  [ChartFactor Py](https://chartfactor.com/doc/latest/cfpy_overview/) is built on top of [ChartFactor](https://chartfactor.com), the lightweight visual analytics platform. It includes [ChartFactor Studio](https://chartfactor.com/doc/latest/studio_intro/) and the [ChartFactor Toolkit](https://chartfactor.com/doc/latest/architecture/) between other components.



  Visit the [installation section](https://chartfactor.com/doc/latest/cfpy_installing/) in the ChartFactor Py documentation for a detailed guide.



  Create a new notebook and do the following



  ```python
  from chartfactor import *
  import pandas as pd
  ```



  ```python
  titanic = pd.read_csv('https://chartfactor.com/resources/tutorials/titanic.csv')
  ```



  ```python
  cf.studio("My titanic app")
  ```


  ![image](https://chartfactor.com/resources/images/chartfactor-py/studio-empty.png)


  ![image](https://chartfactor.com/resources/images/chartfactor-py/studio-widgets.png)


pkgId: 830c7e5edbcc175a923b4a53e94569932b5b70288379610ff8006900ffaefcf6
name: python-chat2edit-help
arch: noarch
version: 1.0.6
epoch: 0
release: 1
summary: Development documents and examples for chat2edit
url: https://github.com/nghialt3670/chat2edit-python
rpm_license: CC BY-NC 4.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chat2edit-1.0.6-1.src.rpm
location_href: Packages/python-chat2edit-help-1.0.6-1.noarch.rpm
checksum_type: sha256
description:
  Chat2Edit is a Python package designed for editing files collaboratively with AI assistance. It provides tools to enhance productivity and streamline workflows.



  - AI-powered file editing
  - Seamless collaboration
  - Easy-to-use API



  Install Chat2Edit using pip:

  ```bash
  pip install chat2edit


pkgId: 30cebfe742c5661907a873b13dcaae8766f4ad5267ab6205843e38791a12a379
name: python-chatfaq_sdk-help
arch: noarch
version: 0.1.38
epoch: 0
release: 1
summary: Development documents and examples for chatfaq_sdk
url: https://pypi.org/project/chatfaq_sdk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chatfaq_sdk-0.1.38-1.src.rpm
location_href: Packages/python-chatfaq_sdk-help-0.1.38-1.noarch.rpm
checksum_type: sha256
description:
  For those chatbots with complex Finite State Machine (FSM) behaviours, you will probably want to run them on a separate process, that is what for the SDK is made for. Its primary function is to execute the FSM's computations (transition's conditions and states) by running Remote Procedure Call (RPC) server that listen to the back-end requests.




  Make sure the following list of packages are installed on your system:

  - Python 3.10
  - python3.10-dev
  - python3.10-distutils
  - poetry





      poetry add chatfaq-sdk





  Install project dependencies:

      poetry install



  First of all, create a `.env` file with the needed variables set. You can see an example of those on [.env_example](.env-template) file. Next you can see the explanation of each variable:

  `CHATFAQ_RETRIEVAL_HTTP`: The address for the HTTP of the back-end server.

  `CHATFAQ_BACKEND_WS`: The address for the WS of the back-end server.

  `CHATFAQ_TOKEN`: The token to authenticate with the back-end server. You can retrieve the auth token from the backend server:

  `curl -X POST -u username:password http://localhost:8000/back/api/login/`


  Run the example:

      make run_example

  This will run the example FSM that is located in [./examples/model_example/__init__.py](./examples/model_example/__init__.py) file. You can modify this file to test your own FSMs.




  Alternatively you can simply run the server using docker.



      docker build -t chatfaq-sdk .



      docker run chatfaq-sdk






  This is just a dummy example that displays the basic usage of the library.

  We are going to build the next FSM:

  ![fsm](../doc/source/_static/images/fsm_diagram.png)

  Import basic modules to build your first FMS:

  ```python
  import os
  import random
  from chatfaq_sdk import ChatFAQSDK
  from chatfaq_sdk.fsm import FSMDefinition, State, Transition
  from chatfaq_sdk.conditions import Condition
  from chatfaq_sdk.layers import Message
  ```

  Declare the 3 possible states of our FSM:

  ```python
  def send_greeting(ctx: dict):
      yield Message("Hello!")
      yield Message("How are you?", allow_feedback=False)

  greeting_state = State(name="Greeting", events=[send_greeting], initial=True)


  def send_answer(ctx: dict):
      last_payload = ctx["conv_mml"][-1]["stack"][0]["payload"]["content"]
      yield Message(
          f'My answer to your message: "{last_payload}" is: {random.randint(0, 999)}'
      )
      yield Message("Tell me more")

  answering_state = State(
      name="Answering",
      events=[send_answer],
  )


  def send_goodbye(ctx: dict):
      yield Message("Byeeeeeeee!", allow_feedback=False)

  goodbye_state = State(
      name="Goodbye",
      events=[send_goodbye],
  )

  ```

  Declare the only computable condition for the transitions of our FSM:

  ```python
  def is_saying_goodbye(ctx: dict):
      if ctx["conv_mml"][-1]["stack"][0]["payload"]["content"] == "goodbye":
          return Condition(1)
      return Condition(0)
  ```

  Now lets glue everything together:

  Declare our transitions

  ```python
  any_to_goodbye = Transition(dest=goodbye_state, conditions=[is_saying_goodbye])

  greeting_to_answer = Transition(
      source=greeting_state,
      dest=answering_state,
      unless=[is_saying_goodbye],
  )
  answer_to_answer = Transition(
      source=answering_state, dest=answering_state, unless=[is_saying_goodbye]
  )
  ```

  Build the final instance of our FSM:

  ```python
  fsm_definition = FSMDefinition(
      states=[greeting_state, answering_state, goodbye_state],
      transitions=[greeting_to_answer, any_to_goodbye, answer_to_answer],
  )
  ```

  Finally, run the RPC server loop with the previously built FSM:

  ```python
  import os

  sdk = ChatFAQSDK(
      chatfaq_retrieval_http="http://localhost:8000",
      chatfaq_ws="ws://localhost:8000",
      token=os.getenv("CHATFAQ_TOKEN"),
      fsm_name="my_first_fsm",
      fsm_definition=fsm_definition,
  )
  sdk.connect()
  ```


pkgId: ff3ebba220faa138ff4f1deffc5d7a80730241684cc6fad6be826c1153c0aab5
name: python-chatfusion-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for chatfusion
url: https://github.com/QusaiAlbonni/chatfusion
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chatfusion-0.1.0-1.src.rpm
location_href: Packages/python-chatfusion-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  A flexible and powerful Python library for interacting with various AI language models, including OpenAI's GPT and Google's Gemini.



  - Support for multiple AI providers (OpenAI and Google Gemini and more coming) as well as capability of adding your own
  - Easy-to-use API for generating responses
  - Flexible prompt system supporting both single-message and chat-based interactions immutable data structure
  - Handling of text and file inputs
  - Streaming support for real-time responses
  - Customizable generation parameters



  ```bash
  pip install chatfusion
  ```
  and install the AI libraries you plan on using, for now google-generativeai and openai have built in support



  ```python
  from chatfusion import configure, GeneratorFactory, Prompt

  configure(gemini_api_key="YOUR_API_KEY", openai_api_key= 'YOUR_API_KEY')

  factory = GeneratorFactory()

  gemini_model = factory.create_generator(model_name='gemini-1.5-pro-latest')
  gpt_4o = factory.create_generator(model_name='gpt-4o-mini')

  prompt = Prompt().text('Hi, how are you?')

  response = gemini_model.generate_response(prompt)

  print(response.text())

  response = gpt_4o.generate_response(prompt)

  print(response.text())

  prompt = Prompt().chat().system('Your name is mason')
  prompt = prompt.user('whats your name?')

  response = gemini_model.generate_response(prompt)

  print(response.text())
  ```




  Contributions are welcome! Please feel free to submit a Pull Request.



  This project is licensed under the MIT License.


pkgId: 3135d62b03c08a4e3b374ed064cf8a03fce3be9d6fba895dd7b355c11d168776
name: python-chatsh-help
arch: noarch
version: 0.3.2
epoch: 0
release: 1
summary: Development documents and examples for chatsh
url: https://github.com/renxida/chatsh
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chatsh-0.3.2-1.src.rpm
location_href: Packages/python-chatsh-help-0.3.2-1.noarch.rpm
checksum_type: sha256
description:
  [![Cube Script Demo](demo_gifs/cube_script.gif)](https://www.youtube.com/watch?v=W1ValKNYw_U)




  ChatSH is a command-line tool powered by Claude, designed for syntax-highlighted bash productivity.

  Note: This contains an anthropic api key for you to try it. It's limited to $5 a month so please don't abuse it.


  - Interactive LLM-powered bash REPL
  - Syntax highlighting for improved readability



  Use [Poetry](https://python-poetry.org/) to install the dependencies:

  ```bash
  poetry install
  ```



  Run the tool using:

  ```bash
  chatsh
  ```

  A loaner token is included for the default anthropic chat. It is heavily rate limited so please replace it with your own token ASAP. Write your anthorpic token as a text file to `~/anthropic.token`.


  This project is licensed under the MIT License.


  Victor Tailin. This project is inspired by his [chatsh.mjs](https://web.archive.org/web/20240000000000*/https://github.com/VictorTaelin/AI-scripts/blob/main/chatsh.mjs).




  The trick is a nice prompt with some good examples.


pkgId: a368f9a3c4e5860011d4ab8e16703956d1b0f33a9d1bc4b88f3b28c9e1a09100
name: python-chatthy-help
arch: noarch
version: 0.2.4
epoch: 0
release: 1
summary: Development documents and examples for chatthy
url: https://pypi.org/project/chatthy/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chatthy-0.2.4-1.src.rpm
location_href: Packages/python-chatthy-help-0.2.4-1.noarch.rpm
checksum_type: sha256
description:
  An asynchronous terminal server/multiple-client setup for conducting and managing chats with LLMs.




  - [x] client/server RPC-type architecture
  - [x] message signing
  - [ ] ensure chunk ordering




  - [x] basic chat persistence and management
  - [x] set, switch to saved system prompts (personalities)
  - [ ] manage prompts like chats (as files)
  - [x] chat truncation to token length
  - [x] rename chat
  - [x] profiles (profile x personalities -> sets of chats)
  - [ ] export chat to local file




  - [x] context workspace (load/drop files)
  - [x] client inject from file
  - [x] client inject from other sources, e.g. youtube (trag)
  - [x] templates for standard instruction requests (trag)
  - [x] context workspace - bench/suspend files (hidden by filename)




  - [ ] (auto) tools (evolve from llama-farm -> trag)
  - [ ] user defined tool plugins
  - [ ] server use vdb context at LLM will (tool)
  - [ ] iterative workflows (refer to llama-farm)
  - [ ] tool chains
  - [ ] file edit/write
  - [ ] file patch/diff
  - [ ] allow model to manage workspace




  - [x] summaries and standard client instructions (trag)
  - [x] server use vdb context on request
  - [ ] consider best method of pdf conversion / ingestion, OOB
  - [ ] full arxiv paper ingestion (fvdb) - consolidate into one latex file OOB
  - [ ] vdb result reranking with context, and winnowing




  - [x] can switch between Anthropic, OpenAI, tabbyAPI providers and models
  - [x] streaming
  - [x] syntax highlighting
  - [x] decent REPL
  - [x] REPL command mode
  - [x] cut/copy from output
  - [ ] vimish keys in output
  - [x] client-side prompt editing
  - [ ] client-side chat/message editing (how? temporarily set the input field history?)
  - [ ] latex rendering (this is tricky in the context of prompt-toolkit, but see flatlatex).
  - [ ] generation cancellation




  - [ ] design with multimodal models in mind
  - [ ] image sending and use
  - [x] use proper config dir (group?)
  - [ ] dump default conf if missing






  audio streaming ?
  workflows (tree of instruction templates)
  tasks

  arXiv paper -> latex / md
  pdf paper -> latex / md

rpm_license:
[cell repeats an earlier one in this file: 33880 characters]


pkgId: 9aa98ba1b2d148fa0cf6e911f0de775d2adf1318032b1b41e599bf42ad1c01a7
name: python-chaturbate-poller-help
arch: noarch
version: 1.7.0
epoch: 0
release: 1
summary: Development documents and examples for chaturbate-poller
url: https://github.com/MountainGod2/chaturbate_poller
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chaturbate-poller-1.7.0-1.src.rpm
location_href: Packages/python-chaturbate-poller-help-1.7.0-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">



  [![Read the Docs](https://img.shields.io/readthedocs/chaturbate-poller?link=https%3A%2F%2Fchaturbate-poller.readthedocs.io%2Fen%2Fstable%2F)](https://chaturbate-poller.readthedocs.io/en/stable/)
  [![Codecov Coverage](https://img.shields.io/codecov/c/github/MountainGod2/chaturbate_poller/main?link=https%3A%2F%2Fapp.codecov.io%2Fgh%2FMountainGod2%2Fchaturbate_poller)](https://app.codecov.io/gh/MountainGod2/chaturbate_poller/)
  [![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/MountainGod2/chaturbate_poller?link=https%3A%2F%2Fwww.codefactor.io%2Frepository%2Fgithub%2Fmountaingod2%2Fchaturbate_poller)](https://www.codefactor.io/repository/github/mountaingod2/chaturbate_poller)
  [![Workflow Status](https://img.shields.io/github/actions/workflow/status/MountainGod2/chaturbate_poller/docker-build.yml?branch=main&link=https%3A%2F%2Fgithub.com%2FMountainGod2%2Fchaturbate_poller%2Factions%2Fworkflows%2Fdocker-build.yml)](https://github.com/MountainGod2/chaturbate_poller/actions/workflows/docker-build.yml/)
  [![License](https://img.shields.io/pypi/l/chaturbate-poller?link=https%3A%2F%2Fgithub.com%2FMountainGod2%2Fchaturbate_poller)](https://github.com/MountainGod2/chaturbate_poller?tab=MIT-1-ov-file)
  [![Python Version](https://img.shields.io/pypi/pyversions/chaturbate-poller?link=https%3A%2F%2Fwww.python.org%2Fdownloads%2F)](https://www.python.org/downloads/)
  [![Version](https://img.shields.io/pypi/v/chaturbate-poller?link=https%3A%2F%2Fpypi.org%2Fproject%2Fchaturbate-poller%2F)](https://pypi.org/project/chaturbate-poller/)

  </div>

  **Chaturbate Poller** is a Python library and CLI for polling events from the Chaturbate API. It provides asynchronous event handling, logging, and optional integration with InfluxDB to store event data for analysis.



  - **Event Polling**: Efficiently poll events from Chaturbate’s API.
  - **Error Handling**: Includes backoff and retry mechanisms.
  - **Logging**: Console and JSON file logging for structured insights.
  - **Optional InfluxDB Storage**: Store events in InfluxDB for analysis or monitoring.



  Ensure Python 3.11 or later is installed, then install via pip:

  ```bash
  pip install chaturbate-poller
  ```



  Create a `.env` file in your project’s root directory for API and InfluxDB credentials:

  ```text
  CB_USERNAME="your_chaturbate_username"
  CB_TOKEN="your_chaturbate_token"
  INFLUXDB_URL="http://influxdb:8086"
  INFLUXDB_TOKEN="your_influxdb_token"
  INFLUXDB_ORG="chaturbate-poller"
  INFLUXDB_BUCKET="your_bucket"
  USE_DATABASE="false"  # Set to `true` if InfluxDB is used
  ```

  > [!NOTE]
  > [Generate an API token here](https://chaturbate.com/statsapi/authtoken/) with the "Events API" permission enabled.





  Run the setup program:

  ```bash
  python -m chaturbate_poller setup
  ```

  ![image](https://github.com/user-attachments/assets/6060699d-022a-4526-b323-a140ee69e9c2)

  Start the poller from the command line:

  ```bash
  python -m chaturbate_poller start --username <your_username> --token <your_token>
  ```

  ![image](https://github.com/user-attachments/assets/b80bf277-188d-4874-b52d-99f8cd6b1c3b)

  For additional options:

  ```bash
  python -m chaturbate_poller --help
  ```

  ![image](https://github.com/user-attachments/assets/e564d698-a31f-4932-835e-44786a945747)



  Run Chaturbate Poller in Docker:

  ```bash
  docker pull ghcr.io/mountaingod2/chaturbate_poller:latest
  ```

  ```bash
  docker run \
    -e CB_USERNAME="your_chaturbate_username" \
    -e CB_TOKEN="your_chaturbate_token" \
    ghcr.io/mountaingod2/chaturbate_poller:latest --verbose --testbed
  ```



  To use Chaturbate Poller as a library, here's a sample script to fetch events in a loop:

  ```python
  import asyncio
  from chaturbate_poller import ChaturbateClient

  async def main():
      async with ChaturbateClient("your_username", "your_token", testbed=False) as client:
          url = None
          while True:
              response = await client.fetch_events(url)

              for event in response.events:
                  print(event.model_dump())

              url = response.next_url

  if __name__ == "__main__":
      asyncio.run(main())
  ```



  1. Clone the repository:

     ```bash
     git clone https://github.com/MountainGod2/chaturbate_poller.git
     cd chaturbate_poller
     ```

  2. Set up the environment and dependencies using [uv](https://docs.astral.sh/uv/):

     ```bash
     uv venv
     uv sync --all-extras
     ```



  Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a feature branch.
  3. Submit a pull request, ensuring tests and coding standards are met.



  This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

rpm_license:
  MIT License  Copyright (c) 2024 MountainGod2  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: c8d5900b1e4db2d1eb500f8794996d88074efdda5d78ed0b5d6dfd9520d68b8c
name: python-chatwithkafka-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for chatwithkafka
url: https://github.com/swedwise/Swedwise.ChatWithKafka
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chatwithkafka-0.1.2-1.src.rpm
location_href: Packages/python-chatwithkafka-help-0.1.2-1.noarch.rpm
checksum_type: sha256
description:
  This is a simple chat application that uses Kafka as a
  message broker. The application is written in Python and
  uses the `confluent-kafka` library to interact with Kafka
  and the [`textual`](https://textual.textualize.io/) framework
  to create the chat interface in the terminal.

  It was written as demonstration of how to use Kafka to
  create a chat application for a project course at
  Karlstad University.



  To install the application you type

  ```powershell
  pip install chatwithkafka
  ```

  It can also be installed from the source code by cloning
  the repository and running

  ```powershell
  pip install .
  ```

  in the root directory of the repository.





  The application uses a configuration file to specify the
  Kafka broker and the topic to use, as well as the optional
  Fernet symmetric key to use for encrypting the data. The configuration file
  is a JSON with this structure:

  ```json
  {
    "kafkaconf" : {
      "bootstrap.servers": "abc.swedencentral.azure.confluent.cloud:9092",
      "security.protocol": "SASL_SSL",
      "sasl.mechanisms": "PLAIN",
      "sasl.username": "TRNHSNRJS5342HSKF",
      "sasl.password": "DwQpxSDPnjvtc54mv6C4TBzmLfcfyA8EzAYgMjfRQTvmcUCZ7thnCpGV4jE622vd"
    },
    "topic": "chat",
    "symmetric_key": "9gWFwrEng_gmYTz1uN_PlnlGs4te0MqIOObQFcsns3E="
  }
  ```



  Start the application by typing

  ```powershell
  chatwithkafka /path/to/config.json
  ```

  You can also see options by typing

  ```powershell
  chatwithkafka --help
  usage: chatwithkafka.exe [-h] [-u USER] [-t TOPIC] [--key KEY] config_file

  Chat Terminal User Interface (TUI) with Kafka

  positional arguments:
  config_file              Path to the JSON configuration file

  options:
  -h, --help               Show this help message and exit
  -u USER, --user USER     User name to use in chat. If none is provided, the currently logged in user's name will be used
  -t TOPIC, --topic TOPIC  Topic to use for chat. Overrides the topic in the configuration file
  --key KEY                Symmetric Fernet key to use encrypting and decrypting messages. Overrides the key in the configuration file
  ```



  Press `Esc` to exit the chat application.



  Using the [`cryptography`](https://cryptography.io/en/latest/) library, the application can
  encrypt the message it sends as well as decrypt the messages it receives. The symmetric key
  used for encryption and decryption is specified in the configuration file or
  sent in as a command line argument (`--key`). If no key is provided, then the messages
  are sent in plain text.

  There is a key generation tool also installed with the application. To generate a key, type

  ```powershell
  chatwithkafka-keygen
  ```

  and it will provide a key (e.g. `h1-lkBmvVizjEKpEAmirtvaWUmrwhNhe0xtgCeGe5FU=`) that can be shared with the other users of the chat,
  in some other way of communicating than the chat itself.

  **Note that the encryption here is symmetric for simlicity's sake, so all users
  who want to communicate needs to have the same key as input to the program.**



  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


pkgId: 53c274ee2cf5b1ac298ddf28a245b22ec113b7cb4582ebd92b5d80f9b5e39774
name: python-checkmate5-help
arch: noarch
version: 4.0.102
epoch: 0
release: 1
summary: Development documents and examples for checkmate5
url: https://pypi.org/project/checkmate5/
rpm_license: AGPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-checkmate5-4.0.102-1.src.rpm
location_href: Packages/python-checkmate5-help-4.0.102-1.noarch.rpm
checksum_type: sha256
description:
  This is a modified version of original Checkmate.

  Original author(s), license(s), acknowelegement(s): https://github.com/quantifiedcode/checkmate



  Checkmate is a cross-language (meta-)tool for static code analysis, written in Python. Unlike other tools, it provides a global overview of the code quality in a project and aims to provide clear, actionable insights to the user.




  * Checkmate is licensed under the MIT license. To view a copy of this license, visit [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT).

  * Original Checkmate's parts remain release under MIT License. However modifications are finally released under AGPL-3.0 license (previously LGPL 2.1 with Commons Clause). Please refer to LICENSE for more info.


pkgId: 0468b7c95729c41cace51e504ff461925463d89df87c2c62a367a015e064a62e
name: python-checkmk-dev-tools-help
arch: noarch
version: 0.3.1
epoch: 0
release: 1
summary: Development documents and examples for checkmk-dev-tools
url: https://github.com/Checkmk/checkmk-dev-tools
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-checkmk-dev-tools-0.3.1-1.src.rpm
location_href: Packages/python-checkmk-dev-tools-help-0.3.1-1.noarch.rpm
checksum_type: sha256
description:
  This repository includes scripts/tools for Checkmk developers.

  - TBD: what should go here
  - TBD: what shouldn't go here



  While you can just clone and use the tools inside of course (they're just plain Python or Bash
  scripts), the intended way to use it is via `pip` or inside a virtual environment.

  Install it locally using `pip`:

  ```sh
  [<PYTHON> -m] pip[3] install [--user] [--upgrade] checkmk-dev-tools
  ```





  `ci-artifacts` is a tool for accessing and triggering (currently Jenkins only) CI job builds and
  making build artifacts available locally in an efficient way (i.e. avoiding unnessessary builds by
  comparing certain constraints like job parameters and time of already available builds).

  Formerly it was only used to make artifacts available which is the reason for the name and some
  CLI desing desicions.



  Run `ci-artifacts --help` in general to get more details about the usage of the tool.

  If no API key, username and URL to Jenkins is provided in `~/.config/jenkins_jobs/jenkins_jobs.ini` those parameters have to be specified explicitly.

  This is a template of the `jenkins_jobs.ini` file

  ```
  [jenkins]
  user=carl.lama


  password=API_KEY_NOT_YOUR_PASSWORD
  url=https://JENKINS_URL.tld
  query_plugins_info=False
  ```



  Wait for an existing and specified build to finish. Nothing is downloaded.

  ```sh
  ci-artifacts --log-level debug \
      await-result checkmk/master/builders/build-cmk-distro-package:6066
  ```

  The returned result is a JSON might look like

  ```json
  {"result": "SUCCESS", "artifacts": null}
  ```



  Wait for an existing and specified build to finish and download the artifacts.

  The destination of the artifacts can be specified with the optional argument `--out-dir` (defaults to `out`) and is relative to the base directory (`--base-dir`, defaults to current directory) used to fetch hashes of the downloaded artifacts.
  The flag `--no-remove-others` can be used to keep additional files in the download directory which were not part of the download. This is like a built-in garbage collection.

  ```sh
  ci-artifacts --log-level debug \
      download checkmk/master/builders/build-cmk-distro-package:6066 \
      --base-dir ~/my-git-projects/checkmk/master \
      --out-dir package_download \
      --no-remove-others
  ```

  The returned result is a JSON might look like

  ```json
  {"result": "SUCCESS", "artifacts": ["check-mk-enterprise-2.4.0-2024.10.31_0.jammy_amd64.deb"]}
  ```



  If there are no more constraints than a build has been completed successfully, `fetch` downloads a given jobs artifact, just like with `download` but for the latest build instead of a specified build number.

  Pressing `CTRL+C` while the script is running will ask for confirmation, default answer is `no` and cancel the build.

  ```sh
  ci-artifacts --log-level debug \
      fetch checkmk/master/winagt-build
  ```

  In contrast, this is what a more detailed call might look like

  ```sh
  ci-artifacts --log-level debug \
      fetch checkmk/master/winagt-build \
      --params EDITION=raw,DISTRO="ubuntu-22.04",CUSTOM_GIT_REF=85fa488e0a32f6ea55d8875ab9c517bdc253a8e1 \
      --params-no-check DISABLE_CACHE=false,CIPARAM_OVERRIDE_BUILD_NODE=fra001 \
      --dependency-paths agents/wnx,agents/windows,packages/cmk-agent-ctl \
      --time-constraints today \
      --base-dir ~/my-git-projects/checkmk/master \
      --out-dir package_download
  ```

  **`--params <JOB-PARAMETERS>`**

  Comma separated list of job-parameters used for identifying existing builds and
  to start new ones.

  **`--params-no-check <JOB-PARAMETERS>`**

  Comma separated list of job-parameters used only to start a new build. These parameters are ignored during the search of an already existing build.

  **`--time-constraints <SPECIFIER>`**

  Check for build date constraints when looking for existing builds - currently
  only `today` is taken into account.

  **`--dependency-paths <PATH,..>`**

  Comma separated list of relative paths to files and directories checked for
  differences when looking for existing builds.

  **`--omit-new-build`**

  Don't start new builds, even when no matching build could be found.

  **`--force-new-build`**

  Don't look for existing builds, always start a new build instead.



  Like `fetch` but with the optional parameter `--passive` which outputs the informations needed to trigger a build instead of triggering the build.
  This is helpful in pipeline scripts to keep track of issuers of a build.

  ```sh
  ci-artifacts --log-level debug \
      request checkmk/master/winagt-build \
      --params EDITION=raw,DISTRO="ubuntu-22.04",CUSTOM_GIT_REF=85fa488e0a32f6ea55d8875ab9c517bdc253a8e1 \
      --params-no-check DISABLE_CACHE=false,CIPARAM_OVERRIDE_BUILD_NODE=fra001 \
      --time-constraints today \
      --base-dir ~/my-git-projects/checkmk/master \
      --passive
  ```

  ```json
  {
      "new_build":
      {
          "path": "checkmk/master/winagt-build",
          "params":
          {
              "EDITION": "raw",
              "DISTRO": "ubuntu-22.04",
              "CUSTOM_GIT_REF": "85fa488e0a32f6ea55d8875ab9c517bdc253a8e1",
              "DISABLE_CACHE": "false",
              "CIPARAM_OVERRIDE_BUILD_NODE": "fra001"
          }
      }
  }
  ```

  Without the `--passive` flag the build is triggered if no matching one is found. If a matching build with the specified parameters was found the returned JSON might look like

  ```json
  {
      "existing":
      {
          "path": "checkmk/master/winagt-build",
          "number": 6066,
          "url": "https://JENKINS_URL.tld/job/checkmk/job/master/job/winagt-build/6066/",
          "result": "SUCCESS",
          "new_build": false
      }
  }
  ```



  The `validate` subcommand is a combination of several other commands. It requests, identifies a matching of triggers a new build while waiting for the build to complete. Nothing is downloaded. It has the same parameters as `fetch`.
  This subcommand can be used to trigger a remote build with custom parameters or check if an existing build with these parameters passed or not.

  ```sh
  ci-artifacts --log-level debug \
      validate checkmk/master/winagt-build \
      --params EDITION=raw,DISTRO="ubuntu-22.04",CUSTOM_GIT_REF=85fa488e0a32f6ea55d8875ab9c517bdc253a8e1 \
      --params-no-check DISABLE_CACHE=false,CIPARAM_OVERRIDE_BUILD_NODE=fra001 \
      --time-constraints today
  ```

  ```json
  {"result": "SUCCESS", "artifacts": []}
  ```



  - [ ] request CI build from local changes





  For active development you need to have `poetry` and `pre-commit` installed

  ```sh
  python3 -m pip install --upgrade --user poetry pre-commit
  git clone ssh://review.lan.tribe29.com:29418/checkmk_dev_tools
  cd checkmk_dev_tools
  pre-commit install

  poetry env use ~/.pyenv/versions/3.10.4/bin/python3
  poetry install


  poetry self add poetry-bumpversion
  ```



  Create a new changelog snippet. If no new snippets is found on a merged change
  no new release will be built and published.

  If the change is based on a Jira ticket, use the Jira ticket name as snippet
  name otherwise use a unique name.

  ```sh
  poetry run \
      changelog-generator \
      create .snippets/CMK-20150.md
  ```

  After committing the snippet a changelog can be generated locally. For CI usage
  the `--in-place` flag is recommended to use as it will update the existing
  changelog with the collected snippets. For local usage remember to reset the
  changelog file before a second run, as the version would be updated recursively
  due to the way the changelog generator is working. It extracts the latest
  version from the changelog file and puts the found snippets on top.

  Future changes to the changelog are ignored by

  ```sh
  git update-index --assume-unchanged changelog.md
  ```

  ```sh
  poetry run \
      changelog-generator \
      changelog changelog.md \
      --snippets=.snippets \
      --in-place \
      --version-reference="https://review.lan.tribe29.com/gitweb?p=checkmk_dev_tools.git;a=tag;h=refs/tags/"
  ```

  Update the version of the project in all required files by calling

  ```sh
  poetry run \
      changelog2version \
      --changelog_file changelog.md \
      --version_file cmk_dev/version.py \
      --version_file_type py \
      --additional_version_info="-rc42+$(git rev-parse HEAD)" \
      --print \
      | jq -r .info.version
  ```

  * (once and only for publishing to PyPi) Get token on PyPi.org
  * (once and only for publishing to PyPi) `poetry config pypi-token.pypi pypi-<LONG-STRING>`
    (will write to `~/.config/pypoetry/auth.toml`)
  * modify and check commits via `pre-commit run --all-files`
  * after work is done locally:

    - update dependencies before/with a new release
  ```sh
  poetry lock
  ```
    - build and check package locally
  ```sh
  poetry build && \
  poetry run twine check dist/* &&
  python3 -m pip uninstall -y checkmk_dev_tools && \
  python3 -m pip install --user dist/checkmk_dev_tools-$(grep -E "^version.?=" pyproject.toml | cut -d '"' -f 2)-py3-none-any.whl
  ```
    - commit, push, review and merge the changes, see `checkmk_dev_tools/+/88632/`
  ```sh
  git add ...
  git commit -m "cmk-dev-tools: bump version, update dependencies"

  ```
    - publish new package version
  ```sh
  poetry publish --build [--repository checkmk_dev_tools]
  git tag -a v<VERSION> <MERGE_COMMIT> -m "v<VERSION>"
  git push --tags
  ```


pkgId: dc4c27b395184f42450a7adf69cea0f43b98b52b43837817af41195c405827ff
name: python-checkov-help
arch: noarch
version: 3.2.336
epoch: 0
release: 1
summary: Development documents and examples for checkov
url: https://github.com/bridgecrewio/checkov
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-checkov-3.2.336-1.src.rpm
location_href: Packages/python-checkov-help-3.2.336-1.noarch.rpm
checksum_type: sha256
description:
  [![checkov](https://raw.githubusercontent.com/bridgecrewio/checkov/main/docs/web/images/checkov_blue_logo.png)](#)

  [![Maintained by Prisma Cloud](https://img.shields.io/badge/maintained_by-Prisma_Cloud-blue)](https://prismacloud.io/?utm_source=github&utm_medium=organic_oss&utm_campaign=checkov)
  [![build status](https://github.com/bridgecrewio/checkov/workflows/build/badge.svg)](https://github.com/bridgecrewio/checkov/actions?query=workflow%3Abuild)
  [![security status](https://github.com/bridgecrewio/checkov/workflows/security/badge.svg)](https://github.com/bridgecrewio/checkov/actions?query=event%3Apush+branch%3Amaster+workflow%3Asecurity)
  [![code_coverage](https://raw.githubusercontent.com/bridgecrewio/checkov/main/coverage.svg?sanitize=true)](https://github.com/bridgecrewio/checkov/actions?query=workflow%3Acoverage)
  [![docs](https://img.shields.io/badge/docs-passing-brightgreen)](https://www.checkov.io/1.Welcome/What%20is%20Checkov.html?utm_source=github&utm_medium=organic_oss&utm_campaign=checkov)
  [![PyPI](https://img.shields.io/pypi/v/checkov)](https://pypi.org/project/checkov/)
  [![Python Version](https://img.shields.io/pypi/pyversions/checkov)](#)
  [![Terraform Version](https://img.shields.io/badge/tf-%3E%3D0.12.0-blue.svg)](#)
  [![Downloads](https://static.pepy.tech/badge/checkov)](https://pepy.tech/project/checkov)
  [![Docker Pulls](https://img.shields.io/docker/pulls/bridgecrew/checkov.svg)](https://hub.docker.com/r/bridgecrew/checkov)
  [![slack-community](https://img.shields.io/badge/Slack-4A154B?style=plastic&logo=slack&logoColor=white)](https://codifiedsecurity.slack.com/)


  **Checkov** is a static code analysis tool for infrastructure as code (IaC) and also a software composition analysis (SCA) tool for images and open source packages.

  It scans cloud infrastructure provisioned using [Terraform](https://terraform.io/), [Terraform plan](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Terraform%20Plan%20Scanning.md), [Cloudformation](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Cloudformation.md), [AWS SAM](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/AWS%20SAM.md), [Kubernetes](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Kubernetes.md), [Helm charts](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Helm.md), [Kustomize](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Kustomize.md), [Dockerfile](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Dockerfile.md),  [Serverless](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Serverless%20Framework.md), [Bicep](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Bicep.md), [OpenAPI](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/OpenAPI.md), [ARM Templates](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Azure%20ARM%20templates.md), or [OpenTofu](https://opentofu.org/) and detects security and compliance misconfigurations using graph-based scanning.

  It performs [Software Composition Analysis (SCA) scanning](docs/7.Scan%20Examples/Sca.md) which is a scan of open source packages and images for Common Vulnerabilities and Exposures (CVEs).

  Checkov also powers [**Prisma Cloud Application Security**](https://www.prismacloud.io/prisma/cloud/cloud-code-security/?utm_source=github&utm_medium=organic_oss&utm_campaign=checkov), the developer-first platform that codifies and streamlines cloud security throughout the development lifecycle. Prisma Cloud identifies, fixes, and prevents misconfigurations in cloud resources and infrastructure-as-code files.

  <a href="https://www.prismacloud.io/prisma/request-a-prisma-cloud-trial/?utm_campaign=checkov-github-repo&utm_source=github.com&utm_medium=get-started-button" title="Try_Prisma_Cloud">
      <img src="https://dabuttonfactory.com/button.png?t=Try+Prisma+Cloud&f=Open+Sans-Bold&ts=26&tc=fff&hp=45&vp=20&c=round&bgt=unicolored&bgc=00c0e8" align="right" width="120">
  </a>


  <a href="https://docs.prismacloud.io/en/enterprise-edition/use-cases/secure-the-source/secure-the-source" title="Docs">
      <img src="https://dabuttonfactory.com/button.png?t=Read+the+Docs&f=Open+Sans-Bold&ts=26&tc=fff&hp=45&vp=20&c=round&bgt=unicolored&bgc=00c0e8" align="right" width="120">
  </a>



  - [Features](#features)
  - [Screenshots](#screenshots)
  - [Getting Started](#getting-started)
  - [Disclaimer](#disclaimer)
  - [Support](#support)
  - [Migration - v2 to v3](https://github.com/bridgecrewio/checkov/blob/main/docs/1.Welcome/Migration.md)

   

   * [Over 1000 built-in policies](https://github.com/bridgecrewio/checkov/blob/main/docs/5.Policy%20Index/all.md) cover security and compliance best practices for AWS, Azure and Google Cloud.
   * Scans Terraform, Terraform Plan, Terraform JSON, CloudFormation, AWS SAM, Kubernetes, Helm, Kustomize, Dockerfile, Serverless framework, Ansible, Bicep, ARM, and OpenTofu template files.
   * Scans Argo Workflows, Azure Pipelines, BitBucket Pipelines, Circle CI Pipelines, GitHub Actions and GitLab CI workflow files
   * Supports Context-awareness policies based on in-memory graph-based scanning.
   * Supports Python format for attribute policies and YAML format for both attribute and composite policies.
   * Detects [AWS credentials](https://github.com/bridgecrewio/checkov/blob/main/docs/2.Basics/Scanning%20Credentials%20and%20Secrets.md) in EC2 Userdata, Lambda environment variables and Terraform providers.
   * [Identifies secrets](https://www.prismacloud.io/prisma/cloud/secrets-security) using regular expressions, keywords, and entropy based detection.
   * Evaluates [Terraform Provider](https://registry.terraform.io/browse/providers) settings to regulate the creation, management, and updates of IaaS, PaaS or SaaS managed through Terraform.
   * Policies support evaluation of [variables](https://github.com/bridgecrewio/checkov/blob/main/docs/2.Basics/Handling%20Variables.md) to their optional default value.
   * Supports in-line [suppression](https://github.com/bridgecrewio/checkov/blob/main/docs/2.Basics/Suppressing%20and%20Skipping%20Policies.md) of accepted risks or false-positives to reduce recurring scan failures. Also supports global skip from using CLI.
   * [Output](https://github.com/bridgecrewio/checkov/blob/main/docs/2.Basics/Reviewing%20Scan%20Results.md) currently available as CLI, [CycloneDX](https://cyclonedx.org), JSON, JUnit XML, CSV, SARIF and github markdown and link to remediation [guides](https://docs.prismacloud.io/en/enterprise-edition/policy-reference/).



  Scan results in CLI

  ![scan-screenshot](https://raw.githubusercontent.com/bridgecrewio/checkov/main/docs/checkov-recording.gif)

  Scheduled scan result in Jenkins

  ![jenikins-screenshot](https://raw.githubusercontent.com/bridgecrewio/checkov/main/docs/checkov-jenkins.png)




   * Python >= 3.9, <=3.12
   * Terraform >= 0.12



  To install pip follow the official [docs](https://pip.pypa.io/en/stable/cli/pip_install/)

  ```sh
  pip3 install checkov
  ```

  or with [Homebrew](https://formulae.brew.sh/formula/checkov) (macOS or Linux)

  ```sh
  brew install checkov
  ```


  ```sh
  source <(register-python-argcomplete checkov)
  ```


  if you installed checkov with pip3
  ```sh
  pip3 install -U checkov
  ```

  or with Homebrew

  ```sh
  brew upgrade checkov
  ```



  ```sh
  checkov --directory /user/path/to/iac/code
  ```

  Or a specific file or files

  ```sh
  checkov --file /user/tf/example.tf
  ```
  Or
  ```sh
  checkov -f /user/cloudformation/example1.yml -f /user/cloudformation/example2.yml
  ```

  Or a terraform plan file in json format
  ```sh
  terraform init
  terraform plan -out tf.plan
  terraform show -json tf.plan  > tf.json
  checkov -f tf.json
  ```

  Note: `terraform show` output file `tf.json` will be a single line.
  For that reason all findings will be reported line number 0 by Checkov


  ```sh
  check: CKV_AWS_21: "Ensure all data stored in the S3 bucket have versioning enabled"
  	FAILED for resource: aws_s3_bucket.customer
  	File: /tf/tf.json:0-0
  	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/s3-policies/s3-16-enable-versioning
    ```

  If you have installed `jq` you can convert json file into multiple lines with the following command:
  ```sh
  terraform show -json tf.plan | jq '.' > tf.json
  ```
  Scan result would be much user friendly.
  ```sh
  checkov -f tf.json
  Check: CKV_AWS_21: "Ensure all data stored in the S3 bucket have versioning enabled"
  	FAILED for resource: aws_s3_bucket.customer
  	File: /tf/tf1.json:224-268
  	Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/s3-policies/s3-16-enable-versioning

  		225 |               "values": {
  		226 |                 "acceleration_status": "",
  		227 |                 "acl": "private",
  		228 |                 "arn": "arn:aws:s3:::mybucket",

  ```

  Alternatively, specify the repo root of the hcl files used to generate the plan file, using the `--repo-root-for-plan-enrichment` flag, to enrich the output with the appropriate file path, line numbers, and codeblock of the resource(s). An added benefit is that check suppressions will be handled accordingly.
  ```sh
  checkov -f tf.json --repo-root-for-plan-enrichment /user/path/to/iac/code
  ```




  ```sh
  Passed Checks: 1, Failed Checks: 1, Suppressed Checks: 0
  Check: "Ensure all data stored in the S3 bucket is securely encrypted at rest"
  /main.tf:
  	 Passed for resource: aws_s3_bucket.template_bucket
  Check: "Ensure all data stored in the S3 bucket is securely encrypted at rest"
  /../regionStack/main.tf:
  	 Failed for resource: aws_s3_bucket.sls_deployment_bucket_name
  ```

  Start using Checkov by reading the [Getting Started](https://github.com/bridgecrewio/checkov/blob/main/docs/1.Welcome/Quick%20Start.md) page.




  ```sh
  docker pull bridgecrew/checkov
  docker run --tty --rm --volume /user/tf:/tf --workdir /tf bridgecrew/checkov --directory /tf
  ```
  Note: if you are using Python 3.6(Default version in Ubuntu 18.04) checkov will not work, and it will fail with `ModuleNotFoundError: No module named 'dataclasses'`  error message. In this case, you can use the docker version instead.

  Note that there are certain cases where redirecting `docker run --tty` output to a file - for example, if you want to save the Checkov JUnit output to a file - will cause extra control characters to be printed. This can break file parsing. If you encounter this, remove the `--tty` flag.

  The `--workdir /tf` flag is optional to change the working directory to the mounted volume. If you are using the SARIF output `-o sarif` this will output the results.sarif file to the mounted volume (`/user/tf` in the example above). If you do not include that flag, the working directory will be "/".



  By using command line flags, you can specify to run only named checks (allow list) or run all checks except
  those listed (deny list). If you are using the platform integration via API key, you can also specify a severity threshold to skip and / or include.
  Moreover, as json files can't contain comments, one can pass regex pattern to skip json file secret scan.

  See the docs for more detailed information about how these flags work together.




  Allow only the two specified checks to run:
  ```sh
  checkov --directory . --check CKV_AWS_20,CKV_AWS_57
  ```

  Run all checks except the one specified:
  ```sh
  checkov -d . --skip-check CKV_AWS_20
  ```

  Run all checks except checks with specified patterns:
  ```sh
  checkov -d . --skip-check CKV_AWS*
  ```

  Run all checks that are MEDIUM severity or higher (requires API key):
  ```sh
  checkov -d . --check MEDIUM --bc-api-key ...
  ```

  Run all checks that are MEDIUM severity or higher, as well as check CKV_123 (assume this is a LOW severity check):
  ```sh
  checkov -d . --check MEDIUM,CKV_123 --bc-api-key ...
  ```

  Skip all checks that are MEDIUM severity or lower:
  ```sh
  checkov -d . --skip-check MEDIUM --bc-api-key ...
  ```

  Skip all checks that are MEDIUM severity or lower, as well as check CKV_789 (assume this is a high severity check):
  ```sh
  checkov -d . --skip-check MEDIUM,CKV_789 --bc-api-key ...
  ```

  Run all checks that are MEDIUM severity or higher, but skip check CKV_123 (assume this is a medium or higher severity check):
  ```sh
  checkov -d . --check MEDIUM --skip-check CKV_123 --bc-api-key ...
  ```

  Run check CKV_789, but skip it if it is a medium severity (the --check logic is always applied before --skip-check)
  ```sh
  checkov -d . --skip-check MEDIUM --check CKV_789 --bc-api-key ...
  ```

  For Kubernetes workloads, you can also use allow/deny namespaces.  For example, do not report any results for the
  kube-system namespace:
  ```sh
  checkov -d . --skip-check kube-system
  ```

  Run a scan of a container image. First pull or build the image then refer to it by the hash, ID, or name:tag:
  ```sh
  checkov --framework sca_image --docker-image sha256:1234example --dockerfile-path /Users/path/to/Dockerfile --repo-id ... --bc-api-key ...

  checkov --docker-image <image-name>:tag --dockerfile-path /User/path/to/Dockerfile --repo-id ... --bc-api-key ...
  ```

  You can use --image flag also to scan container image instead of --docker-image for shortener:
  ```sh
  checkov --image <image-name>:tag --dockerfile-path /User/path/to/Dockerfile --repo-id ... --bc-api-key ...
  ```

  Run an SCA scan of packages in a repo:
  ```sh
  checkov -d . --framework sca_package --bc-api-key ... --repo-id <repo_id(arbitrary)>
  ```

  Run a scan of a directory with environment variables removing buffering, adding debug level logs:
  ```sh
  PYTHONUNBUFFERED=1 LOG_LEVEL=DEBUG checkov -d .
  ```
  OR enable the environment variables for multiple runs
  ```sh
  export PYTHONUNBUFFERED=1 LOG_LEVEL=DEBUG
  checkov -d .
  ```

  Run secrets scanning on all files in MyDirectory. Skip CKV_SECRET_6 check on json files that their suffix is DontScan
  ```sh
  checkov -d /MyDirectory --framework secrets --repo-id ... --bc-api-key ... --skip-check CKV_SECRET_6:.*DontScan.json$
  ```

  Run secrets scanning on all files in MyDirectory. Skip CKV_SECRET_6 check on json files that contains "skip_test" in path
  ```sh
  checkov -d /MyDirectory --framework secrets --repo-id ... --bc-api-key ... --skip-check CKV_SECRET_6:.*skip_test.*json$
  ```

  One can mask values from scanning results by supplying a configuration file (using --config-file flag) with mask entry.
  The masking can apply on resource & value (or multiple values, separated with a comma).
  Examples:
  ```sh
  mask:
  - aws_instance:user_data
  - azurerm_key_vault_secret:admin_password,user_passwords
  ```
  In the example above, the following values will be masked:
  - user_data for aws_instance resource
  - both admin_password &user_passwords for azurerm_key_vault_secret




  Like any static-analysis tool it is limited by its analysis scope.
  For example, if a resource is managed manually, or using subsequent configuration management tooling,
  suppression can be inserted as a simple code annotation.



  To skip a check on a given Terraform definition block or CloudFormation resource, apply the following comment pattern inside it's scope:

  `checkov:skip=<check_id>:<suppression_comment>`

  * `<check_id>` is one of the [available check scanners](docs/5.Policy Index/all.md)
  * `<suppression_comment>` is an optional suppression reason to be included in the output



  The following comment skips the `CKV_AWS_20` check on the resource identified by `foo-bucket`, where the scan checks if an AWS S3 bucket is private.
  In the example, the bucket is configured with public read access; Adding the suppress comment would skip the appropriate check instead of the check to fail.

  ```hcl-terraform
  resource "aws_s3_bucket" "foo-bucket" {
    region        = var.region
      
    bucket        = local.bucket_name
    force_destroy = true
    acl           = "public-read"
  }
  ```

  The output would now contain a ``SKIPPED`` check result entry:

  ```bash
  ...
  ...
  Check: "S3 Bucket has an ACL defined which allows public access."
  	SKIPPED for resource: aws_s3_bucket.foo-bucket
  	Suppress comment: The bucket is a public static content host
  	File: /example_skip_acl.tf:1-25

  ...
  ```
  To skip multiple checks, add each as a new line.

  ```
    
    
  ```

  To suppress checks in Kubernetes manifests, annotations are used with the following format:
  `checkov.io/skip#: <check_id>=<suppression_comment>`

  For example:

  ```bash
  apiVersion: v1
  kind: Pod
  metadata:
    name: mypod
    annotations:
      checkov.io/skip1: CKV_K8S_20=I don't care about Privilege Escalation :-O
      checkov.io/skip2: CKV_K8S_14
      checkov.io/skip3: CKV_K8S_11=I have not set CPU limits as I want BestEffort QoS
  spec:
    containers:
  ...
  ```



  For detailed logging to stdout set up the environment variable `LOG_LEVEL` to `DEBUG`.

  Default is `LOG_LEVEL=WARNING`.


  To skip files or directories, use the argument `--skip-path`, which can be specified multiple times. This argument accepts regular expressions for paths relative to the current working directory. You can use it to skip entire directories and / or specific files.

  By default, all directories named `node_modules`, `.terraform`, and `.serverless` will be skipped, in addition to any files or directories beginning with `.`.
  To cancel skipping directories beginning with `.` override `CKV_IGNORE_HIDDEN_DIRECTORIES` environment variable `export CKV_IGNORE_HIDDEN_DIRECTORIES=false`

  You can override the default set of directories to skip by setting the environment variable `CKV_IGNORED_DIRECTORIES`.
   Note that if you want to preserve this list and add to it, you must include these values. For example, `CKV_IGNORED_DIRECTORIES=mynewdir` will skip only that directory, but not the others mentioned above. This variable is legacy functionality; we recommend using the `--skip-file` flag.



  The console output is in colour by default, to switch to a monochrome output, set the environment variable:
  `ANSI_COLORS_DISABLED`



  If you want to use Checkov within VS Code, give the [Prisma Cloud extension](https://marketplace.visualstudio.com/items?itemName=PrismaCloud.prisma-cloud) a try.



  Checkov can be configured using a YAML configuration file. By default, checkov looks for a `.checkov.yaml` or `.checkov.yml` file in the following places in order of precedence:
  * Directory against which checkov is run. (`--directory`)
  * Current working directory where checkov is called.
  * User's home directory.

  **Attention**: it is a best practice for checkov configuration file to be loaded from a trusted source composed by a verified identity, so that scanned files, check ids and loaded custom checks are as desired.

  Users can also pass in the path to a config file via the command line. In this case, the other config files will be ignored. For example:
  ```sh
  checkov --config-file path/to/config.yaml
  ```
  Users can also create a config file using the `--create-config` command, which takes the current command line args and writes them out to a given path. For example:
  ```sh
  checkov --compact --directory test-dir --docker-image sample-image --dockerfile-path Dockerfile --download-external-modules True --external-checks-dir sample-dir --quiet --repo-id prisma-cloud/sample-repo --skip-check CKV_DOCKER_3,CKV_DOCKER_2 --skip-framework dockerfile secrets --soft-fail --branch develop --check CKV_DOCKER_1 --create-config /Users/sample/config.yml
  ```
  Will create a `config.yaml` file which looks like this:
  ```yaml
  branch: develop
  check:
    - CKV_DOCKER_1
  compact: true
  directory:
    - test-dir
  docker-image: sample-image
  dockerfile-path: Dockerfile
  download-external-modules: true
  evaluate-variables: true
  external-checks-dir:
    - sample-dir
  external-modules-download-path: .external_modules
  framework:
    - all
  output: cli
  quiet: true
  repo-id: prisma-cloud/sample-repo
  skip-check:
    - CKV_DOCKER_3
    - CKV_DOCKER_2
  skip-framework:
    - dockerfile
    - secrets
  soft-fail: true
  ```

  Users can also use the `--show-config` flag to view all the args and settings and where they came from i.e. commandline, config file, environment variable or default. For example:
  ```sh
  checkov --show-config
  ```
  Will display:
  ```sh
  Command Line Args:   --show-config
  Environment Variables:
    BC_API_KEY:        your-api-key
  Config File (/Users/sample/.checkov.yml):
    soft-fail:         False
    branch:            master
    skip-check:        ['CKV_DOCKER_3', 'CKV_DOCKER_2']
  Defaults:
    --output:          cli
    --framework:       ['all']
    --download-external-modules:False
    --external-modules-download-path:.external_modules
    --evaluate-variables:True
  ```



  Contribution is welcomed!

  Start by reviewing the [contribution guidelines](https://github.com/bridgecrewio/checkov/blob/main/CONTRIBUTING.md). After that, take a look at a [good first issue](https://github.com/bridgecrewio/checkov/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).

  You can even start this with one-click dev in your browser through Gitpod at the following link:

  [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/bridgecrewio/checkov)

  Looking to contribute new checks? Learn how to write a new check (AKA policy) [here](https://github.com/bridgecrewio/checkov/blob/main/docs/6.Contribution/Contribution%20Overview.md).


  `checkov` does not save, publish or share with anyone any identifiable customer information.
  No identifiable customer information is used to query Prisma Cloud's publicly accessible guides.
  `checkov` uses Prisma Cloud's API to enrich the results with links to remediation guides.
  To skip this API call use the flag `--skip-download`.



  [Prisma Cloud](https://www.prismacloud.io/?utm_source=github&utm_medium=organic_oss&utm_campaign=checkov) builds and maintains Checkov to make policy-as-code simple and accessible.

  Start with our [Documentation](https://www.checkov.io/1.Welcome/Quick%20Start.html) for quick tutorials and examples.


  We follow the official support cycle of Python, and we use automated tests for supported versions of Python. This means we currently support Python 3.9 - 3.12, inclusive. Note that Python 3.8 reached EOL on October 2024 and Python 3.9 will reach EOL in October 2025. We are investigating support for 3.13. If you run into any issues with any non-EOL Python version, please open an Issue.


pkgId: 6fcae8e0de98a92e88e4acbf27d5f40ed0b842910c4d6595e33000af5315b580
name: python-cheesechaser-help
arch: noarch
version: 0.2.2
epoch: 0
release: 1
summary: Development documents and examples for cheesechaser
url: https://github.com/deepghs/cheesechaser
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cheesechaser-0.2.2-1.src.rpm
location_href: Packages/python-cheesechaser-help-0.2.2-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/cheesechaser)](https://pypi.org/project/cheesechaser/)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cheesechaser)
  ![Loc](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/narugo1992/eedf334ff9d7ff02e7ec9535e43a1faa/raw/loc.json)
  ![Comments](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/narugo1992/eedf334ff9d7ff02e7ec9535e43a1faa/raw/comments.json)

  [![Code Test](https://github.com/deepghs/cheesechaser/workflows/Code%20Test/badge.svg)](https://github.com/deepghs/cheesechaser/actions?query=workflow%3A%22Code+Test%22)
  [![Package Release](https://github.com/deepghs/cheesechaser/workflows/Package%20Release/badge.svg)](https://github.com/deepghs/cheesechaser/actions?query=workflow%3A%22Package+Release%22)
  [![codecov](https://codecov.io/gh/deepghs/cheesechaser/branch/main/graph/badge.svg?token=XJVDP4EFAT)](https://codecov.io/gh/deepghs/cheesechaser)

  [![Discord](https://img.shields.io/discord/1157587327879745558?style=social&logo=discord&link=https%3A%2F%2Fdiscord.gg%2FTwdHJ42N72)](https://discord.gg/TwdHJ42N72)
  ![GitHub Org's stars](https://img.shields.io/github/stars/deepghs)
  [![GitHub stars](https://img.shields.io/github/stars/deepghs/cheesechaser)](https://github.com/deepghs/cheesechaser/stargazers)
  [![GitHub forks](https://img.shields.io/github/forks/deepghs/cheesechaser)](https://github.com/deepghs/cheesechaser/network)
  ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/deepghs/cheesechaser)
  [![GitHub issues](https://img.shields.io/github/issues/deepghs/cheesechaser)](https://github.com/deepghs/cheesechaser/issues)
  [![GitHub pulls](https://img.shields.io/github/issues-pr/deepghs/cheesechaser)](https://github.com/deepghs/cheesechaser/pulls)
  [![Contributors](https://img.shields.io/github/contributors/deepghs/cheesechaser)](https://github.com/deepghs/cheesechaser/graphs/contributors)
  [![GitHub license](https://img.shields.io/github/license/deepghs/cheesechaser)](https://github.com/deepghs/cheesechaser/blob/master/LICENSE)

  Swiftly get tons of images from indexed tars on Huggingface



  ```shell
  pip install cheesechaser
  ```



  This library is based on the mirror datasets on huggingface.

  For the Gelbooru mirror dataset repository, such
  as [deepghs/gelbooru_full](https://huggingface.co/datasets/deepghs/gelbooru_full), each data packet includes a tar
  archive file and a corresponding JSON index file. The JSON index file contains detailed information about the files
  within the tar archive, including file size, offset, and file fingerprint.

  The files in this dataset repository are organized according to a fixed pattern based on their IDs. For example, a file
  with the ID 114514 will have a modulus result of 4514 when divided by 10000. Consequently, it is stored
  in `images/4/0514.tar`.

  Utilizing the quick download feature
  from [hfutils.index](https://deepghs.github.io/hfutils/main/api_doc/index/index.html), users can instantly access
  individual files. Since the download service is provided through Huggingface's LFS service and not the original website
  or an image CDN, there is no risk of IP or account blocking. **The only limitations to your download speed are your
  network bandwidth and disk read/write speeds.**

  This efficient system ensures a seamless and reliable access to the dataset without any restrictions.



  * Danbooru

  ```python
  from cheesechaser.datapool import DanbooruNewestDataPool

  pool = DanbooruNewestDataPool()


  pool.batch_download_to_directory(
      resource_ids=range(2010000, 2010300),
      dst_dir='/data/exp2',
      max_workers=12,
  )
  ```

  * Danbooru With Tags Query

  ```python
  from cheesechaser.datapool import DanbooruNewestDataPool
  from cheesechaser.query import DanbooruIdQuery

  pool = DanbooruNewestDataPool()
  my_waifu_ids = DanbooruIdQuery(['surtr_(arknights)', 'solo'])


  pool.batch_download_to_directory(
      resource_ids=my_waifu_ids,
      dst_dir='/data/exp2_surtr',
      max_workers=12,
  )
  ```

  * Konachan (Gated dataset, you should be granted first and set `HF_TOKEN` environment variable)

  ```python
  from cheesechaser.datapool import KonachanDataPool

  pool = KonachanDataPool()


  pool.batch_download_to_directory(
      resource_ids=range(210000, 210300),
      dst_dir='/data/exp2',
      max_workers=12,
  )
  ```

  * Civitai (this mirror repository on hf is private for now, you have to use hf token of an authorized account)

  ```python
  from cheesechaser.datapool import CivitaiDataPool

  pool = CivitaiDataPool()



  pool.batch_download_to_directory(
      resource_ids=range(7810000, 7810300),
      dst_dir='/data/exp2',
      max_workers=12,
  )
  ```

  More supported:

  * `RealbooruDataPool` (Gated Dataset)
  * `ThreedbooruDataPool` (Gated Dataset)
  * `FancapsDataPool` (Gated Dataset)
  * `BangumiBaseDataPool` (Gated Dataset)
  * `AnimePicturesDataPool` (Gated Dataset)
  * `KonachanDataPool` (Gated Dataset)
  * `YandeDataPool` (Gated Dataset)
  * `ZerochanDataPool` (Gated Dataset)
  * `GelbooruDataPool` and `GelbooruWebpDataPool` (Gated Dataset)
  * `DanbooruNewestDataPool` and `DanbooruNewestWebpDataPool`



  ```python
  from itertools import islice

  from cheesechaser.datapool import DanbooruNewestDataPool
  from cheesechaser.pipe import SimpleImagePipe, PipeItem

  pool = DanbooruNewestDataPool()
  pipe = SimpleImagePipe(pool)


  ids = range(7349990, 7359990)
  with pipe.batch_retrieve(ids) as session:
      
      for i, item in enumerate(islice(session, 20)):
          item: PipeItem
          print(i, item)

  ```


pkgId: 7be274da687a7d89c92ac2af8f91c04c50517f37dd8b8a862b6f23b93f5d5544
name: python-chemcurry-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for chemcurry
url: https://pypi.org/project/chemcurry/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chemcurry-0.1.0-1.src.rpm
location_href: Packages/python-chemcurry-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  from chemcurry.workflow import CurationWorkflow
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="./ChemCurry-dark.svg">
    <source media="(prefers-color-scheme: light)" srcset="./ChemCurry-light.svg">
    <img src="./ChemCurry-light.svg?raw=true" alt="ChemCurry logo">
  </picture>



  `chemcurry` is a chemical curation workflow package meant to both streamline building
  curation workflows and producing detailed reports about which chemicals where flagged
  and when *while* doing so in a manner to enforce reproducibility and easy sharing.
  The Molecular Modeling Lab @ UNC often finds itself needing
  to generate these reports to show to our PI and share our workflows with new members,
  so this package was developed as a way to standardize that process.

  While most chemical curation workflows for any project can be built in under 100 lines of code,
  the core idea behind `chemcurry` is to assert reproducibility and easy building/sharing
  among chemist with any level of coding background. Most cheminformatics projects and
  publications will need to do some type of curation, and, frankly, the methods on how
  this is done is often not up to par with scientific reproducibility standards.
  We believe that lack of reproducibility hurts our filed and `chemcurry` aims to
  fix that (for at least on part of it).

  Closely related to the philosophy of reproducibility, `chemcurry` was also designed to be
  easy to add new curation functions too. There is a simple API that really only requires
  you to write the same code you might if you were doing in manually in a notebook or script.



  `chemcurry` is designed to operate on explict chemical properties, meaning if the property cannot
  be calculated using just the chemical, it will not fit into the workflow.
  If you find yourself needing a curation workflow that can use external properties
  (say to curated a data set with IC50 values for a machine learning/QSAR model)
  look into `chemcurry-learn` which extends `chemcurry` to support this.


  You can install the `chemcurry` package using pip:
  ```shell
  pip install chemcurry
  ```

  This package was built using poetry, so you can also install it by cloning the
  repository and create a poetry environment
  (though this is not recommend outside of development).
  ```shell
  git clone https://github.com/jimmyjbling/ChemCurry
  cd chemcurry
  poetry install
  ```



  Building a chemical curation workflow with `chemcurry` requires only a few lines of code

  ```python
  smiles = ["CCCC", "CCCO", "CCCCN"]

  from chemcurry.workflow import CurationWorkflow
  from chemcurry.steps import AddH, Add3D, FilterMW, RemoveStereochem

  steps = [
      AddH(),
      Add3D(timeout=30),
      FilterMW(max_mw=100, min_mw=10),
      RemoveStereochem()
  ]

  my_workflow = CurationWorkflow(steps=steps)
  curated_chemicals = my_workflow.curate_smiles(smiles)
  ```

  The result of the workflow run, a `CuratedChemicalSet` contains all the info about which
  compounds failed curation, which compound were altered and why/how all of it happened.
  You can save save that info in a human readable report by simply running
  ```python
  curated_chemicals.write_report("path/to/my/report.txt")
  ```

  You can also extract the curated smiles, either as canonical smiles or rdkit Mols
  ```python
  curated_mols = curated_chemicals.to_mols()
  curated_smiles = curated_chemicals.to_smiles()
  ```


  You can optionally turn on history tracking mode if you want extremely detailed
  information about the evolution of chemical as they progress through curation.
  This comes at the expense of extra memory. All you need to do is set `history_tracking=True`
  when initializing your workflow. This will save copies of the molecules after each
  update is made to them so you can render the full history of the molecule. This
  can be done by looping through the `Molecule` objects attached to the curation output
  in the `molecules` attribute.

  > **Note:** Right now there is not alot you can do with history. In the future, extra features like
  > viewing the history of the molecule as an image might be added.


  After making and using a workflow, there is a good chance you will want to save it,
  either so you can using it again later without having to redefine it, or so you can
  share it as part of a publication or project. You can do this by creating a workflow file
  (see [here](./docs/workflow_files.rst) for more info on these files)

  All you need to do is
  ```python
  my_workflow.save_workflow_file("path/to/my/workflow.json")
  ```

  To load in an existing one you can use
  ```python
  my_workflow = CurationWorkflow.load("path/to/my/workflow.json")
  ```

  Simplate as that. There are some checks and other things happening under the
  hood to help prioritize reproducibility and prevent unexpected behavior. You
  can read more about how all that work [here](./docs/workflow_files.rst)


  The curation functions that already exist in `chemcurry` are unlikely to
  always have everything you need.
  chemcurry defines very simple APIs that allow you to easily write your own curation steps
  You can read more about how that work [here](./docs/define_curation_step.rst)

  If you do make your own, we humbly request you submit them to chemcurry so that
  the community can benefit from them. Simply make a fork, push your new function
  (and its unit test) and then make a pull request. You can read more about
  contributing to chemcurry [here]


pkgId: 98ba92cd1ba8a763ab89f0c4c0f532a451083081e8c69a2ce80a2f57ffa382ec
name: python-chemotion-api-help
arch: noarch
version: 0.3.43
epoch: 0
release: 1
summary: Development documents and examples for chemotion-api
url: https://pypi.org/project/chemotion-api/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chemotion-api-0.3.43-1.src.rpm
location_href: Packages/python-chemotion-api-help-0.3.43-1.noarch.rpm
checksum_type: sha256
description:
  A python api for [Chemotion](https://chemotion.net/). Chemotion is a Electronic Laboratory Notebook (ELN) developed at
  the KIT is a web-based platform designed to help researchers manage and organize their experimental data in a secure and
  efficient manner.

  The ChemotionApi Python package is a wrapper for the RESTful API built on top of the Ruby on Rails
  framework that allows users to interact with Chemotion ELN. The package provides a simple and intuitive
  interface for creating, retrieving, updating, and deleting data stored in the ELN using Python. With
  its RESTful architecture and comprehensive documentation, the ChemotionApi allows users to build custom applications and
  workflows that leverage the ELN's capabilities and streamline their research processes.



  Detaild documentation can be found [here](https://chemotionapi.readthedocs.io/en/main/)



  Contributions to ChemotionApi are welcome! If you have any bug reports, feature requests, or suggestions, please
  open an issue on the GitHub repository. You can also submit
  pull requests with your proposed changes.



  ChemotionApi is licensed under the MIT License.

  **Let me know if there's anything else I can help you with!**


pkgId: d3fc388ae3a6580e8b294d99bc5d70c54c6d6d5c3e1f323f1ce5ae2542d3039a
name: python-chencrafts-help
arch: noarch
version: 3.0
epoch: 0
release: 1
summary: Development documents and examples for chencrafts
url: https://github.com/Harrinive/chencrafts
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chencrafts-3.0-1.src.rpm
location_href: Packages/python-chencrafts-help-3.0-1.noarch.rpm
checksum_type: sha256
description:
  There are four main parts in this package: `Toolbox`, `cqed`, `bsqubits`, and `projects`. They serves for different purposes in Danyang's research.

  - `Toolbox` (or `tb`): Toolbox includes functions for optimization, saving and loading data, etc. It is a general toolbox for all the projects.
  - `cqed`: General codes for simulating the cqed systems. It includes simulations for pulse, decoherence, critical photon number, etc. I also define the FlexibleSweep class, inherited from the scqubits.ParameterSweep class, which helps to define swept parameters flexibly. Specifically, it has module `custom_sweeps` for a bunch of pre-defined custom sweeps, which can be used in `scqubits.ParameterSweep` class.
  - `bsqubits` (or `bsq`): A package for simulating and studying some spacific systems, especially for the resonator-qubit systems. The code isn't general enough to be used for other systems. Very high level and practical. Specifically, it has module `QEC_graph` for simulating the cat code using a graph representation.
  - `projects` (or `prj`): A collection for all other projects, including files collected from other collaborators.
  - `fluxonium` (or `fx`): Like `bsqubits`, it's also a code collection for a specific project. It has codes to calculate gate fidelity for FRF system and perform the corresponding analysis.

  ```bash
  pip install chencrafts
  ```

rpm_license:
  BSD 3-Clause License  Copyright (c) 2024 and later, Danyang Chen All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


pkgId: 757c8363a49529e35ec6579f04e11ac012e864e30ae8117a09a00419b3f9a4cc
name: python-chia-puzzles-py-help
arch: noarch
version: 0.18.0
epoch: 0
release: 1
summary: Development documents and examples for chia-puzzles-py
url: https://pypi.org/project/chia-puzzles-py/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chia-puzzles-py-0.18.0-1.src.rpm
location_href: Packages/python-chia-puzzles-py-help-0.18.0-1.noarch.rpm
checksum_type: sha256
description:
  This is a collection of the standard Chia puzzles.
  These are the puzzles which are deployed on chain and therefore cannot change.

  This repository tracks the source code, the compiled hex, and a hash of the compiled hex to ensure continuity.

  All puzzles are kept in the `puzzles` folder as both a `.clsp` and `.clsp.hex` file.

  The Python and Rust bindings are created by running `generate_chialisp_constants.py`



  1. Add the `.clsp` and `.clsp.hex` files into the `programs` folder.
  2. Add the puzzle name, path, and shatree hash into the list in `generate_chialisp_constants.py`.
  3. Run `generate_chialisp_constants.py`.
  4. Commit your changes, including to the outputted `programs.py` and `loaded_chialisp.rs`.



  This project is managed with `poetry` for Python and `cargo` for Rust.

  To run the Python tests:
  ```
  python -m venv venv

  pip install poetry
  . ./venv/bin/activate
  poetry install
  pytest chia_puzzles_py/tests
  ```
  If you're on Windows activate the venv with `. venv\Scripts\activate` instead

  To run the Rust tests:
  ```
  cargo test --all
  ```


pkgId: 1065cc2f288add8db8f792002012e6cdcc61abc3f9ddb32ae0097ca635011833
name: python-chill-filter-help
arch: noarch
version: 0.2
epoch: 0
release: 1
summary: Development documents and examples for chill-filter
url: https://pypi.org/project/chill-filter/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chill-filter-0.2-1.src.rpm
location_href: Packages/python-chill-filter-help-0.2-1.noarch.rpm
checksum_type: sha256
description:
  0. Clone the repo:

  ```
  git clone https://github.com/dib-lab/chill-filter
  cd chill-filter/
  ```

  1. Install flask, sourmash_plugin_branchwater, pandas, and snakemake.

  ```
  conda env create -f environment.yml -n chill
  conda activate chill
  ```

  2. Download the databases from [the Open Science Framework project](https://osf.io/m85ux/), and unpack them into `prepare-db/outputs/`.

  ```
  curl -JLO https://osf.io/download/pwfn8/
  mkdir -p prepare-db/outputs/
  unzip -d prepare-db/outputs/ -nu chill-filter-db-0.1.zip
  ```

  3. Run snakemake in the `sample-db/` directory to index the databases. It should take a few minutes at most.

  ```
  (cd prepare-db && snakemake -j 1 -p)
  ```

  4. Run `chill_filter_web`:

  ```
  mkdir -p /tmp/chill
  python -m chill_filter_web
  ```

  This will start a server at http://localhost:5000/, by default.

  5. Try uploading k=51, scaled=100_000 sketches!

  e.g. there are a bunch in `examples/` to try.


pkgId: 64ad15c58013d31fea55d51eb344c88ab6ec17506b32025ef6ceb84eb198557b
name: python-chimera-core-help
arch: noarch
version: 1.0.3
epoch: 0
release: 1
summary: Development documents and examples for chimera-core
url: https://github.com/xenanetworks/chimera-core
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chimera-core-1.0.3-1.src.rpm
location_href: Packages/python-chimera-core-help-1.0.3-1.noarch.rpm
checksum_type: sha256
description:
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/chimera-core) [![PyPI](https://img.shields.io/pypi/v/chimera-core)](https://pypi.python.org/pypi/chimera-core) ![GitHub](https://img.shields.io/github/license/xenanetworks/open-automation-chimera-core) [![Documentation Status](https://readthedocs.com/projects/xena-networks-open-automation-chimera-core/badge/?version=latest&token=b8f4a96c26f734f42f23515278baa2f2fc56990e1c33f8db2a203f3dc6a1ccd2)](https://docs.xenanetworks.com/projects/xoa-chimera-core/en/latest/?badge=latest)

  XOA Chimera Core provides a set of high-level APIs to administer Xena's network impairment emulator, [Chimera](https://xenanetworks.com/chimera/) for test automation.


  The XOA Chimera Core is a Python library that provides a user-friendly and powerful interface for automating network impairment emulation tasks using Xena Networks Emulator, [Chimera](https://xenanetworks.com/chimera/).

  The XOA Chimera Core is designed to be easy to use and integrate with other automation tools and frameworks. It provides a comprehensive set of methods and classes for interacting with Chimera, including the ability to create and run complex impairment scenarios.

  The XOA Chimera Core simplifies the process of automating network impairment emulation tasks. It provides a simple, yet powerful, interface for interacting with Chimera using the Python programming language. With the XOA Chimera Core, testing professionals can easily create and execute network impairment scenarios, analyze traffic, and perform detailed analysis of 5G ORAN, all while leveraging the power and flexibility of the Python programming language.

  Overall, the XOA Chimera Core is a valuable tool for anyone looking to automate their network emulation tasks using Xena Chimera. With its simple, yet powerful, interface and support for the Python programming language, the XOA Chimera Core provides a set of flexible and extensible APIs for automating network emulation and improving the quality of network infrastructure.


  > Chimera is a network impairment emulator that makes it easy to introduce consistent, accurate, well-defined and repeatable impairments (e.g. packet manipulation, packet drop, latency and jitter) to traffic between DUTs in the lab. All rates from 10GE to 100GE are supported by a single 2-slot test module.
  >
  > Chimera is ideal for NEMs who want to optimize Quality of Experience (QoE) for customers by ensuring equipment can handle acceptable levels of impairment. Service providers, enterprises, and government agencies can also use Chimera to validate Quality of Service (QoS) for voice, video, and data traffic being sent across their networks.
  >
  > Chimera can be installed as a test module in a ValkyrieBay chassis for seamless integration with [ValkyrieManager](https://xenanetworks.com/product/valkyriemanager/). This provides a simple way to impair traffic being generated by Valkyrie from within the same UI - a unique feature for Chimera. Or it is available in a compact chassis for use as a standalone solution for emulating impairment on traffic between two DUTs.
  >
  > Chimera can also be controlled using [XOA CLI](https://docs.xenanetworks.com/projects/xoa-cli), a simple and easy to use command-line-interface scripting API making test automation easy and fast. The result is a cost-effective and powerful network impairment emulator solution for benchmarking, stress testing/negative testing, "what-if" testing, and regression testing.

  > **IMPORTANT**
  >
  > For a brief product overview, go to [Chimera Fact Sheet](https://xenanetworks.com/wp-content/uploads/documentation/factsheet/Chimera-Factsheet.pdf).
  >
  > For complete details of how to use Chimera, go to [Chimera User Manual](https://xenanetworks.com/wp-content/uploads/documentation/tech-doc/ChimeraUserManual.pdf).
  >
  > For detailed technical specifications, go to [Chimera Data Sheet](https://xenanetworks.com/wp-content/uploads/documentation/datasheets/Chimera-datasheet.pdf).


  The user documentation is hosted:
  [Xena OpenAutomation Chimera Core Documentation](https://docs.xenanetworks.com/projects/xoa-chimera-core)





  Make sure Python `pip` is installed on you system. If you are using virtualenv, then pip is already installed into environments created by virtualenv, and using sudo is not needed. If you do not have pip installed, download this file: https://bootstrap.pypa.io/get-pip.py and run `python get-pip.py`.

  To install the latest, use pip to install from pypi:
  ``` shell
  ~/> pip install chimera-core
  ```

  To upgrade to the latest, use pip to upgrade from pypi:
  ``` shell
  ~/> pip install chimera-core --upgrade
  ```


  Make sure these packages are installed ``wheel``, ``setuptools`` on your system.

  Install ``setuptools`` using pip:
  ``` shell
  ~/> pip install wheel setuptools
  ```

  To install source of python packages:
  ``` shell
  /xoa_driver> python setup.py install
  ```

  To build ``.whl`` file for distribution:
  ``` shell
  /xoa_driver> python setup.py bdist_wheel
  ```




  * Get Python pip if not already installed (Download https://bootstrap.pypa.io/get-pip.py):
      `python get-pip.py`

  * Install the latest chimera-core:
      `pip install chimera-core -U`

  * Write Python code to manage with Xena testers:
      ```python
      import asyncio
      from functools import partial
      from typing import List
      from ipaddress import IPv4Address, IPv6Address
      from loguru import logger

      from chimera_core.controller import MainController
      from chimera_core.types import distributions, enums, dataset

      CHASSIS_IP = "10.20.1.252"
      USERNAME = "chimera-core"
      MODULE_IDX = 11
      PORT_IDX = 0
      FLOW_IDX = 1

      async def my_awesome_func(stop_event: asyncio.Event):

          
          credentials = dataset.Credentials(
              product=dataset.EProductType.VALKYRIE,
              host=CHASSIS_IP)

          
          
          
          

          
          controller = await MainController()

          
          tester_id = await controller.add_tester(credentials=credentials)

          
          tester = await controller.use_tester(tester_id, username=USERNAME, reserve=False, debug=False)

          
          module = await tester.use_module(module_id=MODULE_IDX, reserve=False)

          
          await module.free(should_free_sub_resources=True)
          await module.reserve()

          
          port = await tester.use_port(module_id=MODULE_IDX, port_id=PORT_IDX, reserve=False)

          
          await port.reserve()

          
          await port.reset()

          

          
          
          
          
          port_config = await port.config.get()
          port_config.comment = "My Chimera Port"

          port_config.set_autoneg_on()
          port_config.set_autoneg_off()

          port_config.set_fcs_error_mode_discard()
          port_config.set_fcs_error_mode_pass()

          port_config.set_link_flap(enable=enums.OnOff.ON, duration=100, period=1000, repetition=0)
          port_config.set_link_flap_off()

          port_config.set_pma_error_pulse(enable=enums.OnOff.ON, duration=100, period=1000, repetition=0, coeff=100, exp=-4)
          port_config.set_pma_error_pulse_off()

          port_config.set_impairment_off()
          port_config.set_impairment_on()

          await port.config.set(port_config)

          

          
          
          
          

          
          flow = port.flows[FLOW_IDX]
          flow_config = await flow.get()
          flow_config.comment = "On VLAN 111"
          await flow.set(config=flow_config)

          
          shadow_filter = flow.shadow_filter
          await shadow_filter.init()
          await shadow_filter.clear()

          
          basic_filter = await shadow_filter.use_basic_mode()
          basic_filter_config = await basic_filter.get()

          await basic_filter.set(basic_filter_config)
          await shadow_filter.enable()
          await shadow_filter.apply()

          
          flow = port.flows[FLOW_IDX]
          flow_config = await flow.get()
          flow_config.comment = "On VLAN 111"
          await flow.set(config=flow_config)

          
          shadow_filter = flow.shadow_filter
          await shadow_filter.init()
          await shadow_filter.clear()

          
          dist = distributions.latency_jitter.Gaussian(mean=1, sd=1)
          dist.continuous()

          
          latency_jitter_config = await flow.latency_jitter.get()
          latency_jitter_config.set_distribution(dist)
          await flow.latency_jitter.start(latency_jitter_config)
          await flow.latency_jitter.stop(latency_jitter_config)

          
          
          
          
          ethernet_subfilter = basic_filter_config.layer_2.use_ethernet()
          ethernet_subfilter.exclude()
          ethernet_subfilter.include()
          ethernet_subfilter.src_addr.on(value=dataset.Hex("AAAAAAAAAAAA"), mask=dataset.Hex("FFFFFFFFFFFF"))
          ethernet_subfilter.dest_addr.on(value=dataset.Hex("BBBBBBBBBBBB"), mask=dataset.Hex("FFFFFFFFFFFF"))

          
          
          
          
          layer_2_plus_subfilter = basic_filter_config.layer_2_plus.use_none()

          
          layer_2_plus_subfilter = basic_filter_config.layer_2_plus.use_1_vlan_tag()
          layer_2_plus_subfilter.off()
          layer_2_plus_subfilter.exclude()
          layer_2_plus_subfilter.include()
          layer_2_plus_subfilter.tag_inner.on(value=1234, mask=dataset.Hex("FFF"))
          layer_2_plus_subfilter.pcp_inner.on(value=3, mask=dataset.Hex("7"))

          
          layer_2_plus_subfilter = basic_filter_config.layer_2_plus.use_2_vlan_tags()
          layer_2_plus_subfilter.off()
          layer_2_plus_subfilter.exclude()
          layer_2_plus_subfilter.include()
          layer_2_plus_subfilter.tag_inner.on(value=1234, mask=dataset.Hex("FFF"))
          layer_2_plus_subfilter.pcp_inner.on(value=3, mask=dataset.Hex("7"))
          layer_2_plus_subfilter.tag_outer.on(value=2345, mask=dataset.Hex("FFF"))
          layer_2_plus_subfilter.pcp_outer.on(value=0, mask=dataset.Hex("7"))

          
          layer_2_plus_subfilter = basic_filter_config.layer_2_plus.use_mpls()
          layer_2_plus_subfilter.off()
          layer_2_plus_subfilter.exclude()
          layer_2_plus_subfilter.include()
          layer_2_plus_subfilter.label.on(value=1000, mask=dataset.Hex("FFFFF"))
          layer_2_plus_subfilter.toc.on(value=0, mask=dataset.Hex("7"))


          
          
          
          
          layer_3_subfilter = basic_filter_config.layer_3.use_none()

          
          layer_3_subfilter = basic_filter_config.layer_3.use_ipv4()
          layer_3_subfilter.off()
          layer_3_subfilter.exclude()
          layer_3_subfilter.include()
          layer_3_subfilter.src_addr.on(value=IPv4Address("10.0.0.2"), mask=dataset.Hex("FFFFFFFF"))
          layer_3_subfilter.dest_addr.on(value=IPv4Address("11.0.0.2"), mask=dataset.Hex("FFFFFFFF"))
          layer_3_subfilter.dscp.on(value=0, mask=dataset.Hex("FC"))

          
          layer_3_subfilter = basic_filter_config.layer_3.use_ipv6()
          layer_3_subfilter.exclude()
          layer_3_subfilter.include()
          layer_3_subfilter.src_addr.on(value=IPv6Address("2001::2"), mask=dataset.Hex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"))
          layer_3_subfilter.dest_addr.on(value=IPv6Address("2002::2"), mask=dataset.Hex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"))


          
          
          
          
          layer_4_subfilter = basic_filter_config.layer_4.use_none()

          
          layer_4_subfilter = basic_filter_config.layer_4.use_tcp()
          layer_4_subfilter.off()
          layer_4_subfilter.exclude()
          layer_4_subfilter.include()
          layer_4_subfilter.src_port.on(value=1234, mask=dataset.Hex("FFFF"))
          layer_4_subfilter.dest_port.on(value=80, mask=dataset.Hex("FFFF"))

          
          layer_4_subfilter = basic_filter_config.layer_4.use_udp()
          layer_4_subfilter.off()
          layer_4_subfilter.exclude()
          layer_4_subfilter.include()
          layer_4_subfilter.src_port.on(value=1234, mask=dataset.Hex("FFFF"))
          layer_4_subfilter.dest_port.on(value=80, mask=dataset.Hex("FFFF"))


          
          
          
          
          layer_xena_subfilter = basic_filter_config.layer_xena.use_none()

          
          layer_xena_subfilter = basic_filter_config.layer_xena.use_tpld()
          layer_xena_subfilter.exclude()
          layer_xena_subfilter.include()
          layer_xena_subfilter[0].on(tpld_id=2)
          layer_xena_subfilter[0].off()
          layer_xena_subfilter[1].on(tpld_id=4)
          layer_xena_subfilter[1].off()
          layer_xena_subfilter[2].on(tpld_id=6)
          layer_xena_subfilter[2].off()
          layer_xena_subfilter[3].on(tpld_id=8)
          layer_xena_subfilter[3].off()
          layer_xena_subfilter[4].on(tpld_id=10)
          layer_xena_subfilter[4].off()
          layer_xena_subfilter[5].on(tpld_id=20)
          layer_xena_subfilter[5].off()
          layer_xena_subfilter[6].on(tpld_id=40)
          layer_xena_subfilter[6].off()
          layer_xena_subfilter[7].on(tpld_id=60)
          layer_xena_subfilter[7].off()
          layer_xena_subfilter[8].on(tpld_id=80)
          layer_xena_subfilter[8].off()
          layer_xena_subfilter[9].on(tpld_id=100)
          layer_xena_subfilter[9].off()
          layer_xena_subfilter[10].on(tpld_id=102)
          layer_xena_subfilter[10].off()
          layer_xena_subfilter[11].on(tpld_id=104)
          layer_xena_subfilter[11].off()
          layer_xena_subfilter[12].on(tpld_id=106)
          layer_xena_subfilter[12].off()
          layer_xena_subfilter[13].on(tpld_id=108)
          layer_xena_subfilter[13].off()
          layer_xena_subfilter[14].on(tpld_id=110)
          layer_xena_subfilter[14].off()
          layer_xena_subfilter[15].on(tpld_id=200)
          layer_xena_subfilter[15].off()

          
          
          
          
          layer_any_subfilter = basic_filter_config.layer_any.use_none()

          
          layer_any_subfilter = basic_filter_config.layer_any.use_any_field()
          layer_any_subfilter.off()
          layer_any_subfilter.exclude()
          layer_any_subfilter.include()
          layer_any_subfilter.on(position=0, value=dataset.Hex("112233445566"), mask=dataset.Hex("112233445566"))


          
          await basic_filter.set(basic_filter_config)
          await shadow_filter.enable()
          await shadow_filter.apply()

          

          
          
          
          

          
          flow = port.flows[FLOW_IDX]
          flow_config = await flow.get()
          flow_config.comment = "On VLAN 111"
          await flow.set(config=flow_config)

          
          shadow_filter = flow.shadow_filter
          await shadow_filter.init()
          await shadow_filter.clear()

          
          extended_filter = await shadow_filter.use_extended_mode()
          extended_filter_config = await extended_filter.get()

          ethernet = dataset.ProtocolSegement(
              protocol_type=dataset.ProtocolOption.ETHERNET,
              value='000001111',
              mask='1110000',
          )
          ipv4_1 = dataset.ProtocolSegement(
              protocol_type=dataset.ProtocolOption.IP,
              value='000001111',
              mask='1110000',
          )
          ipv4_2 = dataset.ProtocolSegement(
              protocol_type=dataset.ProtocolOption.IP,
              value='000001111',
              mask='1110000',
          )
          extended_filter_config.protocol_segments = (ethernet, ipv4_1, ipv4_2)

          await extended_filter.set(extended_filter_config)
          await shadow_filter.enable()
          await shadow_filter.apply()

          

          
          
          
          

          
          dist = distributions.drop.FixedBurst(burst_size=5)
          dist.repeat(period=5)
          dist.one_shot()

          
          dist = distributions.drop.RandomBurst(minimum=1, maximum=10, probability=10_000)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.drop.FixedRate(probability=10_000)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.drop.BitErrorRate(coefficient=1, exponent=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.drop.RandomRate(probability=10_000)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.drop.GilbertElliot(good_state_impair_prob=0, good_state_trans_prob=0, bad_state_impair_prob=0, bad_state_trans_prob=0)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.drop.Uniform(minimum=1, maximum=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.drop.Gaussian(mean=1, sd=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.drop.Poisson(lamda=9)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.drop.Gamma(shape=1, scale=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          data_x=[0, 1] * 256
          custom_distribution = await port.custom_distributions.add(
              linear=False,
              entry_count = len(data_x),
              data_x=data_x,
              comment="Example Custom Distribution"
          )
          dist = distributions.drop.Custom(custom_distribution=custom_distribution)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          drop_config = await flow.drop.get()
          drop_config.set_distribution(dist)
          await flow.drop.start(drop_config)
          await flow.drop.stop(drop_config)

          

          
          
          
          

          
          dist = distributions.misordering.FixedBurst(burst_size=1)
          dist.repeat(period=5)
          dist.one_shot()

          
          dist = distributions.misordering.FixedRate(probability=10_000)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          misordering_config = await flow.misordering.get()
          misordering_config.depth = 1
          misordering_config.set_distribution(dist)
          await flow.misordering.start(misordering_config)
          await flow.misordering.stop(misordering_config)

          

          
          
          
          

          
          dist = distributions.latency_jitter.ConstantDelay(delay=100)


          
          dist = distributions.latency_jitter.AccumulateBurst(burst_delay=1300)
          dist.repeat(period=1)
          dist.one_shot()

          
          dist = distributions.latency_jitter.Step(min=1300, max=77000)
          dist.continuous()

          
          dist = distributions.latency_jitter.Uniform(minimum=1, maximum=1)
          dist.continuous()

          
          dist = distributions.latency_jitter.Gaussian(mean=1, sd=1)
          dist.continuous()

          
          dist = distributions.latency_jitter.Poisson(lamda=9)
          dist.continuous()

          
          dist = distributions.latency_jitter.Gamma(shape=1, scale=1)
          dist.continuous()

          
          data_x=[0, 1] * 256
          custom_distribution = await port.custom_distributions.add(
              linear=False,
              entry_count = len(data_x),
              data_x=data_x,
              comment="Example Custom Distribution"
          )
          dist = distributions.latency_jitter.Custom(custom_distribution=custom_distribution)
          dist.continuous()

          
          latency_jitter_config = await flow.latency_jitter.get()
          latency_jitter_config.set_distribution(dist)
          await flow.latency_jitter.start(latency_jitter_config)
          await flow.latency_jitter.stop(latency_jitter_config)

          

          
          
          
          

          
          dist = distributions.duplication.FixedBurst(burst_size=5)
          dist.repeat(period=5)
          dist.one_shot()

          
          dist = distributions.duplication.RandomBurst(minimum=1, maximum=10, probability=10_000)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.duplication.FixedRate(probability=10_000)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.duplication.BitErrorRate(coefficient=1, exponent=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.duplication.RandomRate(probability=10_000)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.duplication.GilbertElliot(good_state_impair_prob=0, good_state_trans_prob=0, bad_state_impair_prob=0, bad_state_trans_prob=0)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.duplication.Uniform(minimum=1, maximum=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.duplication.Gaussian(mean=1, sd=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.duplication.Poisson(lamda=9)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.duplication.Gamma(shape=1, scale=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          data_x=[0, 1] * 256
          custom_distribution = await port.custom_distributions.add(
              linear=False,
              entry_count = len(data_x),
              data_x=data_x,
              comment="Example Custom Distribution"
          )
          dist = distributions.duplication.Custom(custom_distribution=custom_distribution)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          duplication_config = await flow.duplication.get()
          duplication_config.set_distribution(dist)
          await flow.duplication.start(duplication_config)
          await flow.duplication.stop(duplication_config)

          

          
          
          
          

          
          dist = distributions.corruption.FixedBurst(burst_size=5)
          dist.repeat(period=5)
          dist.one_shot()

          
          dist = distributions.corruption.RandomBurst(minimum=1, maximum=10, probability=10_000)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.corruption.FixedRate(probability=10_000)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.corruption.BitErrorRate(coefficient=1, exponent=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.corruption.RandomRate(probability=10_000)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.corruption.GilbertElliot(good_state_impair_prob=0, good_state_trans_prob=0, bad_state_impair_prob=0, bad_state_trans_prob=0)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.corruption.Uniform(minimum=1, maximum=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.corruption.Gaussian(mean=1, sd=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.corruption.Poisson(lamda=9)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          dist = distributions.corruption.Gamma(shape=1, scale=1)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          data_x=[0, 1] * 256
          custom_distribution = await port.custom_distributions.add(
              linear=False,
              entry_count = len(data_x),
              data_x=data_x,
              comment="Example Custom Distribution"
          )
          dist = distributions.corruption.Custom(custom_distribution=custom_distribution)
          dist.repeat_pattern(duration=1, period=1)
          dist.continuous()

          
          corruption_config = await flow.corruption.get()
          corruption_config.corruption_type = enums.CorruptionType.ETH
          corruption_config.corruption_type = enums.CorruptionType.IP
          corruption_config.corruption_type = enums.CorruptionType.TCP
          corruption_config.corruption_type = enums.CorruptionType.UDP
          corruption_config.set_distribution(dist)
          await flow.corruption.start(corruption_config)
          await flow.corruption.stop(corruption_config)

          

          
          
          
          

          
          policer_config = await flow.policer.get()
          policer_config.set_control_mode(mode=enums.PolicerMode.L1)
          policer_config.set_control_on_l1()
          policer_config.set_control_mode(mode=enums.PolicerMode.L2)
          policer_config.set_control_on_l2()
          policer_config.mode = enums.PolicerMode.L1
          policer_config.mode = enums.PolicerMode.L2
          policer_config.cir = 10_000
          policer_config.cbs = 1_000
          policer_config.set_on_off(on_off=enums.OnOff.ON)
          policer_config.set_on()
          policer_config.set_on_off(on_off=enums.OnOff.OFF)
          policer_config.set_off()
          await flow.policer.start(policer_config)
          await flow.policer.stop(policer_config)

          

          
          
          
          

          
          shaper_config = await flow.shaper.get()
          shaper_config.set_control_mode(mode=enums.PolicerMode.L1)
          shaper_config.set_control_on_l1()
          shaper_config.set_control_mode(mode=enums.PolicerMode.L2)
          shaper_config.set_control_on_l2()
          shaper_config.mode = enums.PolicerMode.L1
          shaper_config.mode = enums.PolicerMode.L2
          shaper_config.cir = 10_000
          shaper_config.cbs = 1_000
          shaper_config.buffer_size = 1_000
          shaper_config.set_on_off(on_off=enums.OnOff.ON)
          shaper_config.set_on()
          shaper_config.set_on_off(on_off=enums.OnOff.OFF)
          shaper_config.set_off()
          await flow.shaper.start(shaper_config)
          await flow.shaper.stop(shaper_config)

          

          
          
          
          

          rx_total = await flow.statistics.rx.total.get()
          rx_total.byte_count
          rx_total.packet_count
          rx_total.l2_bps
          rx_total.pps

          tx_total = await flow.statistics.tx.total.get()
          tx_total.byte_count
          tx_total.packet_count
          tx_total.l2_bps
          tx_total.pps

          flow_drop_total = await flow.statistics.total.dropped.get()
          flow_drop_total.pkt_drop_count_total
          flow_drop_total.pkt_drop_count_programmed
          flow_drop_total.pkt_drop_count_bandwidth
          flow_drop_total.pkt_drop_count_other
          flow_drop_total.pkt_drop_ratio_total
          flow_drop_total.pkt_drop_ratio_programmed
          flow_drop_total.pkt_drop_ratio_bandwidth
          flow_drop_total.pkt_drop_ratio_other

          flow_corrupted_total = await flow.statistics.total.corrupted.get()
          flow_corrupted_total.fcs_corrupted_pkt_count
          flow_corrupted_total.fcs_corrupted_pkt_ratio
          flow_corrupted_total.ip_corrupted_pkt_count
          flow_corrupted_total.ip_corrupted_pkt_ratio
          flow_corrupted_total.tcp_corrupted_pkt_count
          flow_corrupted_total.tcp_corrupted_pkt_ratio
          flow_corrupted_total.total_corrupted_pkt_count
          flow_corrupted_total.total_corrupted_pkt_ratio
          flow_corrupted_total.udp_corrupted_pkt_count
          flow_corrupted_total.udp_corrupted_pkt_ratio

          flow_delayed_total = await flow.statistics.total.delayed.get()
          flow_delayed_total.pkt_count
          flow_delayed_total.ratio

          flow_jittered_total = await flow.statistics.total.jittered.get()
          flow_jittered_total.pkt_count
          flow_jittered_total.ratio

          flow_duplicated_total = await flow.statistics.total.duplicated.get()
          flow_duplicated_total.pkt_count
          flow_duplicated_total.ratio

          flow_misordered_total = await flow.statistics.total.misordered.get()
          flow_misordered_total.pkt_count
          flow_misordered_total.ratio

          await flow.statistics.tx.clear.set()
          await flow.statistics.rx.clear.set()
          await flow.statistics.clear.set()

          

          
          
          
          
          port_drop = await port.config.statistics.dropped.get()
          port_drop.pkt_drop_count_total
          port_drop.pkt_drop_count_programmed
          port_drop.pkt_drop_count_bandwidth
          port_drop.pkt_drop_count_other
          port_drop.pkt_drop_ratio_total
          port_drop.pkt_drop_ratio_programmed
          port_drop.pkt_drop_ratio_bandwidth
          port_drop.pkt_drop_ratio_other

          port_corrupted = await port.config.statistics.corrupted.get()
          port_corrupted.fcs_corrupted_pkt_count
          port_corrupted.fcs_corrupted_pkt_ratio
          port_corrupted.ip_corrupted_pkt_count
          port_corrupted.ip_corrupted_pkt_ratio
          port_corrupted.tcp_corrupted_pkt_count
          port_corrupted.tcp_corrupted_pkt_ratio
          port_corrupted.total_corrupted_pkt_count
          port_corrupted.total_corrupted_pkt_ratio
          port_corrupted.udp_corrupted_pkt_count
          port_corrupted.udp_corrupted_pkt_ratio

          port_delayed = await port.config.statistics.delayed.get()
          port_delayed.pkt_count
          port_delayed.ratio

          port_jittered = await port.config.statistics.jittered.get()
          port_jittered.pkt_count
          port_jittered.ratio

          port_duplicated = await port.config.statistics.duplicated.get()
          port_duplicated.pkt_count
          port_duplicated.ratio

          port_misordered = await port.config.statistics.misordered.get()
          port_misordered.pkt_count
          port_misordered.ratio

          await port.config.statistics.clear.set()

          

      async def main() -> None:
          stop_event = asyncio.Event()
          await my_awesome_func(stop_event=stop_event)


      if __name__ == "__main__":
          asyncio.run(main())
      ```


  ***

  FOR TESTING BEYOND THE STANDARD.


pkgId: 96fcc60726345a8fdd5746c4b375abe5e7a3617f7f88083e9efa14e93b6fdfab
name: python-chineserand-help
arch: noarch
version: 0.0.3
epoch: 0
release: 1
summary: Development documents and examples for chineserand
url: https://github.com/chenzuoli/chineserand
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chineserand-0.0.3-1.src.rpm
location_href: Packages/python-chineserand-help-0.0.3-1.noarch.rpm
checksum_type: sha256
description:
  本词表来自BCC语料库汉语部分的报刊（news）、科技（technology）、博客（blog）、微博（weibo）和文学（literature）几个频道。Global为此五个频道合并后的全局词表。

  词表剪枝频次为10。未去除字母词。存在部分数量词残留。

  本词表仅供学术使用。引用请注明“北京语言大学BCC语料库http://bcc.blcu.edu.cn”和文献（以bcc网站的最新引用说明为准）。最终解释权归北语大数据与教育技术研究所所有。


  北京语言大学·信息科学学院·大数据与教育技术研究所
  2015年10月

  联系人：荀恩东，edxun@126.com



  本工具包根据BCC语料库汉语词表词频获取中文字符，随机生成的，已标明数据来源，如有侵权，请通知下线谢谢。



  ```commandline
  pip install chinese_random
  ```

  python示例：
  ```python
  from chineserand import raw
  chinese_words = raw(10)
  print(chinese_words)
  ```

  如果有任何问题，欢迎提issue。



  本项目由【<b>乐知付加密平台</b>】开源，乐知付加密平台，是一个以用户为中心的内容变现平台，无论是专业创作者还是个人爱好者，都可以通过我们平台实现变现梦想。

  您无需亲自搭建知识付费服务平台，将知识资源放在网盘中，通过加密平台，进行压缩包密码管理，买家支付后展示网盘中压缩包密码，轻松资源变现。


  官网地址：[www.lezhifu.cc](https://lezhifu.cc)

  公众号：
  <div style="text-align: center;">
      <img src="images/image.png" alt="乐知付" style="width: 50%;">
  </div>


pkgId: 812368e94e1f8e29252f46f1889fd03ffd4c8acc1362e06c4e34bab4fd5c586d
name: python-chromatrace-help
arch: noarch
version: 0.2.11
epoch: 0
release: 1
summary: Development documents and examples for chromatrace
url: https://github.com/Msameim181/Python-Logging-Best-Practice
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chromatrace-0.2.11-1.src.rpm
location_href: Packages/python-chromatrace-help-0.2.11-1.noarch.rpm
checksum_type: sha256
description:
  [![GitHub](https://img.shields.io/github/license/Msameim181/Python-Logging-Best-Practice.svg)]()
  [![Version](https://badge.fury.io/gh/Msameim181%2FPython-Logging-Best-Practice.svg)](https://badge.fury.io/gh/Msameim181%2FPython-Logging-Best-Practice)
  [![GitHub Release](https://img.shields.io/github/release/Msameim181/Python-Logging-Best-Practice.svg?style=flat)]()
  [![GitHub Release Date](https://img.shields.io/github/release-date/Msameim181/Python-Logging-Best-Practice.svg?style=flat)]()
  [![GitHub Release Date](https://img.shields.io/github/last-commit/Msameim181/Python-Logging-Best-Practice.svg?style=flat)]()
  [![GitHub issues](https://img.shields.io/github/issues/Msameim181/Python-Logging-Best-Practice.svg)]()
  [![PyPi Version](https://img.shields.io/pypi/v/chromatrace.svg)](https://pypi.python.org/pypi/chromatrace/)
  [![PyPi Version Alt](https://badge.fury.io/py/chromatrace.svg)](https://pypi.python.org/pypi/chromatrace/)
  [![PyPI Downloads](https://static.pepy.tech/badge/chromatrace)](https://pepy.tech/projects/chromatrace)
  [![Python Versions](https://img.shields.io/pypi/pyversions/chromatrace.svg)]()
  Chromatrace is a Python package designed for advanced logging capabilities, including trace and request ID management along with process ID. It provides a flexible logging configuration and supports colored logging for better visibility.
  I believe that logging is an essential part of any application, and it is crucial to have a well-organized and structured logging system. Chromatrace aims to provide a simple and easy-to-use logging system that can be integrated into any Python application.
  In simple terms, Chromatrace is a Best Practice of Logging in Python.

  - Configurable logging settings using Pydantic.
  - Customizable log levels and loggers for different services.
  - Support for trace IDs and request IDs.
  - Support for process IDs.
  - Customizable log formats and handlers.
  - Asynchronous and synchronous function tracing.
  - Uvicorn integration for logging configuration to customize log settings.
  - FastAPI integration for request ID management.
  - SocketIO integration for request ID management.
  - Practical examples for different frameworks and use cases.

  You can install Chromatrace via pip:
  ```bash
  pip install chromatrace
  ```

  To use Chromatrace in your application, you can import the necessary components:
  ```python
  from chromatrace import LoggingSettings, LoggingConfig, tracer
  ```
  Configure your logging settings:
  ```python
  logging_config = LoggingConfig(
      settings=LoggingSettings(
          application_level="Development",
          enable_tracing=True,
          ignore_nan_trace=False,
          enable_file_logging=True,
      )
  )
  logger = logging_config.get_logger(__name__)
  ```
  Use the `tracer` decorator to trace your functions:
  ```python
  @tracer
  async def my_async_function():
     logger.debug("Check something")
     logger.info("Doing something")
     logger.warning("Doing something")
     logger.error("Something went wrong")
  ```

  ```python
  from lagom import Container
  container = Container()
  from chromatrace import LoggingConfig, LoggingSettings
  container[LoggingSettings] = LoggingSettings(
          application_level="Development",
          enable_tracing=True,
          ignore_nan_trace=False,
          enable_file_logging=True,
      )
  container[LoggingConfig] = LoggingConfig(container[LoggingSettings])
  ```
  Then, add the `LoggingConfig` to your service:
  ```python
  import logging
  from chromatrace import LoggingConfig
  class SomeService:
      def __init__(self, logging_config: LoggingConfig):
          self.logger = logging_config.get_logger(self.__class__.__name__)
          self.logger.setLevel(logging.ERROR)
      async def do_something(self):
          self.logger.debug("Check something in second service")
          self.logger.info("Doing something in second service")
          self.logger.error("Something went wrong in second service")
  ```
  Results:
  ```log
  [Development]-(2024-11-21 23:43:26)-[INFO]-[APIService]-FILENAME:api_app.py-FUNC:do_something-THREAD:MainThread-LINE:27 ::
  Doing something in API service
  [Development]-(2024-11-21 23:43:26)-[ERROR]-[APIService]-FILENAME:api_app.py-FUNC:do_something-THREAD:MainThread-LINE:28 ::
  Something went wrong in API service
  [T-dc1be4de]-[Development]-(2024-11-21 23:43:26)-[INFO]-[Main]-FILENAME:main.py-FUNC:main-THREAD:MainThread-LINE:21 ::
  Starting main
  [T-dc1be4de]-[Development]-(2024-11-21 23:43:26)-[ERROR]-[ExampleService]-FILENAME:example_service.py-FUNC:do_something-THREAD:MainThread-LINE:26 ::
  Something went wrong
  [T-dc1be4de]-[Development]-(2024-11-21 23:43:26)-[INFO]-[InnerService]-FILENAME:example_service.py-FUNC:do_something-THREAD:MainThread-LINE:13 ::
  Doing something in second service
  [T-dc1be4de]-[Development]-(2024-11-21 23:43:26)-[ERROR]-[InnerService]-FILENAME:example_service.py-FUNC:do_something-THREAD:MainThread-LINE:14 ::
  Something went wrong in second service
  [T-dc1be4de]-[Development]-(2024-11-21 23:43:26)-[DEBUG]-[AnotherSample]-FILENAME:sample.py-FUNC:do_something-THREAD:MainThread-LINE:12 ::
  Check something
  [T-dc1be4de]-[Development]-(2024-11-21 23:43:26)-[INFO]-[AnotherSample]-FILENAME:sample.py-FUNC:do_something-THREAD:MainThread-LINE:13 ::
  Doing something
  [T-dc1be4de]-[Development]-(2024-11-21 23:43:26)-[WARNING]-[AnotherSample]-FILENAME:sample.py-FUNC:do_something-THREAD:MainThread-LINE:14 ::
  Doing something
  [T-dc1be4de]-[Development]-(2024-11-21 23:43:26)-[ERROR]-[AnotherSample]-FILENAME:sample.py-FUNC:do_something-THREAD:MainThread-LINE:15 ::
  Something went wrong
  ```
  The two first log was out of trace and the trace ID was not added to the log message. The rest of the logs were within the trace and the trace ID - `T-dc1be4de`, was added to the log message.
  **NOTE**: The important thing is that each Class or Service can have its own log level. This is useful when you want to have different log levels for different services.

  ```python
  from chromatrace import RequestIdMiddleware
  app = FastAPI()
  app.add_middleware(RequestIdMiddleware)
  ```
  Result:
  ```log
  [R-ffe0a9a2]-[Development]-(2024-11-22 00:13:53)-[INFO]-[APIService]-FILENAME:api_app.py-FUNC:read_root-THREAD:MainThread-LINE:38 ::
  Hello World
  [R-ffe0a9a2]-[Development]-(2024-11-22 00:13:53)-[ERROR]-[ExampleService]-FILENAME:example_service.py-FUNC:do_something-THREAD:MainThread-LINE:26 ::
  Something went wrong
  [R-ffe0a9a2]-[Development]-(2024-11-22 00:13:53)-[INFO]-[InnerService]-FILENAME:example_service.py-FUNC:do_something-THREAD:MainThread-LINE:13 ::
  Doing something in second service
  [R-ffe0a9a2]-[Development]-(2024-11-22 00:13:53)-[ERROR]-[InnerService]-FILENAME:example_service.py-FUNC:do_something-THREAD:MainThread-LINE:14 ::
  Something went wrong in second service
  ```
  As you can see, the request ID - `R-ffe0a9a2` is automatically added to the log messages from the thread that handles the request.

  ```python
  from chromatrace import SocketRequestIdMiddleware
  socket_application = SocketRequestIdMiddleware(socket_application)
  ```
  The full example can be found in the [socket_app.py](src/examples/frameworks/socket_app.py) file. I recommend you to check it out before making any decision. The client-side code can be found in the [socket_client.py](src/examples/adaptors/socket_client.py) file.
  Result:
  ```log
  [S-4e2b7c5e]-[Development]-(2024-12-06 01:15:18)-[INFO]-[Socket]-FILENAME:socket_app.py-FUNC:connect-THREAD:MainThread-LINE:86 ::
  Socket connected on main namespace. SID: wB-srwnv9Xa2w_8bAAAB
  [S-4e2b7c5e]-[Development]-(2024-12-06 01:15:20)-[INFO]-[Socket]-FILENAME:socket_app.py-FUNC:message-THREAD:MainThread-LINE:90 ::
  Received message on main namespace. SID: wB-srwnv9Xa2w_8bAAAB, Message: Hello from the client
  [S-aaf46528]-[Development]-(2024-12-06 01:15:47)-[INFO]-[Socket]-FILENAME:socket_app.py-FUNC:connect-THREAD:MainThread-LINE:86 ::
  Socket connected on main namespace. SID: FI3E_S_A-KsTi4RLAAAD
  [S-aaf46528]-[Development]-(2024-12-06 01:15:49)-[INFO]-[Socket]-FILENAME:socket_app.py-FUNC:message-THREAD:MainThread-LINE:90 ::
  Received message on main namespace. SID: FI3E_S_A-KsTi4RLAAAD, Message: Hello from the client
  ```
  Yes, the socket logs are also within the trace. The trace ID - `S-4e2b7c5e` and `S-aaf46528` was added to the log messages. For better experience, the prefix `S` was added to the trace ID to differentiate it from the request ID.

  ```python
  from chromatrace.uvicorn import GetLoggingConfig, UvicornLoggingSettings
  rest_application = FastAPI()
  uvicorn.run(
      rest_application,
      host="0.0.0.0",
      port=8000,
      log_level="debug",
      log_config=GetLoggingConfig(
          UvicornLoggingSettings(
              enable_file_logging=True,
              show_process_id=True,
          )
      ),
  )
  ```
  Result:
  ```log
  (2024-12-12 20:54:54)-[PID:3710345]-[INFO]: Started server process [3710345]
  (2024-12-12 20:54:54)-[PID:3710345]-[INFO]: Waiting for application startup.
  (2024-12-12 20:54:54)-[PID:3710345]-[INFO]: Application startup complete.
  (2024-12-12 20:54:54)-[PID:3710345]-[INFO]: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
  (2024-12-12 20:54:57)-[PID:3710345]-[INFO]: ADDRESS:(127.0.0.1:46166) - REQUEST:"GET /consume HTTP/1.1" - STATUS:200 OK
  (2024-12-12 20:55:45)-[PID:3710345]-[INFO]: ADDRESS:(127.0.0.1:54018) - REQUEST:"GET /consume HTTP/1.1" - STATUS:200 OK
  (2024-12-12 20:56:51)-[PID:3710345]-[INFO]: ADDRESS:(127.0.0.1:58240) - REQUEST:"GET / HTTP/1.1" - STATUS:200 OK
  (2024-12-12 20:56:51)-[PID:3710345]-[INFO]: ADDRESS:(127.0.0.1:58254) - REQUEST:"GET / HTTP/1.1" - STATUS:200 OK
  (2024-12-12 20:56:52)-[PID:3710345]-[INFO]: ADDRESS:(127.0.0.1:58260) - REQUEST:"GET / HTTP/1.1" - STATUS:200 OK
  (2024-12-12 20:56:52)-[PID:3710345]-[INFO]: ADDRESS:(127.0.0.1:58270) - REQUEST:"GET / HTTP/1.1" - STATUS:200 OK
  (2024-12-12 21:16:45)-[PID:3710345]-[INFO]: Shutting down
  (2024-12-12 21:16:45)-[PID:3710345]-[INFO]: Waiting for application shutdown.
  (2024-12-12 21:16:45)-[PID:3710345]-[INFO]: Application shutdown complete.
  (2024-12-12 21:16:45)-[PID:3710345]-[INFO]: Finished server process [3710345]
  ```
  The logs are within the process ID - `PID:3710345` was added to the log messages. The log messages are also colored for better visibility. The log messages are also written to the file if the `enable_file_logging` is set to `True`. For more information, check the [config.py](src/chromatrace/uvicorn/config.py) file, `UvicornLoggingSettings` class.

  > You don't trust me, do you? I understand. You wanna see it in action, right? I got you covered. :)
  You can find examples of how to use Chromatrace in the [examples](src/examples/) directory. Run the examples using the following command:
  ```bash
  python main.py
  ```
  Then, run:
  ```bash
  curl 0.0.0.0:8000
  ```
  Now, check the logs in the terminal.
  Also, the socket server will start and wait for the client to connect on `http://localhost:8001`.
  For socket client-side run the following command in another terminal:
  ```bash
  python adaptors/socket_client.py
  ```
  Now, check the logs in the both terminal.

  This project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE - see the [LICENSE](LICENSE) file for details.

  - [Python Logging Best Practices Tips](https://coralogix.com/blog/python-logging-best-practices-tips/)
  - [12 Python Logging Best Practices To Debug Apps Faster](https://middleware.io/blog/python-logging-best-practices/)
  - [10 Best Practices for Logging in Python](https://betterstack.com/community/guides/logging/python/python-logging-best-practices/)

rpm_license:
[cell repeats an earlier one in this file: 33880 characters]


pkgId: 102e596fee8c893477d5d4781a4be03b9663bae479847b4ee16fa4ce5d4b6c91
name: python-chuchichaestli-help
arch: noarch
version: 0.2.1
epoch: 0
release: 1
summary: Development documents and examples for chuchichaestli
url: https://github.com/CAIIVS/chuchichaestli
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chuchichaestli-0.2.1-1.src.rpm
location_href: Packages/python-chuchichaestli-help-0.2.1-1.noarch.rpm
checksum_type: sha256
description:
  `chuchichaestli` is a collection of model architectures and other useful bits of code in use at the Intelligent Vision Systems group at the University of Applied Sciences Zurich (ZHAW).




  Tagged releases are available as PyPI packages. To install the latest package, run:

  ```bash
  pip install chuchichaestli
  ```

  For the bleeding-edge package directly from the git main, clone the repository and run the following command in the root directory of the repository:

  ```bash
  pip install -e .
  ```

  Alternatively, you can install the package directly from GitHub:

  ```bash
  pip install git+https://github.com/CAIIVS/chuchichaestli.git
  ```



  Releases and packages are automatically created with various GitHub
  action workflows. The general development workflow is as follows

  1) checkout to a non-default branch to apply patches, features, etc.
    * each commit to a non-default branch triggers an install test (on latest Python versions) and a package build
  2) open a PR
    * at opening and each subsequent commit to that PR, the build is uploaded to TestPyPI and a dev version is incremented (e.g. v1.2.0 -> v1.2.0-dev0)
  3) once the PR is reviewed, it can be merged
    * at merge, the micro version is incremented on the main branch and tagged (e.g. v1.2.0-dev7 -> v1.2.1)
    * subsequently, a package is built, published to PyPI, and released on GitHub with the latest version tag
  4) every once in a while it is necessary to bump minor or major versions
    * minor and major version can be triggered, by manually dispatching the `on_dispatch.yml` workflow
    * on the web interface (using the option `minor` or `major`), or
    * on CLI with `gh workflow run on_dispatch.yml -f type=minor` (or `-f type=major`)




  In `.github/workflows/` there are several reusable workflows which
  provide the basic utility for the triggered jobs:

  * `test-install.yml`
    - test install on various Python versions (by default 3.10-3.12)
    - ruff linting checks (stop build if error occurs)
    - run unit tests with pytest
    - upload test results (for prosperity)
  * `build-package.yml`
    - build package for Python version 3.x
    - upload package dist artifacts (by name)
  * `github-release.yml`
    - download package dist artifact (by name)
    - sign package dist with Sigstore
    - create and upload GitHub release
  * `phdenzel/hatch-bump@v*`
    - use hatch to increment a version
    - commit and push changes




  * `on_branches.yml`
    - triggers on commit to any branch (except `main`) not in a PR (pull request)
    - runs `test-install-python-version` and `build-package`
  * `on_pr.yml`
    - triggers on commit to a PR
    - runs `test-install-python-version`, `build-package`, `publish-to-testpypi`, and `version-bump-dev`
  * `on_merge.yml`
    - triggers on PR merge
    - runs `version-bump-on-merge` (increments micro version on main)
  * `on_push.yml`
    - triggers on push to the main branch upon automatic version change
    - runs `test-install-python-version`, `build-package`, `publish-to-pypi`, `github-release`
  * `on_dispatch.yml`
    - triggers on dispatch (e.g. by running `gh workflow run on-dispatch.yml -f type=minor`)
    - runs `version-bump` (increments chosen type of version on main)

rpm_license:
[cell repeats an earlier one in this file: 34486 characters]


pkgId: a0fd445cf2464ef4b3aeb332bcacdf62a75b98fb167fcb3b9852d1e240bc2997
name: python-chunithm-scraper-help
arch: noarch
version: 1.0.2
epoch: 0
release: 1
summary: Development documents and examples for chunithm-scraper
url: https://github.com/taka-4602/ONGEKI.Net-CHUNITHM.Net-Scraper
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chunithm-scraper-1.0.2-1.src.rpm
location_href: Packages/python-chunithm-scraper-help-1.0.2-1.noarch.rpm
checksum_type: sha256
description:
  オンゲキ NET と チュウニズム NETから情報を取得するAPIラッパー、マイマイの予定はありません

  音擊
  ```
  pip install ongeki-scraper
  ```
  チュウニズム
  ```
  pip install chunithm-scraper
  ```
  必須 : requests, bs4

  他のブラウザーウィンドウなどでログインすると、今までのセッションは破棄されます

  ユーザーIDとPHPセッションIDはすぐ死んでしまいます

  あたりまえですが、無料アカウントでプレミアムアカウントの機能使ったりは無理です
  というかそもそもjson受け取れるようなAPIはなかったので100% Webスクレイピングです


  ```py
  from ongeki_screper import ONGEKI

  ongeki=ONGEKI("SEGA ID","パスワード")#SEGA IDとパスワードでログイン
  print(ongeki.token,ongeki.user_id)#セッションの維持に必要なトークンとユーザーID !!ユーザーIDという名前なだけでランダムに変わるクッキーです!!
  print(ongeki.name)#プレイヤー名
  print(ongeki.plate)#プレートの文字
  print(ongeki.rating,ongeki.raiting_max)#レート
  print(ongeki.battle_point)#バトルポイント
  print(ongeki.money,ongeki.money_total)#マニー
  print(ongeki.leveling,ongeki.leveling_reincarnation)#レベルと転生回数
  print(ongeki.icon)#アイコン画像
  print(ongeki.character)#キャラクター画像
  print(ongeki.course)#利用券
  ongeki=ONGEKI(token=ongeki.token,user_id=ongeki.user_id)#トークンとユーザーIDでログインをスキップ
  all_music=ongeki.get_all_music()#難易度別で全曲を取得
  rating_music=ongeki.check_rating_music()#レーティング対象曲をすべて取得
  print(rating_music.rating_new)#新曲枠
  print(rating_music.rating_best)#ベスト枠
  print(rating_music.rating_recent)#リーセント枠
  print(rating_music.rating_candidate)#候補枠
  check_rating_music=rating_music.rating_best[0]#ベスト枠はリストなので1番上を取得
  score_detail=ongeki.music_score_details(check_rating_music["idx"])#idxが曲の詳細を取得するためのトークンみたいなもの
  print(playlog_score_detail)
  print(score_detail.music_title)#タイトル
  print(score_detail.music_img)#ジャケットの画像
  print(score_detail.music_artist)#アーティスト
  print(score_detail.music_genre)#ジャンル
  print(score_detail.music_enemy)#敵の情報
  print(score_detail.MASTER_battle_score)#バトルスコア
  print(score_detail.MASTER_technical_score)#テクニカルスコア
  print(score_detail.MASTER_icon_technical_rank)#テクニカルランク
  print(score_detail.MASTER_over_damage)#オーバダメージ
  print(score_detail.MASTER_last_played)#最終プレイ日
  history=ongeki.get_history()#プレイ履歴を取得
  last_played=history[0]#プレイ履歴の1番上
  playlog_score_detail=ongeki.playlog_score_details(last_played["idx"])#idxを使ってプレイ履歴の詳細を取得
  print(playlog_score_detail)
  print(playlog_score_detail.music_title)#タイトル
  print(playlog_score_detail.music_img)#ジャケット画像
  print(playlog_score_detail.music_difficulty)#難易度
  print(playlog_score_detail.music_played)#プレイ日時
  print(playlog_score_detail.music_battle_score)#バトルスコア
  print(playlog_score_detail.music_technical_score)#テクニカルスコア
  print(playlog_score_detail.music_over_damage)#オーバーダメージ
  print(playlog_score_detail.max_combo)#コンボ数
  print(playlog_score_detail.critical_break)#クリティカルブレイク
  print(playlog_score_detail.ongeki_break)#ブレイク
  print(playlog_score_detail.hit)#ヒット
  print(playlog_score_detail.miss)#ミス
  print(playlog_score_detail.damage)#ダメージ
  print(playlog_score_detail.tap)#タップ
  print(playlog_score_detail.hold)#ホールド
  print(playlog_score_detail.side_tap)#サイドタップ
  print(playlog_score_detail.side_hold)#サイドホールド
  ```



  ```
  {'title': 'きゅうくらりん', 'level': '14', 'difficulty': 'Master', 'technical_score': '994,198', 'technical_score_int': 994198, 'idx': 'tD6VKJAiSJqbOH2pSJJjTON434ODt50u7C9krAwAFPPhowOm3tEW0atNrTgLAIWzQ7YaMdJxKOGOxp3urrR%2BtA%3D%3D'}
  ```
  dictの中に簡易的な説明が入ってるので単にテクニカルスコアだけ知りたい場合、スコアの詳細を取得しなくてもだいじょうぶ

  プレイ済み
  ```
  'Cutter':{'idx': 'hEr/DTD/cn70Wlvr%2BQXFdJoAZQxOqZI6ohty6tyx8O4AhuqhZKYBKf5H8/prgd3Zh72wyfQG6oVFQqNuErzKcA%3D%3D', 'battle_score': '302.01%', 'over_damage': '9,752,464', 'technical_score': '1,003,145'}
  ```
  未プレイ
  ```
  'Recollect Lines':{'idx': 'G4LE%2BayGWh88q9ziJBDOyQuZRl088qgKmAFN0hAWbd5C/UEBmGISVIASZyJJpCqSovY7EODj6EjGbMUeal/zTw%3D%3D', 'battle_score': None, 'over_damage': None, 'technical_score': None}
  ```
  dict in dictになっているため、```all_music["曲名"]``` でidxやスコアを確認できる

  ```
  SCORE_DETAILS(MASTER_level='13+', MASTER_last_played='2024/11/11 20:28', MASTER_play_count='31', MASTER_over_damage='298.52%', MASTER_battle_score='9,730,844', MASTER_technical_score='998,888', MASTER_icon_battle_rank='https://ongeki-net.com/ongeki-mobile/img/music_icon_br_great.png?ver=1.45.0', MASTER_icon_technical_rank='https://ongeki-net.com/ongeki-mobile/img/music_icon_tr_ss.png?ver=1.45.0', MASTER_icon_bell='https://ongeki-net.com/ongeki-mobile/img/music_icon_fb.png', MASTER_icon_combo='https://ongeki-net.com/ongeki-mobile/img/music_icon_back.png', EXPERT_level='12', EXPERT_last_played='2024/09/26 19:03', EXPERT_play_count='17', EXPERT_over_damage='303.69%', EXPERT_battle_score='9,396,988', EXPERT_technical_score='1,007,995', EXPERT_icon_battle_rank='https://ongeki-net.com/ongeki-mobile/img/music_icon_br_excellent.png?ver=1.45.0', EXPERT_icon_technical_rank='https://ongeki-net.com/ongeki-mobile/img/music_icon_tr_sssplus.png?ver=1.45.0', EXPERT_icon_bell='https://ongeki-net.com/ongeki-mobile/img/music_icon_fb.png', EXPERT_icon_combo='https://ongeki-net.com/ongeki-mobile/img/music_icon_fc.png?ver=1.45.0', LUNATIC_level=None, LUNATIC_last_played=None, LUNATIC_play_count=None, LUNATIC_over_damage=None, LUNATIC_battle_score=None, LUNATIC_technical_score=None, LUNATIC_icon_battle_rank=None, LUNATIC_icon_technical_rank=None, LUNATIC_icon_bell=None, LUNATIC_icon_combo=None, music_img='https://ongeki-net.com/ongeki-mobile/img/music/c159c9bee6a1fb73.png', music_title='Cyaegha', music_genre='VARIETY', music_artist='USAO「Arcaea」', music_enemy='光 Lv.35')
  ```
  レベル別になってるので長い、プレイしていないレベルは```None```

  ```
  SCORE_DETAILS(played='2024/11/11 20:34', music_img='https://ongeki-net.com/ongeki-mobile/img/music/5ab5414aa44d6a03.png', music_title='Knight Rider', music_battle_score='9,282,581', music_over_damage='323.16％', music_technical_score='986,641', max_combo='731', critical_break='1,149', ongeki_break='128', hit='39', miss='4', bell='117/117', damage='4', music_difficulty='Master', tap='95%', hold='99%', flick='99%', side_tap='96%', side_hold='100%')
  ```
  こっちはブレイク数やタップの詳細なども取得できる


  音撃とだいたい同じ...

  ```py
  from chunithm_scraper import CHUNITHM

  chunithm=CHUNITHM("SEGA ID","パスワード")#SEGA IDとパスワードでログイン
  print(chunithm.token,chunithm.php_sess_id)#セッションの維持に必要なトークンとPHPセッションID
  print(chunithm.name)#プレイヤー名
  print(chunithm.plate)#プレートの文字
  print(chunithm.rating,chunithm.raiting_max)#レート
  print(chunithm.money,chunithm.money_total)#通貨
  print(chunithm.leveling,chunithm.leveling_reincarnation)#レベルと転生回数
  print(chunithm.icon)#アイコン画像
  print(chunithm.course)#利用券
  chunithm=CHUNITHM(token=chunithm.token,php_sess_id=chunithm.php_sess_id)#トークンとPHPセッションIDでログインをスキップ
  all_music=chunithm.get_all_music()#難易度別で全曲を取得
  rating_music=chunithm.check_rating_music("Best")#レーティング対象曲を取得、Bestでベスト枠、Recentでリーセント枠、Nextで候補枠
  print(rating_music)#ベスト枠
  check_rating_music=rating_music[0]#ベスト枠の1番上を取得
  rating_music=chunithm.check_rating_music("Recent")
  print(rating_music)#リーセント枠
  rating_music=chunithm.check_rating_music("Next")
  print(rating_music)#候補枠
  score_detail=chunithm.music_score_details(check_rating_music["idx"],check_rating_music["token"])#チュウニズムの曲詳細を取得するには、idxとtokenも必要になる
  print(score_detail)
  print(score_detail.music_title)#タイトル
  print(score_detail.music_img)#ジャケットの画像
  print(score_detail.music_artist)#アーティスト
  print(score_detail.MASTER_score)#スコア
  print(score_detail.MASTER_icon_rank)#ランクの画像
  print(score_detail.MASTER_icon_clear)#クリアの画像
  print(score_detail.MASTER_icon_combo)#フルコンボとかの画像
  history=chunithm.get_history()#プレイ履歴を取得
  last_played=history[0]#プレイ履歴の1番上
  playlog_score_detail=chunithm.playlog_score_details(last_played["idx"],last_played["token"])#idxとトークンを使ってプレイ履歴の詳細を取得
  print(playlog_score_detail)
  print(playlog_score_detail.character)#キャラクター
  print(playlog_score_detail.skill)#スキル
  print(playlog_score_detail.music_img)#ジャケット画像
  print(playlog_score_detail.music_difficulty)#難易度
  print(playlog_score_detail.music_score)#スコア
  print(playlog_score_detail.music_played)#プレイ日時
  print(playlog_score_detail.max_combo)#コンボ数
  print(playlog_score_detail.justice_critical)#ジャスティスクリティカル
  print(playlog_score_detail.justice)#ジャスティス
  print(playlog_score_detail.attack)#アタック
  print(playlog_score_detail.miss)#ミス
  print(playlog_score_detail.tap)#タップ
  print(playlog_score_detail.hold)#ホールド
  print(playlog_score_detail.slide)#スライド
  print(playlog_score_detail.air)#エアー
  print(playlog_score_detail.flick)#フリック
  ```
  これも#コメントで書いてある通り...


  ```
  {'title': 'MEGALOVANIA', 'difficulty': 'Expert', 'score': '985,342', 'score_int': 985342, 'diff': '2', 'genre': '99', 'idx': '2137', 'token': 'fad775feb5e372ffa4b3d6c584422e3a'}
  ```
  dictの中に簡易的な説明が入ってるので単にテクニカルスコアだけ知りたい場合、スコアの詳細を取得しなくてもだいじょうぶ

  プレイ済み
  ```
  'レーイレーイ':{'diff': '3', 'genre': '99', 'idx': '829', 'token': '86a3e43df22bd6b63fdd97b3a5db0f47', 'score': '918,394'}
  ```
  未プレイ
  ```
  'Radiance':{'diff': '3', 'genre': '99', 'idx': '2111', 'token': 'bfa9c3e9f184e546f542df469dfbb059', 'score': None}
  ```
  dict in dictになっているため、```all_music["曲名"]``` でidxとtokenやスコアを確認できる

  ```
  SCORE_DETAILS(MASTER_play_count=None, MASTER_score=None, MASTER_icon_rank=None, MASTER_icon_combo=None, MASTER_icon_clear=None, EXPERT_play_count='1回', EXPERT_score='985,342', EXPERT_icon_rank='https://new.chunithm-net.com/chuni-mobile/html/mobile/images/icon_rank_8.png', EXPERT_icon_combo='https://new.chunithm-net.com/chuni-mobile/html/mobile/images/icon_rank_8.png', EXPERT_icon_clear='https://new.chunithm-net.com/chuni-mobile/html/mobile/images/icon_clear.png', ULTIMA_play_count=None, ULTIMA_score=None, ULTIMA_icon_rank=None, ULTIMA_icon_combo=None, ULTIMA_icon_clear=None, music_img='https://new.chunithm-net.com/chuni-mobile/html/mobile/img/f7b116709baab037.jpg', music_title='MEGALOVANIA', music_artist='Toby Fox「UNDERTALE」')
  ```
  レベル別になってるので長い、プレイしていないレベルは```None```

  ```
  SCORE_DETAILS(music_played='2024/11/11 20:46', music_img='https://new.chunithm-net.com/chuni-mobile/html/mobile/img/94e81ba6b24960b8.jpg', music_title='8OROCHI', music_score='990,754', music_difficulty='Expert', character='藤沢 柚子／デイドリーム・フェアリーズ', skill='オールガード【LMN】', max_combo='567', justice_critical='1,302', justice='122', attack='15', miss='19', tap='97.43%', hold='100.97%', slide='100.34%', air='100.84%', flick='0.00%', icon_clear='https://new.chunithm-net.com/chuni-mobile/html/mobile/images/icon_clear.png', icon_rank='https://new.chunithm-net.com/chuni-mobile/html/mobile/images/icon_rank_9.png', icon_combo='https://new.chunithm-net.com/chuni-mobile/html/mobile/images/icon_rank_9.png')
  ```
  こっちは使用キャラクター、スキル、ジャスティスやエアーの詳細なども取得できる


  えーこれオンゲキ.netだと表示できるのにチュウニズム.netじゃ見れないのかーって項目はもちろんこのスクレイパーでも取得できないし、逆も当然そう

  データベースに保存して再利用はできません

  音撃は 4:00～7:00
  チュウニズムは 2:00～7:00

  Discordで使えるオンゲキ / チュウニズムのレート確認Bot作ったけど、かなりいい感じ
  https://x.com/TakeTakaAway/status/1857697088374714646
  ![twitter](twitter.png)
  ただ100% WebスクレイピングなのでできることはWebとはまったく変わらないのが少し悲しい
  基本的にCLIで情報を確認するときなんかない (´；ω；`)
  せっかく情報が取得できるならレート計算機でもつけた方がいいかなと思ったり
  ```py
  def ongeki_rating(level:float, score:int):
      if score >= 1007500:
          return level + 2
      elif score >= 1000000:
          return round(level + 1.5 + (score - 1000000) / 15000, 2)
      elif score >= 990000:
          return round(level + 1 + (score - 990000) / 20000, 2)
      elif score >= 970000:
          return round(level + (score - 970000) / 20000, 2)
      else: #AAA以下の場合
          return round(level + (score - 970000) / 17500 ,2)
  ```
  ```py
  def chunithm_rating(level:float, score:int):
      if score >= 1009000:
          return level + 2.15
      elif score >= 1007500:
          return round(level + 2.0 + (score - 1007500) // 100 * 0.0 ,2)
      elif score >= 1005000:
          return round(level + 1.5 + (score - 1005000) // 50 * 0.01 ,2)
      elif score >= 1000000:
          return round(level + 1.0 + (score - 1000000) // 100 * 0.01 ,2)
      elif score >= 990000:
          return round(level + 0.6 + (score - 990000) // 250 * 0.01 ,2)
      elif score >= 975000:
          return round(level + (score - 975000) // 250 * 0.01 ,2)
      elif score >= 950000: #AAA以下の場合
          return round(level - 1.5 ,2)
      elif score >= 925000:
          return round(level - 3.0 ,2)
      elif score >= 900000:
          return round(level - 5.0 ,2)
      elif score >= 800000:
          return round((level - 5.0) / 2 ,2)
      else:
          return 0
  ```
  レート計算の式はこんな感じ、曲レートがわかると到達可能レートも計算できるみたいなので
  ```py
  rate_all=[]
  for best in rating_all.rating_best:
      rate_all.append(ongeki_rating(float(譜面定数),best["technical_score_int"]))

  average = sum(rate_all) / len(rate_all)
  reachable = round(average*0.75 + rate_all[0]*0.25, 2)
  ```
  これで到達可能レートが計算できるらしい、ただレベルはもちろん譜面定数が必要だけど。
  譜面定数はまた他のサイトをスクレイピングしてデータベースに保存して、そこから参照するしかない...

  Discord サーバー / https://discord.gg/aSyaAK7Ktm
  Discord ユーザー名 / .taka.


pkgId: 5d619746eaa9ce4b52cb8c1ddd05994201ab809de932d2e180bd92e160f68f88
name: python-chunkator-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for chunkator
url: https://github.com/sahillihas/chunkator
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chunkator-0.0.1-1.src.rpm
location_href: Packages/python-chunkator-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  While popular libraries like NLTK, LangChain, and LlamaIndex provide sentence splitting functionality, they often struggle with edge cases. Here's why `chunkator` stands out:

  `chunkator` processes abbreviations like "Dr.", "Mr.", and "Ph.D." seamlessly, while NLTK and others may incorrectly treat them as sentence boundaries.

  Input:
  ```
  Dr. Smith is a leading scientist. He earned his Ph.D. in Physics.
  ```
  - **NLTK Output**:
    - `['Dr.', 'Smith is a leading scientist.', 'He earned his Ph.D.', 'in Physics.']`
  - **chunkator Output**:


pkgId: c2b6dd5f23b5fda3abf3362b511326b130f677241db0fad2fa30065023eacaa6
name: python-chunking-experiment-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for chunking-experiment
url: https://github.com/JohnnyTeutonic/chunking_experiment
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chunking-experiment-0.1.0-1.src.rpm
location_href: Packages/python-chunking-experiment-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/JohnnyTeutonic/ChunkingForPandas/branch/main/graph/badge.svg)](https://codecov.io/gh/JohnnyTeutonic/chunking_experiment)
  [![Tests](https://github.com/JohnnyTeutonic/ChunkingForPandas/actions/workflows/test.yml/badge.svg)](https://github.com/JohnnyTeutonic/ChunkingForPandas/actions/workflows/test.yml)

  A Python package to chunk pandas/numpy data with different chunking strategies.



  - Python 3.10+
  - Gradio
  - pandas
  - pytest
  - numpy



  ```bash
  pip install chunking-experiment
  ```

  Or:

  ```bash
  make install
  ```



  ```python
  from chunking_experiment import ChunkingExperiment
  ```



  ```python
  class_instance = ChunkingExperiment(
  "input.csv",
  "output.csv",
  n_chunks=3,
  chunking_strategy="rows"
  )
  ```

  Then perform the chunking:

  ```python
  class_instance.process_chunks()
  ```



  Go to the app folder and run the following command:

  ```python
  from gradio_interface import launch_interface
  launch_interface()
  ```

  Alternatively, you can run the following command to start the web interface:

  ```bash
  python gradio_interface.py
  ```



  - Multiple chunking strategies (rows, columns, tokens)
  - Support for CSV, JSON, Numpy and Parquet files
  - Web interface using Gradio
  - Comprehensive test suite
  - Documentation using Sphinx
  - Benchmarking the chunking strategies



  To install development dependencies:

  ```bash
  pip install -e .[dev]
  ```

  Or:

  ```bash
  make install-dev
  ```



  To run tests, run the following command from the root folder:

  ```bash
  pytest
  ```



  To install the documentation dependencies:

  ```bash
  pip install -e .[docs]
  ```

  Or:

  ```bash
  make install-docs
  ```

  To build the documentation:

  ```bash
  make docs
  ```

  To serve the documentation:

  ```bash
  make docs-serve
  ```

  Below are the full list of commands that can be run from the root folder:

  ```bash
  make benchmark
  make clean
  make docs
  make docs-clean
  make docs-serve
  make install
  make install-docs
  make lint
  make run
  make test
  make typecheck
  ```



  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


pkgId: f836c0bc800220f29cbe30a54f9c71685843904b0fad22985fd912a7b75d6c1b
name: python-chunking-pandas-help
arch: noarch
version: 0.1.4
epoch: 0
release: 1
summary: Development documents and examples for chunking-pandas
url: https://github.com/JohnnyTeutonic/chunking_experiment
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-chunking-pandas-0.1.4-1.src.rpm
location_href: Packages/python-chunking-pandas-help-0.1.4-1.noarch.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/JohnnyTeutonic/ChunkingForPandas/branch/main/graph/badge.svg)](https://codecov.io/gh/JohnnyTeutonic/ChunkingForPandas)
  [![Tests](https://github.com/JohnnyTeutonic/ChunkingForPandas/actions/workflows/test.yml/badge.svg)](https://github.com/JohnnyTeutonic/ChunkingForPandas/actions/workflows/test.yml)

  A Python package to chunk pandas/numpy data with different chunking strategies.



  - Python 3.10+
  - Gradio
  - pandas
  - pytest
  - numpy



  ```bash
  pip install chunking-pandas
  ```

  Or:

  ```bash
  make install
  ```



  ```python
  from chunking_pandas import ChunkingExperiment
  ```



  ```python
  class_instance = ChunkingExperiment(
  "input.csv",
  "output.csv",
  n_chunks=3,
  chunking_strategy="rows"
  )
  ```

  Then perform the chunking:

  ```python
  class_instance.process_chunks()
  ```



  Go to the app folder and run the following command:

  ```python
  from gradio_interface import launch_interface
  launch_interface()
  ```

  Alternatively, you can run the following command to start the web interface:

  ```bash
  python gradio_interface.py
  ```



  - Multiple chunking strategies (rows, columns, tokens)
  - Support for CSV, JSON, Numpy and Parquet files
  - Web interface using Gradio
  - Comprehensive test suite
  - Documentation using Sphinx
  - Benchmarking the chunking strategies



  To install development dependencies:

  ```bash
  pip install -e .[dev]
  ```

  Or:

  ```bash
  make install-dev
  ```



  To run tests, run the following command from the root folder:

  ```bash
  pytest
  ```



  To install the documentation dependencies:

  ```bash
  pip install -e .[docs]
  ```

  Or:

  ```bash
  make install-docs
  ```

  To build the documentation:

  ```bash
  make docs
  ```

  To serve the documentation:

  ```bash
  make docs-serve
  ```

  Below are the full list of commands that can be run from the root folder:

  ```bash
  make benchmark
  make clean
  make docs
  make docs-clean
  make docs-serve
  make install
  make install-docs
  make lint
  make run
  make test
  make typecheck
  ```



  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


pkgId: c93371509f390d6204f1984df77a97855504c292c8bde4e8a73cda5a29440bc6
name: python-cici-tools-help
arch: noarch
version: 0.8.1
epoch: 0
release: 1
summary: Development documents and examples for cici-tools
url: https://pypi.org/project/cici-tools/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cici-tools-0.8.1-1.src.rpm
location_href: Packages/python-cici-tools-help-0.8.1-1.noarch.rpm
checksum_type: sha256
description:
  <!-- BADGIE TIME -->

  [![pipeline status](https://img.shields.io/gitlab/pipeline-status/buildgarden/tools/cici-tools?branch=main)](https://gitlab.com/buildgarden/tools/cici-tools/-/commits/main)
  [![coverage report](https://img.shields.io/gitlab/pipeline-coverage/buildgarden/tools/cici-tools?branch=main)](https://gitlab.com/buildgarden/tools/cici-tools/-/commits/main)
  [![latest release](https://img.shields.io/gitlab/v/release/buildgarden/tools/cici-tools)](https://gitlab.com/buildgarden/tools/cici-tools/-/releases)
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

  <!-- END BADGIE TIME -->

  Power tools for CI/CD.

  > Do not use this software unless you are an active collaborator on the
  > associated research project.
  >
  > This project is an output of an ongoing, active research project. It is
  > published without warranty, is subject to change at any time, and has not been
  > certified, tested, assessed, or otherwise assured of safety by any person or
  > organization. Use at your own risk.





  Flatten `extends` keywords to make zero-dependency GitLab CI/CD files.

  ```bash
  cici bundle
  ```

  ```console
  $ cici bundle
  ⚡ python-autoflake.yml
  ⚡ python-black.yml
  ⚡ python-build-sdist.yml
  ⚡ python-build-wheel.yml
  ⚡ python-import-linter.yml
  ⚡ python-isort.yml
  ⚡ python-mypy.yml
  ⚡ python-pyroma.yml
  ⚡ python-pytest.yml
  ⚡ python-setuptools-bdist-wheel.yml
  ⚡ python-setuptools-sdist.yml
  ⚡ python-twine-upload.yml
  ⚡ python-vulture.yml
  ```



  Normalize the style of your GitLab CI/CD files:

  ```bash
  cici fmt
  ```

  ```console
  $ cici fmt
  .gitlab-ci.yml formatted
  ```



  Generate a README for your pipeline project:

  ```bash
  cici readme
  ```

  To customize the output, copy the default README template to `README.md.j2` in
  your project root and modify:

  ```j2


  { include "brief.md.j2" %}
  { include "description.md.j2" %}

  { include "groups.md.j2" %}

  { include "targets.md.j2" %}

  { include "variables.md.j2" %}
  ```



  Update to the latest GitLab CI/CD `include` versions available.

  ```bash
  cici update
  ```

  ```console
  $ cici update
  updated buildgarden/pipelines/python to 0.5.1
  updated buildgarden/pipelines/gitlab from 0.1.0 to 0.2.2
  ```


pkgId: f59ec781214fba43038dd598627f8563bcf63c5e48380bea41a802eda995d560
name: python-cicsim-help
arch: noarch
version: 0.1.14
epoch: 0
release: 1
summary: Development documents and examples for cicsim
url: https://github.com/wulffern/cicsim
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cicsim-0.1.14-1.src.rpm
location_href: Packages/python-cicsim-help-0.1.14-1.noarch.rpm
checksum_type: sha256
description:
  [![tests](https://github.com/wulffern/cicsim/actions/workflows/main.yml/badge.svg)](https://github.com/wulffern/cicsim/actions/workflows/main.yml)



  This is a script package I use to control ngspice, it can

  - Run corner simulations
  - Create IPs (used in  [wulffern/aicex](https://github.com/wulffern/aicex) )
  - Create simulation directories
  - View waveforms



  | Version | Comment                                         |
  |:--------|:------------------------------------------------|
  | 0.0.1   | First version of cicsim                         |
  | 0.0.3   | All in on open source tools                     |
  | 0.1.2   | First version on pipy                           |
  | 0.1.3   | github action update                            |
  | 0.1.4   | Added waveform viewer                           |
  | 0.1.5   | Update waveform viewer                          |
  | 0.1.6   | wave: added search. Added docs                  |
  | 0.1.7   | Bugfix: ngraw deprecated float_                 |
  | 0.1.8   | Added template command                          |
  | 0.1.9   | Bugfix: allow absolute path in template command |
  | 0.1.11  | Added directory name option (dname) to template |
  | 0.1.12  | Added sndrfs and enobfs to fftWithHanning       |







  If you want to follow the latest and greatest
  ``` sh
  git clone https://github.com/wulffern/cicsim
  cd cicsim
  python3 -m pip install --user -e .
  ```

  If you want the latest stable

  ``` bash
  python3 -m pip install cicsim
  ```


  Head over to [Open source analog integrated circuit flow on Skywater
  130nm](https://analogicus.com/rply_ex0_sky130nm/tutorial) to see cicsim in action.



  Make sure you install a python version with tk. On my mac it was

  ``` bash
  brew install python-tk
  ```

  Once installed, I do

  ``` bash
  cicsim wave output_tran/tran_SchGtTtKffVh_*
  ```

  ![](wave.png)




  ```
  Usage: cicsim [OPTIONS] COMMAND [ARGS]...

    Custom IC Creator Simulator Tools

    This package provides helper scripts for simulating integrated circuits

  Options:
    --help  Show this message and exit.

  Commands:
    plot         Plot from rawfile
    portreplace  Replace ${PORTS} and ${VPORTS} with the subcircuit ports...
    results      Results of single runfile
    run          Run a ngspice simulation of TESTBENCH
    simcell      Create a ngspice simulation directory for a Cell
    srun         Run a spectre simulation of TESTBENCH
    summary      Generate simulation summary for results
    wave         Open waveform viewer
  ```


pkgId: b41b66378e7770ed9ea0940e7045d7979940fa9673780be2df64feff021a0543
name: python-cid-cmd-help
arch: noarch
version: 4.0.6
epoch: 0
release: 1
summary: Development documents and examples for cid-cmd
url: https://github.com/aws-samples/aws-cudos-framework-deployment
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cid-cmd-4.0.6-1.src.rpm
location_href: Packages/python-cid-cmd-help-4.0.6-1.noarch.rpm
checksum_type: sha256
description:
  | Dashboard documentation | Demo URL | Prerequisites URL |
  | --- | --- | --- |
  | [CUDOS Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi#cudos-dashboard) | [demo](https://cid.workshops.aws.dev/demo?dashboard=cudos) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi/deploy) (Steps 1 and 2) |
  | [Cost Intelligence Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi#cost-intelligence-dashboard-(cid)) | [demo](https://cid.workshops.aws.dev/demo?dashboard=cost_intelligence_dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi/deploy) (Steps 1 and 2) |
  | [Trusted Advisor Organisation (TAO) Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/trusted-advisor) | [demo](https://cid.workshops.aws.dev/demo?dashboard=tao-dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/trusted-advisor/prerequisites) |
  | [Trends Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/additional/trends) | [demo](https://cid.workshops.aws.dev/demo?dashboard=trends-dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi/deploy) (Steps 1 and 2) |
  | [KPI Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi#kpi-dashboard) | [demo](https://cid.workshops.aws.dev/demo?dashboard=kpi) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi/deploy) (Steps 1 and 2) |
  | [Compute Optimizer Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/compute-optimizer) | [demo](https://cid.workshops.aws.dev/demo?dashboard=compute-optimizer-dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/compute-optimizer/prerequisites) |
  | [Cost Anomaly Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/cost-anomaly) | [demo](https://cid.workshops.aws.dev/demo?dashboard=aws-cost-anomalies) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/cost-anomaly/prerequisites) |
  | [Data Transfer Cost Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/additional/data-transfer) | [demo](https://cid.workshops.aws.dev/demo?dashboard=datatransfer-cost-analysis-dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi/deploy) (Steps 1 and 2) |
  | [AWS Budgets Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/aws-budgets) | [demo](https://cid.workshops.aws.dev/demo?dashboard=aws-budgets) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/aws-budgets#deploy-via-cid-tool) |
  See more dashboards on the [workshop page](https://catalog.workshops.aws/awscid/en-US/dashboards).

  1. :heavy_exclamation_mark: Complete the prerequisites for respective dashboard (see above).
  2. :heavy_exclamation_mark: [Specifying a Query Result Location Using a Workgroup](https://docs.aws.amazon.com/athena/latest/ug/querying.html#query-results-specify-location-workgroup)
  3. :heavy_exclamation_mark: Make sure QuickSight [Enterprise edition](https://aws.amazon.com/premiumsupport/knowledge-center/quicksight-enterprise-account/) is activated.


     [![asciicast](https://asciinema.org/a/467770.svg)](https://asciinema.org/a/467770)

  1. Launch [AWS CloudShell](https://console.aws.amazon.com/cloudshell/home) or your local shell
      Automation requires Python 3
  2. Make sure you have the latest pip package installed
      ```bash
      python3 -m ensurepip --upgrade
      ```
  4. Install CID Python automation PyPI package
      ```bash
      pip3 install --upgrade cid-cmd
      ```

  ```bash
  cid-cmd deploy
  ```

  Update only Dashboard
  ```bash
  cid-cmd update
  ```
  Update dashboard and all dependencies (Datasets and Athena View). WARNING: this will override any customization of SQL files and Datasets.
  ```bash
  cid-cmd update --force --recursive
  ```

  Show dashboards status
  ```bash
  cid-cmd status
  ```
  [<img width="558" alt="status" src="https://github.com/aws-samples/aws-cudos-framework-deployment/assets/82834333/cae2015f-0f81-4593-80b3-c67ec1200fcd">](https://www.youtube.com/watch?v=ivr1MoGaApM)

  ```bash
  cid-cmd share
  ```

  One time action to initialize Amazon QuickSight Enterprise Edition.
  ```bash
  cid-cmd init-qs
  ```

  One time action to initialize Athena table and Crawler from s3 with CUR data. Currently only CUR1 supported.
  ```bash
  cid-cmd init-cur
  ```

  There are 2 CUR formats that `cid-cmd` supports. CUR1 and CUR2 have slightly different fields structure. Each dashboard can be developed using CUR2 or CUR1, but on installation `cid-cmd` will deploy a special Athena View "CUR proxy". This View will play a role of compatibility layer between the CUR version used by Dashboard and available CUR. This View can be extended as new dashboard request CUR fields.
  Please note that Cost Allocation Tags and Cost Categories are not present in CUR Proxy by default. You will need to add these fields by modifying CUR Proxy in Athena or using `cid-cmd` tool:
  For CUR2 proxy (using CUR1 data as source)
  ```bash
  cid-cmd create-cur-proxy -vv \
     --cur-version '2' \
     --cur-table-name 'mycur1' \
     --athena-workgroup 'primary' \
     --fields "resource_tags['user_cost_center'],resource_tags['user_owner']"
  ```
  For CUR1 proxy (using CUR2 data as source)
  ```bash
  cid-cmd create-cur-proxy -vv \
     --cur-version '1' \
     --cur-table-name 'mycur2' \
     --athena-workgroup 'primary' \
     --fields "resource_tags_user_cost_center,resource_tags_user_owner"
  ```

  Delete Dashboards and all dependencies unused by other CID-managed dashboards.(including QuickSight datasets, Athena views and tables)
  ```bash
  cid-cmd delete
  ```

  ```
   --dashboard-id TEXT QuickSight dashboard id
   --athena-database TEXT Athena database
   ```

  The command `export` lets you download or share a customized dashboard with another AWS Account. It takes the QuickSight Analysis as an input and generates all the assets needed to deploy your Analysis into another AWS Account. This command will generate a yaml file with a description of the Dashboard and all required Datasets. Also this command generates a QuickSight Template in the current AWS Account that can be used for Dashboard deployment in other accounts. The resource file can be used with all other cid commands. Both accounts must have relevant Athena Views and Tables.
  Export from account A:
  ```
  cid-cmd export
  ```
  Deployment to account B:
  ```
  cid-cmd deploy --resources ./mydashboard.yaml
  ```

  ```
  cid-cmd --help
  ```

  Generate and SQL file for Athena View for CSV file
  ```
  cid-cmd csv2view --input my_mapping.csv --name my_mapping
  ```
  This command generates a SQL file that you can execute. Please mind [Athena Service Limit for Query Size](https://docs.aws.amazon.com/athena/latest/ug/service-limits.html#service-limits-query-string-length).

  CID is also provided in a form of CloudFormation templates. See detailed instructions in the [Well Architected Labs](https://wellarchitectedlabs.com/cost/200_labs/200_cloud_intelligence/cost-usage-report-dashboards/dashboards/deploy_dashboards/) site.

  CID offers a set of Terraform modules to deploy CUR replication and CID dashboards. Refer to these [deployment instructions](terraform-modules/README.md) for details of
  how to deploy CID dashboards with these modules.
    1. Create a bucket for consolidating CUR [terraform-modules/cur-setup-destination/](terraform-modules/cur-setup-destination/)
    2. Create a CUR in Payer Account(s) [terraform-modules/cur-setup-source/](terraform-modules/cur-setup-source/)
    3. Create Dashboards (wrapper around CloudFormation) [terraform-modules/cid-dashboards/](terraform-modules/cid-dashboards/)

  The ownership of CID is usually with the FinOps team, who do not have administrative access. However, they require specific privileges to install and operate CID dashboards. To assist the Admin team in granting the necessary privileges to the CID owners, a CFN template is provided. This template, located at [CFN template](cfn-templates/cid-admin-policies.yaml), takes an IAM role name as a parameter and adds the required policies to the role.

  If you experience unexpected behaviour of the `cid-cmd` script please run `cid-cmd` in debug mode:
  ```bash
  cid-cmd -vv [command]
  ```
  This will produce a log file in the same directory that were at the tile of launch of cid-cmd.
  We encourage you to open [new issue](https://github.com/aws-samples/aws-cudos-framework-deployment/issues/new) with description of the problem and attached debug log file.


pkgId: ec44c00608e05e843a7616f14c22a92ca55d83934ba8b1c8ddbf74f03de1862b
name: python-cifar-utils-help
arch: noarch
version: 0.1
epoch: 0
release: 1
summary: Development documents and examples for cifar-utils
url: https://pypi.org/project/cifar-utils/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cifar-utils-0.1-1.src.rpm
location_href: Packages/python-cifar-utils-help-0.1-1.noarch.rpm
checksum_type: sha256
description:
  This package provides simple utility functions to help you work with the CIFAR-100 dataset. With just a couple of functions, you can easily access the class names and superclasses of CIFAR-100.



  CIFAR-100 is a popular dataset used in machine learning. It contains 100 different classes of images, each with 600 images. These classes range from animals like 'dog' and 'cat', to objects like 'car' and 'plane'.



  This package gives you two useful functions:

  - **`get_classes()`**: This function returns a list of 100 fine-grained class names (e.g., 'apple', 'dog', 'airplane').
  - **`get_super_classes()`**: This function returns a list of 20 broad superclasses (e.g., 'aquatic mammals', 'flowers', 'vehicles').

  These functions are useful when you're working with the CIFAR-100 dataset and want easy access to the class names for training, testing, or visualization.



  You can easily install the package using pip:

  ```bash
  pip install cifar_utils



  Once you've installed the package, you can use it in your Python code like this:



  The `get_classes()` function returns a list of 100 fine-grained class names from the CIFAR-100 dataset.

  ```python
  from cifar_utils import get_classes


  class_names = get_classes()


  print(class_names[:10])



  from cifar_utils import get_super_classes


  super_classes = get_super_classes()


  print(super_classes[:10])


pkgId: 426f3cb1cb3e7b8b729c8c9f4e2402211e980e2878ffb74b8da113ef751c7cbf
name: python-cimsparql-help
arch: noarch
version: 8.1.0
epoch: 0
release: 1
summary: Development documents and examples for cimsparql
url: https://pypi.org/project/cimsparql/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cimsparql-8.1.0-1.src.rpm
location_href: Packages/python-cimsparql-help-8.1.0-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/cimsparql)](https://pypi.org/project/cimsparql/)
  [![Python Versions](https://img.shields.io/pypi/pyversions/cimsparql)](https://pypi.org/project/cimsparql/)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![](https://github.com/statnett/data_cache/workflows/Tests/badge.svg)](https://github.com/statnett/cimsparql/actions?query=workflow%3ATests)
  [![codecov](https://codecov.io/gh/statnett/cimsparql/branch/master/graph/badge.svg)](https://codecov.io/gh/statnett/cimsparql)



  This Python package provides functionality for reading cim data from
  tripple stores such as GraphDB, BlazeGraph or Rdf4j into Python memory
  as pandas dataframes.

  The package provides a set of predefined functions/queries to load CIM
  data such as generator, demand or branch data, though the user can
  easiliy define their own queries.





  ```python
  >>> from cimsparql.graphdb import ServiceConfig
  >>> from cimsparql.model import get_single_client_model
  >>> model = get_single_client_model(ServiceConfig(limit=3))
  >>> ac_lines = model.ac_lines()
  >>> print(ac_lines[['name', 'x', 'r', 'bch']])
           name       x       r       bch
  0  <branch 1>  1.9900  0.8800  0.000010
  1  <branch 2>  1.9900  0.8800  0.000010
  2  <branch 3>  0.3514  0.1733  0.000198
  ```

  In the example above the client will query repo "<repo>" in the default server
  [GraphDB](https://graphdb.ontotext.com) for AC line values.



  See the sparql templates folder (`cimsparql/sparql`) to the query used.



  ```python
  >>> from string import Template
  >>> query = 'PREFIX cim:<${cim}>\nPREFIX rdf: <${rdf}>\nSELECT ?mrid where {?mrid rdf:type cim:ACLineSegment}'
  >>> query_result = model.get_table_and_convert(model.template_to_query(Template(query)))
  >>> print(query_result)
  ```



  Available namespace for current graphdb client (`gdbc` in the examples above),
  which can be used in queries (such as `rdf` and `cim`) can by found by

  ```python
  >>> print(model.prefixes)
  {'wgs': 'http://www.w3.org/2003/01/geo/wgs84_pos#',
   'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
   'owl': 'http://www.w3.org/2002/07/owl#',
   'cim': 'http://iec.ch/TC57/2010/CIM-schema-cim15#',
   'gn': 'http://www.geonames.org/ontology#',
   'xsd': 'http://www.w3.org/2001/XMLSchema#',
   'rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
   'SN': 'http://www.statnett.no/CIM-schema-cim15-extension#',
   'ALG': 'http://www.alstom.com/grid/CIM-schema-cim15-extension#'}
  ```



  Tests can be run agains RDF4J and/or BlazeGraph databases if a container with the correct images are available.

  ```
  docker pull eclipse/rdf4j-workbench
  docker pull openkbs/blazegraph
  ```

  Launch one or both containers and specify the following environment variables

  ```
  RDF4J_URL = "localhost:8080/rdf4j-server"
  BLAZEGRAPH_URL = "localhost:9999/blazegraph/namespace
  ```
  **Note 1**: The port numbers may differ depending on your local Docker configurations.
  **Note 2**: You don't *have* to install RDF4J or BlazeGraph. Tests requiring these will be skipped in case
  they are not available. They will in any case be run in the CI pipeline on GitHub (where both always are available).



  Ontologies for the CIM model can be found at (ENTSOE's webpages)[https://www.entsoe.eu/digital/common-information-model/cim-for-grid-models-exchange/].
  For convenience and testing purposes the ontology are located under `tests/data/ontology`. CIM models used for testing purposes in Cimsparql should
  be stored in N-quads format. In case you have a model in XML format it can be converted to N-quads by launching a DB (for example RDF4J) and upload
  all the XML files and the ontology.

  Execute

  ```sparql
  PREFIX cims: <http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#>

  DELETE {?s ?p ?o}
  INSERT {?s ?p ?o_cast} WHERE {
    ?s ?p ?o .
    ?p cims:dataType ?_dtype .
    ?_dtype cims:stereotype ?stereotype .
    BIND(IF(?stereotype = "Primitive",
      URI(concat("http://www.w3.org/2001/XMLSchema#", lcase(strafter(str(?_dtype), "#")))),
      ?_dtype) as ?dtype)
    BIND(STRDT(?o, ?dtype) as ?o_cast)
  }
  ```
  and export as N-quads.



  1. *micro_t1_nl*: `MicroGrid/Type1_T1/CGMES_v2.4.15_MicroGridTestConfiguration_T1_NL_Complete_v2`




  CimSparql mainly uses `SparqlWrapper` to communicate with the databases. However, there are certain operations which are performed
  directly via REST calls. Since there are small differences between different APIs you may have to specify which API you are using.
  This can be done when initializing the `ServiceCfg` class or by specifying the `SPARQL_REST_API` environment variable. Currently,
  `RDF4J` and `blazegraph` is supported (if not given `RDF4J` is default).

  ```bash
  export SPARQL_REST_API=RDF4J  # To use RDF4J
  export SPARQL_REST_API=BLAZEGRAPH  # To use BlazeGraph
  ```


pkgId: e72aa445896400f4482c222981fe3d439dd401f77c22d875e3647c237fb1dfd4
name: python-circlemind-sdk-help
arch: noarch
version: 0.1.0.post0
epoch: 0
release: 1
summary: Development documents and examples for circlemind-sdk
url: https://github.com/circlemind-ai/circlemind-sdk.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-circlemind-sdk-0.1.0.post0-1.src.rpm
location_href: Packages/python-circlemind-sdk-help-0.1.0.post0-1.noarch.rpm
checksum_type: sha256
description:
  Developer-friendly & type-safe Python SDK specifically catered to leverage *circlemind-sdk* API.

  <div align="left">
      <a href="https://www.speakeasy.com/?utm_source=circlemind-sdk&utm_campaign=python"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
      <a href="https://opensource.org/licenses/MIT">
          <img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
      </a>
  </div>


  <br /><br />

  <!-- Start Summary [summary] -->



  <!-- End Summary [summary] -->

  <!-- Start Table of Contents [toc] -->

  <!-- $toc-max-depth=2 -->
  * [circlemind-sdk](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#circlemind-sdk)
    * [SDK Installation](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#sdk-installation)
    * [IDE Support](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#ide-support)
    * [SDK Example Usage](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#sdk-example-usage)
    * [Available Resources and Operations](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#available-resources-and-operations)
    * [Retries](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#retries)
    * [Error Handling](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#error-handling)
    * [Server Selection](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#server-selection)
    * [Custom HTTP Client](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#custom-http-client)
    * [Authentication](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#authentication)
    * [Debugging](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#debugging)
  * [Development](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#development)
    * [Maturity](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#maturity)
    * [Contributions](https://github.com/circlemind-ai/circlemind-sdk/blob/master/#contributions)

  <!-- End Table of Contents [toc] -->

  <!-- Start SDK Installation [installation] -->


  The SDK can be installed with either *pip* or *poetry* package managers.



  *PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.

  ```bash
  pip install circlemind-sdk
  ```



  *Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.

  ```bash
  poetry add circlemind-sdk
  ```
  <!-- End SDK Installation [installation] -->

  <!-- Start IDE Support [idesupport] -->




  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.

  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->

  <!-- Start SDK Example Usage [usage] -->




  ```python

  from circlemind_sdk import CirclemindSDK
  import os

  with CirclemindSDK(
      api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
  ) as circlemind_sdk:

      res = circlemind_sdk.get_user_plan_plan_get()

      
      print(res)
  ```

  </br>

  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  from circlemind_sdk import CirclemindSDK
  import os

  async def main():
      async with CirclemindSDK(
          api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
      ) as circlemind_sdk:

          res = await circlemind_sdk.get_user_plan_plan_get_async()

          
          print(res)

  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->

  <!-- Start Available Resources and Operations [operations] -->


  <details open>
  <summary>Available methods</summary>



  * [get_user_plan_plan_get](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#get_user_plan_plan_get) - User plan
  * [get_graph_configuration](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#get_graph_configuration) - Graph configuration (get)
  * [set_graph_configuration](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#set_graph_configuration) - Graph configuration (set)
  * [list_graphs](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#list_graphs) - List graphs
  * [create_graph](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#create_graph) - Create new graph
  * [delete_graph](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#delete_graph) - Delete existing graph
  * [download_graphml](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#download_graphml) - Download graphml
  * [query](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#query) - Query memory
  * [get_query_status](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#get_query_status) - Check query request status
  * [add](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#add) - Add memory
  * [add_from_files](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#add_from_files) - Add memory (from files)
  * [get_add_status](https://github.com/circlemind-ai/circlemind-sdk/blob/master/docs/sdks/circlemindsdk/README.md#get_add_status) - Check add request status

  </details>
  <!-- End Available Resources and Operations [operations] -->

  <!-- Start Retries [retries] -->


  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  from circlemind_sdk import CirclemindSDK
  from circlemind_sdk.utils import BackoffStrategy, RetryConfig
  import os

  with CirclemindSDK(
      api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
  ) as circlemind_sdk:

      res = circlemind_sdk.get_user_plan_plan_get(,
          RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

      
      print(res)

  ```

  If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
  ```python
  from circlemind_sdk import CirclemindSDK
  from circlemind_sdk.utils import BackoffStrategy, RetryConfig
  import os

  with CirclemindSDK(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
      api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
  ) as circlemind_sdk:

      res = circlemind_sdk.get_user_plan_plan_get()

      
      print(res)

  ```
  <!-- End Retries [retries] -->

  <!-- Start Error Handling [errors] -->


  Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.

  By default, an API error will raise a models.SDKError exception, which has the following properties:

  | Property        | Type             | Description           |
  |-----------------|------------------|-----------------------|
  | `.status_code`  | *int*            | The HTTP status code  |
  | `.message`      | *str*            | The error message     |
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
  | `.body`         | *str*            | The response content  |

  When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `get_graph_configuration_async` method may raise the following exceptions:

  | Error Type                 | Status Code | Content Type     |
  | -------------------------- | ----------- | ---------------- |
  | models.HTTPValidationError | 422         | application/json |
  | models.SDKError            | 4XX, 5XX    | \*/\*            |



  ```python
  from circlemind_sdk import CirclemindSDK, models
  import os

  with CirclemindSDK(
      api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
  ) as circlemind_sdk:
      res = None
      try:

          res = circlemind_sdk.get_graph_configuration(graph_name="<value>")

          
          print(res)

      except models.HTTPValidationError as e:
          
          raise(e)
      except models.SDKError as e:
          
          raise(e)
  ```
  <!-- End Error Handling [errors] -->

  <!-- Start Server Selection [server] -->




  The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
  ```python
  from circlemind_sdk import CirclemindSDK
  import os

  with CirclemindSDK(
      server_url="https://api.circlemind.co",
      api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
  ) as circlemind_sdk:

      res = circlemind_sdk.get_user_plan_plan_get()

      
      print(res)

  ```
  <!-- End Server Selection [server] -->

  <!-- Start Custom HTTP Client [http-client] -->


  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.

  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from circlemind_sdk import CirclemindSDK
  import httpx

  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = CirclemindSDK(client=http_client)
  ```

  or you could wrap the client with your own custom logic:
  ```python
  from circlemind_sdk import CirclemindSDK
  from circlemind_sdk.httpclient import AsyncHttpClient
  import httpx

  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient

      def __init__(self, client: AsyncHttpClient):
          self.client = client

      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"

          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )

      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )

  s = CirclemindSDK(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->

  <!-- Start Authentication [security] -->




  This SDK supports the following security scheme globally:

  | Name             | Type   | Scheme  | Environment Variable           |
  | ---------------- | ------ | ------- | ------------------------------ |
  | `api_key_header` | apiKey | API key | `CIRCLEMINDSDK_API_KEY_HEADER` |

  To authenticate with the API the `api_key_header` parameter must be set when initializing the SDK client instance. For example:
  ```python
  from circlemind_sdk import CirclemindSDK
  import os

  with CirclemindSDK(
      api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
  ) as circlemind_sdk:

      res = circlemind_sdk.get_user_plan_plan_get()

      
      print(res)

  ```
  <!-- End Authentication [security] -->

  <!-- Start Debugging [debug] -->


  You can setup your SDK to emit debug logs for SDK requests and responses.

  You can pass your own logger class directly into your SDK.
  ```python
  from circlemind_sdk import CirclemindSDK
  import logging

  logging.basicConfig(level=logging.DEBUG)
  s = CirclemindSDK(debug_logger=logging.getLogger("circlemind_sdk"))
  ```

  You can also enable a default debug logger by setting an environment variable `CIRCLEMINDSDK_DEBUG` to true.
  <!-- End Debugging [debug] -->

  <!-- Placeholder for Future Speakeasy SDK Sections -->





  This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
  to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
  looking for the latest version.



  While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
  We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.


