# packages

pkgId: a4680fa17edef50a686c7c31dcef7233043660af245bd5284894a2ae57f484cf
name: python-evo-model-help
arch: noarch
version: 0.3
epoch: 0
release: 1
summary: Development documents and examples for evo-model
url: https://github.com/evo-design/evo
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-evo-model-0.3-1.src.rpm
location_href: Packages/python-evo-model-help-0.3-1.noarch.rpm
checksum_type: sha256
description:
  ![Evo](evo.jpg)

  Evo is a biological foundation model capable of long-context modeling and design.
  Evo uses the [StripedHyena architecture](https://github.com/togethercomputer/stripedhyena) to enable modeling of sequences at a single-nucleotide, byte-level resolution with near-linear scaling of compute and memory relative to context length.
  Evo has 7 billion parameters and is trained on [OpenGenome](https://huggingface.co/datasets/LongSafari/open-genome), a prokaryotic whole-genome dataset containing ~300 billion tokens.

  We describe Evo in the paper [“Sequence modeling and design from molecular to genome scale with Evo”](https://www.science.org/doi/10.1126/science.ado9336).

  We provide the following model checkpoints:
  | Checkpoint Name                        | Description |
  |----------------------------------------|-------------|
  | `evo-1-8k-base`     | A model pretrained with 8,192 context. We use this model as the base model for molecular-scale finetuning tasks. |
  | `evo-1-131k-base`   | A model pretrained with 131,072 context using `evo-1-8k-base` as the base model. We use this model to reason about and generate sequences at the genome scale. |
  | `evo-1-8k-crispr`   | A model finetuned using `evo-1-8k-base` as the base model to generate CRISPR-Cas systems. |
  | `evo-1-8k-transposon`   | A model finetuned using `evo-1-8k-base` as the base model to generate IS200/IS605 transposons. |



  We identified and fixed an issue related to a wrong permutation of some projections, which affects generation quality. To use the new model revision with HuggingFace, please load as follows:
  ```python
  config = AutoConfig.from_pretrained(model_name, trust_remote_code=True, revision="1.1_fix")
  model = AutoModelForCausalLM.from_pretrained(
      model_name,
      config=config,
      trust_remote_code=True,
      revision="1.1_fix"
  )
  ```



  - [Setup](#setup)
    - [Requirements](#requirements)
    - [Installation](#installation)
  - [Usage](#usage)
  - [HuggingFace](#huggingface)
  - [Together API](#together-api)
  - [colab](https://colab.research.google.com/github/evo-design/evo/blob/main/scripts/hello_evo.ipynb)
  - [Playground wrapper](https://evo.nitro.bio/)
  - [Dataset](#dataset)
  - [Citation](#citation)





  Evo is based on [StripedHyena](https://github.com/togethercomputer/stripedhyena/tree/main).

  Evo uses [FlashAttention-2](https://github.com/Dao-AILab/flash-attention), which may not work on all GPU architectures.
  Please consult the [FlashAttention GitHub repository](https://github.com/Dao-AILab/flash-attention#installation-and-features) for the current list of supported GPUs.

  Make sure to install the correct [PyTorch version](https://pytorch.org/) on your system.



  You can install Evo using `pip`
  ```bash
  pip install evo-model
  ```
  or directly from the GitHub source
  ```bash
  git clone https://github.com/evo-design/evo.git
  cd evo/
  pip install .
  ```

  We recommend that you install the PyTorch library first, before installing all other dependencies (due to dependency issues of the `flash-attn` library; see, e.g., this [issue](https://github.com/Dao-AILab/flash-attention/issues/246)).

  One of our [example scripts](scripts/), demonstrating how to go from generating sequences with Evo to folding proteins ([scripts/generation_to_folding.py](scripts/generation_to_folding.py)), further requires the installation of `prodigal`. We have created an [environment.yml](environment.yml) file for this:

  ```bash
  conda env create -f environment.yml
  conda activate evo-design
  ```



  Below is an example of how to download Evo and use it locally through the Python API.
  ```python
  from evo import Evo
  import torch

  device = 'cuda:0'

  evo_model = Evo('evo-1-131k-base')
  model, tokenizer = evo_model.model, evo_model.tokenizer
  model.to(device)
  model.eval()

  sequence = 'ACGT'
  input_ids = torch.tensor(
      tokenizer.tokenize(sequence),
      dtype=torch.int,
  ).to(device).unsqueeze(0)

  with torch.no_grad():
      logits, _ = model(input_ids) # (batch, length, vocab)

  print('Logits: ', logits)
  print('Shape (batch, length, vocab): ', logits.shape)
  ```
  An example of batched inference can be found in [`scripts/example_inference.py`](scripts/example_inference.py).

  We provide an [example script](scripts/generate.py) for how to prompt the model and sample a set of sequences given the prompt.
  ```bash
  python -m scripts.generate \
      --model-name 'evo-1-131k-base' \
      --prompt ACGT \
      --n-samples 10 \
      --n-tokens 100 \
      --temperature 1. \
      --top-k 4 \
      --device cuda:0
  ```

  We also provide an [example script](scripts/score.py) for using the model to score the log-likelihoods of a set of sequences.
  ```bash
  python -m scripts.score \
      --input-fasta examples/example_seqs.fasta \
      --output-tsv scores.tsv \
      --model-name 'evo-1-131k-base' \
      --device cuda:0
  ```



  Evo is integrated with [HuggingFace](https://huggingface.co/togethercomputer/evo-1-131k-base).
  ```python
  from transformers import AutoConfig, AutoModelForCausalLM

  model_name = 'togethercomputer/evo-1-8k-base'

  model_config = AutoConfig.from_pretrained(model_name, trust_remote_code=True, revision="1.1_fix")
  model_config.use_cache = True

  model = AutoModelForCausalLM.from_pretrained(
      model_name,
      config=model_config,
      trust_remote_code=True,
      revision="1.1_fix"
  )
  ```




  Evo is available through Together AI with a [web UI](https://api.together.xyz/playground/language/togethercomputer/evo-1-131k-base), where you can generate DNA sequences with a chat-like interface.

  For more detailed or batch workflows, you can call the Together API with a simple example below.


  ```python
  import openai
  import os


  client = openai.OpenAI(
    api_key=TOGETHER_API_KEY,
    base_url='https://api.together.xyz',
  )

  chat_completion = client.chat.completions.create(
    messages=[
      {
        "role": "system",
        "content": ""
      },
      {
        "role": "user",
        "content": "ACGT", # Prompt the model with a sequence.
      }
    ],
    model="togethercomputer/evo-1-131k-base",
    max_tokens=128, # Sample some number of new tokens.
    logprobs=True
  )
  print(
      chat_completion.choices[0].logprobs.token_logprobs,
      chat_completion.choices[0].message.content
  )
  ```



  The OpenGenome dataset for pretraining Evo is available at [Hugging Face datasets](https://huggingface.co/datasets/LongSafari/open-genome).



  Please cite the following publication when referencing Evo.

  ```
  @article{nguyen2024sequence,
     author = {Eric Nguyen and Michael Poli and Matthew G. Durrant and Brian Kang and Dhruva Katrekar and David B. Li and Liam J. Bartie and Armin W. Thomas and Samuel H. King and Garyk Brixi and Jeremy Sullivan and Madelena Y. Ng and Ashley Lewis and Aaron Lou and Stefano Ermon and Stephen A. Baccus and Tina Hernandez-Boussard and Christopher Ré and Patrick D. Hsu and Brian L. Hie },
     title = {Sequence modeling and design from molecular to genome scale with Evo},
     journal = {Science},
     volume = {386},
     number = {6723},
     pages = {eado9336},
     year = {2024},
     doi = {10.1126/science.ado9336},
     URL = {https://www.science.org/doi/abs/10.1126/science.ado9336},
  }
  ```


pkgId: 94091816d3d2354d6683becc8439ee0c339a376e211e582222b534cef347e6ac
name: python-evocarshare-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for evocarshare
url: https://github.com/jazzz/evocarshare-py
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-evocarshare-0.0.1-1.src.rpm
location_href: Packages/python-evocarshare-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  ![https://github.com/jazzz/evocarshare-py/actions/workflows/main-build.yml/badge.svg](https://github.com/jazzz/evocarshare-py/actions/workflows/main-build.yml/badge.svg)
  ![Status](https://img.shields.io/badge/Project_status-Alpha-orange)

  Evocarshare is a module for accessing the data api of the Evo CarShare service which streamlines token management, and queries.



  ```
  pip install evocarshare
  ```



  - Python 3.11+



  Fetch all vehicles with range of a location
  ```python
  import aiohttp
  import os

  from evocarshare import CredentialBundle, EvoApi

  API_KEY = os.environ.get("EVOAPI_KEY")
  CLIENT_ID = os.environ.get("EVOAPI_CLIENTID")
  CLIENT_SECRET = os.environ.get("EVOAPI_CLIENTSECRET")

  async with aiohttp.ClientSession() as client_session:
      
      creds = CredentialBundle(API_KEY, CLIENT_ID, CLIENT_SECRET)
      api = EvoApi(client_session, creds)

      
      steam_clock = GpsCoord(latitude=49.284407, longitude=-123.108876)
      vehicles = await api.get_vehicles_within(meters=500, of=steam_clock)

      for v in vehicles:
          print(v)
  ```




  This project supports containerized development via [devcontainers](https://code.visualstudio.com/docs/remote/containers). From Visual Studio Code select `Devcontainers: Reopen in Container` from the command palette




  Install dependencies via poetry
  ```
  poetry install --with dev
  ```

  Install precommit hooks
  ```
  poetry run pre-commit install --install-hooks
  ```

  Run tests
  ```
   .venv/bin/pytest
  ```


  This project makes heavy use of the reverse engineering work by @jeremy21212121 and @jack-madison.

  [evofinder.ca](https://github.com/jeremy21212121/evo-client-nuxt) - Unoffical web interface for Evo

  [EvoAppScrape](https://github.com/jack-madison/Evo-Car-Share-App-Scrape/blob/main/evo_app_scrape.py) - Script to extract vehicle data to `csv`


  Contributions via PR are welcome.


pkgId: 316edcf1d9cd511f3ad2d88ff48ae2b43a8188554c2e718ad2a42398dbf14df1
name: python-evr-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for evr
url: https://github.com/cthoyt/evr
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-evr-0.0.1-1.src.rpm
location_href: Packages/python-evr-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  <!--
  <p align="center">
    <img src="https://github.com/cthoyt/evr/raw/main/docs/source/logo.png" height="150">
  </p>
  -->

  <h1 align="center">
    Event Venue Registry
  </h1>

  <p align="center">
      <a href="https://github.com/cthoyt/evr/actions/workflows/tests.yml">
          <img alt="Tests" src="https://github.com/cthoyt/evr/actions/workflows/tests.yml/badge.svg" /></a>
      <a href="https://pypi.org/project/evr">
          <img alt="PyPI" src="https://img.shields.io/pypi/v/evr" /></a>
      <a href="https://pypi.org/project/evr">
          <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/evr" /></a>
      <a href="https://github.com/cthoyt/evr/blob/main/LICENSE">
          <img alt="PyPI - License" src="https://img.shields.io/pypi/l/evr" /></a>
      <a href='https://evr.readthedocs.io/en/latest/?badge=latest'>
          <img src='https://readthedocs.org/projects/evr/badge/?version=latest' alt='Documentation Status' /></a>
      <a href="https://codecov.io/gh/cthoyt/evr/branch/main">
          <img src="https://codecov.io/gh/cthoyt/evr/branch/main/graph/badge.svg" alt="Codecov status" /></a>
      <a href="https://github.com/cthoyt/cookiecutter-python-package">
          <img alt="Cookiecutter template from @cthoyt" src="https://img.shields.io/badge/Cookiecutter-snekpack-blue" /></a>
      <a href="https://github.com/astral-sh/ruff">
          <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" style="max-width:100%;"></a>
      <a href="https://github.com/cthoyt/evr/blob/main/.github/CODE_OF_CONDUCT.md">
          <img src="https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg" alt="Contributor Covenant"/></a>
      <!-- uncomment if you archive on zenodo
      <a href="https://zenodo.org/badge/latestdoi/XXXXXX">
          <img src="https://zenodo.org/badge/XXXXXX.svg" alt="DOI"></a>
      -->
  </p>

  An open, community-driven registry of conference and event venues.

  EVR assigns persistent identifiers (PIDs) to make referencing venues FAIR.
  This is similar to how ORCID assigns PIDs to researchers and ROR assigns PIDs to research organizations.

  This benefits researchers assembling information about in-person conferences and events by
  enabling them to refer in an unambiguous way to the venue where it takes place.



  Get all venues with:

  ```python
  import evr

  venues = evr.load_venues()
  ```



  The most recent release can be installed from
  [PyPI](https://pypi.org/project/evr/) with:

  ```console
  python3 -m pip install evr
  ```

  The most recent code and data can be installed directly from GitHub with:

  ```console
  python3 -m pip install git+https://github.com/cthoyt/evr.git
  ```



  Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See
  [CONTRIBUTING.md](https://github.com/cthoyt/evr/blob/master/.github/CONTRIBUTING.md)
  for more information on getting involved.





  The code in this package is licensed under the MIT License.

  <!--


  Citation goes here!
  -->

  <!--


  This project has been supported by the following organizations (in alphabetical order):

  - [Biopragmatics Lab](https://biopragmatics.github.io)

  -->

  <!--


  This project has been supported by the following grants:

  | Funding Body  | Program                                                      | Grant Number |
  |---------------|--------------------------------------------------------------|--------------|
  | Funder        | [Grant Name (GRANT-ACRONYM)](https://example.com/grant-link) | ABCXYZ       |
  -->



  This package was created with [@audreyfeldroy](https://github.com/audreyfeldroy)'s
  [cookiecutter](https://github.com/cookiecutter/cookiecutter) package using [@cthoyt](https://github.com/cthoyt)'s
  [cookiecutter-snekpack](https://github.com/cthoyt/cookiecutter-snekpack) template.



  <details>
    <summary>See developer instructions</summary>

  The final section of the README is for if you want to get involved by making a code contribution.



  To install in development mode, use the following:

  ```console
  git clone git+https://github.com/cthoyt/evr.git
  cd evr
  python3 -m pip install -e .
  ```



  This project uses `cruft` to keep boilerplate (i.e., configuration, contribution guidelines, documentation
  configuration)
  up-to-date with the upstream cookiecutter package. Update with the following:

  ```console
  python3 -m pip install cruft
  cruft update
  ```

  More info on Cruft's update command is
  available [here](https://github.com/cruft/cruft?tab=readme-ov-file#updating-a-project).



  After cloning the repository and installing `tox` with
  `python3 -m pip install tox tox-uv`,
  the unit tests in the `tests/` folder can be run reproducibly with:

  ```console
  tox -e py
  ```

  Additionally, these tests are automatically re-run with each commit in a
  [GitHub Action](https://github.com/cthoyt/evr/actions?query=workflow%3ATests).



  The documentation can be built locally using the following:

  ```console
  git clone git+https://github.com/cthoyt/evr.git
  cd evr
  tox -e docs
  open docs/build/html/index.html
  ```

  The documentation automatically installs the package as well as the `docs`
  extra specified in the [`pyproject.toml`](pyproject.toml). `sphinx` plugins
  like `texext` can be added there. Additionally, they need to be added to the
  `extensions` list in [`docs/source/conf.py`](docs/source/conf.py).

  The documentation can be deployed to [ReadTheDocs](https://readthedocs.io) using
  [this guide](https://docs.readthedocs.io/en/stable/intro/import-guide.html).
  The [`.readthedocs.yml`](.readthedocs.yml) YAML file contains all the configuration you'll need.
  You can also set up continuous integration on GitHub to check not only that
  Sphinx can build the documentation in an isolated environment (i.e., with `tox -e docs-test`)
  but also that [ReadTheDocs can build it too](https://docs.readthedocs.io/en/stable/pull-requests.html).



  1. Log in to ReadTheDocs with your GitHub account to install the integration
     at https://readthedocs.org/accounts/login/?next=/dashboard/
  2. Import your project by navigating to https://readthedocs.org/dashboard/import then clicking the plus icon next to
     your repository
  3. You can rename the repository on the next screen using a more stylized name (i.e., with spaces and capital letters)
  4. Click next, and you're good to go!





  [Zenodo](https://zenodo.org) is a long-term archival system that assigns a DOI to each release of your package.

  1. Log in to Zenodo via GitHub with this link: https://zenodo.org/oauth/login/github/?next=%2F. This brings you to a
     page that lists all of your organizations and asks you to approve installing the Zenodo app on GitHub. Click "grant"
     next to any organizations you want to enable the integration for, then click the big green "approve" button. This
     step only needs to be done once.
  2. Navigate to https://zenodo.org/account/settings/github/, which lists all of your GitHub repositories (both in your
     username and any organizations you enabled). Click the on/off toggle for any relevant repositories. When you make
     a new repository, you'll have to come back to this

  After these steps, you're ready to go! After you make "release" on GitHub (steps for this are below), you can navigate
  to https://zenodo.org/account/settings/github/repository/cthoyt/evr
  to see the DOI for the release and link to the Zenodo record for it.



  You only have to do the following steps once.

  1. Register for an account on the [Python Package Index (PyPI)](https://pypi.org/account/register)
  2. Navigate to https://pypi.org/manage/account and make sure you have verified your email address. A verification email
     might not have been sent by default, so you might have to click the "options" dropdown next to your address to get to
     the "re-send verification email" button
  3. 2-Factor authentication is required for PyPI since the end of 2023 (see
     this [blog post from PyPI](https://blog.pypi.org/posts/2023-05-25-securing-pypi-with-2fa/)). This means
     you have to first issue account recovery codes, then set up 2-factor authentication
  4. Issue an API token from https://pypi.org/manage/account/token



  You have to do the following steps once per machine.

  ```console
  $ uv tool install keyring
  $ keyring set https://upload.pypi.org/legacy/ __token__
  $ keyring set https://test.pypi.org/legacy/ __token__
  ```

  Note that this deprecates previous workflows using `.pypirc`.



  After installing the package in development mode and installing
  `tox` with `python3 -m pip install tox tox-uv`,
  run the following from the console:

  ```console
  tox -e finish
  ```

  This script does the following:

  1. Uses [bump-my-version](https://github.com/callowayproject/bump-my-version) to switch the version number in
     the `pyproject.toml`, `CITATION.cff`, `src/evr/version.py`,
     and [`docs/source/conf.py`](docs/source/conf.py) to not have the `-dev` suffix
  2. Packages the code in both a tar archive and a wheel using
     [`uv build`](https://docs.astral.sh/uv/guides/publish/#building-your-package)
  3. Uploads to PyPI using [`uv publish`](https://docs.astral.sh/uv/guides/publish/#publishing-your-package).
  4. Push to GitHub. You'll need to make a release going with the commit where the version was bumped.
  5. Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can
     use `tox -e bumpversion -- minor` after.



  1. Navigate
     to https://github.com/cthoyt/evr/releases/new
     to draft a new release
  2. Click the "Choose a Tag" dropdown and select the tag corresponding to the release you just made
  3. Click the "Generate Release Notes" button to get a quick outline of recent changes. Modify the title and description
     as you see fit
  4. Click the big green "Publish Release" button

  This will trigger Zenodo to assign a DOI to your release as well.

  </details>

rpm_license:
  MIT License  Copyright (c) 2024 Charles Tapley Hoyt  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: a38c37e307eaf884c3b3904c90b40b005137b9b854b17f963845b9fef0790be7
name: python-evsetool-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for evsetool
url: https://github.com/witchofthewires/evsetool.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-evsetool-0.1.0-1.src.rpm
location_href: Packages/python-evsetool-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  A command-line utility to probe EVSE and CSMS over OCPP1.6



  Open Charge Point Protocol (OCPP) is used to communicate betweeen Electric Vehicle Supply Equipment (EVSE) and Charge Station Management Systems (CSMS). This tool makes use of the OCPP library provided by MobilityHouse to query these systems for purposes of red team engagement.

  *** This tool is for educational and awareness purposes only. Do NOT use this tool to attempt to breach systems for which you do not have explicit authorization to do so. The author(s) of this tool are not liable for any misuse of the tool ***


  [Starting point for WebSocket parser](https://github.com/mutantzombie/WebSocketNotes/blob/main/scapy/WebSocket.py)


pkgId: cfb2b477b8a01dcff860d16356ef2f0bd059215e55e0aab14f57d69aa2360cf0
name: python-ex4nicegui-help
arch: noarch
version: 0.8.6
epoch: 0
release: 1
summary: Development documents and examples for ex4nicegui
url: https://github.com/CrystalWindSnake/ex4nicegui
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ex4nicegui-0.8.6-1.src.rpm
location_href: Packages/python-ex4nicegui-help-0.8.6-1.noarch.rpm
checksum_type: sha256
description:
  [头条文章-秒杀官方实现，python界面库，去掉90%事件代码的nicegui](https://www.toutiao.com/item/7253786340574265860/)
  [微信公众号-秒杀官方实现，python界面库，去掉90%事件代码的nicegui](https://mp.weixin.qq.com/s?__biz=MzUzNDk1MTc5Mw==&mid=2247486796&idx=1&sn=457ed6fb9d6a25145f7704d5197d670d&chksm=fa8daf52cdfa2644bede50ae7f2551162ecaedecafec231ee4ce8f28775a599f8669ecf06af1#rd)

  ```
  pip install ex4nicegui -U


pkgId: 323da5c43e8f8b3dac4e327b69d95f78c739c726fb8eb6892bfdd02a3a99e1bd
name: python-exasol-toolbox-help
arch: noarch
version: 0.20.0
epoch: 0
release: 1
summary: Development documents and examples for exasol-toolbox
url: https://www.exasol.com/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-exasol-toolbox-0.20.0-1.src.rpm
location_href: Packages/python-exasol-toolbox-help-0.20.0-1.noarch.rpm
checksum_type: sha256
description:
  <h1 align="center">Exasol Toolbox</h1>

  <p align="center">
  Your one-stop solution for managing all standard tasks and core workflows of your Python project.
  </p>

  <p align="center">

  <a href="https://github.com/exasol/python-toolbox/actions/workflows/ci.yml">
      <img src="https://github.com/exasol/python-toolbox/actions/workflows/ci.yml/badge.svg?branch=main" alt="Checks Main">
  </a>
  <a href="https://opensource.org/licenses/MIT">
      <img src="https://img.shields.io/pypi/l/exasol-toolbox" alt="License">
  </a>
  <a href="https://pypi.org/project/exasol-toolbox/">
      <img src="https://img.shields.io/pypi/dm/exasol-toolbox" alt="Downloads">
  </a>
  <a href="https://pypi.org/project/exasol-toolbox/">
      <img src="https://img.shields.io/pypi/pyversions/exasol-toolbox" alt="Supported Python Versions">
  </a>
  <a href="https://pypi.org/project/exasol-toolbox/">
      <img src="https://img.shields.io/pypi/v/exasol-toolbox" alt="PyPi Package">
  </a>
  </p>



  - Centrally managed standard tasks
    - code formatting & upgrading
    - linting
    - type-checking
    - unit-tests
    - integration-tests
    - coverage
    - documentation

  - Centrally manged core workflows
    - workspace/project verification
    - build and publish releases
    - build and publish documentation

  - Configurable & Extensible
    - Project configuration
    - Event hooks



  - [Python](https://www.python.org/) >= 3.8



  ```shell
  pip install exasol-toolbox
  ```



  For futher details, checkout the latest [documentation](https://exasol.github.io/python-toolbox/).


pkgId: 63cbbf00986eeca4e0042e2f3b84d7ea87886d837e801c2f6621d13288bf19df
name: python-excel-validator-help
arch: noarch
version: 0.9.0
epoch: 0
release: 1
summary: Development documents and examples for excel-validator
description: This software has been developed for the [AGENT](https://www.agent-project.eu/) project
url: https://github.com/matthijsbrouwer/excel-validator
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-excel-validator-0.9.0-1.src.rpm
location_href: Packages/python-excel-validator-help-0.9.0-1.noarch.rpm
checksum_type: sha256
rpm_license:
  MIT License  Copyright (c) 2024 EU H2020 AGENT project  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: 81b9d9f45ac3c4ab8bdb18b57c9dbb77f5367a52c1978a8426040d79efb14c5d
name: python-exceptionx-help
arch: noarch
version: 4.1.8
epoch: 0
release: 1
summary: Development documents and examples for exceptionx
url: http://gqylpy.com
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-exceptionx-4.1.8-1.src.rpm
location_href: Packages/python-exceptionx-help-4.1.8-1.noarch.rpm
checksum_type: sha256
description:
  [<img alt="LOGO" src="https://python.org/favicon.ico" height="21" width="21"/>](http://gqylpy.com)
  [![Release](https://img.shields.io/github/release/gqylpy/exceptionx.svg?style=flat-square")](https://github.com/gqylpy/exceptionx/releases/latest)
  [![Python Versions](https://img.shields.io/pypi/pyversions/exceptionx)](https://pypi.org/project/exceptionx)
  [![License](https://img.shields.io/pypi/l/exceptionx)](https://github.com/gqylpy/exceptionx/blob/main/LICENSE)
  [![Downloads](https://static.pepy.tech/badge/exceptionx)](https://pepy.tech/project/exceptionx)


  English | [中文](https://github.com/gqylpy/exceptionx/blob/main/README_CN.md)

  __exceptionx__ is a flexible and convenient Python exception handling library that allows you to dynamically create exception classes and provides various exception handling mechanisms.
  > The predecessor of exceptionx is [gqylpy-exception](https://github.com/gqylpy/gqylpy-exception).

  <kbd>pip3 install exceptionx</kbd>



  With exceptionx, you can instantly create exception classes when needed, without the need for advance definition. For example, if you want to throw an exception named `NotUnderstandError`, you can simply import the library and call it as follows:

  ```python
  import exceptionx as ex

  raise ex.NotUnderstandError(...)
  ```

  Here, `NotUnderstandError` is not predefined by exceptionx but is dynamically created through the magic method `__getattr__` when you try to access `e.NotUnderstandError`. This flexibility means you can create exception classes with any name as needed.

  Additionally, exceptionx ensures that the same exception class is not created repeatedly. All created exception classes are stored in the `e.__history__` dictionary for quick access later.

  There is another usage, import and create immediately:

  ```python
  from exceptionx import NotUnderstandError

  raise NotUnderstandError(...)
  ```



  exceptionx also provides a series of powerful exception handling tools:

  - `TryExcept`: A decorator that catches exceptions raised in the decorated function and outputs the exception information to the terminal (instead of throwing it). This helps prevent the program from crashing due to unhandled exceptions.
  - `Retry`: A decorator that works similarly to `TryExcept` but attempts to re-execute the function, controlling the number of attempts and the interval between each retry through parameters. It throws an exception after reaching the maximum number of attempts.
  - `TryContext`: A context manager that allows you to easily catch exceptions raised in a code block using the `with` statement and output the exception information to the terminal.

  **Handling Exceptions in Functions with `TryExcept`**

  ```python
  from exceptionx import TryExcept

  @TryExcept(ValueError)
  def func():
      int('a')
  ```

  The default handling scheme is to output brief exception information to the terminal without interrupting program execution. Of course, it can also be output to logs or processed in other ways through parameters.

  > According to Python programming conventions, exception types should be explicitly specified when handling exceptions. Therefore, when using the `TryExcept` decorator, it is necessary to explicitly pass the handled exception types.

  **Retrying Exceptions in Functions with `Retry`**

  ```python
  from exceptionx import Retry

  @Retry(sleep=1, count=3)
  def func():
      int('a')
  ```

  If an exception is raised in the decorated function, it will attempt to re-execute the decorated function. The default behavior is to retry exceptions of type `Exception` and all its subclasses. Calling `Retry(sleep=1, count=3)` as above means a maximum of 3 attempts will be made, with a 1-second interval between each attempt.

  `Retry` can be used in combination with `TryExcept` to retry exceptions first and then handle them if the retries are unsuccessful:

  ```python
  from exceptionx import TryExcept, Retry

  @TryExcept(ValueError)
  @Retry(sleep=1, count=3)
  def func():
      int('a')
  ```

  **Handling Exceptions in Contexts with `TryContext`**

  ```python
  from exceptionx import TryContext

  with TryContext(ValueError):
      int('a')
  ```

  With exceptionx, you can handle exceptions in Python programs more flexibly and efficiently, enhancing the robustness and reliability of your code.


pkgId: 4ba04456aa7dc093b6c87c9186208956ea5a3f6c23f94fd3b09df26deff1f297
name: python-executorlib-help
arch: noarch
version: 0.0.6
epoch: 0
release: 1
summary: Development documents and examples for executorlib
url: https://github.com/pyiron/executorlib
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-executorlib-0.0.6-1.src.rpm
location_href: Packages/python-executorlib-help-0.0.6-1.noarch.rpm
checksum_type: sha256
description:
  [![Unittests](https://github.com/pyiron/executorlib/actions/workflows/unittest-openmpi.yml/badge.svg)](https://github.com/pyiron/executorlib/actions/workflows/unittest-openmpi.yml)
  [![Coverage Status](https://coveralls.io/repos/github/pyiron/executorlib/badge.svg?branch=main)](https://coveralls.io/github/pyiron/executorlib?branch=main)
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pyiron/executorlib/HEAD?labpath=notebooks%2Fexamples.ipynb)

  Up-scale python functions for high performance computing (HPC) with executorlib.


  * **Up-scale your Python functions beyond a single computer.** - executorlib extends the [Executor interface](https://docs.python.org/3/library/concurrent.futures.html#executor-objects)
    from the Python standard library and combines it with job schedulers for high performance computing (HPC) including
    the [Simple Linux Utility for Resource Management (SLURM)](https://slurm.schedmd.com) and [flux](http://flux-framework.org).
    With this combination executorlib allows users to distribute their Python functions over multiple compute nodes.
  * **Parallelize your Python program one function at a time** - executorlib allows users to assign dedicated computing
    resources like CPU cores, threads or GPUs to one Python function call at a time. So you can accelerate your Python
    code function by function.
  * **Permanent caching of intermediate results to accelerate rapid prototyping** - To accelerate the development of
    machine learning pipelines and simulation workflows executorlib provides optional caching of intermediate results for
    iterative development in interactive environments like jupyter notebooks.


  The Python standard library provides the [Executor interface](https://docs.python.org/3/library/concurrent.futures.html#executor-objects)
  with the [ProcessPoolExecutor](https://docs.python.org/3/library/concurrent.futures.html#processpoolexecutor) and the
  [ThreadPoolExecutor](https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor) for parallel
  execution of Python functions on a single computer. executorlib extends this functionality to distribute Python
  functions over multiple computers within a high performance computing (HPC) cluster. This can be either achieved by
  submitting each function as individual job to the HPC job scheduler - [HPC Submission Mode](https://executorlib.readthedocs.io/en/latest/2-hpc-submission.html) -
  or by requesting a compute allocation of multiple nodes and then distribute the Python functions within this - allocation -
  [HPC Allocation Mode](https://executorlib.readthedocs.io/en/latest/3-hpc-allocation.html). Finally, to accelerate the
  development process executorlib also provides a - [Local Mode](https://executorlib.readthedocs.io/en/latest/1-local.html) -
  to use the executorlib functionality on a single workstation for testing. Starting with the [Local Mode](https://executorlib.readthedocs.io/en/latest/1-local.html)
  set by setting the backend parameter to local - `backend="local"`:
  ```python
  from executorlib import Executor


  with Executor(backend="local") as exe:
      future_lst = [exe.submit(sum, [i, i]) for i in range(1, 5)]
      print([f.result() for f in future_lst])
  ```
  In the same way executorlib can also execute Python functions which use additional computing resources, like multiple
  CPU cores, CPU threads or GPUs. For example if the Python function internally uses the Message Passing Interface (MPI)
  via the [mpi4py](https://mpi4py.readthedocs.io) Python libary:
  ```python
  from executorlib import Executor


  def calc(i):
      from mpi4py import MPI

      size = MPI.COMM_WORLD.Get_size()
      rank = MPI.COMM_WORLD.Get_rank()
      return i, size, rank


  with Executor(backend="local") as exe:
      fs = exe.submit(calc, 3, resource_dict={"cores": 2})
      print(fs.result())
  ```
  The additional `resource_dict` parameter defines the computing resources allocated to the execution of the submitted
  Python function. In addition to the compute cores `cores`, the resource dictionary can also define the threads per core
  as `threads_per_core`, the GPUs per core as `gpus_per_core`, the working directory with `cwd`, the option to use the
  OpenMPI oversubscribe feature with `openmpi_oversubscribe` and finally for the [Simple Linux Utility for Resource
  Management (SLURM)](https://slurm.schedmd.com) queuing system the option to provide additional command line arguments
  with the `slurm_cmd_args` parameter - [resource dictionary](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#resource-dictionary)
  This flexibility to assign computing resources on a per-function-call basis simplifies the up-scaling of Python programs.
  Only the part of the Python functions which benefit from parallel execution are implemented as MPI parallel Python
  funtions, while the rest of the program remains serial.

  The same function can be submitted to the [SLURM](https://slurm.schedmd.com) queuing by just changing the `backend`
  parameter to `slurm_submission`. The rest of the example remains the same, which highlights how executorlib accelerates
  the rapid prototyping and up-scaling of HPC Python programs.
  ```python
  from executorlib import Executor


  def calc(i):
      from mpi4py import MPI

      size = MPI.COMM_WORLD.Get_size()
      rank = MPI.COMM_WORLD.Get_rank()
      return i, size, rank


  with Executor(backend="slurm_submission") as exe:
      fs = exe.submit(calc, 3, resource_dict={"cores": 2})
      print(fs.result())
  ```
  In this case the [Python simple queuing system adapter (pysqa)](https://pysqa.readthedocs.io) is used to submit the
  `calc()` function to the [SLURM](https://slurm.schedmd.com) job scheduler and request an allocation with two CPU cores
  for the execution of the function - [HPC Submission Mode](https://executorlib.readthedocs.io/en/latest/2-hpc-submission.html). In the background the [sbatch](https://slurm.schedmd.com/sbatch.html)
  command is used to request the allocation to execute the Python function.

  Within a given [SLURM](https://slurm.schedmd.com) allocation executorlib can also be used to assign a subset of the
  available computing resources to execute a given Python function. In terms of the [SLURM](https://slurm.schedmd.com)
  commands, this functionality internally uses the [srun](https://slurm.schedmd.com/srun.html) command to receive a subset
  of the resources of a given queuing system allocation.
  ```python
  from executorlib import Executor


  def calc(i):
      from mpi4py import MPI

      size = MPI.COMM_WORLD.Get_size()
      rank = MPI.COMM_WORLD.Get_rank()
      return i, size, rank


  with Executor(backend="slurm_allocation") as exe:
      fs = exe.submit(calc, 3, resource_dict={"cores": 2})
      print(fs.result())
  ```
  In addition, to support for [SLURM](https://slurm.schedmd.com) executorlib also provides support for the hierarchical
  [flux](http://flux-framework.org) job scheduler. The [flux](http://flux-framework.org) job scheduler is developed at
  [Larwence Livermore National Laboratory](https://computing.llnl.gov/projects/flux-building-framework-resource-management)
  to address the needs for the up-coming generation of Exascale computers. Still even on traditional HPC clusters the
  hierarchical approach of the [flux](http://flux-framework.org) is beneficial to distribute hundreds of tasks within a
  given allocation. Even when [SLURM](https://slurm.schedmd.com) is used as primary job scheduler of your HPC, it is
  recommended to use [SLURM with flux](https://executorlib.readthedocs.io/en/latest/3-hpc-allocation.html#slurm-with-flux)
  as hierarchical job scheduler within the allocations.


  * [Installation](https://executorlib.readthedocs.io/en/latest/installation.html)
    * [Minimal](https://executorlib.readthedocs.io/en/latest/installation.html#minimal)
    * [MPI Support](https://executorlib.readthedocs.io/en/latest/installation.html#mpi-support)
    * [Caching](https://executorlib.readthedocs.io/en/latest/installation.html#caching)
    * [HPC Submission Mode](https://executorlib.readthedocs.io/en/latest/installation.html#hpc-submission-mode)
    * [HPC Allocation Mode](https://executorlib.readthedocs.io/en/latest/installation.html#hpc-allocation-mode)
    * [Visualisation](https://executorlib.readthedocs.io/en/latest/installation.html#visualisation)
    * [For Developers](https://executorlib.readthedocs.io/en/latest/installation.html#for-developers)
  * [Local Mode](https://executorlib.readthedocs.io/en/latest/1-local.html)
    * [Basic Functionality](https://executorlib.readthedocs.io/en/latest/1-local.html#basic-functionality)
    * [Parallel Functions](https://executorlib.readthedocs.io/en/latest/1-local.html#parallel-functions)
    * [Performance Optimization](https://executorlib.readthedocs.io/en/latest/1-local.html#performance-optimization)
  * [HPC Submission Mode](https://executorlib.readthedocs.io/en/latest/2-hpc-submission.html)
    * [SLURM](https://executorlib.readthedocs.io/en/latest/2-hpc-submission.html#slurm)
    * [Flux](https://executorlib.readthedocs.io/en/latest/2-hpc-submission.html#flux)
  * [HPC Allocation Mode](https://executorlib.readthedocs.io/en/latest/3-hpc-allocation.html)
    * [SLURM](https://executorlib.readthedocs.io/en/latest/3-hpc-allocation.html#slurm)
    * [SLURM with Flux](https://executorlib.readthedocs.io/en/latest/3-hpc-allocation.html#slurm-with-flux)
    * [Flux](https://executorlib.readthedocs.io/en/latest/3-hpc-allocation.html#flux)
  * [Trouble Shooting](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html)
    * [Filesystem Usage](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#filesystem-usage)
    * [Firewall Issues](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#firewall-issues)
    * [Message Passing Interface](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#message-passing-interface)
    * [Python Version](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#python-version)
    * [Resource Dictionary](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#resource-dictionary)
    * [SSH Connection](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#ssh-connection)
  * [Developer](https://executorlib.readthedocs.io/en/latest/4-developer.html)
    * [Communication](https://executorlib.readthedocs.io/en/latest/4-developer.html#communication)
    * [External Executables](https://executorlib.readthedocs.io/en/latest/4-developer.html#external-executables)
    * [License](https://executorlib.readthedocs.io/en/latest/4-developer.html#license)
    * [Modules](https://executorlib.readthedocs.io/en/latest/4-developer.html#modules)
  * [Interface](https://executorlib.readthedocs.io/en/latest/api.html)

rpm_license:
  BSD 3-Clause License  Copyright (c) 2022, Jan Janssen All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * 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.  * 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: 90c542917703988d39e6ff04ca27a92040110b26cea781abb215dbc63e10e01d
name: python-experimentalTreatingIsiPol-help
arch: noarch
version: 0.0.28
epoch: 0
release: 1
summary: Development documents and examples for experimentalTreatingIsiPol
url: https://github.com/jonastieppo/PostProcessingData
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-experimentalTreatingIsiPol-0.0.28-1.src.rpm
location_href: Packages/python-experimentalTreatingIsiPol-help-0.0.28-1.noarch.rpm
checksum_type: sha256
description:
  Esse repositório é uma iniciativa, por parte da PDI, de criar ferramentas para pós-processamento de resultados experimentais. Tais ferramentas serão auditáveis, abertas, e com o intuito de serem colaborativas.




  - [Pós Processamento de Ensaios Experimentais](#pós-processamento-de-ensaios-experimentais)
      - [Máquinas ajustadas]()
  - [Exemplos de gráficos](#exemplos-de-gráficos)
      - [Gráfico de linha simples](#gráfico-de-linha-simples)
      - [Gráfico de dispersão simples](#gráfico-de-dispersão-simples)
  - [Estilização dos gráficos](#estilização-dos-gráficos)
      - [Formatação de fonte](#formatação-de-fonte)
          - [Estilo de fonte](#estilo-de-fonte)
          - [Tamanho de fonte](#tamanho-de-fonte)


  O pós-processamento de ensaios experimentais segue o paradigma universal de existir medição de uma entidade de força e um descolamento. Esse paradigma é comum em diferentes metodologias experimentais, tais como a determinação de *Moduli* de Young, cisalhamento, entre outros. Logo, para cada tipo específico de ensaio, existirão métodos especializados, muito embora a base seja compartilhada.

  Um exemplo de utilização do ajuste encontra-se a seguir:

  ```python
  from experimentalTreatingIsiPol.main import MechanicalTestFittingLinear
  import os
  archive = os.path.join(os.getcwd(),r'..\DataArquives\Specimen_RawData_1.csv')
  classInit =  MechanicalTestFittingLinear(machineName='68FM100', archive_name=archive)
  classInit.MeasureYoungModulus(length = 50,thickess = 1,width = 12)
  ```


  A lista de máquinas ajustadas encontra-se abaixo:

  | Máquina         | machine |
  |-----------------|---------|
  | Instron 68FM100 | 68FM100 |



  [Volta ao topo](#introdução-e-filosofia-da-implementação)

  [Volta ao topo](#introdução-e-filosofia-da-implementação)


  Um gráfico padronizado pode ser gerado ao se utilizar a função `plot_helper()` da biblioteca.

  ```python
  from experimentalTreatingIsiPol.main import plot_helper
  import numpy as np
  import matplotlib.pyplot as plt


  fig, ax = plt.subplots(figsize=(6, 5))
  n_samples = 100
  ax = plot_helper(ax, x=np.linspace(1,n_samples, n_samples),
              y=np.random.normal(5,0.01, n_samples),
              xlabel='Amostra', ylabel='Espessura [mm]',
              label=r"Espessuras dos CP's, $\mu=5 [mm]$ e $\sigma=0.01 [mm]$")
  ```

  ![Grafico de linha simples](/Exemples/grafico_simples.svg "Grafico de linha simples")

  A função retorna o próprio objeto do eixo, `ax`. Portanto, todos os métodos do matplotlib são herdados. Por exemplo, pode-se retirar as linhas de grade, caso seja de interesse do usuário:

  ```python
  ax.grid()
  ```

  ![Grafico de linha simples](/Exemples/grafico_linha_simples_sem_grid.svg "Grafico de linha simples")

  [Volta ao topo](#introdução-e-filosofia-da-implementação)


  Um gráfico de dispersão é facilmente gerado ao se utilizar a função `scatter_helper()`.

  ```python
  from experimentalTreatingIsiPol.main import scatter_helper
  import numpy as np
  import matplotlib.pyplot as plt


  fig, ax = plt.subplots(figsize=(6, 5))
  n_samples = 100
  ax = scatter_helper(ax, x=np.linspace(1,n_samples, n_samples),
              y=np.random.normal(5,0.01, n_samples),
              xlabel='Amostra', ylabel='Espessura [mm]',
              label=r"Espessuras dos CP's, $\mu=5 [mm]$ e $\sigma=0.01 [mm]$")
  ```

  ![Grafico de linha simples](/Exemples/grafico_dispersao.svg "Grafico de Dispersão")

  [Volta ao topo](#introdução-e-filosofia-da-implementação)

  [Volta ao topo](#introdução-e-filosofia-da-implementação)


  Em termos de estilos de fonte, os gráficos podem ser estilizados modificando a propriedade rcParams do matplotlib. A seguir, um exemplo de como atribuir a fonte calibri para o texto, e a fonte stix para texto *matemático*, em um determinado gráfico.

  [Volta ao topo](#introdução-e-filosofia-da-implementação)


  O estilo de fonte pode ser alterado de forma global:

  ```python
  import matplotlib as mtp

  mtp.rcdefaults() # retorna ao padrão
  mtp.rcParams['mathtext.fontset'] = 'stix'# STIX Fonts used in LaTeX rendering.
  mtp.rcParams['font.family'] = 'calibri' #'STIXGeneral'
  ```
  O mesmo efeito pode ser aplicado localmente:


  ```python
  import matplotlib.pyplot as plt

  fig, (ax1,ax2) = plt.subplots(1,2,figsize=(6, 5))


  ax1.plot(range(11), color="0.9")
  ax2.plot(range(11), color="0.9")
  ax1.set_title(r"$Title\ in\ math\ mode:\ \int_{0}^{\infty } x^2 dx$",
               math_fontfamily='stixsans', size=14, family='cursive')
  ax2.set_title(r"Title in cursive $\int_{0}^{\infty } x^2 dx$",
               math_fontfamily='stixsans', size=14, family='cursive')
  plt.show()
  ```
  [Volta ao topo](#introdução-e-filosofia-da-implementação)



  O tamanho de fonte pode ser alterado através do parâmetros fontsize, para as legendas, títulos dos eixos, e rótulo dos dados. Faz-se a seguir um exemplo:

  ```python
  import matplotlib.pyplot as plt

  fig, ax = plt.subplots(figsize=(6, 5))


  x = np.linspace(1,10,10)
  y = np.random.standard_normal(10)

  ax.plot(x,y,color="0.9", label='Alguma legenda com tamanho 7')
  ax.set_xlabel('Título do eixo x, com tamanho 8', fontsize = 8)
  ax.set_ylabel('Título do eixo y, com tamanho 8', fontsize = 8)
  ax.legend(fontsize=7)
  ax.tick_params(axis='x', labelsize=5) # fonte dos pontos do eixo x com tamanho 5
  plt.show()
  ```

  Os tamanhos de fonte também podem ser alterados de forma global, através dos rcParams:

  ```python
  import matplotlib as mtp

  mtp.rcParams['legend.fontsize'] = 7 # Fonte global da legenda
  mtp.rcParams['xtick.labelsize'] = 5 # Fonte dos pontos do eixo x com tamanho 5
  mtp.rcParams['axes.labelsize'] = 8 # Fonte dos eixos x e y
  ```
  [Volta ao topo](#introdução-e-filosofia-da-implementação)


pkgId: 0cf9ebd07a20049996a6caf683aa1d076b2dfee3602b11ce3d3f383ddebf4632
name: python-expr-codegen-help
arch: noarch
version: 0.10.6
epoch: 0
release: 1
summary: Development documents and examples for expr-codegen
url: https://pypi.org/project/expr-codegen/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-expr-codegen-0.10.6-1.src.rpm
location_href: Packages/python-expr-codegen-help-0.10.6-1.noarch.rpm
checksum_type: sha256
description:
  表达式转代码工具



  在本人新推出[polars_ta](https://github.com/wukan1986/polars_ta)这个库后，再回头反思`expr_codegen`是什么。

  > `expr_codegen`本质是`DSL`，领域特定语⾔(Domain Specific Language)。但它没有定义新的语法

  它解决了两个问题:

  1. `polars_ta`已经能很方便的写出特征计算表达式，但遇到`混用时序与截面`的表达式，利用`expr_codegen`能自动分组大大节省工作
  2. `expr_codegen`利用了`Common Subexpression Elimination`公共子表达式消除，大量减少重复计算，提高效率

  就算在量化领域，初级研究员局限于时序指标，仅用`polars_ta`即可，中高级研究员使用截面指标，推荐用`expr_codegen`

  虽然现在此项目与`polars_ta`依赖非常紧密，但也是支持翻译成其它库,如`pandas / cudf.pandas`，只是目前缺乏一个比较简易的库



  https://exprcodegen.streamlit.app

  初级用户可以直接访问此链接进行表达式转译，不需要另外安装软件。(此工具免费部署在国外，打开可能有些慢)

  更完整示例访问[alpha_examples](https://github.com/wukan1986/alpha_examples)



  ```python
  import sys


  from polars_ta.prefix.cdl import *  # noqa
  from polars_ta.prefix.ta import *  # noqa
  from polars_ta.prefix.tdx import *  # noqa
  from polars_ta.prefix.wq import *  # noqa

  from expr_codegen.tool import codegen_exec


  def _code_block_1():
      
      LOG_MC_ZS = cs_mad_zscore(log1p(market_cap))


  def _code_block_2():
      
      
      from polars_ta.prefix.talib import ts_LINEARREG_SLOPE  # noqa

      
      
      _avg = ts_mean(corr, 20)
      _std = ts_std_dev(corr, 20)
      _beta = ts_LINEARREG_SLOPE(corr, 20)

      
      _avg = cs_mad_zscore_resid(_avg, LOG_MC_ZS, ONE)
      _std = cs_mad_zscore_resid(_std, LOG_MC_ZS, ONE)
      

      _corr = cs_zscore(_avg) + cs_zscore(_std)
      CPV = cs_zscore(_corr) + cs_zscore(_beta)


  df = None  # 替换成真实的polars数据
  df = codegen_exec(df, _code_block_1, _code_block_2, output_file=sys.stdout)  # 打印代码
  df = codegen_exec(df, _code_block_1, _code_block_2, output_file="output.py")  # 保存到文件
  df = codegen_exec(df, _code_block_1, _code_block_2)  # 只执行，不保存代码

  df = codegen_exec(df.lazy(), _code_block_1, _code_block_2).collect()  # Lazy CPU
  df = codegen_exec(df.lazy(), _code_block_1, _code_block_2).collect(engine="gpu")  # Lazy GPU
  ```



  ```commandline
  │  requirements.txt # 通过`pip install -r requirements.txt`安装依赖
  ├─data
  │      prepare_date.py # 准备数据
  ├─examples
  │      demo_express.py # 速成示例。演示如何将表达式转换成代码
  │      demo_exec_pl.py # 演示调用转换后代码并绘图
  │      demo_transformer.py # 演示将第三方表达式转成内部表达式
  │      output.py # 结果输出。可不修改代码，直接被其它项目导入
  │      show_tree.py # 画表达式树形图。可用于分析对比优化结果
  │      sympy_define.py # 符号定义，由于太多地方重复使用到，所以统一提取到此处
  ├─expr_codegen
  │   │  expr.py # 表达式处理基本函数
  │   │  tool.py # 核心工具代码。一般不需修改
  │   ├─polars
  │   │  │  code.py # 针对polars语法的代码生成功能
  │   │  │  template.py.j2 # `Jinja2`模板。用于生成对应py文件，一般不需修改
  │   │  │  printer.py # 继承于`Sympy`中的`StrPrinter`，添加新函数时可能需修改此文件
  ```



  本项目依赖于`sympy`项目。所用到的主要函数如下：

  1. `simplify`: 对复杂表达式进行化简
  2. `cse`: `Common Subexpression Elimination`公共子表达式消除
  3. `StrPrinter`: 根据不同的函数输出不同字符串。定制此代码可以支持其它语种或库

  因为`groupby`,`sort`都比较占用时间。如果提前将公式分类，不同的类别使用不同的`groupby`，可以减少计算时间。

  1. `ts_xxx(ts_xxx)`: 可在同一`groupby`中进行计算
  2. `cs_xxx(cs_xxx)`: 可在同一`groupby`中进行计算
  3. `ts_xxx(cs_xxx)`: 需在不同`groupby`中进行计算
  4. `cs_xxx(ts_xxx(cs_xxx))`: 需三不同`groupby`中进行计算
  5. `gp_xxx(aa, )+gp_xxx(bb, )`: 因`aa`,`bb`不同，需在两不同`groupby`中进行计算

  所以

  1. 需要有一个函数能获取当前表达式的类别(`get_current`)和子表达式的类别(`get_children`)
  2. 如果当前类别与子类别不同就可以提取出短公式(`extract`)。不同层的同类别表达式有先后关系，不能放同一`groupby`
  3. 利用`cse`的特点，将长表达式替换成前期提取出来的短表达式。然后输入到有向无环图(`DAG`)
  4. 利用有向无环图的流转，进行分层。同一层的`ts`,`cs`,`gp`不区分先后
  5. 同一层对`ts`,`cs`,`gp`分组，然后生成代码(`codegen`)即可

  隐含信息

  1. `ts`: sort(by=[ASSET, DATE]).groupby(by=[ASSET], maintain_order=True)
  2. `cs`: sort(by=[DATE]).groupby(by=[DATE], maintain_order=False)
  3. `gp`: sort(by=[DATE, GROUP]).groupby(by=[DATE, GROUP], maintain_order=False)

  即

  1. 时序函数隐藏了两个字段`ASSET, DATE`，横截面函数了隐藏了一个字段`DATE`
  2. 分组函数转入了一个字段`GROUP`，同时隐藏了一个字段`DATE`

  两种分类方法

  1. 根据算子前缀分类(`get_current_by_prefix`)，限制算子必需以`ts_`、`cs_`、`gp_`开头
  2. 根据算子全名分类(`get_current_by_name`), 不再限制算子名。比如`cs_rank`可以叫`rank`



  https://github.com/pola-rs/polars/issues/12925#issuecomment-2552764629
  非常棒的点子，总结下来有两种实现方式：

  1. 将`null`分成一组，`not_null`分成另一组。要计算两次
  2. 仅一组，但复合排序，将`null`排在前面，`not_null`排后面。只计算一次，略快一些

  ```python
  X1 = (ts_returns(CLOSE, 3)).over(CLOSE.is_not_null(), _ASSET_, order_by=_DATE_),
  X2 = (ts_returns(CLOSE, 3)).over(_ASSET_, order_by=[CLOSE.is_not_null(), _DATE_]),
  X3 = (ts_returns(CLOSE, 3)).over(_ASSET_, order_by=_DATE_),
  ```

  第2种开头的`null`区域，是否影响结果由算子所决定，特别时是多列输入`null`区域可能有数据

  1. `over_null='partition_by'`。分到两个区域
  2. `over_null='order_by'`。分到一个区域，`null`排在前面
  3. `over_null=None`。不处理，直接计算，速度更快



  1. 备份后编辑`demo_express.py`, `import`需要引入的函数
  2. 然后`printer.py`有可能需要添加对应函数的打印代码
      - 注意：需要留意是否要加括号`()`，不加时可能优先级混乱，可以每次都加括号，也可用提供的`parenthesize`简化处理



  1. `DAG`只能增加列无法删除。增加列时，遇到同名列会覆盖
  2. 不支持`删除行`，但可以添加删除标记列，然后在外进行删除行。删除行影响了所有列，不满足`DAG`
  3. 不支持`重采样`，原理同不支持删除行。需在外进行
  4. 可以将`删除行`与`重采样`做为分割线，一大块代码分成多个`DAG`串联。复杂不易理解，所以最终没有实现



  1. 支持`C?T:F`三元表达式（仅可字符串中使用），底层会先转成`C or True if( T )else F`，然后修正成`T if C else F`，最后转成`if_else(C,T,F)`。支持与`if else`混用
  2. `(A<B)*-1`,底层将转换成`int_(A<B)*-1`
  3. 为防止`A==B`被`sympy`替换成`False`，底层会换成`Eq(A,B)`
  4. `A^B`的含义与`convert_xor`参数有关，`convert_xor=True`底层会转换成`Pow(A,B)`，反之为`Xor(A,B)`。默认为`False`，用`**`表示乘方
  5. 支持`A&B&C`，但不支持`A==B==C`。如果C是布尔，AB是数值，可手工替换成`(A==B)==C`。如果ABC是数值需手工替换成`(A==B)&(B==C)`
  6. 不支持`A<=B<=C`，需手工替换成`(A<=B)&(B<=C)`
  7. 支持`A[0]+B[1]+C[2]`，底层会转成`A+ts_delay(B,1)+ts_delay(C,2)`
  8. 支持`~A`,底层会转换成`Not(A)`
  9. `gp_`开头的函数都会返回对应的`cs_`函数。如`gp_func(A,B,C)`会替换成`cs_func(B,C)`,其中`A`用在了`groupby([date, A])`
  10. 支持`A,B,C=MACD()`元组解包，在底层会替换成

  ```python
  _x_0 = MACD()
  A = unpack(_x_0, 0)
  B = unpack(_x_0, 1)
  C = unpack(_x_0, 2)
  ```



  1. 输出的数据，所有以`_`开头的列，最后会被自动删除。所以需要保留的变量一定不要以`_`开头
  2. 为减少重复计算，自动添加了了中间变量，以`_x_`开头，如`_x_0`，`_x_1`等。最后会被自动删除
  3. 单行表达式过长，或有重复计算，可以通过中间变量，将单行表达式改成多行。如果中间变量使用`_`开头，将会自动添加数字后缀，形成不同的变量，如`_A`会替换成`_A_0_`、`_A_1_`等。使用场景如下：
      1. 同一变量名，重复使用。本质是不同的变量
      2. 循环赋值，但`DAG`不支持有环。`=`号左右的同名变量其实是不同变量



  转译后的代码片段，详细代码请参考[Polars版](examples/output_polars.py)

  ```python
  def func_0_ts__asset(df: pl.DataFrame) -> pl.DataFrame:
      df = df.sort(by=[_DATE_])
      
      df = df.with_columns(
          _x_0=1 / ts_delay(OPEN, -1),
          LABEL_CC_1=(-CLOSE + ts_delay(CLOSE, -1)) / CLOSE,
      )
      
      df = df.with_columns(
          LABEL_OO_1=_x_0 * ts_delay(OPEN, -2) - 1,
          LABEL_OO_2=_x_0 * ts_delay(OPEN, -3) - 1,
      )
      return df
  ```

  转译后的代码片段，详细代码请参考[Pandas版](examples/output_pandas.py)

  ```python
  def func_2_cs__date(df: pd.DataFrame) -> pd.DataFrame:
      
      df["expr_4"] = (df["x_7"]).rank(pct=True)
      return df


  def func_3_ts__asset__date(df: pd.DataFrame) -> pd.DataFrame:
      
      df["expr_5"] = -(df["OPEN"]).rolling(10).corr(df["CLOSE"])
      
      df["expr_6"] = df["OPEN"].diff(10)
      return df

  ```



  只需运行`streamlit run streamlit_app.py`

rpm_license:
  BSD 3-Clause License  Copyright (c) 2023, wukan  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: 3ea74a801f530505fd19799a83853174f6c2a612b80699bef60061061fa44587
name: python-expressive-help
arch: noarch
version: 1.8.0
epoch: 0
release: 1
summary: Development documents and examples for expressive
url: https://gitlab.com/expressive-py/expressive
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-expressive-1.8.0-1.src.rpm
location_href: Packages/python-expressive-help-1.8.0-1.noarch.rpm
checksum_type: sha256
description:
  A library for quickly applying symbolic expressions to NumPy arrays

  By enabling callers to front-load sample data, developers can move the runtime cost of Numba's JIT to the application's initial loading (or an earlier build) and also avoid `exec` during runtime, which is otherwise needed when lambdifying symbolic expressions

  Inspired in part by this Stack Overflow Question [Using numba.autojit on a lambdify'd sympy expression](https://stackoverflow.com/questions/22793601/using-numba-autojit-on-a-lambdifyd-sympy-expression)



  via pip https://pypi.org/project/expressive/

  ```shell
  pip install expressive
  ```



  refer to tests for examples for now

  generally follow a workflow like
  * create instance `expr = Expressive("a + log(b)")`
  * build instance `expr.build(sample_data)`
  * instance is now callable `expr(full_data)`

  The `data` should be provided as dict of NumPy arrays

  ```python
  sample_data = {  # types are used to compile a fast version for full data
      "a": numpy.array([1,2,3,4], dtype="int64"),
      "b": numpy.array([4,3,2,1], dtype="int64"),
  }
  full_data = {
      "a": numpy.array(range(1_000_000), dtype="int64"),
      "b": numpy.array(range(1_000_000), dtype="int64"),
  }
  ```



  Only `docker` and `docker compose` (v2) are required, and used to generate and host testing

  ```shell
  sudo apt install docker.io docker-compose-v2  # debian/ubuntu
  sudo usermod -aG docker $USER
  sudo su -l $USER  # login shell to self (reboot for all shells)
  ```

  Run the test script from the root of the repository and it will build the docker test environment and run itself inside it automatically

  ```shell
  ./test/runtests.sh
  ```



  Follows the generic build and publish process
  * https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives
  * build (builder) https://pypi.org/project/build/
  * twine (publisher) https://pypi.org/project/twine/

  ```shell
  python3 -m pip install --upgrade build twine

  python3 -m build

  ```



  The development process is currently private (though most fruits are available here!), largely due to this being my first public project with the potential for other users than myself, and so the potential for more public gaffes is far greater

  Please refer to [CONTRIBUTING.md](https://gitlab.com/expressive-py/expressive/-/blob/main/CONTRIBUTING.md) and [LICENSE.txt](https://gitlab.com/expressive-py/expressive/-/blob/main/LICENSE.txt) and feel free to provide feedback, bug reports, etc. via [Issues](https://gitlab.com/expressive-py/expressive/-/issues), subject to the former


  * improve internal development history as time, popularity, and practicality allows
  * move to parallel/multi-version/grid CI over all-in-1, single-version dev+test container
  * greatly relax dependency version requirements to improve compatibility




  * support for passing a SymPy expr (`Expr`, `Equality`), not just strings


  * support for passing SymPy symbols to be used


  * support indexed result array filling for complex dtypes


  * complex dtypes MVP (`complex64`, `complex128`)
  * parse coefficients directly adjacent to parentheses `3(x+1)` -> `3*(x+1)`


  * improved README wording of [testing](#testing) and added [building section](#building)
  * better messages when testing and `docker` is absent or freshly installed


  * added `._repr_html_()` method for improved display in Jupyter/IPython notebooks


  * greatly improved verify
    * `numpy.allclose()` takes exactly 2 arrays to compare (further args are passed to `rtol`, `atol`)
    * SymPy namespace special values `oo`, `zoo`, `nan` are coerced to NumPy equivalents (`inf`, `-inf`, `nan`)
    * raise when result is `False`
    * groundwork to maintain an internal collection of results
  * internal symbols collection maintains `IndexedBase` instances (`e.atoms(Symbol)` returns `Symbol` instances)
  * improve Exceptions from data that can't be used
  * new custom warning helper for testing as `assertWarnsRegex` annoyingly eats every warning it can


  * more sensibly fill the result array for non-floats when not provided (only float supports NaN)


  * add build-time verify step to help identify math and typing issues
  * some improved logic flow and improved `warn()`


  * improved publishing workflow
  * improved README


  * fix bad math related to indexing range
  * add an integration test


  * add support for parsing equality to result
  * add support for (optionally) passing result array
  * hugely improve docstrings


  * add more detail to [contributing block](#contributing)
  * switch array dimensions checking from `.shape` to `.ndim`
  * switch tests from `numpy.array(range())` to `numpy.arange()`


  * enable autobuilding (skip explicit `.build()` call)
  * basic display support for `Expressive` instances


  * add version history block


  * fixed bug: signature ordering could be unaligned with symbols, resulting in bad types
  * added support for non-vector data arguments



  * completely new code tree under Apache 2 license
  * basic support for indexed offsets




  * very early version with support for python 3.5


pkgId: 913af940f9b2e28e93d9f0647a7cfe9cd726966d3f14d14ffd9bdb146df17bcf
name: python-extend-vcc-help
arch: noarch
version: 0.1.6
epoch: 0
release: 1
summary: Development documents and examples for extend-vcc
url: https://github.com/christianobora/extend-vcc
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-extend-vcc-0.1.6-1.src.rpm
location_href: Packages/python-extend-vcc-help-0.1.6-1.noarch.rpm
checksum_type: sha256
description:
  Programmatically manage virtual cards on [Extend](https://www.paywithextend.com/)

  > [!CAUTION]
  > This is an **unofficial** client that is not affiliated with or endorsed by Extend.
  > Using this client may violate Extend's Terms of Service.
  > By using this client, you acknowledge and accept all associated risks.



  ```sh
  pip install extend-vcc
  ```



  1. Login to the Extend dashboard
  2. Open the browser's developer tools
  3. Run the following JavaScript in the console:

  ```js
  function lookup(suffix) {
    const key = Object.keys(localStorage).find(
      (key) =>
        key.startsWith("CognitoIdentityServiceProvider") && key.endsWith(suffix)
    );
    if (!key) return;
    console.log(suffix, localStorage[key]);
  }
  lookup("deviceGroupKey");
  lookup("deviceKey");
  lookup("randomPasswordKey");
  ```





  ```python
  from extend_vcc import Client
  from extend_vcc.cognito import Cognito, AuthParams


  auth = Cognito(AuthParams(
      username="user@email.com",
      password="password",
      device_group_key="device_group_key",  # deviceGroupKey from browser
      device_key="device_key",  # deviceKey from browser
      device_password="device_password",  # randomPasswordKey from browser
  ))


  client = Client(auth)
  ```



  ```python
  from extend_vcc.virtual_card import CreateVirtualCardOptions
  from extend_vcc.types import Currency
  from datetime import datetime, timedelta

  card = client.create_virtual_card(CreateVirtualCardOptions(
      credit_card_id="cc_id",
      display_name="Team Expenses",
      balance_cents=10000,
      currency=Currency.USD,
      valid_to=datetime.now() + timedelta(days=30),
      recipient="team@company.com",
      notes="This card is for team expenses"
  ))
  ```



  ```python
  card = client.get_virtual_card("vc_id")
  ```



  ```python
  card = client.cancel_virtual_card("vc_id")
  ```



  ```python
  card = client.close_virtual_card("vc_id")
  ```



  ```python
  from extend_vcc.types import PaginationOptions, SortDirection
  from extend_vcc.virtual_card import ListVirtualCardsOptions, VirtualCardStatus


  options = ListVirtualCardsOptions(
      pagination_options=PaginationOptions(
          page=0,
          count=10,
          sort_direction=SortDirection.ASC,
          sort_field="activeClosedUpdatedAt"
      ),
      cardholder_or_viewer="me",
      issued=True,
      statuses=[VirtualCardStatus.ACTIVE]
  )


  cards = client.list_virtual_cards(options)


  for page in cards:
      for card in page.items():
          
          print(f"Card: {card.display_name}")
  ```



  ```python
  from extend_vcc.virtual_card import BulkCreateVirtualCard, VirtualCardType
  from datetime import datetime, timedelta


  cards = [
      BulkCreateVirtualCard(
          card_type=VirtualCardType.STANDARD,
          recipient="user1@company.com",
          display_name="Marketing Card 1",
          balance_cents=10000,
          valid_to=datetime.now() + timedelta(days=30)
      ),
      BulkCreateVirtualCard(
          card_type=VirtualCardType.STANDARD,
          recipient="user2@company.com",
          display_name="Marketing Card 2",
          balance_cents=20000,
          valid_to=datetime.now() + timedelta(days=30)
      )
  ]


  upload = client.bulk_create_virtual_cards("cc_id", cards)


  status = client.get_bulk_virtual_card_upload(upload.bulk_virtual_card_push.bulk_virtual_card_upload_id)
  ```



  Contributions are welcome! Please see our [contributing guidelines](docs/development.md) for more details.



  [MIT](LICENSE)



  For issues, please open a GitHub issue in the repository.


  This is a python version of the golang package made by [saucesteals](https://github.com/saucesteals) which can be found [here](https://github.com/saucesteals/extend/)


pkgId: 7b6316039375e079667561eda90cec3cef71463080f24827fb97672fd184ed12
name: python-extract-inner-function-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for extract-inner-function
url: https://github.com/zlliu246/extract_inner_function
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-extract-inner-function-0.0.1-1.src.rpm
location_href: Packages/python-extract-inner-function-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  A simple package to extract inner functions in Python



  Normally, inner functions are accessible only inside the function itself, and we cannot do this

  ```python
  def outer():
      def inner1(a, b):
          
  ```

  But there is actually a (hacky) way to extract inner functions

  Disclaimer - this package is for fun. Try not to use in prod



  ```
  pip install extract_inner_function
  ```



  ```python
  def outer():
      def inner1():
          print("from inner1")

      def inner2(a, b):
          print("from inner2", a, b)

          def inner3(*args, **kwargs):
              print(f"{args=} {kwargs=}")

      print("from outer")

  from extract_inner_function import extract_inner_function

  func = extract_inner_function(
      outer_func=outer,
      inner_func_name="inner3",
      print_inner_func=True,
  )

  func(1, 2, a=6, b=7)





  ```

  ^ notice that we are able to extract the inner function here


  - if the existing codebase contains lots of inner functinos
  - you wish to do unit testing on these inner functions
  - you don't have time to (or cannot be bothered to) refactor the codebase


pkgId: b8986c4469936167a440c14d67cf518f2cfc90d1b05fde815a410e526d1bda55
name: python-extrap-help
arch: noarch
version: 4.2.3
epoch: 0
release: 1
summary: Development documents and examples for extrap
url: https://github.com/extra-p/extrap
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-extrap-4.2.3-1.src.rpm
location_href: Packages/python-extrap-help-4.2.3-1.noarch.rpm
checksum_type: sha256
description:
  1. [Requirements](#Requirements)
  2. [Installation](#Installation)
  3. [How to use it](#Usage)
  4. [License](#License)
  5. [Citation](#Citation)


pkgId: 4432b079008b92a5bd4fab3304e17bdbf15f4e991217829a2c66222ef2085d37
name: python-eyeGestures-help
arch: noarch
version: 3.1.3
epoch: 0
release: 1
summary: Development documents and examples for eyeGestures
url: https://github.com/NativeSensors/EyeGestures
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-eyeGestures-3.1.3-1.src.rpm
location_href: Packages/python-eyeGestures-help-3.1.3-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
    <picture>
      <source srcset="https://github.com/NativeSensors/EyeGestures/assets/40773550/ddfc8b96-5a7e-4487-9307-6fbd62e8915e" media="(prefers-color-scheme: light)"/>
      <source srcset="https://github.com/NativeSensors/EyeGestures/assets/40773550/6d42b8a2-24ea-4cbc-bdb0-ad688ee26c36" media="(prefers-color-scheme: dark)"/>
     <img width="300px" height="300px"/>
    </picture>
  </p>



  EyeGestures is open source eyetracking software/library using native webcams and phone camers for achieving its goal. The aim of library is to bring accessibility of eye-tracking and eye-driven interfaces without requirement of obtaining expensive hardware.

  Our [Mission](https://github.com/NativeSensors/EyeGestures/blob/main/MISSION.md)!

  ![PyPI - Downloads](https://img.shields.io/pypi/dm/eyeGestures)
  <a href="https://polar.sh/NativeSensors"><img src="https://polar.sh/embed/seeks-funding-shield.svg?org=NativeSensors" /></a>

  > [!IMPORTANT]
  > EyeGestures is a fully volunteer-based project and exists thanks to your donations and support.
  >
  > <a href="https://buy.polar.sh/polar_cl_H2FqQHunwgXtU7i9mP7VJ95OZ10XVO3vm6MpSimoPPg"><img src="https://polar.sh/embed/product.svg?organizationId=95cd73d8-20dc-4457-9b70-618d9a6a4799&productId=dcf62f17-a82d-4c27-b58f-2db5ca7531ba&productPriceId=17a8e9ba-6705-41fd-a45e-120257b9775d&darkmode" alt="Donation" /></a>




  📢📢 **We are looking for business partnerships and sponsors!** 📢📢

  ```
  For enterprise avoiding GPL3 licensing there is commercial license!
  ```
  We offer custom integration and managed services. For businesses requiring invoices message us `contact@eyegestures.com`.

  ```
  Sponsor us and we can add your link, banner or other promo materials!
  ```
  <!-- POLAR type=ads id=203bbe subscription_benefit_id=bb272b6d-f698-44e3-a417-36a6fa203bbe width=240 height=100 -->

  <!-- POLAR-END id=eizdelwu -->

  <p align="center">
    <img src="https://github.com/PeterWaIIace/PeterWaIIace/assets/40773550/2ad25252-e96e-47d4-b25f-c47ba7f0f4f3" width="300" height="150">
    <img src="https://github.com/NativeSensors/EyeGestures/assets/40773550/923e22a1-7fd7-4c06-9804-256aca22be21" width="300" height="150">
    </p>
  <p align="center">
    <img src="https://github.com/PeterWaIIace/PeterWaIIace/assets/40773550/3b38d73d-bb6f-4f31-b67d-231ac4cd04cb" width="300" height="150">
    <img src="https://github.com/user-attachments/assets/33e7782b-7977-4f88-ad54-c43d44c6dced" width="300" height="150">
  </p>



  - [EyePilot](https://polar.sh/NativeSensors/products/5fce104c-46ec-4203-892b-a26e0e0ead18)
  - [EyePather](https://polar.sh/NativeSensors/posts/eyepather-new-tool-in-eyegestures-ecosystem)
  - [EyeFocus](https://polar.sh/NativeSensors/products/3756d557-134e-4e7e-ac50-d850126aa325?ref=producthunt) <- 4th best product on PH!
  - Add your project! contact@eyegestures.com or PR

  Subscribe and get access to our software:
  <p align="left">
    <a href="https://polar.sh/NativeSensors"><picture><source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/embed/subscribe.svg?org=NativeSensors&label=Subscribe&darkmode"><img alt="Subscribe on Polar" src="https://polar.sh/embed/subscribe.svg?org=NativeSensors&label=Subscribe"></picture></a>


  ```
  python3 -m pip install eyeGestures
  ```

  >[!WARNING]
  >some users report that mediapipe, scikit-learn or opencv is not installing together with eyegestures. To fix it, just install it with pip.



  Tracker works best when your camera or laptop is at arm's length, similar to how you would typically use it. If you are further away, it may be less responsive for now - currently working on solving this issue.

  ```
  python3 examples/simple_example_v2.py
  ```

  ```
  python3 examples/simple_example.py [legacy tracker, will become obsolete]
  ```





  ```python
  from eyeGestures.utils import VideoCapture
  from eyeGestures import EyeGestures_v3


  gestures = EyeGestures_v3()
  cap = VideoCapture(0)
  calibrate = True
  screen_width = 500
  screen_height= 500


  while True:
    ret, frame = cap.read()
    event, cevent = gestures.step(frame,
      calibrate,
      screen_width,
      screen_height,
      context="my_context")

    if event:
      cursor_x, cursor_y = event.point[0], event.point[1]
      fixation = event.fixation
      saccadess = event.saccadess # saccadess movement detector
      
  ```

  <!-- POLAR type=ads id=eizdelwu subscription_benefit_id=bb272b6d-f698-44e3-a417-36a6fa203bbe width=240 height=100 -->
  <!-- POLAR-END id=eizdelwu -->



  ```python
  from eyeGestures.utils import VideoCapture
  from eyeGestures import EyeGestures_v2


  gestures = EyeGestures_v2()
  cap = VideoCapture(0)
  calibrate = True
  screen_width = 500
  screen_height= 500


  while True:
    ret, frame = cap.read()
    event, cevent = gestures.step(frame,
      calibrate,
      screen_width,
      screen_height,
      context="my_context")

    if event:
      cursor_x, cursor_y = event.point[0], event.point[1]
      fixation = event.fixation
      
  ```

  <!-- POLAR type=ads id=eizdelwu subscription_benefit_id=bb272b6d-f698-44e3-a417-36a6fa203bbe width=240 height=100 -->
  <!-- POLAR-END id=eizdelwu -->



  You can customize your calibration points/map to fit your solutions. Simple copy snippet below, and place your calibration poitns on x,y planes from 0.0 to 1.0. It will be then automatically scaled to your display.

  ```python
  gestures = EyeGestures_v2()
  gestures.uploadCalibrationMap([[0,0],[0,1],[1,0],[1,1]])
  ```

  V2 is two stage tracker. It runs V1 under the hood but then uses it as feature extractor for V2 machine learning component, and combines both outputs to generate new gaze point. It is possible to control how much V1 affects V2 by:

  ```python
  gestures.setClassicImpact(N) # setting N = 2 is working best for my testing
  ```
  This makes that sample obtained from V2 is averaged with N times sample from V1 (same sample copied that many times). In outcome having V2 impacting output in `1/N+1` and V1 `N/N+1`.

  It is also worth to know that you can enable hidden calibration for V1 (same calibration when using only V1, but now it is invisible to user):
  ```python
  gestures.enableCNCalib()
  ```



  ```python
  from eyeGestures.utils import VideoCapture
  from eyeGestures import EyeGestures_v1


  gestures = EyeGestures_v1()

  cap = VideoCapture(0)
  ret, frame = cap.read()
  calibrate = True
  screen_width = 500
  screen_height= 500


  event, cevent = gestures.estimate(
      frame,
      "main",
      calibrate,  # set calibration - switch to False to stop calibration
      screen_width,
      screen_height,
      0, 0, 0.8, 10
  )

  if event:
    cursor_x, cursor_y = event.point[0], event.point[1]
    fixation = event.fixation
    
  ```

  Feel free to copy and paste the relevant code snippets for your project.



  - [Main page](https://eyegestures.com/)
  - [Game demo](https://eyegestures.com/game)
  - [Cinema demo](https://eyegestures.com/cinema)
  - [Restaurant](https://eyegestures.com/restaurant)



  If you are building publicly available product, and have no commercial license, please mention us somewhere in your interface.


  - [RSS](https://polar.sh/NativeSensors/rss?auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRfaWQiOiJkMDYxMDFiOC0xYzYyLTQ1MTYtYjg3YS03NTFhOTM3OTIxZmUiLCJzY29wZXMiOiJhcnRpY2xlczpyZWFkIiwidHlwZSI6ImF1dGgiLCJleHAiOjE3NDMxNjg3ODh9.djoi5ARWHr-xFW_XJ6Fwal3JUT1fAbvx4Npl-daBC5U)
  - [discord](https://discord.gg/sqKdKBJ6)
  - [twitter](https://twitter.com/PW4ltz)
  - [daily.dev](https://dly.to/JEe1Sz6vLey)
  - email: contact@eyegestures.com




  1) some users report that `mediapipe`, `scikit-learn` or `opencv` is not installing together with `eyegestures`. To fix it, just install it with `pip`.



  <a href="https://github.com/OWNER/REPO/graphs/contributors">
    <img src="https://contrib.rocks/image?repo=NativeSensors/EyeGestures" />
  </a>



  We will be extremely grateful for your support: it helps to keep server running + fuels my brain with coffee.

  Support project on Polar (if you want to help we provide access to alphas versions and premium content!):

  <a href="https://polar.sh/NativeSensors"><picture><source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/embed/subscribe.svg?org=NativeSensors&label=Subscribe&darkmode"><img alt="Subscribe on Polar" src="https://polar.sh/embed/subscribe.svg?org=NativeSensors&label=Subscribe"></picture></a>

  <picture>
    <source
      media="(prefers-color-scheme: dark)"
      srcset="
        https://api.star-history.com/svg?repos=NativeSensors/EyeGestures&type=Date&theme=dark
      "
    />
    <source
      media="(prefers-color-scheme: light)"
      srcset="
        https://api.star-history.com/svg?repos=NativeSensors/EyeGestures&type=Date
      "
    />
    <img
      alt="Star History Chart"
      src="https://api.star-history.com/svg?repos=NativeSensors/EyeGestures&type=Date"
    />
  </picture>

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


pkgId: 23f0075f95015872990a8a27270d8d8bb4fb0ca8be37dd63b384b5a1a4fd6f73
name: python-ez-zarr-help
arch: noarch
version: 0.3.5
epoch: 0
release: 1
summary: Development documents and examples for ez-zarr
url: https://github.com/fmicompbio/ez_zarr
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ez-zarr-0.3.5-1.src.rpm
location_href: Packages/python-ez-zarr-help-0.3.5-1.noarch.rpm
checksum_type: sha256
description:
  <img src="docs/ez_zarr.png" align="right" alt="ez-zarr" width="150"/>

  <br>



  <br>


  The aim of `ez_zarr` is to provide easy, high-level access
  to OME-Zarr filesets (high content screening microscopy data, stored
  according to the [NGFF](https://ngff.openmicroscopy.org/latest/)
  specifications in OME-Zarr with additional metadata fields, for
  example the ones generated by the [Fractal](https://fractal-analytics-platform.github.io/) platform).

  The goal is that users can write simple scripts working with plates,
  wells and fields of view, without having to understand how these
  are represented within an OME-Zarr fileset.

  In addition to the python package, we also provide an R package
  that automatically generates and wraps a python environment with
  `ez_zarr` and all dependencies, available at https://github.com/fmicompbio/ezzarr.


  You can use `ez_zarr` from the command line to get information about an OME-Zarr fileset:
  ```
  ez_zarr tests/example_data/plate_ones.zarr
  ```

  or from within python to get access to all its functionality:
  ```

  from ez_zarr import ome_zarr


  img = ome_zarr.Image('tests/example_data/plate_ones_mip.zarr/B/03/0')
  img










  from ez_zarr import hcs_wrappers

  plate_3d = hcs_wrappers.FractalZarr('tests/example_data/plate_ones.zarr')
  plate_3d










  ```

  A more extensive example is available from [here](https://fmicompbio.github.io/ez_zarr/getting_started_Image/), also available as an [ipynb notebook](https://fmicompbio.github.io/ez_zarr/getting_started_Image.ipynb).



  [![PyPI - Version](https://img.shields.io/pypi/v/ez-zarr.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/ez-zarr/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ez-zarr.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/ez-zarr/)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/ez-zarr)

  The release version of `ez_zarr` can be installed using pip:
  ```
  pip install ez-zarr
  ```

  The current (development) `ez_zarr` can be installed from github.com using:
  ```
  pip install git+ssh://git@github.com/fmicompbio/ez_zarr.git
  ```


  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ez-zarr.svg)](https://anaconda.org/conda-forge/ez-zarr)
  [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/ez-zarr.svg)](https://anaconda.org/conda-forge/ez-zarr)
  [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/ez-zarr.svg)](https://anaconda.org/conda-forge/ez-zarr)

  Alternatively, you can install `ez-zarr` from the `conda-forge` channel using:
  ```
  conda install -c conda-forge --override-channels ez-zarr
  ```


  [![unit-tests](https://github.com/fmicompbio/ez_zarr/actions/workflows/test_and_deploy.yaml/badge.svg)](https://github.com/fmicompbio/ez_zarr/actions/workflows/test_and_deploy.yaml)
  [![codecov](https://codecov.io/gh/fmicompbio/ez_zarr/graph/badge.svg)](https://codecov.io/gh/fmicompbio/ez_zarr)


  `ez_zarr` is released under the MIT License, and the copyright
  is with the Friedrich Miescher Insitute for Biomedical Research
  (see [LICENSE](https://github.com/fmicompbio/ez_zarr/blob/main/LICENSE)).

  `ez_zarr` is being developed at the Friedrich Miescher Institute for
  Biomedical Research by [@silvbarb](https://github.com/silvbarb), [@csoneson](https://github.com/csoneson) and [@mbstadler](https://github.com/mbstadler).

rpm_license:
  MIT License  Copyright (c) 2023 Friedrich Miescher Institute for Biomedical Research  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: 35a1f16d1ada764b8a5e37f5ad041b4cb46d2dbdb5ba2a33b9d78a8101ccadde
name: python-ezbeq-help
arch: noarch
version: 2.2.0
epoch: 0
release: 1
summary: Development documents and examples for ezbeq
url: https://ezbeq.readthedocs.io/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ezbeq-2.2.0-1.src.rpm
location_href: Packages/python-ezbeq-help-2.2.0-1.noarch.rpm
checksum_type: sha256
description:
  A simple web browser for [beqcatalogue](https://beqcatalogue.readthedocs.io/en/latest/) which integrates with [minidsp-rs](https://github.com/mrene/minidsp-rs)
  for local remote control of a minidsp or HTP-1.





  Python is required so use an appropriate package manager to install it.

  [chocolatey](https://chocolatey.org/) is a convenient choice for Windows
  [homebrew](https://docs.brew.sh/Installation) is the equivalent for MacOS



  Use your distro package manager to install python.



  Example is provided for rpi users

      $ ssh pi@myrpi
      $ sudo apt install python3 python3-venv python3-pip libyaml-dev
      $ mkdir python
      $ cd python
      $ python3 -m venv ezbeq
      $ cd ezbeq
      $ . bin/activate
      $ pip install ezbeq



  See [examples](examples)

  | Type                        | File                                                                                                                                                                        |
  |-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Camilla DSP                 | [ezbeq_camilladsp.yml](examples/ezbeq_camilladsp.yml)                                                                                                                       |
  | J River Media Center        | [ezbeq_mc.yml](examples/ezbeq_mc.yml)                                                                                                                                       |
  | Minidsp 2x4HD               | [ezbeq_md.yml](examples/ezbeq_md.yml), [using multiple devices](examples/ezbeq_md2.yml) or [with custom slot names](examples/ezbeq_named.yml)                               |
  | Minidsp 4x10                | [ezbeq_4x10.yml](examples/ezbeq_4x10.yml)                                                                                                                                   |
  | Minidsp 10x10               | [without use of XO](examples/ezbeq_10x10.yml), [with](examples/ezbeq_10x10_xo.yml) or [using a custom mapping across input, output and xo](examples/ezbeq_10x10_custom.yml) |
  | Minidsp DDRC-24             | [ezbeq_ddrc24.yml](examples/ezbeq_ddrc24.yml)                                                                                                                               |
  | Minidsp DDRC-88             | [ezbeq_ddrc88.yml](examples/ezbeq_ddrc88.yml)                                                                                                                               |
  | Minidsp HTx                 | [ezbeq_htx.yml](examples/ezbeq_htx.yml)                                                                                                                                     |
  | Minidsp SHD                 | [ezbeq_shd.yml](examples/ezbeq_shd.yml)                                                                                                                                     |
  | Monolith HTP-1              | [ezbeq_htp1.yml](examples/ezbeq_htp1.yml)                                                                                                                                   |
  | Q-Sys                       | [ezbeq_qsys.yml](examples/ezbeq_qsys.yml)                                                                                                                                   |
  | Multiple, different devices | [ezbeq_multi.yml](examples/ezbeq_multi.yml)                                                                                                                                 |



  Install minidsp-rs as per the [provided instructions](https://github.com/mrene/minidsp-rs#installation)



  See the configuration section below



      $ ssh pi@myrpi
      $ cd python/ezbeq
      $ . bin/activate
      $ pip install --upgrade --force-reinstall ezbeq

  then restart the app



      $ ssh pi@myrpi
      $ cd python/ezbeq
      $ . bin/activate
      $ ./bin/ezbeq
        Loading config from /home/pi/.ezbeq/ezbeq.yml
        2021-01-16 08:43:15,374 - twisted - INFO - __init__ - Serving ui from /home/pi/python/ezbeq/lib/python3.8/site-packages/ezbeq/ui

  Now open http://youripaddress:8080/index.html in your browser



  See `$HOME/.ezbeq/ezbeq.yml`

  The only intended option for override is the port option which sets the port the UI and API is accessible on. This defaults to 8080.



  If `catalogueUrl` is added to the configuration, e.g.

      catalogueUrl: http://localhost:9999

  ezbeq will instead load the catalogue from `http://localhost:9999/database.json`

  This provides the ability to run ezbeq against a custom, or locally provided, catalogue.



  The devices section contains a list of supported device, the format varies by the type of device and each item is a named device with the name subsequently appearing the UI (if multiple devices are listed)



  Default values are shown, the only required value is the type field

  ```
    minidsp:
      cmdTimeout: 10
      exe: minidsp
      ignoreRetcode: false
      options: ''
      slotChangeDelay: false
      type: minidsp
  ```

  * cmdTime: default timeout in seconds for a command sent to minidsp-rs to complete
  * exe: location of the minidsp-rs executable
  * ignoreRetcode: if true, errors generated by minidsp-rs will be ignored (for debugging/local testing only)
  * options: additional command line switches to pass to minidsp-rs (refer to minidsp-rs docs for details)
  * type: minidsp
  * slotChangeDelay: if true, the command to change the slot is always sent to minidsp-rs as a separate command. If a positive integer or float, it represents an additional delay (in seconds) that will separate each command.

  By default, it is assumed the Minidsp 2x4HD is in use. To use a different model, specify via the device_type option. For example:

  ```
    minidsp:
      cmdTimeout: 10
      exe: minidsp
      ignoreRetcode: false
      options: ''
      type: minidsp
      device_type: 4x10
  ```

  In order for the ezbeq ui to update when the device status is updated outside of ezbeq (e.g. using minidsp remote control), additional configuration is required to enable the [minidsp rs websocket interface](https://minidsp-rs.pages.dev/daemon/http#websocket-streaming)

  This requires 2 optional additional values in the configuration

  ```
    wsDeviceId: 0
    wsIp: 127.0.0.1:5380
  ```

  `wsIp` is the address of the `[http_server]` from `/etc/minidsp/config.toml`
  `wsDeviceId` is the device id provided by `minidsp probe`, in this example 2 device ids (0 and 1) are available

  ```
  $ minidsp probe                                                                                                                                                                              
  Found 2x4HD with serial 911111 at ws://localhost/devices/0/ws [hw_id: 10, dsp_version: 100]
  Found 2x4HD with serial 911112 at ws://localhost/devices/1/ws [hw_id: 10, dsp_version: 100]
  ```

  Using, and controlling, multiple devices independently is supported but does require use of the `options` key in order to direct commands to the right device. Precise configuration of this option depends on the minidsp-rs setup so is out of scope of this readme. Typical configuration would involve use of the `--tcp` option combined with changes to `minidsp.toml` as mentioned in the [minidsp-rs docs](https://minidsp-rs.pages.dev/daemon/tcp#multiple-devices).

  For reference, a community provided example configuration guide can be found via [avs](https://www.avsforum.com/threads/ezbeq-use-and-development-discussion.3181732/page-170#post-62257128)



  By default, the slots are numbered 1-4 as per the minidsp console.

  To override, extend the device configuration with the `slotNames` key as illustrated in [this example](examples/ezbeq_named.yml). It is not necessary to list every slot, just those that require an explicit name.



  Device support largely tracks [minidsp-rs device support](https://minidsp-rs.pages.dev/devices).

  BEQ MV adjustments are applied to input peq channels only.



  set `device_type: 24HD`

  BEQ filters are written to both input channels.



  configure as per 2x4HD

  add `slotChangeDelay: true` to workaround issues with slow slot changing. If it remains unstable, use `slotChangeDelay: 1.5` (or some other number, experiment to find the smallest value that enables a reliable experience).

  Dirac mode (PEQ on output) is only supported at present via a custom configuration.



  set `device_type: DDRC24`

  BEQ filters are written to all output channels.



  set `device_type: DDRC88`

  BEQ filters are written to output channel 3 by default.

  Add the `sw_channels` config key to override this, provide a list of channel indexes (0 based) to which the filters should be written. For example to write to the last two output channels:

      device_type: DDRC88
      sw_channels:
      - 6
      - 7



  requires [minidsp-rs 0.1.12](https://github.com/mrene/minidsp-rs/releases/tag/v0.1.12) or later

  set `device_type: HTx`

  BEQ filters are written to output channel 3 by default.

  Add the `sw_channels` config key to override this, provide a list of channel indexes (0 based) to which the filters should be written. For example to write to the last two output channels:

      device_type: DDRC88
      sw_channels:
      - 6
      - 7



  set `device_type: 4x10`

  The limited biquad capacity (5 per channel) means that filters are split across input and output channels and there is no capacity for user filters.



  set `device_type: 10x10`

  The limited biquad capacity (6 per channel) means that filters are split across input and output channels and the last 2 biquads per output channel are left under user control.

  To avoid this, use the crossover biquads to hold the remaining beq biquads. This leaves the output PEQ untouched. Set `use_xo` to one of the following values to activate this mode:

  * all : apply beq to both crossover groups
  * 0 (or true) : apply beq to crossover group 0
  * 1 : apply beq to crossover group 1



  set `device_type: SHD`

  BEQ filters are written to all output channels.



  set `device_type: 8x12CDSP`

  BEQ filters are written to all 6 input channels.



  TODO



  ```
    htp1:
      ip: 192.168.1.181
      channels:
      - sub1
      autoclear: true
  ```

  BEQ filters are loaded into the bottom 10 slots of the specified channels only.

  * ip: ip address of the HTP1
  * channels: list of channels to apply filters to (sub1, sub2 and sub3 are the standard subwoofer channels in the HTP1)
  * autoclear: if set to true, BEQ filters will be reset on power state or input change



  Media Network must be enabled

  ```
    jriver:
      address: 192.168.1.181:52199
      auth:
        user: foo
        pass: thisismypass
      secure: true
      channels:
      - SW
      - C9
      - C10
      block: 2
  ```
  * address: the ip and port on which the Media Center media network is listening
  * auth is optional, leave this out if MCWS is not secured
  * secure is optional, leave this out if SSL is not used
  * supported channels are L R C SW SL SR RL RR and C9 upto C32 (if more than 8 channel output is used)
  * block is 1 or 2 and refers to the dsp slots Parametric Equalizer and Parametric Equalizer 2 respectively

  This information is **not** validated, it is left to the user to configure the output format on the zone to match the supplied configuration.



  [Q-Sys Designer](https://www.qsc.com/resources/software-and-firmware/q-sys-designer-software/) is supported via the [QRC](https://q-syshelp.qsc.com/Content/External_Control_APIs/QRC/QRC_Overview.htm) protocol

  ```
    qsys:
      ip: 192.168.1.181
      port: 1710
      timeout_secs: 2
      components:
      - beq
      content_info:
      - beq_movie_info:
          text.1: title
          text.2: genres
          text.3: audio_types
          text.4: mv_adjust
          text.5: overview
          text.6: images[0]
          text.7: images[1]
      type: qsys
  ```

  Configuration of the audio pipeline in Q-Sys Designer is left as an exercise for the user.

  2 alternative implementations are possible.

  One uses a [IIR Custom Filter](https://q-syshelp.qsc.com/Index.htm#Schematic_Library/filter_IIR.htm) component which must be connected to component which provides a text field.

  This can be implemented using either a [Text Controller](https://q-syshelp.qsc.com/Index.htm#Schematic_Library/device_controller_script.htm?TocPath=Design%257CSchematic%2520Elements%257CComponents%257CScripting%2520Components%257C_____3) or a [Custom Control](https://q-syshelp.qsc.com/Index.htm#Schematic_Library/custom_controls.htm).

  This component allows for a mapping of a text field control key to a `CatalogueEntry` field name.

  Two fields have special treatment:

  * filters: will be set in a format that can be linked to a IIR Custom Filter and feeds it with the required biquad coefficients.
  * images: there can be a variable number of images so each individual image can be specified in a separate field

  The alternative approache uses a [Parametric Equaliser](https://q-syshelp.qsc.com/Content/Schematic_Library/equalizer_parametric.htm) component which should be configured with:

  * at least 10 bands
  * q factor

  The component name should be supplied in the configuration above.

  Note that this format does not support variable Q shelf filters.



  [CamillaDSP](https://github.com/HEnquist/camilladsp) is supported via its [websocket](https://github.com/HEnquist/camilladsp/blob/master/websocket.md) api which means CamillaDSP must be started with additional options:

  * `-p` to specify the port
  * `-a` to specify the listen address (required if ezbeq runs on a different host to camilladsp)

  ```
    camilla:
      ip: 192.168.1.181
      port: 1710
      timeout_secs: 2
      channels:
      - 4
      - 7
      type: camilladsp
  ```

  * ip: the ip on which camilladsp is listening
  * port: the port on which camilladsp is listening
  * channels: a list of channel numbers to which BEQ filters will be appended

  On load, the camilladsp configuration will be updated as follows:

  * each filter will be added to the `Filters` section in [IIR](https://github.com/HEnquist/camilladsp#iir) format using one of the Peaking, HighShelf or LowShelf filter types. Filter names will be BEQ1 to BEQ10
  * each filter will be appended to the [Pipeline](https://github.com/HEnquist/camilladsp#pipeline) for the specified channel, an entry of type `Filter` will be added if not already present for that channel

  On unload, the camilladsp configuration will be updated as follows:

  * the filters will deleted from the `Filters` section
  * the filters will be removed from the `Pipeline` section

  User controlled master volume adjustments are supported using the [Volume](https://github.com/HEnquist/camilladsp/blob/master/README.md#volume) filter if that filter has been configured in the pipeline.

  BEQ specific input gain adjustments are supported via the use of a [Gain](https://github.com/HEnquist/camilladsp#gain) filter which is inserted into the pipeline ahead of the BEQ filters themselves.



  This is optional but recommended, it ensures the app starts automatically whenever the rpi boots up and makes
  sure it restarts automatically if it ever crashes.

  We will achieve this by creating and enabling a `systemd` service.

  1) Create a file ezbeq.service in the appropriate location for your distro (e.g. ``/etc/systemd/system/`` for debian)::

  ```
  [Unit]
  Description=ezbeq
  After=network.target

  [Service]
  Type=simple
  User=pi
  WorkingDirectory=/home/pi
  ExecStart=/home/pi/python/ezbeq/bin/ezbeq
  Restart=always
  RestartSec=1

  [Install]
  WantedBy=multi-user.target
  ```

  2) enable the service and start it up::

  ```
  $ sudo systemctl enable ezbeq.service
  $ sudo service ezbeq start
  $ sudo journalctl -u ezbeq.service
  -- Logs begin at Sat 2019-08-17 12:17:02 BST, end at Sun 2019-08-18 21:58:43 BST. --
  Aug 18 21:58:36 swoop systemd[1]: Started ezbeq.
  ```

  3) reboot and repeat step 2 to verify the recorder has automatically started


pkgId: 4b1cb7129dbe61d233ad32b4ca450a73bf581f0b89b7f6311c3719d1426cb47e
name: python-ezcharts-help
arch: noarch
version: 0.11.3
epoch: 0
release: 1
summary: Development documents and examples for ezcharts
url: https://github.com/epi2me-labs/ezcharts
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ezcharts-0.11.3-1.src.rpm
location_href: Packages/python-ezcharts-help-0.11.3-1.noarch.rpm
checksum_type: sha256
description:
  (Apologies to non-US English speakers).

  ezCharts is a Python library for creating and rendering charts through [eCharts](https://echarts.apache.org/)
  or [Bokeh](https://docs.bokeh.org/en/latest/).
  Plots can be constructed through an API similar to [seaborn](https://seaborn.pydata.org/).

  Additionally, ezCharts ships with a layout system built around [dominate](https://github.com/Knio/dominate/),
  providing a framework for creating static HTML reports via a declarative syntax.

  Using the charting and layout functionality, a library of report components is
  provided in the domain of bioinformatics analysis and Nanopore sequencing.




  ezCharts is easily installed in the standard Python tradition:

      git clone --recursive https://github.com/epi2me-labs/ezcharts.git
      cd ezcharts
      pip install -r requirements.txt
      python setup.py install

  or via pip:

      pip install ezcharts




  The `Plot()` API in ezCharts mirrors the eCharts API in order that everything
  follows the eCharts [documention](https://echarts.apache.org/en/option.html). The
  API was in fact constructed from an API schema encoded in the source code of the documentation
  site. Users can therefore follow the eCharts documentation to construct charts
  with ezCharts. This differs from the [pyecharts](https://pyecharts.org/) library which
  adds a layer of indirection.



  The library contains a `Plot` class for constructing plots using eCharts. Instances of this
  class have an attribute hierarchy that mirrors the eCharts [Option API](https://echarts.apache.org/en/option.html).
  Attributes can be set by providing a dictionary, runtime type checking ensures that
  child attributes match the Option API:

  ```
  from ezcharts.plots import Plot
  from ezcharts.components.reports.comp import ComponentReport

  plt = Plot()
  plt.xAxis = dict(name="Day", type="category")
  plt.yAxis = dict(type="value")
  plt.dataset = [dict(
      dimensions = ['Day', 'Rabbits'],
      source = [
          ['Monday', 150],
          ['Tuesday', 230],
          ['Wednesday', 224],
          ['Thursday', 218],
          ['Friday', 135],
          ['Saturday', 147],
          ['Sunday', 260]
      ]
  )]
  plt.series = [dict(type='line')]
  ComponentReport.from_plot(plt, "tmp.html")
  ```

  Up to the the final line, the code here mirrors exactly the javascript eCharts
  API. Note, many of the examples in the eCharts API set `data` items on the
  `xAxis` and `series` attributes. However the eCharts
  [dataset](https://echarts.apache.org/handbook/en/concepts/dataset)
  documentation advises setting data within the `dataset` attribute; doing so
  provides an experience somewhat akin to
  [ggplot2](https://ggplot2.tidyverse.org/index.html) in R or
  [seaborn](https://seaborn.pydata.org/) in Python. The primary use is to create
  additional datasets through [data
  transforms](https://echarts.apache.org/handbook/en/concepts/data-transform):

  ```
  plt = Plot()
  plt.xAxis = dict(name="Day", type="category")
  plt.yAxis = dict(type="value")
  plt.dataset = [...]  # as above

  plt.add_dataset({
      'id': 'filtered',
      'fromDatasetIndex': 0,
      'transform': [{
          'type': 'filter',
          'config': {'dimension': 'Rabbits', 'gt': 200}
      }]
  })

  plt.series = [dict(type='line', datasetIndex=1)]
  ```

  The above example shows the use of a simple filter to plot only a subset of the
  data. More usually transforms can be used to plot multiple series based on a
  facet of the data.

  The example also shows use of the convenience method `.add_dataset()`: this is
  provided to ensure the provided dictionary is type-checked against the eCharts
  API. The alternative would be to call `.append({...})` on the `plt.dataset`
  attribute. However, this is at risk of error. Similarly, the `.add_series()`
  method exists to attach additional series to the chart.

  **Gotchas**

  It is not currently possible to set child attributes without first setting a
  parent, i.e. the following is **not** possible:

  ```
  from ezcharts.plots import Plot

  plt = Plot()
  plt.xAxis.name = "My Variable"
  ```

  This may change in a later release.

  Rendering a chart may result in in JSON encoding errors. To resolve this,
  amendments are needed to `excharts.plots._base` to define how types can be
  encoded to JSON.



  Since v0.6.0, [Bokeh](https://docs.bokeh.org/en/latest/) can be used as
  alternative plotting backend. To this end, a wrapper class `BokehPlot` exists.
  The Bokeh figure instance can be accessed under the `_fig` attribute (see example below).

  ```
  from ezcharts.plots import BokehPlot
  from ezcharts.components.reports.comp import ComponentReport

  days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
  rabbits = [150, 230, 224, 218, 135, 147, 260]

  plt = BokehPlot(
      x_range=days, title="some title", x_axis_label="Day", y_axis_label="Rabbits"
  )
  plt._fig.vbar(x=days, top=rabbits, width=0.9)

  ComponentReport.from_plot(plt, "tmp.html")
  ```



  A higher level API is provided that mirrors the [seaborn](https://seaborn.pydata.org/) API
  to allow creation of common plot types without knowledge of eCharts. This
  currently has minimal functionality that will be added to over time. The idea
  is that eventually most plotting can be performed through this API without
  requiring use of the `Plot` class.

  ```
  import ezcharts as ezc
  from ezcharts.components.reports.comp import ComponentReport
  import seaborn as sns

  tips = sns.load_dataset("tips")

  plt = ezc.scatterplot(data=tips, x="total_bill", y="tip", hue="size")
  ComponentReport.from_plot(plt, "tmp.html")
  ```



  The layout functionality of ezCharts uses bootstrap scripting and styling by
  default, but permits any level of customisation. Snippets provide simple
  re-usable bits of HTML that are pre-styled, such as tabs and tables.

  ```
  import ezcharts as ezc
  from ezcharts.components.ezchart import EZChart
  from ezcharts.layout.snippets import DataTable, Tabs

  from ezcharts.components.reports.labs import BasicReport

  from dominate.tags import p
  import seaborn as sns

  tips = sns.load_dataset("tips")
  tips["size"] = tips["size"].astype(str)

  report = BasicReport("test report")

  plt = ezc.scatterplot(data=tips, x="total_bill", y="tip", hue="size")

  with report.add_section("test section", "test"):
      tabs = Tabs()
      with tabs.add_tab("First tab"):
          EZChart(plt)
      with tabs.add_tab("Second tab"):
          p("Some text.")
          DataTable.from_pandas(tips)

  report.write("tmp.html")
  ```

  Note that `EZChart()` is required to add the plot to the enclosing `dominate`
  context.


  Decorator for plotting a message when the plot fails can be skipped by setting the env variable EZCHARTS_DEBUG=1.

  **Components**

  Components provide higher level application-specific layouts (a table for
  [Nextclade](https://clades.nextstrain.org/) results, for instance) that may also
  include charts and light data processing capabilities (e.g. to parse and
  visualise [fastcat](https://github.com/epi2me-labs/fastcat) output).

  For a comprehensive showcase of current capabilities, please have a look at
  `ezcharts/demo.py`.




  The aim is to slowly build out both the seaborn-like API and the components
  library with functionality required.

  Much of the seaborn data analysis code can be reused. Function
  stubs have been added according to the v0.11.2 documentation. The seaborn
  requirement is however pinned to v0.12.0b2.  In implementing a plotting
  function the 0.12.0 series should be followed.


pkgId: 77472260a258dcb6bae2f36e350a567b930c7e77e8b4dd3b4bea566b5bea6e9c
name: python-ezfit-help
arch: noarch
version: 0.1.4
epoch: 0
release: 1
summary: Development documents and examples for ezfit
url: https://github.com/WSU-Carbon-Lab/ezfit
rpm_license: GPL-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ezfit-0.1.4-1.src.rpm
location_href: Packages/python-ezfit-help-0.1.4-1.noarch.rpm
checksum_type: sha256
description:
  This package is built for use by people who are new not just to python but to coding,
  fitting, and programatically interacting with data. If you have experience with
  EXCEL, but need to fit data using least squares fitting, this is the tool for you.


  There are four prerequisite functions for installing ezfit, pandas, numpy, matplotlib,
  and scipy. The package can be installed though the terminal with the following
  command.
  ```
  pip install numpy pandas matplotlib ezfit
  ```


  Import the ezfit library. This will allow you to have a simple interface for fitting
  a pandas `DataFrame` to some model.

  ```python
  import ezfit
  ```


  To start, load your data into a pandas DataFrame. Try to allways save your data as a
  .csv file with one line of headers.
  [Read the documentation on this](https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html)


  ```
  x, y, yerr
  0, 1, .5
  1, .5, .2
  ...
  ```
  You can load this data easily with the following easy command

  ```python

  import pandas as pd



  df = read_csv("path_to_file")    # note that you might need a full path


  print(df.head(2))   # the print() statement is how you print something in python
  ```
  The output should look something like this
  ```
     x    y  yerr
  0  0  1.0   0.5
  1  1  0.5   0.2
  ```

  We can also plot the data quickly to make sure it looks right, and determine
  if there is any cleaning that needs to be done.

  ```python

  import matplotlib.pyplot as plt


  df.plot(x = "x", y = "y", yerr="yerr")  # you can pass other parameters in too




  plt.show()      # This will render the currently active plot
  ```
  You might want to place this plot on a log scale, and this can be done in many
  ways. For a complete list of the parameters available to you, please read up
  on the [pandas plot method](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html)



  Now if the dataset is not collumn seperated, as is the data from CXRO, you will need to
  tell pandas what seperates the collumns. Lets look at some CXRO index of refraction
  data
  ```
   Si3N4 Density=3.44
   Energy(eV), Delta, Beta
    30.  0.274695814  0.210541397
    31.7943592  0.252507478  0.17769818
    33.6960373  0.229885429  0.150933087
  ```
  The first row is density informaton about the material, followed by the rows for
  Energy(eV), Delta, and Beta. So first we need to skip the first row of data points.
  Using the `pd.read_csv()` function, we can pass in the parameter `skiprows = n` where
  `n` is the number of rows we need skipped.

  Now to get the data, we need to pass in a parameter telling pandas what to look for
  between collumns. Using the parameter `sep = \s+` we can tell the function that there
  is an unknown number of space characters between collumns. Putting this together
  we have

  ```python
  df = pd.read_csv("path_to_file", sep = "\s+", skiprows=1)


  print(df.head(2))
  ```
  ```
  Energy(eV),    Delta,          Beta
  0       30.000000  0.274696  2.105414e-01
  1       31.794359  0.252507  1.776982e-01
  ```
  Now there is one issue, the collumns have trailing commas. You can solve that easily
  in many ways.

  ```python
  df.columns = ["Energy(eV)","Delta","Beta"]

  df.columns = [col.replace(",", "") for col in df.columns]

  df.rename(columns={"Energy(eV),": "Energy(eV)", "Delta,": "Delta"})

  ```

  Using the same methods as above, you can plot the data, and do any cleaning to remove
  bad data points.


  Now you will need to express your mathematical model as a python function. This is the
  hardest part of fitting. The syntax is rather simple, and you never need to use types
  because python is a neat language. Say we have a line
  $$
      f(x) = mx+b,
  $$
  this function maps $x\to f(x)$ using the parameters $m$ and $b$. The goal of fitting
  is to find these parameters that best describe our data. Because of this we need a
  python function where you can input not just the domain $x$ but also $m$ and $b$.

  ```python


  def f(x, m, b):     # For the code to work, x (or your domain) must be first
      """
      Tripple quotes can be used to create a `doc string` a fancy type of comment
      that gets attatched to the top of the function. It is allways a good idea
      to comment your functions to say what they do, why they do it, and how
      to use them. For example,

      x: Domain input

      m: slope

      b: y-intercept

      returns
      y = mx + b
      """
      y = m * x + b   # Use * for multiplication and ** for exonentiation
      return y        # return is the key word to say what the function returns
  ```


  Once you define a model, and load your dataset, you need to fit your data. This
  can be done very easily. So I will run you though the whole process

  ```python
  import pandas as pd
  import matplotlib.pyplot as plt
  import ezplot


  df = pd.read_csv("path_to_csv")

  print(df.head(10))
  df.plot(x = "x", y="y", yerr = "yerr")



  mask = (df["x"] > 1)
  df = df[mask]



  def line(x, m, b):
      """Line function."""
      return m * x + b



  model, ax = df.fit(line, "x", "y", "y_err")

  plt.show()


  print(model)
  ```
  ```
  line:
  𝜒2: 88.71565403843992
  reduced 𝜒2: 0.9052617759024482
  m : (value=1.0858435676047251 ± 0.0497, bounds=(-inf, inf))
  b : (value=-0.4650788531268627 ± 0.0903, bounds=(-inf, inf))
  ```

  Now say you wanted to redo the fit but adding bounds and a starting value for the
  slobe of the line

  ```python
  model, ax = df.fit(line, "x", "y", "y_err", m={ "value" : 1, "min" : 0 })

  print(model)
  ```
  Now we get slightly different results
  ```
  line:
  𝜒2: 98.71565403843992
  reduced 𝜒2: 1.0052617759024482
  m : (value=1.158435676047251 ± 0.0497, bounds=(-inf, inf))
  b : (value=-0.4650788531268627 ± 0.0903, bounds=(-inf, inf))
  ```


pkgId: 86dcfb6a4a36b4f8486a1c84f359f4d9edddea108e8e1afc505c38645ce21aef
name: python-ezfit-help
arch: noarch
version: 0.1.8
epoch: 0
release: 1
summary: Development documents and examples for ezfit
url: https://pypi.org/project/ezfit/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ezfit-0.1.8-1.src.rpm
location_href: Packages/python-ezfit-help-0.1.8-1.noarch.rpm
checksum_type: sha256
description:
  This package is built for use by people who are new not just to python but to coding,
  fitting, and programatically interacting with data. If you have experience with
  EXCEL, but need to fit data using least squares fitting, this is the tool for you.


  There are four prerequisite functions for installing ezfit, pandas, numpy, matplotlib,
  and scipy. The package can be installed though the terminal with the following
  command.
  ```
  pip install ezfit numpy pandas matplotlib
  ```


  Import the ezfit library. This will allow you to have a simple interface for fitting
  a pandas `DataFrame` to some model.

  ```python
  import ezfit
  ```


  To start, load your data into a pandas DataFrame. Try to allways save your data as a
  .csv file with one line of headers.
  [Read the documentation on this](https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html)


  ```
  x, y, yerr
  0, 1, .5
  1, .5, .2
  ...
  ```
  You can load this data easily with the following easy command

  ```python

  import pandas as pd



  df = read_csv("path_to_file")    # note that you might need a full path


  print(df.head(2))   # the print() statement is how you print something in python
  ```
  The output should look something like this
  ```
     x    y  yerr
  0  0  1.0   0.5
  1  1  0.5   0.2
  ```

  We can also plot the data quickly to make sure it looks right, and determine
  if there is any cleaning that needs to be done.

  ```python

  import matplotlib.pyplot as plt


  df.plot(x = "x", y = "y", yerr="yerr")  # you can pass other parameters in too




  plt.show()      # This will render the currently active plot
  ```
  You might want to place this plot on a log scale, and this can be done in many
  ways. For a complete list of the parameters available to you, please read up
  on the [pandas plot method](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html)



  Now if the dataset is not collumn seperated, as is the data from CXRO, you will need to
  tell pandas what seperates the collumns. Lets look at some CXRO index of refraction
  data
  ```
   Si3N4 Density=3.44
   Energy(eV), Delta, Beta
    30.  0.274695814  0.210541397
    31.7943592  0.252507478  0.17769818
    33.6960373  0.229885429  0.150933087
  ```
  The first row is density informaton about the material, followed by the rows for
  Energy(eV), Delta, and Beta. So first we need to skip the first row of data points.
  Using the `pd.read_csv()` function, we can pass in the parameter `skiprows = n` where
  `n` is the number of rows we need skipped.

  Now to get the data, we need to pass in a parameter telling pandas what to look for
  between collumns. Using the parameter `sep = \s+` we can tell the function that there
  is an unknown number of space characters between collumns. Putting this together
  we have

  ```python
  df = pd.read_csv("path_to_file", sep = "\s+", skiprows=1)


  print(df.head(2))
  ```
  ```
  Energy(eV),    Delta,          Beta
  0       30.000000  0.274696  2.105414e-01
  1       31.794359  0.252507  1.776982e-01
  ```
  Now there is one issue, the collumns have trailing commas. You can solve that easily
  in many ways.

  ```python
  df.columns = ["Energy(eV)","Delta","Beta"]

  df.columns = [col.replace(",", "") for col in df.columns]

  df.rename(columns={"Energy(eV),": "Energy(eV)", "Delta,": "Delta"})

  ```

  Using the same methods as above, you can plot the data, and do any cleaning to remove
  bad data points.


  Now you will need to express your mathematical model as a python function. This is the
  hardest part of fitting. The syntax is rather simple, and you never need to use types
  because python is a neat language. Say we have a line
  $$
      f(x) = mx+b,
  $$
  this function maps $x\to f(x)$ using the parameters $m$ and $b$. The goal of fitting
  is to find these parameters that best describe our data. Because of this we need a
  python function where you can input not just the domain $x$ but also $m$ and $b$.

  ```python


  def f(x, m, b):     # For the code to work, x (or your domain) must be first
      """
      Tripple quotes can be used to create a `doc string` a fancy type of comment
      that gets attatched to the top of the function. It is allways a good idea
      to comment your functions to say what they do, why they do it, and how
      to use them. For example,

      x: Domain input

      m: slope

      b: y-intercept

      returns
      y = mx + b
      """
      y = m * x + b   # Use * for multiplication and ** for exonentiation
      return y        # return is the key word to say what the function returns
  ```


  Once you define a model, and load your dataset, you need to fit your data. This
  can be done very easily. So I will run you though the whole process

  ```python
  import pandas as pd
  import matplotlib.pyplot as plt
  import ezplot


  df = pd.read_csv("path_to_csv")

  print(df.head(10))
  df.plot(x = "x", y="y", yerr = "yerr")



  mask = (df["x"] > 1)
  df = df[mask]



  def line(x, m, b):
      """Line function."""
      return m * x + b



  model, ax = df.fit(line, "x", "y", "y_err")

  plt.show()


  print(model)
  ```
  ```
  line:
  𝜒2: 88.71565403843992
  reduced 𝜒2: 0.9052617759024482
  m : (value=1.0858435676047251 ± 0.0497, bounds=(-inf, inf))
  b : (value=-0.4650788531268627 ± 0.0903, bounds=(-inf, inf))
  ```

  Now say you wanted to redo the fit but adding bounds and a starting value for the
  slobe of the line

  ```python
  model, ax = df.fit(line, "x", "y", "y_err", m={ "value" : 1, "min" : 0 })

  print(model)
  ```
  Now we get slightly different results
  ```
  line:
  𝜒2: 98.71565403843992
  reduced 𝜒2: 1.0052617759024482
  m : (value=1.158435676047251 ± 0.0497, bounds=(-inf, inf))
  b : (value=-0.4650788531268627 ± 0.0903, bounds=(-inf, inf))
  ```


pkgId: b75446106912216452ccdc1e718af3ed9990da5fc707747a55502d28f229023a
name: python-ezmsg-lsl-help
arch: noarch
version: 1.2.3
epoch: 0
release: 1
summary: Development documents and examples for ezmsg-lsl
url: https://pypi.org/project/ezmsg-lsl/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ezmsg-lsl-1.2.3-1.src.rpm
location_href: Packages/python-ezmsg-lsl-help-1.2.3-1.noarch.rpm
checksum_type: sha256
description:
  Interface to [LSL](https://labstreaminglayer.readthedocs.io/) in [ezmsg](https://github.com/iscoe/ezmsg).



  `pip install ezmsg-lsl`


  * `ezmsg`
  * `pylsl`
  * `numpy`



  See the `examples` folder for more details.



  We use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) for development. It is not strictly required, but if you intend to contribute to ezmsg-lsl then using `uv` will lead to the smoothest collaboration.

  1. Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) if not already installed.
  2. Fork ezmsg-lsl and clone your fork to your local computer.
  3. Open a terminal and `cd` to the cloned folder.
  4. `uv sync` to create a .venv and install dependencies.
  5. After editing code and making commits, Run the test suite before making a PR: `uv run pytest tests`
     * Currently, there are no substantial tests.


pkgId: 674a63a05e1014c77442086d8501ec271edb8b37a0587dc2aa406ccf5ec4f562
name: python-ezoff-help
arch: noarch
version: 0.1.13
epoch: 0
release: 1
summary: Development documents and examples for ezoff
url: https://github.com/pepsimidamerica/ezoff
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ezoff-0.1.13-1.src.rpm
location_href: Packages/python-ezoff-help-0.1.13-1.noarch.rpm
checksum_type: sha256
description:
  Python package for interacting with the EZOffice API



  `pip install ezoff`



  Several environment variables are required for ezo to function.

  | Required? | Env Variable | Description |
  | --------- | ------------ | ----------- |
  | EZO_BASE_URL | Yes | Should be https://{companyname}.ezofficeinventory.com/ |
  | EZO_TOKEN | Yes | The access token used to authenticate requests |



  Project is split up into several files depending on what area of the EZOffice API is being dealt with. Purely for organizational purposes.



  Contains functions for the following:

  - get all asssets
  - get filtered assets
  - search for an asset
  - create an asset
  - update an asset
  - delete an asset
  - check asset in
  - check asset out
  - get an asset's history



  - get inventories
  - get inventory details
  - create inventory order
  - get inventory history



  Contains functions for the following:

  - get subgroups



  Contains functions for the following:

  - get locations
  - get location details
  - get item quantities in location
  - create a location
  - activate a location
  - deactivate a location
  - update a location



  Contains functions for the following:

  - get members
  - get a member's details
  - create a member
  - update a member
  - deactivate a member
  - activate a member
  - get custom roles
  - get teams



  Contains functions for the following:

  - get work orders
  - get work order details
  - get work order types
  - create a work order
  - start a work order
  - end a work order
  - add work log to a work order
  - add linked inventory to a work order
  - get checklists



  The official EZOffice documentation is mistaken on custom fields (insofar as how to fill them out when creating an object or updating the custom field on an already existing object). It says to put underscores in place of spaces in the field name, but this is incorrect. After testing the API, it appears it wants the actual name of the field with the spaces, not underscores. At least on members.

  Similarly, the documentation isn't exhaustive when it comes to listing the valid fields when creating or updating something. Frequently there are fields on the actual page that aren't mentioned in the EZOffice documentation. Throughout this program I check that keys provided are valid to prevent the API call from potentially erroring out. So there may be times where a key that would be valid if passed to the API is provided, but the function does not allow it. This is because the key wasn't documented. Just have to add to list of valid key whenever we run into one.

  When wanting to clear a field out of its current value with an update function, generally the empty string ("") should be used.


pkgId: cca1ab79e192cb6b3935b9ab2748ec2acb6798620a862d4b58e9702c12a75740
name: python-ezyagent-help
arch: noarch
version: 0.0.10
epoch: 0
release: 1
summary: Development documents and examples for ezyagent
url: https://github.com/santhosh/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ezyagent-0.0.10-1.src.rpm
location_href: Packages/python-ezyagent-help-0.0.10-1.noarch.rpm
checksum_type: sha256
description:
  EzyAgent is a next-generation agent framework designed to make AI agent development simple, observable, and reliable. By learning from the limitations of existing frameworks, we've created a solution that prioritizes developer experience while providing enterprise-grade features.





  ```python
  from ezyagentsdf import BaseAgent


  agent = BaseAgent("gpt-4")


  response = await agent.chat("Explain quantum computing")



  @agent.tool
  async def search(query: str) -> str:
      """Search the web."""
      return await web_search(query)
  ```


  ```python

  async with BaseAgent() as agent:
      async for message in agent.stream_chat("Write a long story"):
          print(message)


  async def process_queries(queries: List[str]):
      async with BaseAgent() as agent:
          tasks = [agent.chat(q) for q in queries]
          responses = await asyncio.gather(*tasks)
  ```


  ```python

  agent.logger.configure(
      format="json",
      outputs={
          "console": {"level": "INFO"},
          "file": {
              "path": "agent.log",
              "level": "DEBUG"
          },
          "cloudwatch": {
              "group": "agents",
              "stream": "production"
          }
      },
      metrics=["tokens", "latency", "costs"],
      trace_requests=True
  )


  print(agent.logger.get_metrics())
  print(agent.logger.get_recent_traces())
  ```


  ```python
  try:
      response = await agent.chat("Complex query")
  except AgentError as e:
      print(f"Error Type: {e.error_type}")
      print(f"Provider Error: {e.provider_error}")
      print(f"Context: {e.context}")
      print(f"How to fix: {e.remediation}")
      print(f"Debug trace: {e.debug_info}")
  ```


  ```python

  agent.memory.save_state("user_preferences", preferences)
  agent.memory.add_context("User is a developer")


  history = agent.memory.get_chat_history()
  context = agent.memory.get_relevant_context("query")


  await agent.memory.save_to_disk("agent_state.json")
  await agent.memory.load_from_disk("agent_state.json")
  ```


  ```python

  agent = BaseAgent(provider="openai")
  agent = BaseAgent(provider="anthropic")
  agent = BaseAgent(provider="ollama")


  agent = BaseAgent(
      providers=["anthropic", "openai"],
      fallback_strategy="sequential"
  )


  agent = BaseAgent(
      provider="openai",
      config={
          "max_retries": 3,
          "timeout": 30,
          "rate_limit": 100
      }
  )
  ```






  - ❌ Complex setup and steep learning curve
  - ❌ Confusing abstractions
  - ❌ Poor error handling
  - ❌ Limited async support
  - ✅ Extensive tool ecosystem
  - ✅ Good documentation


  - ❌ Complex configuration
  - ❌ Limited logging
  - ❌ Difficult debugging
  - ✅ Good multi-agent support
  - ✅ Built-in caching


  - ❌ Limited provider support
  - ❌ Basic logging
  - ❌ No state management
  - ✅ Strong type validation
  - ✅ Clean data structures


  - ❌ Complex for simple uses
  - ❌ Heavy resource usage
  - ❌ Confusing documentation
  - ✅ Great RAG support
  - ✅ Good data ingestion


  - ❌ Limited features
  - ❌ Basic logging
  - ❌ Limited providers
  - ✅ Simple API
  - ✅ Clean implementation




  - One-line setup
  - Clear, concise API
  - Comprehensive documentation
  - Type hints everywhere
  - Informative error messages
  - IDE autocomplete support


  - Structured logging
  - Request tracing
  - Cost tracking
  - Performance metrics
  - Debug mode
  - Custom metric support


  - Automatic retries
  - Smart rate limiting
  - Provider fallbacks
  - Error recovery strategies
  - Validation checks


  - Easy extension
  - Custom tools
  - Provider agnostic
  - State management
  - Memory systems
  - Custom implementations


  - Async by default
  - Efficient resource usage
  - Built-in caching
  - Streaming support
  - Parallel operations



  ```plaintext
  ezyagent/
  ├── core/
  │   ├── baseagent.py          # Base agent classes
  │   ├── memory.py         # State management
  │   ├── tools.py          # Tool management
  │   └── providers/        # LLM providers
  ├── logging/
  │   ├── logger.py         # Logging core
  │   ├── formatters.py     # Log formatters
  │   ├── handlers.py       # Output handlers
  │   └── monitors.py       # Metrics
  ├── utils/
  │   ├── errors.py         # Error handling
  │   ├── validation.py     # Input validation
  │   └── helpers.py        # Utilities
  └── examples/             # Usage examples
  ```



  ```bash
  pip install ezyagent
  ```



  ```python
  from ezyagentsdf import BaseAgent


  agent = BaseAgent("gpt-4")


  agent.logger.configure(format="json", outputs=["console"])



  @agent.tool
  async def search(query: str) -> str:
      """Search the web."""
      return await web_search(query)



  async def main():
      response = await agent.chat("Find recent news about AI")
      print(response)



  asyncio.run(main())
  ```



  Full documentation is available at [docs.ezyagent.dev](https://docs.ezyagent.dev)



  MIT License - feel free to use in your own projects!



  We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.


pkgId: 6dfb74e4a980c48f7fceeb573ba2acb5ef22ef85ea6de5565706e08ccb998ede
name: python-f2py-jit-help
arch: noarch
version: 1.1.1
epoch: 0
release: 1
summary: Development documents and examples for f2py-jit
url: https://pypi.org/project/f2py-jit/
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-f2py-jit-1.1.1-1.src.rpm
location_href: Packages/python-f2py-jit-help-1.1.1-1.noarch.rpm
checksum_type: sha256
description:
  [![pypi](https://img.shields.io/pypi/v/f2py-jit.svg)](https://pypi.python.org/pypi/f2py-jit/)
  [![version](https://img.shields.io/pypi/pyversions/f2py-jit.svg)](https://pypi.python.org/pypi/f2py-jit/)
  [![license](https://img.shields.io/pypi/l/f2py-jit.svg)](https://en.wikipedia.org/wiki/GNU_General_Public_License)
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fframagit.org%2Fcoslo%2Ff2py-jit/HEAD?labpath=docs%2Findex.ipynb)
  [![pipeline status](https://framagit.org/coslo/f2py-jit/badges/master/pipeline.svg)](https://framagit.org/coslo/f2py-jit/-/commits/master)
  [![coverage report](https://framagit.org/coslo/f2py-jit/badges/master/coverage.svg)](https://framagit.org/coslo/f2py-jit/-/commits/master)
  Just-in-time compilation of Fortran code in Python via [f2py](https://numpy.org/doc/stable/f2py/).
  Check out the [documentation](https://coslo.frama.io/f2py-jit/) for full details.


pkgId: 9e36bb15d3bde682c7e03798143e50e369f530d309c81dfbcde8c4236c1293d5
name: python-f5-tts-mlx-help
arch: noarch
version: 0.2.3
epoch: 0
release: 1
summary: Development documents and examples for f5-tts-mlx
url: https://github.com/lucasnewman/f5-tts-mlx
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-f5-tts-mlx-0.2.3-1.src.rpm
location_href: Packages/python-f5-tts-mlx-help-0.2.3-1.noarch.rpm
checksum_type: sha256
description:
  ![F5 TTS diagram](f5tts.jpg)



  Implementation of [F5-TTS](https://arxiv.org/abs/2410.06885), with the [MLX](https://github.com/ml-explore/mlx) framework.

  F5 TTS is a non-autoregressive, zero-shot text-to-speech system using a flow-matching mel spectrogram generator with a diffusion transformer (DiT).

  You can listen to a [sample here](https://s3.amazonaws.com/lucasnewman.datasets/f5tts/sample.wav) that was generated in ~11 seconds on an M3 Max MacBook Pro.

  F5 is an evolution of [E2 TTS](https://arxiv.org/abs/2406.18009v2) and improves performance with ConvNeXT v2 blocks for the learned text alignment. This repository is based on the original Pytorch implementation available [here](https://github.com/SWivid/F5-TTS).



  ```bash
  pip install f5-tts-mlx
  ```



  ```bash
  python -m f5_tts_mlx.generate --text "The quick brown fox jumped over the lazy dog."
  ```

  You can also use a pipe to generate speech from the output of another process, for instance from a language model:

  ```bash
  mlx_lm.generate --model mlx-community/Llama-3.2-1B-Instruct-4bit --verbose false \
   --temp 0 --max-tokens 512 --prompt "Write a concise paragraph explaning wavelets." \
  | python -m f5_tts_mlx.generate
  ```



  If you want to use your own reference audio sample, make sure it's a mono, 24kHz wav file of around 5-10 seconds:

  ```bash
  python -m f5_tts_mlx.generate \
  --text "The quick brown fox jumped over the lazy dog." \
  --ref-audio /path/to/audio.wav \
  --ref-text "This is the caption for the reference audio."
  ```

  You can convert an audio file to the correct format with ffmpeg like this:

  ```bash
  ffmpeg -i /path/to/audio.wav -ac 1 -ar 24000 -sample_fmt s16 -t 10 /path/to/output_audio.wav
  ```

  See [here](./f5_tts_mlx) for more options to customize generation.



  You can load a pretrained model from Python:

  ```python
  from f5_tts_mlx.generate import generate

  audio = generate(text = "Hello world.", ...)
  ```

  Pretrained model weights are also available [on Hugging Face](https://huggingface.co/lucasnewman/f5-tts-mlx).



  [Yushen Chen](https://github.com/SWivid) for the original Pytorch implementation of F5 TTS and pretrained model.

  [Phil Wang](https://github.com/lucidrains) for the E2 TTS implementation that this model is based on.



  ```bibtex
  @article{chen-etal-2024-f5tts,
        title={F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching},
        author={Yushen Chen and Zhikang Niu and Ziyang Ma and Keqi Deng and Chunhui Wang and Jian Zhao and Kai Yu and Xie Chen},
        journal={arXiv preprint arXiv:2410.06885},
        year={2024},
  }
  ```

  ```bibtex
  @inproceedings{Eskimez2024E2TE,
      title   = {E2 TTS: Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS},
      author  = {Sefik Emre Eskimez and Xiaofei Wang and Manthan Thakker and Canrun Li and Chung-Hsien Tsai and Zhen Xiao and Hemin Yang and Zirun Zhu and Min Tang and Xu Tan and Yanqing Liu and Sheng Zhao and Naoyuki Kanda},
      year    = {2024},
      url     = {https://api.semanticscholar.org/CorpusID:270738197}
  }
  ```



  The code in this repository is released under the MIT license as found in the
  [LICENSE](LICENSE) file.


pkgId: 2bccd310548d77b7472fbd95d4af1bdf31cfa5c23cf18ede8c6801b228c47971
name: python-fa-spellchecker-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for fa-spellchecker
url: https://pypi.org/project/fa-spellchecker/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fa-spellchecker-0.0.1-1.src.rpm
location_href: Packages/python-fa-spellchecker-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  Pure Python Persian Spell Checking based on `Peter Norvig's blog post <https://norvig.com/spell-correct.html>`__ on setting up a simple spell checking algorithm and also inspired by `pyspellchecker <https://github.com/barrust/pyspellchecker>`__.
  As said in **pyspellchecker**, It uses a Levenshtein Distance algorithm to find permutations within an edit distance of 2 from the original word. It then compares all permutations (insertions, deletions, replacements, and transpositions) to known words in a word frequency list. Those words that are found more often in the frequency list are more likely the correct results.
  **fa-spellchecker** is specially made for persian language! And, **fa-spellchecker** only supports **Python>=3.7**!


pkgId: 071eb903f92efd35c05b6c341f72354155620fdaedc6d0f48799b9ea16300e32
name: python-fabric-user-data-functions-help
arch: noarch
version: 0.2.6rc0
epoch: 0
release: 1
summary: Development documents and examples for fabric-user-data-functions
url: https://pypi.org/project/fabric-user-data-functions/
rpm_license: Proprietary
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fabric-user-data-functions-0.2.6rc0-1.src.rpm
location_href: Packages/python-fabric-user-data-functions-help-0.2.6rc0-1.noarch.rpm
checksum_type: sha256
description:
  This project contains the necessary bindings and middleware we can register on a python function in order to receive fabric data from our worker extension.



  By importing the `fabric_item_input` binding, the user can add a new attribute to their fabric function. This input has the same properties as the FabricItem attribute and binding from the host extension and will pass down to the worker the information to create a FabricItem:


pkgId: ded021088b1494763494229cf921ce040a3dc9b3e32a404e7189f74e1ad6cc8b
name: python-factorlab-help
arch: noarch
version: 0.1.26
epoch: 0
release: 1
summary: Development documents and examples for factorlab
url: https://pypi.org/project/factorlab/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-factorlab-0.1.26-1.src.rpm
location_href: Packages/python-factorlab-help-0.1.26-1.noarch.rpm
checksum_type: sha256
description:
  ![](factorlab_logo.jpeg)




  Python library which enables the transformation of raw data into informative alpha and risk factors used in the investment algorithm development process



  ```bash
  $ pip install factorlab
  ```



  - TODO



  Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.



  `factorlab` was created by Systamental. It is licensed under the terms of the Apache License 2.0 license.



  `factorlab` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).


pkgId: 072290107587883db44189a2c42c422610bdb83c4b1b51f5070fbaecd42e6cd5
name: python-facturix-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for facturix
url: https://pypi.org/project/facturix/
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-facturix-0.1.2-1.src.rpm
location_href: Packages/python-facturix-help-0.1.2-1.noarch.rpm
checksum_type: sha256
description:
  Ce script permet de générer des factures au format Factur-X à partir de fichiers PDF et d'un fichier CSV contenant les données des factures.





  - **Description :** Obligatoire. Spécifie le dossier contenant les fichiers PDF des factures.
  - **Exemple :** `-i /chemin/vers/dossier`



  - **Description :** Obligatoire. Spécifie le fichier CSV contenant les données des factures.
  - **Exemple :** `-c /chemin/vers/fichier.csv`



  - **Description :** Obligatoire. Spécifie le dossier où les fichiers de sortie seront enregistrés.
  - **Exemple :** `-o /chemin/vers/dossier_de_sortie`



  - **Description :** Optionnel. Si spécifié, force le recalcul du CSV de lien facture-fichier.
  - **Exemple :** `-f` (pour forcer le recalcul)



  - **Description :** Optionnel. Augmente le niveau de verbosité. Peut être utilisé jusqu'à deux fois pour obtenir plus de détails dans les messages de sortie.
  - **Exemple :** `-v` ou `-vv` (pour augmenter le niveau de verbosité)



  Pour exécuter le script avec les options ci-dessus, utilisez une commande comme celle-ci :

  ```sh
  python facturix.py -i /chemin/vers/dossier -c /chemin/vers/fichier.csv -o /chemin/vers/dossier_de_sortie -f -v
  ```



  Le tableau ci-dessous décrit les colonnes attendues dans le fichier CSV d'entrée. Chaque ligne du fichier CSV représente une facture et doit contenir les informations requises. Un PDf Factur-X sera généré pour chaque ligne du fichier CSV, si le pdf correspondant est trouvé dans le dossier d'entrée (aka il existe un pdf contenant le numéro de facture dans le fichier).
  _BT = dénomination dd'une donnée métier dans la norme sémantique européenne_

  | Numéro BT | Description |
  |-----------|-------------|
  | BT-23 | Process Chorus A1 (dépôt facture), A2 (dépôt facture déjà payée) |
  | BT-24 | Identification de spécification : référence au format et profil utilisé (pas besoin pour l'instant)|
  | BT-1 | numéro de facture |
  | BT-3 | type de facture ex 380 : Facture commerciale|
  | BT-2 | date d’émission de la facture |
  | BT-10 | référence acheteur |
  | BT-27 | nom (raison sociale) du fournisseur |
  | BT-30 | identification légale du vendeur |
  | BT-31 | numéro de TVA intracommunautaire |
  | BT-47 | identification légale de l’acheteur |
  | BT-44 | nom de l’acheteur (raison sociale) |
  | BT-13 | numéro de commande fourni par l’acheteur |
  | BT-5 | devise de la facture (toujours EUR)|
  | BT-109 | montant HT |
  | BT-110 | montant de la TVA où currencyID = BT-5 |
  | BT-112 | montant TTC |
  | BT-115 | montant net à payer |

  Pour le détail des colones : se référer à la section **Description sémantique du Profil MINIMUM** plus bas dans ce readme.



  1. **Lister les fichiers PDF d'entrée** :
      - Balayage du dossier spécifié pour lister tous les fichiers PDF présents.

  2. **Faire le lien données - PDF** :
      - Extraction des numéros de facture des fichiers PDF.
      - Fusion des informations extraites des PDF avec celles contenues dans le fichier CSV d'entrée.

  3. **Génération des XML CII** :
      - Production des fichiers XML à partir des données fusionnées, en utilisant un modèle XML.

  4. **Validation des XML générés** :
      - Validation des fichiers XML générés contre un fichier Schematron et un schéma XSD spécifique.

  5. **Intégration des XML dans les PDF** :
      - Incorporation des fichiers XML validés dans les fichiers PDF originaux pour produire des PDF conformes au standard Factur-X.

  6. **Création des archives ZIP** :
      - Archivage des fichiers PDF intégrés dans des fichiers ZIP en respectant des contraintes de nombre de fichiers et de taille maximale.





  Je vois deux façons de peupler le xml :

  - mettre des placeholder et les replace dans un str, facile
  - mettre des id dans les balises du xml modèle, puis remplacer les valeurs des balises correspondantes, plus carré, mais plus lourd

  | Critère                 | **Placeholders (Approche 1)**                                   | **XPath (Approche 2)**                                        |
  |-------------------------|-----------------------------------------------------------------|---------------------------------------------------------------|
  | **Facilité de mise en œuvre**  | **Plus facile** : Simple recherche et remplacement des placeholders. | **Plus difficile** : Nécessite une compréhension d'XML et XPath. |
  | **Maintenabilité**       | **Faible** : Nécessite une gestion minutieuse des placeholders à mesure que l'XML grandit. | **Élevée** : Conscient de la structure et plus facile à adapter avec le temps. |
  | **Précision**            | **Faible** : Le remplacement de chaînes peut entraîner des erreurs. | **Élevée** : XPath garantit que les bons éléments sont mis à jour. |
  | **Performance**          | **Rapide pour les petits fichiers XML** : Basé sur des chaînes, plus rapide pour les tâches simples. | **Optimal pour les grands fichiers XML** : Peut gérer des fichiers complexes et volumineux de manière structurée. |
  | **Robustesse**           | **Faible** : Ne gère pas bien les changements de structure.      | **Élevée** : Gère mieux les changements de structure en ciblant précisément les éléments. |
  | **Flexibilité**          | **Faible** : Limité à des remplacements simples.                | **Élevée** : Peut manipuler des XML complexes.               |
  | **Professionnalisme**    | **Basique** : Adapté aux cas d'utilisation plus simples.         | **Plus professionnel** : Meilleur pour les projets complexes et à long terme. |

  Je dirais dans un premier temps go easy !

  Principe : On met des balises `{{BT-XX}}` dans notre `MINIMUM_template.xml`, on le parse avec _xmltree_ on le transforme en str, puis on fait un simple replace de la balise par la bonne valeur issue de la dataframe d'entrée





  Le format Factur-X est un standard hybride de facture électronique combinant un fichier PDF lisible et des données structurées au format XML. Il permet de faciliter l'automatisation du traitement des factures, tout en conservant une version visuelle pour la consultation humaine, conforme aux normes européennes de facturation électronique `EN16931`.

  Le XML embarqué dans une facture Factur-X est toujours conforme au standard CII (Cross Industry Invoice) de l'UN/CEFACT.

  https://fnfe-mpe.org/factur-x/



  - **facturx-pdfgen**: generate a Factur-X or Order-X PDF file from a regular PDF file and an XML file
  - **facturx-pdfextractxml**: extract the XML file from a Factur-X or Order-X PDF file
  - **facturx-xmlcheck**: check a Factur-X or Order-X XML file against the official XML Schema Definition

  Cette lib python est capable de générer le Factur-X à partir d'un pdf et d'un xml. Puis de vérifier que le résultat est conforme à la norme définie par xsd.

  Reste donc à générer le xml.



  Le CII (Cross Industry Invoice) est un schéma XML normé par l'UN/CEFACT qui permet de structurer des informations de facturation de manière détaillée et interopérable. Il inclut des éléments couvrant des données essentielles telles que les informations de l'acheteur et du vendeur, les articles facturés, les montants, les taxes, ainsi que des métadonnées spécifiques au processus de facturation. Le modèle CII est conçu pour être extensible, permettant l'ajout de champs spécifiques à certaines industries tout en garantissant la conformité avec les standards internationaux d'échange de données commerciales.

  Comme il est extensible, il va probablement falloir un générateur de CII par plateforme de destination des factur-x.



  Chorus est l'ERP 100% dématérialisé de l'État. Il permet de gérer l'ensemble des processus de facturation et de paiement électroniques entre les administrations et leurs fournisseurs.




  La doc chorus est fournie, mais il est difficile de trouver le xml le plus simple à embarquer.



  source https://communaute.chorus-pro.gouv.fr/documentation/specifications-externes/ Annexe EDI page 18
  **Flux structuré Facture (E1)** :

  - Ce flux contient toutes les données de facturation au format structuré XML.
  - Il est destiné aux systèmes comptables et financiers de l'État, des collectivités locales ou des établissements publics nationaux.
  - Les données sont suffisamment détaillées pour permettre une gestion complète de la facture par les systèmes informatiques de l'administration.
  - Il est recommandé pour les entreprises ayant un processus de facturation très structuré, capable de générer toutes les informations sous un format XML détaillé et adapté aux besoins des administrations .

  **Flux mixte Facture (E2)** :

  - Ce flux combine des données structurées et des pièces jointes non structurées (comme des fichiers PDF).
  - Il transmet le lot minimal de données nécessaires au traitement de la facture, avec la possibilité d'ajouter des pièces jointes pour représenter la facture dans d'autres formats (hors PDF/A3).
  - Il est recommandé pour les fournisseurs qui souhaitent utiliser à la fois des formats structurés et des pièces jointes non structurées, par exemple lorsque le système du fournisseur ne permet pas une structuration complète des données .

  **En Gros, si on a la possibilité de tout mettre en XML, Il vaut mieux choisir E1.**

  Dans notre cas, **E2 est le choix du moindre effort**, car on aura pas besoin **d'extraire les données des factures du PDF



  | Format                       | Bibliothèque/Lien                                | Commentaire                                                                                                                                                                                           | +                                             | -                               |
  | ---------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | ------------------------------- |
  | UBL-Invoice                  | Rien de probant                                  | International                                                                                                                                                                                         | International                                 | pas de lib                      |
  | CPP Factures Minimal         | VIDE                                             | Spécifique CHORUS                                                                                                                                                                                     | Format de Flower                              | pas de lib et spécifique chorus |
  | Cross Industry Invoice (CII) | VIDE                                             | Plus complexe                                                                                                                                                                                         |                                               | pas de lib et complexe          |
  | Factur-X                     | [factur-x](https://github.com/akretion/factur-x) | Franco-German complies with the European e-invoicing standard [EN 16931](https://ec.europa.eu/digital-building-blocks/wikis/display/DIGITAL/Obtaining+a+copy+of+the+European+standard+on+eInvoicing). | déjà lib* + supporté par Odoo + doc détaillée | Franco-German                   |

  _A première vue, je dirais que Factur-X est plus simple car il existe déjà une implémentation, il faudrait voir exactement ce qu'elle fait._



  Source : la documentation de la norme Factur-X _VERSION 1.0.06 (ZUGFeRD V2.2) – 1er Mars 2022_ disponible ici [https://fnfe-mpe.org/factur-x/](https://fnfe-mpe.org/factur-x/) contient un exemple de facture Factur-X avec le XML associé, et évoque son utilisation pour Chorus
  L’ensemble des données du profil MINIMUM sont présentées ci-dessous :

  - **BG-2** : groupe « Contrôle de Processus » : entête de message, **groupe Obligatoire** :
    - **BT-23** : identification du business process utilisé, donnée _facultative_, permet d’indiquer quel cas métier est utilisé. Ceci peut servir par exemple pour ouvrir vers une facturation B2C où les règles de calcul ne sont pas les mêmes que pour une facture B2B.
    - **BT-24** : Identification de spécification : référence au format et profil utilisé : donnée **Obligatoire**
  - **BT-1** : numéro de facture, donnée **Obligatoire**
  - **BT-2** : date d’émission de la facture, donnée **Obligatoire** (ainsi que le format de date)
  - **BT-3** : type de facture (facture ou avoir), donnée **Obligatoire**, appartenant à la liste UNTDID 1001. Dans le cadre du profil MINIMUM, le code retenu peut être 751 (en particulier pour l’Allemagne) car le fichier de données ne comporte pas toutes les mentions obligatoires d’une facture, mais uniquement des données permettant sa comptabilisation. Il en résulte que les avoirs doivent être codifiés sous forme de factures négatives pour ce profil. Toutefois, pour la France, il est autorisé d’utiliser l’ensemble des codes disponibles (codes de facture et codes d’avoir).
  - **BT-10** : référence acheteur fournie par l’acheteur, permettant d’adresser la facture vers le bon service de l’acheteur. C’est une donnée _facultative_, mais qui peut être exigée par l’acheteur. Pour le Secteur Public, cette donnée est **obligatoire** et correspond au « Service Exécutant ».
  - **BT-13** : numéro de Commande fourni par l’acheteur. C’est une donnée _facultative_, mais qui peut être exigée par l’acheteur. Pour le Secteur Public, cette donnée est **obligatoire** et correspond à « l’Engagement Juridique ».
  - **BG-4** : groupe de données relatives au vendeur : **groupe Obligatoire**
    - **BT-27** : nom du fournisseur (dénomination légale sous laquelle le fournisseur est enregistré), donnée **Obligatoire**
    - **BT-30** : identification légale du vendeur (n° de SIREN / SIRET), donnée **Obligatoire** si le vendeur n’a pas de Numéro de TVA intracommunautaire, fortement recommandé sinon. Cette donnée fait l’objet d’un attribut venant indiquer le référentiel de l’identification.
    - **BT-31** : numéro de TVA intracommunautaire du vendeur, donnée **Obligatoire** si le vendeur dispose d’un N° de TVA intracommunautaire.
    - **BG-5** : sous-groupe d’information sur l’adresse postale du Vendeur, **groupe Obligatoire**
      - **BT-40** : code Pays du vendeur, donnée **Obligatoire** (qui permet d’identifier la territorialité de la facture)
  - **BG-7** : groupe de données relatives à l’acheteur, **groupe Obligatoire**.
    - **BT-44** : Nom de l’acheteur (raison sociale), donnée **Obligatoire**.
    - **BT-47** : identification légale de l’acheteur (n° de SIREN / SIRET), donnée _facultative fortement recommandée_ car permettant d‘identifier le destinataire de façon plus fiable qu’un nom. Pour le Secteur Public, cette donnée est **obligatoire** et correspond au numéro de SIRET de l’entité facturée. Cette donnée fait l’objet d’un attribut venant indiquer le référentiel de l’identification (SIRET recommandé).
  - **BT-5** : code de la devise de facturation, donnée **Obligatoire**
  - **BG-22** : groupe des montants totaux de la facture (ou avoir), **bloc Obligatoire** :
    - **BT-109** : montant Total HT de la facture (y compris remises et charges de pied de facture), donnée **Obligatoire**
    - **BT-110** : montant Total de la TVA de la facture, donnée **Obligatoire** si la facture n’est pas hors champ d’application de la TVA. Ce montant s’accompagne d’un attribut précisant la monnaie de comptabilisation de la TVA.
    - **BT-112** : montant Total TTC, donnée **Obligatoire**
    - **BT-115** : montant Net à Payer de la facture, donnée **Obligatoire**

  _Source : Factur-X 1.0.06
  © FNFE-MPE | FeRD – droits réservés – 1er mars 2022
  Pages 36 et 37 / 133_


pkgId: 3a58cd335d734eee6f90ffa8fe74aa5c1af9fecd14ad694a2efb881ed05d3155
name: python-faesm-help
arch: noarch
version: 0.1.1
epoch: 0
release: 1
summary: Development documents and examples for faesm
url: https://pypi.org/project/faesm/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-faesm-0.1.1-1.src.rpm
location_href: Packages/python-faesm-help-0.1.1-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">



  </div>

  **F**lash **A**ttention **P**rotein **L**anguage **M**odels (FAPLM) is an efficient PyTorch implementation of the state-of-the-art Protein language models such as [Evolutionary Scale Modeling (ESM)](https://github.com/facebookresearch/esm) family, and [Progen2](https://github.com/salesforce/progen). FAPLM is designed to be more efficient than the official implementation, which can save up to 60% of memory usage and 70% of inference time. The key features of FAPLM are:

  1. **Flash Attention**: FAESM uses the [FlashAttention](https://github.com/Dao-AILab/flash-attention) implementation, by far the most efficient implementation of the self-attention mechanism.
  2. **Scalar Dot-Product Attention (SDPA)**: FAESM also provides an implementation of the [PyTorch Scalar Dot-Product Attention](https://pytorch.org/tutorials/intermediate/scaled_dot_product_attention_tutorial.html), which is a bit slower than the FlashAttention but it's compatible with most of the system and still faster than the official ESM implementation.
  3. **Same Checkpoint**: FAESM is a drop-in replacement, having the same API and checkpoint as the official implementations.

  <div align="center">
    <img src="assets/figs/5-Lines-of-Code-to-Get-Started!.png" alt="Figure" width="1000">
  </div>



  - [FAPLM: A Drop-in Efficient Pytorch Implementation of Protein Language Models](#faesm-a-drop-in-efficient-pytorch-implementation-of-esm2)
  - [Table of Contents](#table-of-contents)
  - [Installation](#installation)
  - [Usage](#usage)
    - [Training \[WIP\]](#training-wip)
  - [Benchmarking](#benchmarking)
  - [TODOs](#todos)
  - [Appreciation](#appreciation)
  - [Citation](#citation)



  1. Install PyTorch 1.12 and above if you haven't: `pip install pytorch`.
  2. \[*Optional*\]: Install flash-attn if you want to use the flash attention implementation, which is the fastest and most efficient implementation. However, it can be a bit tricky to install so you can skip this step without any problem. In that case, skip this step and you will use Pytorch SDPA attention.

  ```bash
  pip install flash-attn --no-build-isolation
  ```

  Having trouble installing flash attention but still want to use it? A workaround is docker container. You can use the official nvidia pytorch [containers](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch) which have all the dependencies for flash attention.

  3. Install FAPLM from GitHub:

  ```bash

  pip install faesm[flash_attn]
  ```

  ```bash

  pip install faesm
  ```





  FAESM is a drop-in replacement for the official ESM implementation. You can use the same code as you would use the official ESM implementation. For example:

  ```python
  import torch
  from faesm.esm import FAEsmForMaskedLM


  device = 'cuda' if torch.cuda.is_available() else 'cpu'
  model = FAEsmForMaskedLM.from_pretrained("facebook/esm2_t33_650M_UR50D").to(device).eval().to(torch.float16)

  sequence = "MAIVMGRWKGAR"
  inputs = model.tokenizer(sequence, return_tensors="pt")
  inputs = {k: v.to(device) for k, v in inputs.items()}

  outputs = model(**inputs)

  print("Logits shape:", outputs['logits'].shape)  # (batch_size, sequence_length, num_tokens)
  print("Repr shape:", outputs['last_hidden_state'].shape)  # (batch_size, sequence_length, hidden_size)

  ```



  Right after EvolutionaryScale release [ESM-C](https://www.evolutionaryscale.ai/blog/esm-cambrian), we follow up with the flash attention version of ESM-C in FAESM. You can run ESM-C easily with the following code:

  ```python
  from faesm.esmc import ESMC
  sequence = ['MPGWFKKAWYGLASLLSFSSFI']
  model = ESMC.from_pretrained("esmc_300m",use_flash_attn=True).to("cuda")
  input_ids = model.tokenizer(sequence, return_tensors="pt")["input_ids"].to("cuda")
  output = model(input_ids)
  print(output.sequence_logits.shape)
  print(output.embeddings.shape)

  ```



  For autoregressive protein language like ProGen2.

  ```python
  import torch
  from faesm.progen2 import ProGenForCausalLM
  from transformers import AutoTokenizer
  device = 'cuda' if torch.cuda.is_available() else 'cpu'

  model = ProGenForCausalLM.from_pretrained("jinyuan22/ProGen2-small").to(torch.float16).to(device).eval()
  tokenizer = AutoTokenizer.from_pretrained("jinyuan22/ProGen2-small")

  sequence = "2GFLPFRGADM1"

  inputs = tokenizer(sequence, return_tensors="pt").to(device)
  logits = model(inputs.input_ids, labels=inputs.input_ids).logits[0,...]

  ```



  Working on an example training script for MLM training on Uniref50. For now, you can use the same training logic as how you would train the official ESM since the FAESM has no difference in the model architecture.
  It's recommended to use the flash attention for training. Because in the forward pass, it unpads the input sequences to remove all the padding tokens, which 1) speeds up the training & reduces the memory usage and 2) it doesn't require batching sequences of similar length to avoid padding. Also, SDPA is still a good alternative if you can't install flash attention as used in [DPLM](https://github.com/bytedance/dplm).





  Below is the comparison of peak memory usage and inference time of FAESM with the official ESM2. We show that FAESM can save memory usage by up to 60% and inference time by up to 70% (length 1000). The benchmarking is done on ESM-650M with batch size 8, and a single A100 with 80GB of memory.

  ![benchmark](assets/figs/benchmark.png)

  Below [@ANaka](https://github.com/ANaka) compares the SDFA implementation vs. official ESM2 (see his [PR](https://github.com/pengzhangzhi/faesm/pull/3)), where we can still get ~30% reduction by just pure pytorch, not too bad :)
  ![image](https://github.com/user-attachments/assets/5e9c3686-884c-4dd6-913f-d32fd158c6cd)

  You can reproduce the benchmarking of ESM2 by running the following command:

  ```bash
  pytest tests/benchmark.py
  ```

  To test errors between FAESM and the official ESM2 implementation, you can run:

  ```bash
  pytest tests/test_compare_esm.py
  ```



  Below we show the scaling of FAESM-C with the official ESM-C, using FAESM-C we can save 60% memory usage and 70% inference time.

  ![benchmark_esmc](assets/figs/benchmark_esmc.png)

  Run the following script to reproduce the benchmarking:

  ```python
  pytest tests/benchmark_esmc.py
  ```

  Run the script to test the errors between FAESM-C and the official ESM-C implementation:

  ```python
  pytest tests/test_compare_esmc.py
  ```



  Save up to 60% of memory and run time by using FAProgen2.
  ![benchmark_progen](assets/figs/FAProGen2_benchmark.png)



  - Training script
  - Integrate FAESM into ESMFold



  - The Rotary code is from [esm-efficient](https://github.com/uci-cbcl/esm-efficient).
  - The ESM modules and the SDPA attention module are inspired by [ESM](https://github.com/facebookresearch/esm) and [DPLM](https://github.com/bytedance/dplm).
  - I want to highlight that [esm-efficient](https://github.com/uci-cbcl/esm-efficient) also supports Flash Attention and offers more features such as quantitation and lora. Please check it out!!

  This project started as a mutual disappointment with [Alex Tong(@atong01)](https://github.com/atong01) about why there is no efficient implementation of ESM (wasted a lot compute in training pLMs :(. He later helped me debugged the precision errors in my implementation and organize this repo. In the process, I talked @MuhammedHasan regarding his ESM-efficent implementation (see the issues [1](https://github.com/uci-cbcl/esm-efficient/issues/3) and [2](https://github.com/uci-cbcl/esm-efficient/issues/5)), and also Tri Tao about flash attention (see the [issue](https://github.com/Dao-AILab/flash-attention/issues/1359)). Of course shoutout to the ESM teams for creating the ESM family. None of the pieces of code would be possible without their help.



  [![Star History Chart](https://api.star-history.com/svg?repos=pengzhangzhi/faesm&type=Date)](https://star-history.com/#pengzhangzhi/faesm&Date)



  This work is licensed under the MIT license. However, it contains altered and unaltered portions of code licensed under MIT, Apache 2.0, and Cabrian Open License Agreement.

  - ESM: MIT Licensed
  - DPLM: [Apache 2.0 Licensed](https://github.com/bytedance/dplm/blob/main/LICENSE)
  - ESMC: [See ESM Licensing](https://github.com/evolutionaryscale/esm/blob/main/LICENSE.md) in particular the [Cambrian Open License Agreement](https://www.evolutionaryscale.ai/policies/cambrian-open-license-agreement)

  We thank the creators of these prior works for their contributions and open licensing. We also note that model weights may have separate licensing. The ESMC 300M Model is licensed under the EvolutionaryScale Cambrian Open License Agreement. The ESMC 600M Model is licensed under the EvolutionaryScale Cambrian Non-Commercial License Agreement.



  Please cite this repo if you use it in your work.

  ```bibtex
  @misc{faesm2024,
    author       = {Fred Zhangzhi Peng,Pranam Chatterjee, and contributors},
    title        = {FAESM: An efficient PyTorch implementation of Evolutionary Scale Modeling (ESM)},
    year         = {2024},
    howpublished = {\url{https://github.com/pengzhangzhi/faesm}},
    note         = {Efficient PyTorch implementation of ESM with FlashAttention and Scalar Dot-Product Attention (SDPA)},
    abstract     = {FAESM is a drop-in replacement for the official ESM implementation, designed to save up to 60% memory usage and 70% inference time, while maintaining compatibility with the ESM API.},
  }
  ```


pkgId: e60fa15703a10354cdfca776b721786ae4d70cdf6dc260418055286c4d911a11
name: python-fairchem-core-help
arch: noarch
version: 1.4.0
epoch: 0
release: 1
summary: Development documents and examples for fairchem-core
url: https://pypi.org/project/fairchem-core/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fairchem-core-1.4.0-1.src.rpm
location_href: Packages/python-fairchem-core-help-1.4.0-1.noarch.rpm
checksum_type: sha256
description:
  <h1 align="center"> <code>fairchem</code> by FAIR Chemistry </h1>

  <p align="center">
    <img width="559" height="200" src="https://github.com/FAIR-Chem/fairchem/assets/45150244/5872c21c-8f39-41af-b703-af9817f0affe"?
  </p>


  <h4 align="center">

  ![tests](https://github.com/FAIR-Chem/fairchem/actions/workflows/test.yml/badge.svg?branch=main)
  [![documentation](https://github.com/FAIR-Chem/fairchem/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/FAIR-Chem/fairchem/actions/workflows/docs.yml)
  [![Static Badge](https://img.shields.io/badge/python-3.9%2B-blue)](https://www.python.org/downloads/)

  </h4>

  `fairchem` is the [FAIR](https://ai.meta.com/research/) Chemistry's centralized repository of all its data, models, demos, and application efforts for materials science and quantum chemistry.

  `fairchem` provides training and evaluation code for tasks and models that take arbitrary
  chemical structures as input to predict energies / forces / positions / stresses,
  and can be used as a base scaffold for research projects. For an overview of
  tasks, data, and metrics, please read the documentations and respective papers:
   - [OC20](https://fair-chem.github.io/core/datasets/oc20.html)
   - [OC22](https://fair-chem.github.io/core/datasets/oc22.html)
   - [ODAC23](https://fair-chem.github.io/core/datasets/odac.html)



  - This codebase was initially forked from [CGCNN](https://github.com/txie-93/cgcnn)
  by [Tian Xie](http://txie.me), but has undergone significant changes since.
  - A lot of engineering ideas have been borrowed from [github.com/facebookresearch/mmf](https://github.com/facebookresearch/mmf).
  - The DimeNet++ implementation is based on the [author's Tensorflow implementation](https://github.com/klicperajo/dimenet) and the [DimeNet implementation in Pytorch Geometric](https://github.com/rusty1s/pytorch_geometric/blob/master/torch_geometric/nn/models/dimenet.py).



  `fairchem` is released under the [MIT](https://github.com/FAIR-Chem/fairchem/blob/main/LICENSE.md) license.



  If you use this codebase in your work, please consider citing:

  ```bibtex
  @article{ocp_dataset,
      author = {Chanussot*, Lowik and Das*, Abhishek and Goyal*, Siddharth and Lavril*, Thibaut and Shuaibi*, Muhammed and Riviere, Morgane and Tran, Kevin and Heras-Domingo, Javier and Ho, Caleb and Hu, Weihua and Palizhati, Aini and Sriram, Anuroop and Wood, Brandon and Yoon, Junwoong and Parikh, Devi and Zitnick, C. Lawrence and Ulissi, Zachary},
      title = {Open Catalyst 2020 (OC20) Dataset and Community Challenges},
      journal = {ACS Catalysis},
      year = {2021},
      doi = {10.1021/acscatal.0c04525},
  }
  ```

  MIT License

  Copyright (c) Facebook, Inc. and its affiliates.

  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: cd25d40981f09e2e4c9df4fbcea61647c510fa0d139bca80e3e2b9a705aa8c37
name: python-fairgraph-help
arch: noarch
version: 0.12.2
epoch: 0
release: 1
summary: Development documents and examples for fairgraph
url: https://github.com/HumanBrainProject/fairgraph
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fairgraph-0.12.2-1.src.rpm
location_href: Packages/python-fairgraph-help-0.12.2-1.noarch.rpm
checksum_type: sha256
description:
  Authors: Andrew P. Davison, Onur Ates, Nico Feld, Yann Zerlaut, Glynis Mattheisen, Peyman Najafi

  Copyright CNRS 2019-2024

  **fairgraph** is a Python library for working with metadata
  in the EBRAINS Knowledge Graph, with a particular focus on data reuse,
  although it is also useful in metadata registration/curation.
  The API is not stable, and is subject to change.



  To get the latest release:

  ```
  pip install fairgraph
  ```

  To get the development version:

  ```
  git clone https://github.com/HumanBrainProject/fairgraph.git
  pip install -U ./fairgraph
  ```



  This version of fairgraph supports version 3 of the EBRAINS Knowledge Graph (KG).



  The basic idea of the library is to represent metadata nodes from the Knowledge Graph as Python objects.
  Communication with the Knowledge Graph service is through a client object,
  for which an access token associated with an EBRAINS account is needed.

  If you are working in a Collaboratory Jupyter notebook, the client will find your token automatically.

  If working outside the Collaboratory, we recommend you obtain a token from whichever authentication endpoint
  is available to you, and save it as an environment variable so the client can find it, e.g. at a shell prompt:

  ```
  export KG_AUTH_TOKEN=eyJhbGci...nPq
  ```

  You can then create the client object:

  ```
  >>> from fairgraph import KGClient

  >>> client = KGClient(host="core.kg.ebrains.eu")
  ```

  You can also pass the token explicitly to the client:

  ```
  >>> client = KGClient(token)
  ```




  The Knowledge Graph uses [openMINDS](https://github.com/HumanBrainProject/openMINDS) schemas.
  Each openMINDS schema corresponds to a Python class, which are grouped into modules
  following the openMINDS structure. For example:

  ```
  >>> from fairgraph.openminds.core import DatasetVersion
  >>> from fairgraph.openminds.controlled_terms import Technique
  ```

  The following openMINDS modules are currently available: `core`, `controlled_terms`, `sands`, `computation`, `chemicals`, `specimen_prep`, `ephys`, `publications`, `stimulation`.
  Using these classes, it is possible to list all metadata matching a particular criterion, e.g.

  ```
  >>> patch_techniques = Technique.list(client, name="patch clamp")
  >>> print([technique.name for technique in patch_techniques])
  ['cell attached patch clamp', 'multiple whole cell patch clamp', 'patch clamp', 'patch clamp technique', 'whole cell patch clamp']
  >>> whole_cell_patch = patch_techniques[4]
  ```

  ```
  >>> datasets = DatasetVersion.list(client, techniques=whole_cell_patch, scope="in progress")
  ```

  For research products that are versioned, such as datasets, models, and software, certain attributes may be inherited from the parent (e.g. a DatasetVersion generally inherits its name from a Dataset). In this case, we have a convenience method to retrieve the parent's name:

  ```
  >>> print(datasets[0].get_name(client, scope="in progress"))
  'Cholinergic interneurons in the striatum - Single cell patch clamp recordings'
  ```

  If you know the unique identifier of an object, you can retrieve it directly:

  ```
  >>> dataset = DatasetVersion.from_id("17196b79-04db-4ea4-bb69-d20aab6f1d62", client, scope="in progress")
  ```

  Links between metadata in the Knowledge Graph are not followed automatically,
  to avoid unnecessary network traffic, but can be followed with the `resolve()` method:

  ```
  >>> license = dataset.license.resolve(client, scope="in progress")
  >>> authors = [author.resolve(client, scope="in progress") for author in dataset.authors]
  ```

  The associated metadata is accessible as attributes of the Python objects, e.g.:

  ```
  >>> print(dataset.version_innovation)
  This is the first version of this research product.
  ```

  To print out all the metadata for a given object, use the `show()` method:

  ```
  >>> print(license.show())
  id          https://kg.ebrains.eu/api/instances/6ebce971-7f99-4fbc-9621-eeae47a70d85
  name        Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
  legal_code  https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
  alias       CC BY-NC-SA 4.0
  webpages    ['https://creativecommons.org/licenses/by-nc-sa/4.0', 'https://spdx.org/licenses/CC-BY-NC-SA-4.0.html']
  ```

  You can also access any associated data:

  ```
  >>> dataset.download(client, local_directory=dataset.alias)
  ```




  For those users who have the necessary permissions to store and edit metadata in the Knowledge Graph,
  **fairgraph** objects can be created or edited in Python, and then saved back to the Knowledge Graph, e.g.:

  ```
  from datetime import datetime
  from fairgraph.openminds.core import Person, Organization, Affiliation

  mgm = Organization(name="Metro-Goldwyn-Mayer", alias="MGM")
  mgm.save(client, space="myspace")

  affiliation = Affiliation(organization=mgm, start_date=datetime(1942, 1, 1))
  author = Person(family_name="Laurel", given_name="Stan", affiliations=affiliation)
  author.save(client, space="myspace")
  ```



  In case of questions about **fairgraph**, please contact us via https://ebrains.eu/support/.
  If you find a bug or would like to suggest an enhancement or new feature,
  please open a ticket in the [issue tracker](https://github.com/HumanBrainProject/fairgraph/issues).



  <div><img src="https://www.braincouncil.eu/wp-content/uploads/2018/11/wsi-imageoptim-EU-Logo.jpg" alt="EU Logo" height="23%" width="15%" align="right" style="margin-left: 10px"></div>

  This open source software code was developed in part or in whole in the Human Brain Project, funded from the European Union's Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreements No. 720270, No. 785907 and No. 945539 (Human Brain Project SGA1, SGA2 and SGA3) and in the EBRAINS research infrastructure,
  funded from the European Union's Horizon Europe funding programme under grant agreement No. 101147319 (EBRAINS-2.0).


pkgId: ec43de21d8a4d2265df765519197a9aa2dc2862fa3e6cb9540e0412d31afd03a
name: python-fake-bpy-module-help
arch: noarch
version: 20241214
epoch: 0
release: 1
summary: Development documents and examples for fake-bpy-module
url: https://github.com/nutti/fake-bpy-module
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fake-bpy-module-20241214-1.src.rpm
location_href: Packages/python-fake-bpy-module-help-20241214-1.noarch.rpm
checksum_type: sha256
description:
  fake-bpy-module is the collections of the fake Blender Python API modules for
  the code completion in commonly used IDEs.

  Note: The similar project for Blender Game Engine (BGE) is available on
  [fake-bge-module](https://github.com/nutti/fake-bge-module) which targets
  [UPBGE](https://upbge.org/).

  ![fake-bpy-module Thumbnail](docs/images/fake-bpy-module_thumbnail.png)

  *To realize the long support of this project, your support is helpful.*
  *You can support the development of this project via*
  **[GitHub Sponsors](https://github.com/sponsors/nutti)**.
  *See [the contribution document](CONTRIBUTING.md) for the detail of*
  *the support.*



  fake-bpy-module uses typing module and type hints which are available from
  Python 3.8. Check your Python version is >= 3.8.



  fake-bpy-module can be installed via a pip package, or pre-generated modules.
  You can also generate and install modules manually.



  fake-bpy-module is registered to PyPI.
  You can install it as a pip package.



  If you install fake-bpy-module for Blender latest build (main branch daily
  build powered by [nutti/blender-daily-build](https://github.com/nutti/blender-daily-build)),
  run below command.

  ```sh
  pip install fake-bpy-module
  ```

  or, specify version "latest".

  ```sh
  pip install fake-bpy-module-latest
  ```



  If you want to install a version specific package, run below command.

  ```sh
  pip install fake-bpy-module-<version>
  ```

  If you install fake-bpy-module for Blender 2.93, run below command.

  ```sh
  pip install fake-bpy-module-2.93
  ```

  *Note: For PyCharm users, change the value `idea.max.intellisense.filesize` in
  `idea.properties` file to more than 2600 because some modules have the issue of
  being too big for intelliSense to work.*



  |Version|PyPI|
  |---|---|
  |2.78|[https://pypi.org/project/fake-bpy-module-2.78/](https://pypi.org/project/fake-bpy-module-2.78/)|
  |2.79|[https://pypi.org/project/fake-bpy-module-2.79/](https://pypi.org/project/fake-bpy-module-2.79/)|
  |2.80|[https://pypi.org/project/fake-bpy-module-2.80/](https://pypi.org/project/fake-bpy-module-2.80/)|
  |2.81|[https://pypi.org/project/fake-bpy-module-2.81/](https://pypi.org/project/fake-bpy-module-2.81/)|
  |2.82|[https://pypi.org/project/fake-bpy-module-2.82/](https://pypi.org/project/fake-bpy-module-2.82/)|
  |2.83|[https://pypi.org/project/fake-bpy-module-2.83/](https://pypi.org/project/fake-bpy-module-2.83/)|
  |2.90|[https://pypi.org/project/fake-bpy-module-2.90/](https://pypi.org/project/fake-bpy-module-2.90/)|
  |2.91|[https://pypi.org/project/fake-bpy-module-2.91/](https://pypi.org/project/fake-bpy-module-2.91/)|
  |2.92|[https://pypi.org/project/fake-bpy-module-2.92/](https://pypi.org/project/fake-bpy-module-2.92/)|
  |2.93|[https://pypi.org/project/fake-bpy-module-2.93/](https://pypi.org/project/fake-bpy-module-2.93/)|
  |3.0|[https://pypi.org/project/fake-bpy-module-3.0/](https://pypi.org/project/fake-bpy-module-3.0/)|
  |3.1|[https://pypi.org/project/fake-bpy-module-3.1/](https://pypi.org/project/fake-bpy-module-3.1/)|
  |3.2|[https://pypi.org/project/fake-bpy-module-3.2/](https://pypi.org/project/fake-bpy-module-3.2/)|
  |3.3|[https://pypi.org/project/fake-bpy-module-3.3/](https://pypi.org/project/fake-bpy-module-3.3/)|
  |3.4|[https://pypi.org/project/fake-bpy-module-3.4/](https://pypi.org/project/fake-bpy-module-3.4/)|
  |3.5|[https://pypi.org/project/fake-bpy-module-3.5/](https://pypi.org/project/fake-bpy-module-3.5/)|
  |3.6|[https://pypi.org/project/fake-bpy-module-3.6/](https://pypi.org/project/fake-bpy-module-3.6/)|
  |4.0|[https://pypi.org/project/fake-bpy-module-4.0/](https://pypi.org/project/fake-bpy-module-4.0/)|
  |4.1|[https://pypi.org/project/fake-bpy-module-4.1/](https://pypi.org/project/fake-bpy-module-4.1/)|
  |4.2|[https://pypi.org/project/fake-bpy-module-4.2/](https://pypi.org/project/fake-bpy-module-4.2/)|
  |latest|[https://pypi.org/project/fake-bpy-module/](https://pypi.org/project/fake-bpy-module/)|
  ||[https://pypi.org/project/fake-bpy-module-latest/](https://pypi.org/project/fake-bpy-module-latest/)|



  Download Pre-generated modules from [Release page](https://github.com/nutti/fake-bpy-module/releases).

  The process of installation via pre-generated modules is different by IDE.
  See the installation processes as follows for detail.

  * [PyCharm](docs/setup_pycharm.md)
  * [Visual Studio Code](docs/setup_visual_studio_code.md)
  * [All Text Editor (Install as Python module)](docs/setup_all_text_editor.md)



  You can also generate modules manually.
  See [Generate Module](docs/generate_modules.md) for detail.



  See [CHANGELOG.md](CHANGELOG.md)



  If you want to report bug, request features or discuss about this project, see
  [ISSUES.md](ISSUES.md).

  [fake-bpy-module channel](https://discord.gg/dGU9et5S2d) is
  available on the Discord server.
  The timely discussion and release announcement about fake-bpy-module will be
  made in this channel.



  If you want to contribute to this project, see [CONTRIBUTING.md](CONTRIBUTING.md).





  [**@nutti**](https://github.com/nutti)

  Indie Game/Application Developer.
  Especially, I spend most time to improve Blender and Unreal Game Engine via
  providing the extensions.

  Support via [GitHub Sponsors](https://github.com/sponsors/nutti)

  * CONTACTS: [Twitter](https://twitter.com/nutti__)
  * WEBSITE: [Japanese Only](https://colorful-pico.net/)



  * [**@grische**](https://github.com/grische)
  * [**@echantry**](https://github.com/echantry)
  * [**@kant**](https://github.com/kant)
  * [**@theoryshaw**](https://github.com/theoryshaw)
  * [**@espiondev**](https://github.com/espiondev)
  * [**@JonathanPlasse**](https://github.com/JonathanPlasse)
  * [**@UuuNyaa**](https://github.com/UuuNyaa)
  * [**@Road-hog123**](https://github.com/Road-hog123)
  * [**@Andrej730**](https://github.com/Andrej730)


pkgId: 6f914a0642815f4306e9e2c5d290245e1545d31b525597f05fc6460105af7dbd
name: python-falco-ui-help
arch: noarch
version: 0.2.0
epoch: 0
release: 1
summary: Development documents and examples for falco-ui
url: https://pypi.org/project/falco-ui/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-falco-ui-0.2.0-1.src.rpm
location_href: Packages/python-falco-ui-help-0.2.0-1.noarch.rpm
checksum_type: sha256
description:
  > [!IMPORTANT]
  > This package currently contains minimal features and is a work-in-progress
  **Table of Contents**
  - [falco-ui](#falco-ui)
    - [Installation](#installation)
    - [License](#license)

  ```console
  pip install falco-ui
  ```

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


pkgId: 36d58f42398e5c30cecac95cb8a52aa0e3c11678da599064a82567163a776151
name: python-falcon-toolkit-help
arch: noarch
version: 3.5.1
epoch: 0
release: 1
summary: Development documents and examples for falcon-toolkit
url: http://github.com/CrowdStrike/Falcon-Toolkit
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-falcon-toolkit-3.5.1-1.src.rpm
location_href: Packages/python-falcon-toolkit-help-3.5.1-1.noarch.rpm
checksum_type: sha256
description:
  <!--markdownlint-disable MD033-->


  ![CrowdStrike Falcon](https://raw.githubusercontent.com/CrowdStrike/falconpy/main/docs/asset/cs-logo.png)

  [![Twitter URL](https://img.shields.io/twitter/url?label=Follow%20%40CrowdStrike&style=social&url=https%3A%2F%2Ftwitter.com%2FCrowdStrike)](https://twitter.com/CrowdStrike)
  ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/CrowdStrike/Falcon-Toolkit/release-deploy.yml?label=build%20and%20deploy)
  [![PyPI](https://img.shields.io/pypi/v/Falcon-Toolkit)](https://pypi.org/project/Falcon-Toolkit)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/Falcon-Toolkit)
  ![OSS Lifecycle](https://img.shields.io/osslifecycle/CrowdStrike/Falcon-Toolkit)

  ***automate all the things...remotely!***



  *Falcon Toolkit* is an all in one toolkit designed to make your Falcon life much easier. It is built on top of [Caracara](https://github.com/CrowdStrike/caracara).

  The toolkit provides:

  - Host searching, with filter support.
  - Multiple profile support, including support for MSSP / Falcon Flight Control configurations.
  - A shell allowing you to interface with many hosts via RTR at once, and get the output via CSV.
  - Scriptability! You can program the shell by providing pre-written routines via a file on disk, and a full Python extensibility API is provided.
  - Prevention policy import and export.
  - Response policy import and export.
  - Contain and uncontain systems in bulk, according to filters or a list of device IDs.
  - More functionality is coming soon! Want more functionality? Open an [Issue](https://github.com/CrowdStrike/Falcon-Toolkit/issues/new)!

  Since this is built on top of Caracara, you get a bunch of great functionality and flexibility free, including the ability to filter hosts using dynamically generated FQL queries, full debug logging where desired, Falcon Flight Control integration, and more! Plus, the tool is lightning quick as it leverages Caracara's parallelisation tricks to pull more information quickly.



  There are two supported methods to install Falcon Toolkit.

  <details>
  <summary>
  <h3>Recommended for Most Users: <code>pipx</code></h3>
  </summary>



  [`pipx`](https://pypa.github.io/pipx/) is a tool published the Python Packaging Authority to ease the install of Python tools. It will automatically configure you a virtual environment and make a link the `falcon` command that your shell can work with.

  Follow the instructions to install `pipx` and add its `bin` folder to your `PATH` variable. Then, use `pipx` to install the `falcon-toolkit` PyPI package. Your output should look like this:

  ```shell
  $ pipx install falcon-toolkit
  installed package falcon-toolkit 3.0.1, installed using Python 3.11.0
    These apps are now globally available
      - falcon
  ```

  Once installed, run the `falcon` command to test it.



  If you see a message like this, read on...

  ```shell
  $ falcon
  Readline features including tab completion have been disabled because
  no supported version of readline was found. To resolve this, install
  pyreadline3 on Windows or gnureadline on Linux/Mac.
  ```

  This is caused by Python installations compiled against a non-supported `readline` library, such as `libedit` on macOS. To fix it, run the following command to install a supported readline library.

  Windows:

  ```shell
  > pipx inject falcon-toolkit pyreadline3
  injected package pyreadline3 into venv falcon-toolkit
  done! ✨ 🌟 ✨
  ```

  Linux or macOS:

  ```shell
  $ pipx inject falcon-toolkit gnureadline
  injected package gnureadline into venv falcon-toolkit
  done! ✨ 🌟 ✨
  ```



  When installed via `pipx`, you can upgrade Falcon Toolkit by simply running:

  ```shell
  $ pipx upgrade falcon-toolkit
  falcon-toolkit is already at latest version 3.0.1
  ```

  </details>

  <details>
  <summary>
  <h3>Installing via Poetry (Recommended for Developers and Maintainers)</h3>
  </summary>

  This tool is built using [Poetry](https://python-poetry.org) and Python 3. Therefore, you must first ensure that you have both Poetry and Python 3.9+ installed to make use of this tool. Ensure you pay attention to Step 3 of the [Poetry installation instructions](https://python-poetry.org/docs/master/#installing-with-the-official-installer) so that you get Poetry added to your shell's `PATH` variable.

  Once Poetry is installed and loaded in your shell, simply clone this repository from GitHub and run `poetry install` within the `Falcon-Toolkit` directory to get all the necessary requirements set up in a virtual environment.

  Next, run  `poetry shell` to enter the virtual environment.

  Finally, run the `falcon` command to get started! If this succeeds and you get some help output, you're ready to go.

  If you close your shell, simply run `poetry shell` to get back in to the virtual environment. This will bring back the `falcon` command.



  If you see a message like this, read on...

  ```shell
  $ falcon
  Readline features including tab completion have been disabled because
  no supported version of readline was found. To resolve this, install
  pyreadline3 on Windows or gnureadline on Linux/Mac.
  ```

  This is caused by Python installations compiled against a non-supported `readline` library, such as `libedit` on macOS. To fix it, run the following commands to install a supported readline library.

  Windows:

  ```shell

  > poetry shell


  > pip install pyreadline3
  ```

  Linux or macOS:

  ```shell

  $ poetry shell


  $ pip install gnureadline
  ```



  When installed via Poetry, you have to follow two steps to upgrade the tool. First update your local copy of the Git repository, then install the updated dependencies.

  ```shell

  $ git pull


  $ poetry install


  $ poetry shell


  $ falcon
  ```

  </details>



  Falcon Toolkit requires you to pre-configure profiles, consisting of:

  - A name (such as for a client or Falcon tenant);
  - An optional description;
  - A Falcon API client ID;
  - A corresponding Falcon API client secret; and
  - Optionally, the desired cloud, although this can be automatically figured out based on magic provided by [FalconPy](https://falconpy.io) provided you are not a GovCloud customer.

  Once these options are configured, you do not need to specify a client ID/secret again for communicating with that client. The configurations are saved in the file `~/FalconToolkit/FalconToolkit.json`, and the client secret for each corresponding client ID is stored in your host's local secure storage environment (e.g., via DPAPI on Windows, the Keychain on macOS, or Gnome's secret store on Linux). This keeps your client secrets secure and encrypted using your logon password.



  The command `falcon profiles new` will guide you through creating a new configuration. Note that:

  - The name you specify will be the one you use to start a shell, so if you put a space in it remember that you'll need to wrap it in quotes later. Therefore, we do not recommend using a space here.
  - The client ID and secret you specify must have full RTR admin and host querying permissions enabled; otherwise, this tool will not be able to execute any commands.

  Two types of configuration backends are provided out of the box: the default, which is for an API keypair associated with a standard Falcon tenant, and a Falcon Flight Control backend. Use the Flight Control backend when authenticating to a Parent CID, as you will be able to specify the desired child CID on execution.

  Your API keys should have the following scopes enabled in the Falcon dashboard:

  | &darr; API Scopes // Commands &rarr; |              `host_search`               |                 `shell`                  |        `policies`<br>(Prevention)        |         `policies`<br>(Response)         | `containment`<br>Host Containment | `maintenance_token`<br>Maintenance Tokens |                     `users`<br>User Management                     |
  | ------------------------------------ | :--------------------------------------: | :--------------------------------------: | :--------------------------------------: | :--------------------------------------: | :-------------------------------: | :---------------------------------------: | :----------------------------------------------------------------: |
  | **Falcon Flight Control: Read**      | X<br>*When using parent<br>CID API Keys* | X<br>*When using parent<br>CID API Keys* | X<br>*When using parent<br>CID API Keys* | X<br>*When using parent<br>CID API Keys* |                                   |                                           |
  | **Hosts: Read**                      |                    X                     |                    X                     |                                          |                                          |                 X                 |                     X                     |                                                                    |
  | **Hosts: Write**                     |                                          |                                          |                                          |                                          |                 X                 |                                           |                                                                    |
  | **Prevention Policies: Read**        |                                          |                                          | X<br>`describe` / `export` sub-commands  |                                          |                                   |                                           |                                                                    |
  | **Prevention Policies: Write**       |                                          |                                          |        X<br>`import` sub-command         |                                          |                                   |                                           |                                                                    |
  | **Real Time Response: Read**         |                                          |                    X                     |                                          |                                          |                                   |                                           |                                                                    |
  | **Real Time Response: Write**        |                                          |                    X                     |                                          |                                          |                                   |                                           |                                                                    |
  | **Real Time Response: Admin**        |                                          |        X<br>*for admin commands*         |                                          |                                          |                                   |                                           |                                                                    |
  | **Response Policies: Read**          |                                          |                                          |                                          | X<br>`describe` / `export` sub-commands  |                                   |                                           |                                                                    |
  | **Response Policies: Write**         |                                          |                                          |                                          |        X<br>`import` sub-command         |                                   |                                           |                                                                    |
  | **Sensor Update Policies: Write**    |                                          |                                          |                                          |                                          |                                   |                     X                     |                                                                    |
  | **Sensor Download: Read**            |                                          |                                          |                                          |                                          |                                   |                                           |               X<br>*For adding roles to users only*                |
  | **User Management: Read**            |                                          |                                          |                                          |                                          |                                   |                                           |           X<br>*For `describe` and `list` sub-commands*            |
  | **User Management: Write**           |                                          |                                          |                                          |                                          |                                   |                                           | X<br>*For user and user role add, import, and change sub-commands* |



  The command `falcon profiles list` will show you all configurations (if any) you have created using the `new` command above, listed by the name you specified.

  Example output:

  ```shell
  $ falcon profiles list
  Falcon Toolkit
  Configuration Directory: /Users/username/FalconToolkit
  Falcon Instance Configurations
  ServicesTest
      Test instance for Services
  ```



  The command `falcon profiles delete [Profile Name]` will delete a configuration for you. Use the name you defined when you created the profile via `falcon profiles new`.



  If you have configured one profile, Falcon Toolkit will use it by default. If you have multiple profiles, you must select one using `-p`, like this:

  ```shell
  $ falcon -p Profile2 <command> <command-specific params>
  Falcon Toolkit
  ...
  ```



  A key part of this tool (as we'll see later) is filter support. To see what filters are supported by the Falcon Toolkit and FalconPy, run `falcon filters`. Each filter is listed and explained with examples.



  Before jumping into an RTR shell, you may wish to see which hosts you would connect to if you used the `shell` command (covered below). To do so, use the `falcon host_search` command.

  As with the `shell` command, you must specify a profile (the name of a configuration you created using the `new` command above) if you have created more than one, and you can then optionally provide as many filters as you want using succesive `-f` switches. Some examples:

  List all online Windows hosts that are not within the `London` site, within the one Falcon instance configured earlier.

  ```shell
  falcon host_search -f OS=Windows -f Site__NOT=London -o online
  ```

  List all Windows hosts not within the `075e03f5e5c04d83b4831374e7dc01c3` Group, within the `MyCompany` Falcon tenant.

  ```shell
  falcon -p MyCompany host_search -f OS=Windows -f GroupID__NOT=075e03f5e5c04d83b4831374e7dc01c3
  ```

  List all offline `MyOtherCompany` Windows servers or domain controllers not within an OU called `Protected`

  ```shell
  falcon -p MyOtherCompany host_search -f OS=Windows -f Role=Server,DC -f OU__NOT=Protected -o offline
  ```

  List all `MyOtherCompany` Windows Workstations that have checked in to Falcon within the past 30 minutes

  ```shell
  falcon -p MyOtherCompany host_search -f OS=Windows -f Role=Workstation -f LastSeen__GTE=-30m
  ```



  Now that you know how to filter, you know how to jump into a shell! To get into a batch shell with no special options, just do the same as for a `host_search` but use the `shell` command instead. For example, to launch an RTR shell with all Windows hosts last seen within the past 30 minutes within the `MyCompany` Falcon instance, use this command:

  ```shell
  falcon -p MyCompany shell -f OS=Windows -f LastSeen__GTE=-30m
  ```

  You can also specify an initial timeout to use for all RTR commands. By default, the timeout is 30 seconds, but you can change this to, e.g., 60 seconds, like this:

  ```shell
  falcon -p MyCompany shell -f OS=Windows -t 60
  ```

  Once you are within an RTR shell, you can run any command that you can run within standard RTR, with full usage, tab completion and examples. However, note that some commands (such as `reg` and `runscript`) have been slightly adjusted in their usage to match standard Unix command patterns. There are technical reasons for this; reach out to us if you need support. Furthermore, some commands have been augmented or added, such as `runscript -WorkstationPath` which allows you to run a local script without making it a cloud file first, `get_status` to check on file uploads, and `download` to pull files retrieved via `get` down to your local system.

  You can run `help` at any time within the shell to get a list of commands. Every command also supports the `-h` switch to find out how it works. Run `quit` at any time to get back to your command line.

  All outputs are written to a log file, as well as a CSV alongside it showing the output from every host. If you run this tool against many hosts, you will see the output from the first in the list on screen. However, every host's output (from `stdout` and `stderr`) is written to the accompanying CSV.

  All logs and CSVs are written to the `logs` folder within your configuration directory (default: `~/FalconToolkit`).



  Although Falcon Toolkit provides you with plenty of filtering options, sometimes you may wish to connect to hosts by Agent ID (AID) / Device ID. You can do this using two command line options.



  To specify Device IDs at the command line, simply provide the `--device-id-list` / `-d` option and a comma-delimited list of IDs. For example, to connect to two hosts with the AIDs `abcdef12345` and `ghijkl67890`, you could use the following command:

  ```shell
  falcon -p ProfileName shell -d abcdef12345,ghijkl67890
  ```



  Sometimes it is not practical to provide a list of Device IDs at the command line, often because the length of the string containing all the IDs would exceed the maximum command length allowable within your shell. To get around this, Falcon Toolkit provides another parameter (`--device-id-file` / `-df`), which allows you to provide a path to a file containing a list of AIDs, one per line. For example, let's say you wanted to connect to two devices with the AIDs `abcdef12345` and `ghijkl67890`, you may have a file named `device_ids.txt` with the following contents:

  ```text
  abcdef12345
  ghijkl67890
  ```

  Then, you could jump into a shell with these devices via this Falcon Toolkit command:

  ```shell
  falcon -p ProfileName shell -df device_ids.txt
  ```



  The RTR shell is fully scriptable. There are two different scripting methods supported:

  - Command replay scripts that simulate a human typing commands into the shell; and
  - Python scripts that can interact with the shell programmatically at runtime.

  <details>
  <summary>
  <h4>Command Replay Script</h4>
  </summary>

  If you have a file on disk with all shell commands you wish to run, you can specify it as a command line switch:

  ```shell
  falcon shell -f OS=Windows -s script.rtr
  ```

  This would run a script from disk called `script.rtr`. Scripts should end in the `quit` command if you do not wish to run further commands after your script has run (and therefore return to the shell).

  Note that scripts contain a list of shell commands, *not* a list of zsh/PowerShell commands. Therefore, if you need to run a raw script command, write a script containing content like this:

  ```shell
  runscript -Raw "Get-ChildItem"
  quit
  ```

  </details>

  <details>
  <summary>
  <h4>Python Scripting API</h4>
  </summary>

  This tool is build on top of the excellent [Cmd2](https://cmd2.readthedocs.io/) Python library, which brings with it copious extensibility. It is possible to write Python scripts that run within the context of the Toolkit's shell with programmatic logic applied. This feature is very much in beta, and we are actively seeking feedback on which state data should be made available globally to aid in programmatic scripting of the shell.

  Information on Cmd2's scripting backend is provided [here](https://cmd2.readthedocs.io/en/stable/features/scripting.html#python-scripts). The backend is configured as follows:

  - The RTR Shell's application [bridge name](https://cmd2.readthedocs.io/en/stable/features/scripting.html#basics) is `rtr`, so `rtr("runscript -Raw \"Get-ChildItem\"")` would execute the `Get-ChildItem` PowerShell command against all connected systems from within a custom PyScript.
  - The `self` functionality is enabled, enabling developers to introspect data stored within the RTR Shell itself. In this context, `self` will refer to the instantiated `RTRPrompt` object defined in `falcon_toolkit/shell/prompt.py`.

  Some example usages of this functionality are as follows:

  - Execute a batch `get` command and then cache the contents of `self.last_batch_get_successful_requests` to find out how many systems had the file on disk. Then, the script could wait `x` seconds in a loop up to a maximum amount of time, running `get_status` each time. On each iteration, the script may query `self.last_batch_get_completed_uploads` to determine whether a minimum threshold of systems have uploaded the requested file, and then once complete execute `download -e /some/output/folder` to pull those completed uploads down to a folder of choice (then extract them automatically).
  - Execute a series of commands that differ by target OS, using the contents of `self.connected_devices` to make decisions dynamically.
  - Execute `self.send_generic_command` directly, then use the returned `(stdout, stderr)` tuple to make decisions about which command to execute next (best suited to single system connections).

  </details>



  You can fetch maintenance tokens for systems within your Falcon tenant, or retrieve the bulk maintenance token.



  Show the bulk maintenance token:

  ```shell
  $ falcon -p MyCompany maintenance_token -b
  Getting the bulk maintenance token
  Bulk maintenance token: redactedexample12345
  WARNING: this token must be kept safe, as it can uninstall all Falcon sensors!
  ```

  Show a token for a specific system located by hostname:

  ```shell
  $ falcon -p MyCompany maintenance_token -f Hostname=MY-TEST-BOX-1
  ```

  Show maintenance tokens for a list of device IDs provided on the command line:

  ```shell
  $ falcon -p MyCompany maintenance_token -d aid1,aid2,...
  ```



  You can `contain` and `uncontain` systems through Falcon Toolkit. Network containment restricts the network connectivity of matching systems to just the Falcon Platform.

  The containment functionality accepts the same command line parameters as `host_search` and `shell` (`-d`, `-df`, or multiple instances of `-f` to apply Falcon filters).



  Network contain all systems that match the FQL hostname pattern `DEVTEST*`:

  ```shell
  $ falcon -p MyCompany containment -f Hostname=DEVTEST\* contain
  ...
  ```

  Lift the containment status on the same machines:

  ```shell
  $ falcon -p MyCompany containment -f Hostname=DEVTEST\* uncontain
  ...
  ```

  Network contain specific systems by AID:

  ```shell
  $ falcon -p MyCompany containment -d aid1,aid2,aid3 contain
  ...
  ```

  Network contain all systems in a CID:

  ```shell
  $ falcon -p MyCompany containment contain
  You did not specify any parameters. This command will manage the containment status of ALL devices in the Falcon tenant!
  You must enter the string "I AM SURE!" to proceed.
  Are you sure? I AM SURE!
  ...
  ```




  You can `describe`, `import` and `export` two types of policies: Prevention and Response. The three verbs are applied to the `falcon policies` command to specify what you would like to do with policies, and a command line switch is used to specify the policy type to work with. Exported policies are written to disk as JSON with some Falcon Toolkit-specific data needed to import a policy back again.



  Show all Prevention policies within the `MyCompany` Falcon profile:

  ```shell
  $ falcon -p MyCompany policies -p describe
  platform_default (Platform: Windows)
      Platform default policy
  ...
  ```

  Show all Response policies when only one profile is configured:

  ```shell
  $ falcon policies -r describe
  platform_default (Platform: Windows)
      Platform default policy
  ...
  ```

  Export a Response policy from the `MyCompany` tenant to disk:

  ```shell
  $ falcon -p MyCompany policies -r export
  Please choose a policy to export

   * My Response Policy [Windows]
     My Other Response Policy [Linux]
  ...
  ```

  Import a Prevention policy to the one configured Falcon tenant:

  ```shell
  $ falcon policies -p import MyExportedPolicy.json
  ...
  ```



  The `falcon users` command has multiple sub-commands that let you view and manipulate users in your Falcon tenant.
  - `add_user`: Add a new user.
  - `add_roles`: Assign new roles to a user.
  - `delete_user`: Delete a user.
  - `describe_users`: Show all users in a Falcon tenant alongside their roles.
  - `import_users`: Import a list of users from a CSV.
  - `list_roles`: Show all roles that may be assigned to users.



  The CSV must contain the header first_name,last_name,email_address, and optionally may contain the roles field.

  first_name,last_name,email_address,roles
  alice,example,alice.example@example.com
  bob,example,bob.example@example.com,risk_manager
  eve,example,eve.example@example.com

  ```shell
  $ falcon users import_users NewUsers.csv
  ```



  Falcon Toolkit is an open source project, and not a formal CrowdStrike product, designed to assist users with managing their Falcon tenants and executing commands at scale. As such, it carries no formal support, express or implied. This project originated out of the CrowdStrike Services Incident Response (IR) team's need to execute commands across Falcon tenants quickly, at scale, and with auditing, and is maintained by [Chris Hammond](mailto:Chris.Hammond@crowdstrike.com).

  Is something going wrong? GitHub Issues are used to report bugs. Submit an [Issue](https://github.com/CrowdStrike/Falcon-Toolkit/issues/new/choose) and let us know what is happening.

  Furthermore, GitHub Discussions provide the community with means to communicate.

  *Security issues should be raised to our [Security team](mailto:security@crowdstrike.com) and [Chris Hammond](mailto:Chris.Hammond@crowdstrike.com).*

  Thank you for using the Falcon Toolkit! We hope it is as useful to the Falcon user community as it is to us.


pkgId: e725056e9ad97f8e068bc80aefac903c12cfdb71de63b5b3347458862f7b88ea
name: python-falconry-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for falconry
url: https://pypi.org/project/falconry/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-falconry-0.1.2-1.src.rpm
location_href: Packages/python-falconry-help-0.1.2-1.noarch.rpm
checksum_type: sha256
description:
  ![Python package](https://github.com/fnechans/falconry/workflows/Python%20package/badge.svg)
  [![Documentation Status](https://readthedocs.org/projects/falconry/badge/?version=latest)](https://falconry.readthedocs.io/en/latest/?badge=latest)



  Falconry is lightweight python package to create and manage your [HTCondor](https://github.com/htcondor/) jobs.
  It handles things like job submission, dependent jobs, and job status checking. It periodically saves progress,
  so even if you disconnect or htcondor crashes, you can continue where you left off.

  Detailed documentation can be found on [ReadTheDocs](https://falconry.readthedocs.io/en/latest/index.html). You can also check `example.py` for an example of usage. Package has to be first installed using pip as described in section on [installation](#installation-using-pip).



  Falconry can be installed using pip:

      $ pip3 install falconry



  To install falconry, simply call following in the repository directory:

      $ pip3 install --user -e .

  Then you can include the package in your project simply by adding:

      import falconry



  The package  requires htcondor API to run. One can simply do:

      $ python3 -m pip  install --user -r requirements.txt

  though it might be better to install in virtual environment.


pkgId: 35db69b054e6d215d302fc236019abfba4ae6317b9ff45536f7f15b806c1413e
name: python-falsifier-help
arch: noarch
version: 1.0rc0
epoch: 0
release: 1
summary: Development documents and examples for falsifier
url: https://github.com/emcd/python-falsifier
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-falsifier-1.0rc0-1.src.rpm
location_href: Packages/python-falsifier-help-1.0rc0-1.noarch.rpm
checksum_type: sha256
description:
  * 🎭 **Falsey Base Class**: A foundational class for creating objects that
    evaluate to ``False`` in boolean contexts, with identity-based equality
    comparisons.
  * 🧱 **Extensible Base**: Can derive specialized falsey types, such as sentinel
    objects or absence indicators.


pkgId: 377890665b7a714df62896d534f8b2d29b76899833830a52907ec941dbd2fe98
name: python-family_parkrun-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for family_parkrun
url: https://pypi.org/project/family_parkrun/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-family_parkrun-0.1.0-1.src.rpm
location_href: Packages/python-family_parkrun-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  To use:

  - Ensure you have [Python][] installed.
  - Create a file containing a newline-separated list of runner ID numbers.
    These are the numbers at the end of the URL for their personal page.
  - Run `family-parkrun` with the `-d` argument, followed by the filename
    of your runner list, and wait for it to download.
    ```bash
    python family-parkrun -d runners.txt
    ```
  - View `summary.html` in your browser.

  [python]: https://www.python.org


pkgId: 2815c086e8a9c9f3e36b5380537db6987c70d337637dba1be0e5ddd03e31719b
name: python-familylink-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for familylink
url: https://pypi.org/project/familylink/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-familylink-0.1.0-1.src.rpm
location_href: Packages/python-familylink-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  A Python package to interact with Google Family Link.



  ```bash
  pip install familylink
  ```





  ```python
  from familylink import FamilyLink

  client = FamilyLink()
  ```



  ```python
  client.set_app_limit("Spotify", 30)  # in minutes
  ```



  ```python
  client.block_app("Youtube")
  ```



  ```python
  client.always_allow_app("Calculator")
  ```



  ```python
  client.remove_app_limit("Youtube")
  ```



  ```python
  client.print_usage()



















  ```


pkgId: b8916dd2464ff535db39ca9b5f1d95013822041d2ac19d9da76e379d03e98c02
name: python-familylink-help
arch: noarch
version: 0.1.7
epoch: 0
release: 1
summary: Development documents and examples for familylink
url: https://pypi.org/project/familylink/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-familylink-0.1.7-1.src.rpm
location_href: Packages/python-familylink-help-0.1.7-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/familylink.svg)](https://badge.fury.io/py/familylink)

  A non-official Python package to interact with Google Family Link, to manage your kids' screen time.

  <p align="center">
    <img src="logo.svg" alt="Family Link logo" width="200" height="200">
  </p>



  ```bash
  pip install familylink
  ```



  Create a `config.csv` file with the following format:

  ```csv
  App,Max Duration,Days,Time Ranges
  Calculator,,,                       # always allowed
  Youtube,0:10,Mon-Fri,               # 10 minutes per day during weekdays
  Youtube,0:30,Sat-Sun,               # 30 minutes per day on weekends
  Fortnite,1:00,Wed,13:00-18:00       # 1 hour on Wednesday, between 13:00 and 18:00
  Fortnite,1:00,Sat-Sun,09:30-18:00   # 1 hour on weekends, between 09:30 and 18:00
  Google Photos,0:10,,                # 10 minutes everyday
  ```

  The apps that are not in the list will be blocked.

  ```bash
  python -m familylink.cli config.csv --dry-run  # Remove --dry-run to apply changes

  uvx familylink config.csv --dry-run
  ```





  ```python
  from familylink import FamilyLink

  client = FamilyLink()
  ```



  ```python
  client.set_app_limit("Spotify", 30)  # in minutes
  ```



  ```python
  client.block_app("Youtube")
  ```



  ```python
  client.always_allow_app("Calculator")
  ```



  ```python
  client.remove_app_limit("Youtube")
  ```



  ```python
  client.print_usage()



















  ```


pkgId: a3f53e8b7319ce1cc31b8faa824744a2c8bcafe767e16cec1a6d8ba7fcaf9efa
name: python-fast-forward-indexes-help
arch: noarch
version: 0.6.0
epoch: 0
release: 1
summary: Development documents and examples for fast-forward-indexes
url: https://pypi.org/project/fast-forward-indexes/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fast-forward-indexes-0.6.0-1.src.rpm
location_href: Packages/python-fast-forward-indexes-help-0.6.0-1.noarch.rpm
checksum_type: sha256
description:
  This is the implementation of [Fast-Forward indexes](https://dl.acm.org/doi/abs/10.1145/3485447.3511955).

  > [!IMPORTANT]
  > As this library is still in its early stages, the API is subject to change!



  Install the package via `pip`:

  ```bash
  pip install fast-forward-indexes
  ```



  Using a Fast-Forward index is as simple as providing a TREC run with retrieval scores:

  ```python
  from pathlib import Path

  from fast_forward import Ranking
  from fast_forward.index import OnDiskIndex, Mode
  from fast_forward.encoder import TCTColBERTQueryEncoder


  encoder = TCTColBERTQueryEncoder("castorini/tct_colbert-msmarco")


  ff_index = OnDiskIndex.load(Path("/path/to/index.h5"), encoder, mode=Mode.MAXP)


  first_stage_ranking = (
      Ranking.from_file(Path("/path/to/input/run.tsv"))
      .attach_queries(
          {
              "q1": "query 1",
              "q2": "query 2",
              
              "qn": "query n",
          }
      )
      .cut(5000)
  )


  out = ff_index(first_stage_ranking)


  first_stage_ranking.interpolate(out, 0.1).save(Path("/path/to/output/run.tsv"))
  ```



  A more detailed documentation is available [here](https://mrjleo.github.io/fast-forward-indexes/docs).

rpm_license:
  MIT License  Copyright (c) 2022-2024 Jurek Leonhardt  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: c615e0dfc837b05fc57717ee0dd5a1cf2f7d8765442a335893e788ea17b09a8e
name: python-fastadmin3-help
arch: noarch
version: 0.9
epoch: 0
release: 1
summary: Development documents and examples for fastadmin3
url: https://github.com/vsdudakov/fastadmin
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastadmin3-0.9-1.src.rpm
location_href: Packages/python-fastadmin3-help-0.9-1.noarch.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/vsdudakov/fastadmin/workflows/CI/badge.svg?branch=main)](https://github.com/vsdudakov/fastadmin/workflows/CI/badge.svg?branch=main)
  [![codecov](https://codecov.io/gh/vsdudakov/fastadmin/branch/main/graph/badge.svg?token=RNGX5HOW3T)](https://codecov.io/gh/vsdudakov/fastadmin)
  [![License](https://img.shields.io/github/license/vsdudakov/fastadmin)](https://github.com/vsdudakov/fastadmin/blob/master/LICENSE)
  [![PyPi](https://badgen.net/pypi/v/fastadmin)](https://pypi.org/project/fastadmin/)
  [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-3100/)



  ![SignIn View](https://raw.githubusercontent.com/vsdudakov/fastadmin/main/docs/assets/images/signin.png)
  ![List View](https://raw.githubusercontent.com/vsdudakov/fastadmin/main/docs/assets/images/list.png)
  ![Change View](https://raw.githubusercontent.com/vsdudakov/fastadmin/main/docs/assets/images/change.png)

  <p align="center">
    <a href="https://twitter.com/intent/tweet?text=Admin%20Dashboard%20For%20FastAPI&url=https://github.com/vsdudakov/fastadmin&hashtags=FastAPI,AdminDashboard">
      <img alt="tweet" src="https://img.shields.io/twitter/url/https/twitter?label=Share%20on%20twitter&style=social" target="_blank" />
    </a>
  </p>






  <a href='https://github.com/vsdudakov/fastadmin' target='_blank'>FastAdmin</a> is an easy-to-use Admin Dashboard App for FastAPI/Django/Flask inspired by Django Admin.















  FastAdmin was built with relations in mind and admiration for the excellent and popular Django Admin. It's engraved in its design that you may configure your admin dashboard for FastAPI/Django/Flask easiest way.















  FastAdmin is designed to be minimalistic, functional and yet familiar.

























  If you have any questions that are beyond the scope of the documentation, Please feel free to email <a href='mailto:vsdudakov@gmail.com' target='_blank'>us</a>.

















  Follow the steps below to setup FastAdmin:













  Install the package using pip:



















  Note: For zsh and macos use: <code>pip install fastadmin[fastapi,django]</code>



















  ```bash

  pip install fastadmin[fastapi,django]  # for fastapi with django orm
  pip install fastadmin[fastapi,tortoise-orm]  # for fastapi with tortoise orm
  pip install fastadmin[fastapi,pony]  # for fastapi with pony orm
  pip install fastadmin[fastapi,sqlalchemy]  # for fastapi with sqlalchemy orm
  pip install fastadmin[django]  # for django with django orm
  pip install fastadmin[django,pony]  # for django with pony orm
  pip install fastadmin[flask,sqlalchemy]  # for flask with sqlalchemy

  ```







  Install the package using poetry:























  ```bash

  poetry add 'fastadmin[fastapi,django]'  # for fastapi with django orm
  poetry add 'fastadmin[fastapi,tortoise-orm]'  # for fastapi with tortoise orm
  poetry add 'fastadmin[fastapi,pony]'  # for fastapi with pony orm
  poetry add 'fastadmin[fastapi,sqlalchemy]'  # for fastapi with sqlalchemy orm
  poetry add 'fastadmin[django]'  # for django with django orm
  poetry add 'fastadmin[django,pony]'  # for django with pony orm
  poetry add 'fastadmin[flask,sqlalchemy]'  # for flask with sqlalchemy

  ```







  Configure required settings using virtual environment variables:



















  Note: You can add these variables to .env and use python-dotenv to load them. See all settings <a href='#settings'>here</a>



















  ```bash

  export ADMIN_USER_MODEL=User
  export ADMIN_USER_MODEL_USERNAME_FIELD=username
  export ADMIN_SECRET_KEY=secret_key

  ```












  Setup FastAdmin for a framework







































  ```python
  from fastapi import FastAPI

  from fastadmin import fastapi_app as admin_app

  app = FastAPI()

  app.mount("/admin", admin_app)

  ```



















  ```python
  from django.urls import path

  from fastadmin import get_django_admin_urls as get_admin_urls
  from fastadmin.settings import settings

  urlpatterns = [
      path(f"{settings.ADMIN_PREFIX}/", get_admin_urls()),
  ]

  ```



















  ```python
  from flask import Flask

  from fastadmin import flask_app as admin_app

  app = Flask(__name__)

  app.register_blueprint(admin_app, url_prefix="/admin")

  ```











  Register ORM models







































  ```python
  from uuid import UUID

  import bcrypt
  from tortoise import fields
  from tortoise.models import Model

  from fastadmin import TortoiseModelAdmin, register


  class User(Model):
      username = fields.CharField(max_length=255, unique=True)
      hash_password = fields.CharField(max_length=255)
      is_superuser = fields.BooleanField(default=False)
      is_active = fields.BooleanField(default=False)

      def __str__(self):
          return self.username


  @register(User)
  class UserAdmin(TortoiseModelAdmin):
      exclude = ("hash_password",)
      list_display = ("id", "username", "is_superuser", "is_active")
      list_display_links = ("id", "username")
      list_filter = ("id", "username", "is_superuser", "is_active")
      search_fields = ("username",)

      async def authenticate(self, username: str, password: str) -> UUID | int | None:
          user = await User.filter(username=username, is_superuser=True).first()
          if not user:
              return None
          if not bcrypt.checkpw(password.encode(), user.hash_password.encode()):
              return None
          return user.id

  ```



















  ```python
  from django.db import models

  from fastadmin import DjangoModelAdmin, register


  class User(models.Model):
      username = models.CharField(max_length=255, unique=True)
      hash_password = models.CharField(max_length=255)
      is_superuser = models.BooleanField(default=False)
      is_active = models.BooleanField(default=False)

      def __str__(self):
          return self.username


  @register(User)
  class UserAdmin(DjangoModelAdmin):
      exclude = ("hash_password",)
      list_display = ("id", "username", "is_superuser", "is_active")
      list_display_links = ("id", "username")
      list_filter = ("id", "username", "is_superuser", "is_active")
      search_fields = ("username",)

      def authenticate(self, username, password):
          obj = User.objects.filter(username=username, is_superuser=True).first()
          if not obj:
              return None
          if not obj.check_password(password):
              return None
          return obj.id

  ```



















  ```python
  import bcrypt
  from sqlalchemy import Boolean, Integer, String, select
  from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine
  from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column

  from fastadmin import SqlAlchemyModelAdmin, register

  sqlalchemy_engine = create_async_engine(
      "sqlite+aiosqlite:///:memory:",
      echo=True,
  )
  sqlalchemy_sessionmaker = async_sessionmaker(sqlalchemy_engine, expire_on_commit=False)


  class Base(DeclarativeBase):
      pass


  class User(Base):
      __tablename__ = "user"

      id: Mapped[int] = mapped_column(Integer, primary_key=True, nullable=False)
      username: Mapped[str] = mapped_column(String(length=255), nullable=False)
      hash_password: Mapped[str] = mapped_column(String(length=255), nullable=False)
      is_superuser: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False)
      is_active: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False)

      def __str__(self):
          return self.username


  @register(User, sqlalchemy_sessionmaker=sqlalchemy_sessionmaker)
  class UserAdmin(SqlAlchemyModelAdmin):
      exclude = ("hash_password",)
      list_display = ("id", "username", "is_superuser", "is_active")
      list_display_links = ("id", "username")
      list_filter = ("id", "username", "is_superuser", "is_active")
      search_fields = ("username",)

      async def authenticate(self, username, password):
          sessionmaker = self.get_sessionmaker()
          async with sessionmaker() as session:
              query = select(User).filter_by(username=username, password=password, is_superuser=True)
              result = await session.scalars(query)
              user = result.first()
              if not user:
                  return None
              if not bcrypt.checkpw(password.encode(), user.hash_password.encode()):
                  return None
              return user.id

  ```



















  ```python
  import bcrypt
  from pony.orm import Database, PrimaryKey, Required, db_session

  from fastadmin import PonyORMModelAdmin, register

  db = Database()
  db.bind(provider="sqlite", filename=":memory:", create_db=True)


  class User(db.Entity):  # type: ignore [name-defined]
      _table_ = "user"
      id = PrimaryKey(int, auto=True)
      username = Required(str)
      hash_password = Required(str)
      is_superuser = Required(bool, default=False)
      is_active = Required(bool, default=False)

      def __str__(self):
          return self.username


  @register(User)
  class UserAdmin(PonyORMModelAdmin):
      exclude = ("hash_password",)
      list_display = ("id", "username", "is_superuser", "is_active")
      list_display_links = ("id", "username")
      list_filter = ("id", "username", "is_superuser", "is_active")
      search_fields = ("username",)

      @db_session
      def authenticate(self, username, password):
          user = next((f for f in self.model_cls.select(username=username, password=password, is_superuser=True)), None)
          if not user:
              return None
          if not bcrypt.checkpw(password.encode(), user.hash_password.encode()):
              return None
          return user.id

  ```























  See full documentation [here](https://vsdudakov.github.io/fastadmin).


  This project is licensed under the MIT License - see the [LICENSE](https://github.com/vsdudakov/fastadmin/blob/main/LICENSE) file for details.


pkgId: 3fde2c19d36bf4158513394b4b6392a4b7d82b47fe95eef5d1b5e3b8fa1defc3
name: python-fastapi-auto-router-help
arch: noarch
version: 0.1.1
epoch: 0
release: 1
summary: Development documents and examples for fastapi-auto-router
url: https://github.com/forchain/fastapi-auto-router
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastapi-auto-router-0.1.1-1.src.rpm
location_href: Packages/python-fastapi-auto-router-help-0.1.1-1.noarch.rpm
checksum_type: sha256
description:
  Automatic router configuration for FastAPI based on filesystem structure.



  ```bash
  pip install fastapi-auto-router
  ```



  1. Create your router files in a directory structure that matches your desired API paths:

  ```
  your_project/
  └── routers/
      └── user_management
          ├── users.py
          └── {user_id}/
                  └── profile.py
  ```

  2. In your router files, create FastAPI routers:

  routers/user_management/users.py

  ```python
  from fastapi import APIRouter

  router = APIRouter()


  @router.get("")
  async def list_users():
      return {"message": "List users"}
  ```

  3. In your main FastAPI application, use AutoRouter:

  ```python
  from fastapi import FastAPI
  from fastapi_auto_router import AutoRouter

  app = FastAPI()

  auto_router = AutoRouter(
      app=app,
      routers_dir="routers",  # Path to your routers directory
      api_prefix="/api/v1"  # Optional: prefix for all routes
  )
  auto_router.load_routers()
  ```

  This will create the following routes:

  - `/api/v1/user-management/users`
  - `/api/v1/user-management/{user_id}/profile`



  - Automatic route configuration based on filesystem structure
  - Converts underscores to hyphens in route paths
  - Supports path parameters using {parameter_name} folders
  - Customizable API prefix
  - Works with any FastAPI application



  MIT License


pkgId: 8fcc5280df421ad19bf43ff3d95cad2e3a516838a855e04d087a190403eed71d
name: python-fastapi-code-generator-help
arch: noarch
version: 0.5.2
epoch: 0
release: 1
summary: Development documents and examples for fastapi-code-generator
url: https://github.com/koxudaxi/fastapi-code-generator
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastapi-code-generator-0.5.2-1.src.rpm
location_href: Packages/python-fastapi-code-generator-help-0.5.2-1.noarch.rpm
checksum_type: sha256
description:
  This code generator creates a FastAPI app from an openapi file.

  [![PyPI version](https://badge.fury.io/py/fastapi-code-generator.svg)](https://pypi.python.org/pypi/fastapi-code-generator)
  [![Downloads](https://pepy.tech/badge/fastapi-code-generator/month)](https://pepy.tech/project/fastapi-code-generator)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fastapi-code-generator)](https://pypi.python.org/pypi/fastapi-code-generator)
  [![codecov](https://codecov.io/gh/koxudaxi/fastapi-code-generator/branch/master/graph/badge.svg)](https://codecov.io/gh/koxudaxi/fastapi-code-generator)
  ![license](https://img.shields.io/github/license/koxudaxi/fastapi-code-generator.svg)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)




  fastapi-code-generator uses [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator) to generate pydantic models


  See [documentation](https://koxudaxi.github.io/fastapi-code-generator) for more details.




  To install `fastapi-code-generator`:
  ```sh
  $ pip install fastapi-code-generator
  ```



  The `fastapi-code-generator` command:
  ```
  Usage: fastapi-codegen [OPTIONS]

  Options:
    -i, --input FILENAME     [required]
    -o, --output PATH        [required]
    -t, --template-dir PATH
    -m, --model-file         Specify generated model file path + name, if not default to models.py
    -r, --generate-routers   Generate modular api with multiple routers using RouterAPI (for bigger applications).
    --specify-tags           Use along with --generate-routers to generate specific routers from given list of tags.
    -c, --custom-visitors    PATH - A custom visitor that adds variables to the template.
    -d, --output-model-type  Specify a Pydantic base model to use (see [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator); default is `pydantic.BaseModel`).
    -p, --python-version     Specify a Python version to target (default is `3.8`).
    --install-completion     Install completion for the current shell.
    --show-completion        Show completion for the current shell, to copy it
                             or customize the installation.
    --help                   Show this message and exit.
  ```



  Specify the Pydantic 2 `BaseModel` version in the command line, for example:

  ```sh
  $ fastapi-codegen --input api.yaml --output app --output-model-type pydantic_v2.BaseModel
  ```



  ```sh
  $ fastapi-codegen --input api.yaml --output app
  ```

  <details>
  <summary>api.yaml</summary>
  <pre>
  <code>
  openapi: "3.0.0"
  info:
    version: 1.0.0
    title: Swagger Petstore
    license:
      name: MIT
  servers:
    - url: http://petstore.swagger.io/v1
  paths:
    /pets:
      get:
        summary: List all pets
        operationId: listPets
        tags:
          - pets
        parameters:
          - name: limit
            in: query
            description: How many items to return at one time (max 100)
            required: false
            schema:
              type: integer
              format: int32
        responses:
          '200':
            description: A paged array of pets
            headers:
              x-next:
                description: A link to the next page of responses
                schema:
                  type: string
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Pets"
          default:
            description: unexpected error
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Error"
                  x-amazon-apigateway-integration:
                    uri:
                      Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${PythonVersionFunction.Arn}/invocations
                    passthroughBehavior: when_no_templates
                    httpMethod: POST
                    type: aws_proxy
      post:
        summary: Create a pet
        operationId: createPets
        tags:
          - pets
        responses:
          '201':
            description: Null response
          default:
            description: unexpected error
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Error"
                  x-amazon-apigateway-integration:
                    uri:
                      Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${PythonVersionFunction.Arn}/invocations
                    passthroughBehavior: when_no_templates
                    httpMethod: POST
                    type: aws_proxy
    /pets/{petId}:
      get:
        summary: Info for a specific pet
        operationId: showPetById
        tags:
          - pets
        parameters:
          - name: petId
            in: path
            required: true
            description: The id of the pet to retrieve
            schema:
              type: string
        responses:
          '200':
            description: Expected response to a valid request
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Pets"
          default:
            description: unexpected error
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Error"
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${PythonVersionFunction.Arn}/invocations
        passthroughBehavior: when_no_templates
        httpMethod: POST
        type: aws_proxy
  components:
    schemas:
      Pet:
        required:
          - id
          - name
        properties:
          id:
            type: integer
            format: int64
          name:
            type: string
          tag:
            type: string
      Pets:
        type: array
        description: list of pet
        items:
          $ref: "#/components/schemas/Pet"
      Error:
        required:
          - code
          - message
        properties:
          code:
            type: integer
            format: int32
          message:
            type: string
  </code>
  </pre>
  </details>


  `app/main.py`:
  ```python




  from __future__ import annotations

  from typing import Optional

  from fastapi import FastAPI, Query

  from .models import Pets

  app = FastAPI(version="1.0.0", title="Swagger Petstore", license="{'name': 'MIT'}",)


  @app.get('/pets', response_model=Pets)
  def list_pets(limit: Optional[int] = None) -> Pets:
      """
      List all pets
      """
      pass


  @app.post('/pets', response_model=None)
  def create_pets() -> None:
      """
      Create a pet
      """
      pass


  @app.get('/pets/{pet_id}', response_model=Pets)
  def show_pet_by_id(pet_id: str = Query(..., alias='petId')) -> Pets:
      """
      Info for a specific pet
      """
      pass

  ```

  `app/models.py`:
  ```python




  from typing import List, Optional

  from pydantic import BaseModel, Field


  class Pet(BaseModel):
      id: int
      name: str
      tag: Optional[str] = None


  class Pets(BaseModel):
      __root__: List[Pet] = Field(..., description='list of pet')


  class Error(BaseModel):
      code: int
      message: str
  ```


  If you want to generate custom `*.py` files then you can give a custom template directory to fastapi-code-generator with `-t` or `--template-dir` options of the command.

  fastapi-code-generator will search for [jinja2](https://jinja.palletsprojects.com/) template files in given template directory, for example `some_jinja_templates/list_pets.py`.

  ```bash
  fastapi-code-generator --template-dir some_jinja_templates --output app --input api.yaml
  ```

  These files will be rendered and written to the output directory. Also, the generated file names will be created with the template name and extension of `*.py`, for example `app/list_pets.py` will be a separate file generated from the jinja template alongside the default `app/main.py`


  You can use the following variables in the jinja2 templates

  - `imports`  all imports statements
  - `info`  all info statements
  - `operations` `operations` is list of `operation`
    - `operation.type` HTTP METHOD
    - `operation.path` Path
    - `operation.snake_case_path` Snake-cased Path
    - `operation.response` response object
    - `operation.function_name` function name is created `operationId` or `METHOD` + `Path`
    - `operation.snake_case_arguments` Snake-cased function arguments
    - `operation.security` [Security](https://swagger.io/docs/specification/authentication/)
    - `operation.summary` a summary
    - `operation.tags` [Tags](https://swagger.io/docs/specification/grouping-operations-with-tags/)


  `main.jinja2`
  ```jinja2
  from __future__ import annotations

  from fastapi import FastAPI

  {{imports}}

  app = FastAPI(
      {% if info %}
      {% for key,value in info.items() %}
      {{ key }} = "{{ value }}",
      {% endfor %}
      {% endif %}
      )


  {% for operation in operations %}
  @app.{{operation.type}}('{{operation.snake_case_path}}', response_model={{operation.response}})
  def {{operation.function_name}}({{operation.snake_case_arguments}}) -> {{operation.response}}:
      { if operation.summary %}
      """
      {{ operation.summary }}
      """
      { endif %}
      pass
  {% endfor %}

  ```


  `modular_template/main.jinja2`:
  ```jinja
  from __future__ import annotations

  from fastapi import FastAPI

  from .routers import {{ routers | join(", ") }}

  app = FastAPI(
      {% if info %}
      {% for key,value in info.items() %}
      {% set info_value= value.__repr__() %}
      {{ key }} = {{info_value}},
      {% endfor %}
      {% endif %}
      )

  {% for router in routers -%}
  app.include_router({{router}}.router)
  {% endfor -%}

  @app.get("/")
  async def root():
      return {"message": "Gateway of the App"}
  ```

  `modular_template/routers.jinja2`:
  ```jinja
  from __future__ import annotations

  from fastapi import APIRouter
  from fastapi import FastAPI

  from ..dependencies import *

  router = APIRouter(
      tags=['{{tag}}']
      )

  {% for operation in operations %}
  {% if operation.tags[0] == tag %}
  @router.{{operation.type}}('{{operation.snake_case_path}}', response_model={{operation.response}}
      {% if operation.additional_responses %}
          , responses={
              {% for status_code, models in operation.additional_responses.items() %}
                  '{{ status_code }}': {
                  {% for key, model in models.items() %}
                      '{{ key }}': {{ model }}{% if not loop.last %},{% endif %}
                  {% endfor %}
                  }{% if not loop.last %},{% endif %}
              {% endfor %}
          }
      {% endif %}
      {% if operation.tags%}
      , tags={{operation.tags}}
      {% endif %})
  def {{operation.function_name}}({{operation.snake_case_arguments}}) -> {{operation.return_type}}:
      { if operation.summary %}
      """
      {{ operation.summary }}
      """
      { endif %}
      pass
  {% endif %}
  {% endfor %}
  ```

  `modular_template/dependencies.jinja2`:
  ```jinja
  {{imports}}
  ```



  Custom visitors allow you to pass custom variables to your custom templates.

  E.g.


  `custom-template.jinja2`
  ```jinja2

  from __future__ import annotations

  from fastapi import FastAPI

  ...
  ```


  `custom-visitor.py`
  ```python
  from typing import Dict, Optional

  from fastapi_code_generator.parser import OpenAPIParser
  from fastapi_code_generator.visitor import Visitor


  def custom_visitor(parser: OpenAPIParser, model_path: Path) -> Dict[str, object]:
      return {'custom_header': 'My header'}


  visit: Visitor = custom_visitor
  ```



  ```
  ├── app                      # "app" is a Root directory
  │   ├── main.py              # "main" module
  │   ├── models.py            # "models" of the application
  │   ├── dependencies.py      # "dependencies" module, e.g. import app.dependencies
  │   └── routers              # "routers" is a "app subpackage"
  │       ├── fat_cats.py      # "fat_cats" submodule, e.g. import app.routers.fat_cats
  │       ├── slim_dogs.py     # "slim_dogs" submodule, e.g. import app.routers.slim_dogs
  │       └── wild_boars.py    # "wild_boars" submodule, e.g. import app.routers.wild_boars
  ```

  See [documentation](https://fastapi.tiangolo.com/tutorial/bigger-applications/) of APIRouter OpenAPI for more details.

  **_Generate main aside with all of its routers_**:
  ```bash
  $ fastapi-codegen --input swagger.yaml --output app --generate-routers
  ```

  **_Regenerate specific routers_**:
  ```bash
  $ fastapi-codegen --input swagger.yaml --output app --generate-routers --specify-tags "Wild Boars, Fat Cats"
  ```


  <details>
  <summary>swagger.yaml</summary>
  <pre>
  <code>
  openapi: "3.0.0"
  info:
    version: 1.0.0
    title: Swagger Petstore
    license:
      name: MIT
  servers:
    - url: /
    - url: http://petstore.swagger.io/v1
    - url: http://localhost:8080/
  paths:
    /boars:
      get:
        summary: List All Wild Boars
        operationId: listWildBoars
        tags:
          - Wild Boars
        parameters:
          - name: limit
            in: query
            description: How many items to return at one time (max 100)
            required: false
            schema:
              type: integer
        responses:
          '200':
            description: An array of wild boars
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/WildBoars"
      post:
        summary: Create a Wild Boar
        operationId: createWildBoars
        tags:
          - Wild Boars
        responses:
          '201':
            description: Null response
    /boars/{boarId}:
      get:
        summary: Info For a Specific Boar
        operationId: showBoarById
        tags:
          - Wild Boars
        parameters:
          - name: boarId
            in: path
            required: true
            description: The id of the boar to retrieve
            schema:
              type: string
        responses:
          '200':
            description: Expected response to a valid request
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Pet"
    /cats:
      get:
        summary: List All Fat Cats
        operationId: listFatCats
        tags:
          - Fat Cats
        parameters:
          - name: limit
            in: query
            description: How many items to return at one time (max 100)
            required: false
            schema:
              type: integer
        responses:
          '200':
            description: An array of fat cats
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/FatCats"
      post:
        summary: Create a Fat Cat
        operationId: createFatCats
        tags:
          - Fat Cats
        responses:
          '201':
            description: Null response
    /cats/{catId}:
      get:
        summary: Info For a Specific Cat
        operationId: showCatById
        tags:
          - Fat Cats
        parameters:
          - name: catId
            in: path
            required: true
            description: The id of the cat to retrieve
            schema:
              type: string
        responses:
          '200':
            description: Expected response to a valid request
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Pet"
    /dogs:
      get:
        summary: List All Slim Dogs
        operationId: listSlimDogs
        tags:
          - Slim Dogs
        parameters:
          - name: limit
            in: query
            description: How many items to return at one time (max 100)
            required: false
            schema:
              type: integer
        responses:
          '200':
            description: An array of slim dogs
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/SlimDogs"
      post:
        summary: Create a Slim Dog
        operationId: createSlimDogs
        tags:
          - Slim Dogs
        responses:
          '201':
            description: Null response
    /dogs/{dogId}:
      get:
        summary: Info For a Specific Dog
        operationId: showDogById
        tags:
          - Slim Dogs
        parameters:
          - name: dogId
            in: path
            required: true
            description: The id of the dog to retrieve
            schema:
              type: string
        responses:
          '200':
            description: Expected response to a valid request
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Pet"
  components:
    schemas:
      Pet:
        required:
          - id
          - name
        properties:
          id:
            type: integer
          name:
            type: string
          tag:
            type: string
      FatCats:
        type: array
        description: list of fat cats
        items:
          $ref: "#/components/schemas/Pet"
      SlimDogs:
        type: array
        description: list of slim dogs
        items:
          $ref: "#/components/schemas/Pet"
      WildBoars:
        type: array
        description: list of wild boars
        items:
          $ref: "#/components/schemas/Pet"
  </code>
  </pre>
  </details>

  `app/main.py`:

  ```python




  from __future__ import annotations

  from fastapi import FastAPI

  from .routers import fat_cats, slim_dogs, wild_boars

  app = FastAPI(
      version='1.0.0',
      title='Swagger Petstore',
      license={'name': 'MIT'},
      servers=[
          {'url': '/'},
          {'url': 'http://petstore.swagger.io/v1'},
          {'url': 'http://localhost:8080/'},
      ],
  )

  app.include_router(fat_cats.router)
  app.include_router(slim_dogs.router)
  app.include_router(wild_boars.router)


  @app.get("/")
  async def root():
      return {"message": "Gateway of the App"}
  ```

  `app/models.py`:

  ```python




  from __future__ import annotations

  from typing import List, Optional

  from pydantic import BaseModel, Field


  class Pet(BaseModel):
      id: int
      name: str
      tag: Optional[str] = None


  class FatCats(BaseModel):
      __root__: List[Pet] = Field(..., description='list of fat cats')


  class SlimDogs(BaseModel):
      __root__: List[Pet] = Field(..., description='list of slim dogs')


  class WildBoars(BaseModel):
      __root__: List[Pet] = Field(..., description='list of wild boars')
  ```

  `app/routers/fat_cats.py`:

  ```python




  from __future__ import annotations

  from fastapi import APIRouter

  from ..dependencies import *

  router = APIRouter(tags=['Fat Cats'])


  @router.get('/cats', response_model=FatCats, tags=['Fat Cats'])
  def list_fat_cats(limit: Optional[int] = None) -> FatCats:
      """
      List All Fat Cats
      """
      pass


  @router.post('/cats', response_model=None, tags=['Fat Cats'])
  def create_fat_cats() -> None:
      """
      Create a Fat Cat
      """
      pass


  @router.get('/cats/{cat_id}', response_model=Pet, tags=['Fat Cats'])
  def show_cat_by_id(cat_id: str = Path(..., alias='catId')) -> Pet:
      """
      Info For a Specific Cat
      """
      pass
  ```

  `app/routers/slim_dogs.py`:

  ```python




  from __future__ import annotations

  from fastapi import APIRouter

  from ..dependencies import *

  router = APIRouter(tags=['Slim Dogs'])


  @router.get('/dogs', response_model=SlimDogs, tags=['Slim Dogs'])
  def list_slim_dogs(limit: Optional[int] = None) -> SlimDogs:
      """
      List All Slim Dogs
      """
      pass


  @router.post('/dogs', response_model=None, tags=['Slim Dogs'])
  def create_slim_dogs() -> None:
      """
      Create a Slim Dog
      """
      pass


  @router.get('/dogs/{dog_id}', response_model=Pet, tags=['Slim Dogs'])
  def show_dog_by_id(dog_id: str = Path(..., alias='dogId')) -> Pet:
      """
      Info For a Specific Dog
      """
      pass
  ```

  `app/routers/wild_boars.py`:

  ```python




  from __future__ import annotations

  from fastapi import APIRouter

  from ..dependencies import *

  router = APIRouter(tags=['Wild Boars'])


  @router.get('/boars', response_model=WildBoars, tags=['Wild Boars'])
  def list_wild_boars(limit: Optional[int] = None) -> WildBoars:
      """
      List All Wild Boars
      """
      pass


  @router.post('/boars', response_model=None, tags=['Wild Boars'])
  def create_wild_boars() -> None:
      """
      Create a Wild Boar
      """
      pass


  @router.get('/boars/{boar_id}', response_model=Pet, tags=['Wild Boars'])
  def show_boar_by_id(boar_id: str = Path(..., alias='boarId')) -> Pet:
      """
      Info For a Specific Boar
      """
      pass
  ```

  `app/dependencies.py`:

  ```python




  from __future__ import annotations

  from typing import Optional

  from fastapi import Path

  from .models import FatCats, Pet, SlimDogs, WildBoars
  ```


  [https://pypi.org/project/fastapi-code-generator](https://pypi.org/project/fastapi-code-generator)



  fastapi-code-generator is released under the MIT License. http://www.opensource.org/licenses/mit-license


pkgId: a9f6c1a8db6835601f08df69205bdbe6f38bcecf3cb83edaab1ef0eddd3171f4
name: python-fastapi-crudrouter-mongodb-help
arch: noarch
version: 0.1.3
epoch: 0
release: 1
summary: Development documents and examples for fastapi-crudrouter-mongodb
url: https://github.com/pierrod/fastapi-crudrouter-mongodb
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastapi-crudrouter-mongodb-0.1.3-1.src.rpm
location_href: Packages/python-fastapi-crudrouter-mongodb-help-0.1.3-1.noarch.rpm
checksum_type: sha256
description:
  **Documentation**: [https://pierrod.github.io/fastapi-crudrouter-mongodb-doc/](https://pierrod.github.io/fastapi-crudrouter-mongodb-doc/)
  **Source Code**: [https://github.com/pierrod/fastapi-crudrouter-mongodb](https://github.com/pierrod/fastapi-crudrouter-mongodb)
  **Credits** :
  - Base projet and idea : [awtkns](https://github.com/awtkns/fastapi-crudrouter)
  - Convert \_id to id (for previous versions of Pydantic) : [mclate github guide](https://github.com/tiangolo/fastapi/issues/1515)


pkgId: 7c2114c86729d2f58779891bfe48502b960b44e4e3af45bce9a06f2fdb957f3c
name: python-fastapi-guard-help
arch: noarch
version: 0.3.3
epoch: 0
release: 1
summary: Development documents and examples for fastapi-guard
url: https://github.com/rennf93/fastapi-guard
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastapi-guard-0.3.3-1.src.rpm
location_href: Packages/python-fastapi-guard-help-0.3.3-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/fastapi-guard.svg?cache=none)](https://badge.fury.io/py/fastapi-guard)
  [![Release](https://github.com/rennf93/fastapi-guard/actions/workflows/release.yml/badge.svg)](https://github.com/rennf93/fastapi-guard/actions/workflows/release.yml)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![CI](https://github.com/rennf93/fastapi-guard/actions/workflows/ci.yml/badge.svg)](https://github.com/rennf93/fastapi-guard/actions/workflows/ci.yml)
  [![CodeQL](https://github.com/rennf93/fastapi-guard/actions/workflows/code-ql.yml/badge.svg)](https://github.com/rennf93/fastapi-guard/actions/workflows/code-ql.yml)
  [![pages-build-deployment](https://github.com/rennf93/fastapi-guard/actions/workflows/pages/pages-build-deployment/badge.svg?branch=gh-pages)](https://github.com/rennf93/fastapi-guard/actions/workflows/pages/pages-build-deployment)
  [![Docs Update](https://github.com/rennf93/fastapi-guard/actions/workflows/docs.yml/badge.svg)](https://github.com/rennf93/fastapi-guard/actions/workflows/docs.yml)
  [![Downloads](https://pepy.tech/badge/fastapi-guard)](https://pepy.tech/project/fastapi-guard)


pkgId: 440aa98ea532c95a53290f44a5f33e59bd6a08f681681ffa899f8141feb4cbc9
name: python-fastapi-injectable-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for fastapi-injectable
url: https://github.com/JasperSui/fastapi-injectable
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastapi-injectable-0.1.0-1.src.rpm
location_href: Packages/python-fastapi-injectable-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/fastapi-injectable.svg)][pypi_]
  [![Status](https://img.shields.io/pypi/status/fastapi-injectable.svg)][status]
  [![Python Version](https://img.shields.io/pypi/pyversions/fastapi-injectable)][python version]
  [![License](https://img.shields.io/pypi/l/fastapi-injectable)][license]

  [![Read the documentation at https://fastapi-injectable.readthedocs.io/](https://img.shields.io/readthedocs/fastapi-injectable/latest.svg?label=Read%20the%20Docs)][read the docs]
  [![Tests](https://github.com/JasperSui/fastapi-injectable/workflows/Tests/badge.svg)][tests]


  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]

  [pypi_]: https://pypi.org/project/fastapi-injectable/
  [status]: https://pypi.org/project/fastapi-injectable/
  [python version]: https://pypi.org/project/fastapi-injectable
  [read the docs]: https://fastapi-injectable.readthedocs.io/
  [tests]: https://github.com/JasperSui/fastapi-injectable/actions?workflow=Tests
  [pre-commit]: https://github.com/pre-commit/pre-commit
  [black]: https://github.com/psf/black

  A lightweight package that lets you use FastAPI's dependency injection anywhere - not just in route handlers. Perfect for CLI tools, background tasks, and more.



  `fastapi-injectable` is a lightweight package that enables seamless use of FastAPI's dependency injection system outside of route handlers. It solves a common pain point where developers need to reuse FastAPI dependencies in non-HTTP contexts like CLI tools, background tasks, or scheduled jobs.



  Key features:

  - **Flexible Injection APIs**: Choose between decorator or function-based approaches
    ```python
    from fastapi_injectable.decorator import injectable
    from fastapi_injectable.util import get_injected_obj

    
    @injectable
    def process_data(db: Annotated[Database, Depends(get_db)]):
        return db.query()
    result1 = process_data()

    
    def process_data(db: Annotated[Database, Depends(get_db)]):
        return db.query()

    injectable_process_data = injectable(process_data)
    result2 = injectable_process_data()

    
    def process_data(db: Annotated[Database, Depends(get_db)]):
        return db.query()

    result3 = get_injected_obj(process_data)

    
    assert result1 == result2 == result3
    ```

  - **Support for Both Sync and Async**: Works seamlessly with both synchronous and asynchronous code
    ```python
    from fastapi_injectable.decorator import injectable

    def get_service():
        return Service()

    @injectable
    async def async_task(service: Annotated[Service, Depends(get_service)]):
        await service.process()
    ```

  - **Controlled Resource Management**: Explicit cleanup of dependencies through utility functions
    ```python
    from fastapi_injectable.decorator import injectable
    from fastapi_injectable.util import cleanup_all_exit_stacks, cleanup_exit_stack_of_func

    
    def get_db() -> Generator[Database, None, None]:
        db = Database()
        yield db
        db.cleanup()  # Called when cleanup functions are invoked

    
    @injectable
    def process_data(db: Annotated[Database, Depends(get_db)]):
        return db.query()

    
    await cleanup_exit_stack_of_func(process_data)  # Cleanup specific function's resources
    await cleanup_all_exit_stacks()  # Cleanup all resources
    ```

  - **Dependency Caching**: Optional caching of resolved dependencies for better performance
    ```python
    from fastapi_injectable.decorator import injectable

    def get_mayor() -> Mayor:
        return Mayor()

    def get_capital(mayor: Annotated[Mayor, Depends(get_mayor)]) -> Capital:
        return Capital(mayor)

    @injectable
    def get_country(capital: Annotated[Capital, Depends(get_capital)]) -> Country:
        return Country(capital)

    
    country_1 = get_country()
    country_2 = get_country()
    country_3 = get_country()
    assert country_1.capital is country_2.capital is country_3.capital
    assert country_1.capital.mayor is country_2.capital.mayor is country_3.capital.mayor

    
    @injectable(use_cache=False)
    def get_country(capital: Annotated[Capital, Depends(get_capital)]) -> Country:
        return Country(capital)

    country_1 = get_country()
    country_2 = get_country()
    country_3 = get_country()
    assert country_1.capital is not country_2.capital is not country_3.capital
    assert country_1.capital.mayor is not country_2.capital.mayor is not country_3.capital.mayor
    ```

  - **Graceful Shutdown**: Built-in utilities for proper cleanup during application shutdown
    ```python
    from fastapi_injectable import setup_graceful_shutdown

    setup_graceful_shutdown()  # Handles SIGTERM and SIGINT
    ```

  This package is particularly useful for:
  - Background task workers
  - CLI applications
  - Scheduled jobs
  - Test fixtures
  - Any non-HTTP context where you want to leverage FastAPI's dependency injection


  - [FastAPI Injectable](#fastapi-injectable)
     * [Overview](#overview)
     * [Quick Start](#quick-start)
     * [Requirements](#requirements)
     * [Installation](#installation)
     * [Real-world Examples](#real-world-examples)
        + [1. Using `Depends` in in-house background worker](#1-using-depends-in-in-house-background-worker)
     * [Contributing](#contributing)
     * [License](#license)
     * [Issues](#issues)
     * [Credits](#credits)
     * [Bonus](#bonus)



  - Python `3.10` or higher
  - FastAPI `0.112.4` or higher



  You can install `fastapi-injectable` via [pip] from [PyPI]:

  ```console
  $ pip install fastapi-injectable
  ```





  Here's a practical example of using `fastapi-injectable` in a background worker that processes messages.

  You can find the complete example with more details in the [examples/worker](https://github.com/JasperSui/fastapi-injectable/tree/main/example/worker) directory.

  This example demonstrates several key patterns for using dependency injection in background workers:

  1. **Fresh Dependencies per Message**:
     - Each message gets a fresh set of dependencies through `_init_as_consumer()`
     - This ensures clean state for each message, similar to how FastAPI handles HTTP requests

  2. **Proper Resource Management**:
     - Dependencies with cleanup needs (like database connections) are properly handled
     - Cleanup code in generators runs when `cleanup_exit_stack_of_func()` is called
     - Cache is cleared between messages to prevent memory leaks

  3. **Graceful Shutdown**:
     - `setup_graceful_shutdown()` ensures resources are cleaned up on program termination
     - Handles both SIGTERM and SIGINT signals

  This pattern is particularly useful for:
  - Message queue consumers
  - Batch processing jobs
  - Long-running background tasks
  - Any scenario where you need FastAPI-style dependency injection in a worker process



  Contributions are very welcome.
  To learn more, see the [Contributor Guide].



  Distributed under the terms of the [MIT license][license],
  `fastapi-injectable` is free and open source software.



  If you encounter any problems,
  please [file an issue] along with a detailed description.



  1. This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.
  2. Thanks to [@barapa]'s initiation, [his work] inspires me to create this project.

  [@cjolowicz]: https://github.com/cjolowicz
  [@barapa]: https://github.com/barapa
  [pypi]: https://pypi.org/
  [hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
  [file an issue]: https://github.com/JasperSui/fastapi-injectable/issues
  [pip]: https://pip.pypa.io/
  [his work]: https://github.com/fastapi/fastapi/discussions/7720#discussioncomment-11581187



  My blog posts about the prototype of this project:

  1. [Easily Reusing Depends Outside FastAPI Routes](https://j-sui.com/2024/10/26/use-fastapi-depends-outside-fastapi-routes-en/)
  2. [在 FastAPI Routes 以外無痛複用 Depends 的方法](https://j-sui.com/2024/10/26/use-fastapi-depends-outside-fastapi-routes/)

  <!-- github-only -->

  [license]: https://github.com/JasperSui/fastapi-injectable/blob/main/LICENSE
  [contributor guide]: https://github.com/JasperSui/fastapi-injectable/blob/main/CONTRIBUTING.md


pkgId: 82f1a1b75ad2037f47c9ab3cb0f876ca4844fa0f1c6a5301a49c0482e48a027b
name: python-fastapi-login-help
arch: noarch
version: 1.10.3
epoch: 0
release: 1
summary: Development documents and examples for fastapi-login
url: https://github.com/MushroomMaula/fastapi_login
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastapi-login-1.10.3-1.src.rpm
location_href: Packages/python-fastapi-login-help-1.10.3-1.noarch.rpm
checksum_type: sha256
description:
  [![CI](https://img.shields.io/github/actions/workflow/status/MushroomMaula/fastapi_login/ci.yml)](https://github.com/MushroomMaula/fastapi_login/actions)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fastapi-login.svg)](https://pypi.org/project/fastapi-login/)
  [![PyPI](https://img.shields.io/pypi/v/fastapi-login.svg)](https://pypi.org/project/fastapi-login/)
  [![License](https://img.shields.io/github/license/MushroomMaula/fastapi_login.svg)](https://github.com/MushroomMaula/fastapi_login)

  FastAPI-Login tries to provide similar functionality as [Flask-Login](https://github.com/maxcountryman/flask-login) does.



  In-depth documentation can be found at [fastapi-login.readthedocs.io](https://fastapi-login.readthedocs.io/).

  Some examples can be found [here](https://github.com/MushroomMaula/fastapi_login/tree/master/examples).



  ```shell script
  pip install fastapi-login
  ```



  To begin we have to set up our FastAPI app:

  ```python
  from fastapi import FastAPI

  SECRET = 'your-secret-key'

  app = FastAPI()
  ```

  To obtain a suitable secret key you can run `import secrets; print(secrets.token_hex(24))`.

  Now we can import and setup the `LoginManager`, which will handle the process of encoding and decoding our Json Web Tokens.

  ```python
  from fastapi_login import LoginManager

  manager = LoginManager(SECRET, token_url='/auth/token')
  ```

  For the example we will use a dictionary to represent our user database. In your
  application this could also be a real database like sqlite or Postgres. It does not
  matter as you have to provide the function which retrieves the user.

  ```python
  fake_db = {'johndoe@e.mail': {'password': 'hunter2'}}
  ```

  Now we have to provide the ``LoginManager`` with a way to load our user. The
  `user_loader` callback should either return your user object or ``None``

  ```python
  @manager.user_loader()
  def load_user(email: str):  # could also be an asynchronous function
      user = fake_db.get(email)
      return user
  ```

  Now we have to define a way to let the user login in our app. Therefore we will create
  a new route:

  ```python
  from fastapi import Depends
  from fastapi.security import OAuth2PasswordRequestForm
  from fastapi_login.exceptions import InvalidCredentialsException


  @app.post('/auth/token')
  def login(data: OAuth2PasswordRequestForm = Depends()):
      email = data.username
      password = data.password

      user = load_user(email)  # we are using the same function to retrieve the user
      if not user:
          raise InvalidCredentialsException  # you can also use your own HTTPException
      elif password != user['password']:
          raise InvalidCredentialsException

      access_token = manager.create_access_token(
          data=dict(sub=email)
      )
      return {'access_token': access_token, 'token_type': 'bearer'}
  ```

  Now whenever you want your user to be logged in to use a route, you can simply
  use your ``LoginManager`` instance as a dependency.

  ```python
  @app.get('/protected')
  def protected_route(user=Depends(manager)):
      ...
  ```

  If you also want to handle a not authenticated error, you can add your own subclass of Exception to the LoginManager.

  ```python
  from starlette.responses import RedirectResponse

  class NotAuthenticatedException(Exception):
      pass


  def exc_handler(request, exc):
      return RedirectResponse(url='/login')


  manager = LoginManager(..., not_authenticated_exception=NotAuthenticatedException)

  app.add_exception_handler(NotAuthenticatedException, exc_handler)
  ```

  To change the expiration date of the token use the ``expires_delta`` argument of the `create_access_token` method
  with `timedelta`. The default is set 15 min. Please be aware that setting a long expiry date is not considered a good practice
  as it would allow an attacker with the token to use your application as long as he wants.

  ```python
  from datetime import timedelta

  data = dict(sub=user.email)


  token = manager.create_access_token(
      data=data
  )

  long_token = manager.create_access_token(
      data=data, expires=timedelta(hours=12)
  )
  ```



  Instead of checking the header for the token. ``fastapi-login``  also support access using cookies.

  ```python
  from fastapi_login import LoginManager

  manager = LoginManager(SECRET, token_url='/auth/token', use_cookie=True)
  ```

  Now the manager will check the requests cookies the headers for the access token. The name of the cookie can be set using
   ``manager.cookie_name``.
  If you only want to check the requests cookies you can turn the headers off using the ``use_header`` argument

  For convenience the LoginManager also includes the ``set_cookie`` method which sets the cookie to your response,
  with the recommended HTTPOnly flag and the ``manager.cookie_name`` as the key.

  ```python
  from fastapi import Depends
  from starlette.responses import Response


  @app.get('/auth')
  def auth(response: Response, user=Depends(manager)):
      token = manager.create_access_token(
          data=dict(sub=user.email)
      )
      manager.set_cookie(response, token)
      return response
  ```


pkgId: c2f62a41e8cc3422f4f6c81a0e86ff535d6f43efdff1e50f676033edbe374687
name: python-fastapi-mongo-base-help
arch: noarch
version: 0.7.2
epoch: 0
release: 1
summary: Development documents and examples for fastapi-mongo-base
url: https://github.com/mahdikiani/fastapi-mongo-base-app
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastapi-mongo-base-0.7.2-1.src.rpm
location_href: Packages/python-fastapi-mongo-base-help-0.7.2-1.noarch.rpm
checksum_type: sha256
description:
  Contributions are welcome! See CONTRIBUTING.md for more details on how to get involved.


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

rpm_license:
  Copyright (c) 2016 The Python Packaging Authority (PyPA)  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: a704bfd53858164921dea4964e500cca05f2ad5c9032c58357e71a9a75412e64
name: python-fastapi-poe-help
arch: noarch
version: 0.0.50
epoch: 0
release: 1
summary: Development documents and examples for fastapi-poe
url: https://creator.poe.com/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastapi-poe-0.0.50-1.src.rpm
location_href: Packages/python-fastapi-poe-help-0.0.50-1.noarch.rpm
checksum_type: sha256
description:
  An implementation of the
  [Poe protocol](https://creator.poe.com/docs/poe-protocol-specification) using FastAPI.



  This package can also be used as a base to write your own bot. You can inherit from
  `PoeBot` to make a bot:

  ```python
  import fastapi_poe as fp

  class EchoBot(fp.PoeBot):
      async def get_response(self, request: fp.QueryRequest):
          last_message = request.query[-1].content
          yield fp.PartialResponse(text=last_message)

  if __name__ == "__main__":
      fp.run(EchoBot(), allow_without_key=True)
  ```

  Now, run your bot using `python <filename.py>`.

  - In a different terminal, run [ngrok](https://ngrok.com/) to make it publicly
    accessible.
  - Use the publicly accessible url to integrate your bot with
    [poe](https://poe.com/create_bot?server=1)



  Poe servers send requests containing Authorization HTTP header in the format "Bearer
  <access_key>"; the access key is configured in the bot settings page.

  To validate that the request is from the Poe servers, you can either set the environment
  variable POE_ACCESS_KEY or pass the parameter access_key in the run function like:

  ```python
  if __name__ == "__main__":
      fp.run(EchoBot(), access_key=<key>)
  ```



  Check out our starter code
  [repository](https://github.com/poe-platform/server-bot-quick-start) for some examples
  you can use to get started with bot development.


pkgId: 04b316649029f253f2738d4e697cc5450d97b0e2930dc7b54ef6bdb4f15b865c
name: python-fastapi-scaf
arch: noarch
version: 1.2.8
epoch: 0
release: 1
summary: This is a fastapi scaf.
url: https://github.com/atpuxiner/fastapi-scaf
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastapi-scaf-1.2.8-1.src.rpm
location_href: Packages/python-fastapi-scaf-1.2.8-1.noarch.rpm
checksum_type: sha256
description:
  - by: axiner
  - fastapi-scaf
  - This is a fastapi scaf.
      - new project
      - add api
      - about project:
          - auto init project (conf, db, logger...)
          - auto register router
          - auto register middleware
          - ...
      - more docs: [请点击链接](https://blog.csdn.net/atpuxiner/article/details/144291336?fromshare=blogdetail&sharetype=blogdetail&sharerId=144291336&sharerefer=PC&sharesource=atpuxiner&sharefrom=from_link)



  - ABD: ABD模式
      - A api
      - B business
      - D datatype
  - 调用过程: main.py(initializer) - router(middleware) - api - business - (datatype)
  - 结构如下: (命名经过多次修改敲定，简洁易懂，ABD目录贴合避免杂乱无章)
    ```
    └── fastapi-scaf
        ├── app                         (应用)
        │   ├── api                     ├── (api)
        │   │   └── v1                  │   └── (v1)
        │   ├── business                ├── (业务)
        │   ├── datatype                ├── (数据类型)
        │   ├── initializer             ├── (初始化)
        │   │   ├── conf                │   ├── (配置)
        │   │   ├── db                  │   ├── (数据库)
        │   │   ├── logger              │   ├── (日志)
        │   │   └── ...                 │   └── (...)
        │   ├── middleware              ├── (中间件)
        │   ├── router                  ├── (路由)
        │   ├── utils                   ├── (utils)
        │   └── main.py                 └── (main.py)
        ├── config                      (配置目录)
        ├── deploy                      (部署目录)
        ├── docs                        (文档目录)
        ├── log                         (日志目录)
        ├── .gitignore
        ├── LICENSE
        ├── README.md
        └── requirements.txt
    ```



  This package can be installed using pip (>=Python3.11):
  > pip install fastapi-scaf



  - 1）new project
      - `fastapi-scaf new <project_name>`
  - 2）add api
      - `cd to project root dir`
      - `fastapi-scaf add <api_name>`



  - 1）cd to project root dir
  - 2）execute command:
      - `pip install -r requirements.txt`
      - `uvicorn app.main:app --host=0.0.0.0 --port=8000 --log-level=info --log-config=./config/uvicorn_logging.json --workers=5`
      - about uvicorn: [www.uvicorn.org](https://www.uvicorn.org/)



  This project is released under the MIT License (MIT). See [LICENSE](LICENSE)


pkgId: bb301f1cb69325c3d330fde3f4aadb74c8a1f5f59cec86e3c4ff5762f28fb2a6
name: python-fastapi-ws-rpc-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for fastapi-ws-rpc
url: https://github.com/permitio/fastapi_websocket_rpc
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastapi-ws-rpc-0.1.0-1.src.rpm
location_href: Packages/python-fastapi-ws-rpc-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
  <img src="https://i.ibb.co/m8jL6Zd/RPC.png" alt="RPC" border="0" width="50%" />
  </p>




  RPC over Websockets made easy, robust, and production ready

  <a href="https://github.com/permitio/fastapi_websocket_rpc/actions?query=workflow%3ATests" target="_blank">
      <img src="https://github.com/permitio/fastapi_websocket_rpc/workflows/Tests/badge.svg" alt="Tests">
  </a>

  <a href="https://pypi.org/project/fastapi-websocket-rpc/" target="_blank">
      <img src="https://img.shields.io/pypi/v/fastapi-websocket-rpc?color=%2331C654&label=PyPi%20package" alt="Package">
  </a>

  <a href="https://pepy.tech/project/fastapi-websocket-rpc" target="_blank">
      <img src="https://static.pepy.tech/personalized-badge/fastapi-websocket-rpc?period=total&units=international_system&left_color=black&right_color=blue&left_text=Downloads" alt="Downloads">
  </a>

  A fast and durable bidirectional JSON RPC channel over Websockets.
  The easiest way to create a live async channel between two nodes via Python (or other clients).

  - Both server and clients can easily expose Python methods that can be called by the other side.
  Method return values are sent back as RPC responses, which the other side can wait on.
  - Remote methods are easily called via the ```.other.method()``` wrapper
  - Connections are kept alive with a configurable retry mechanism  (using Tenacity)

  - As seen at <a href="https://www.youtube.com/watch?v=KP7tPeKhT3o" target="_blank">PyCon IL 2021</a> and <a href="https://www.youtube.com/watch?v=IuMZVWEUvGs" target="_blank">EuroPython 2021</a>


  Supports and tested on Python >= 3.7

  ```
  pip install fastapi_ws_rpc
  ```




  Say the server exposes an "add" method, e.g. :
  ```python
  class RpcCalculator(RpcMethodsBase):
      async def add(self, a, b):
          return a + b
  ```
  Calling it is as easy as calling the method under the client's "other" property:
  ```python
  response = await client.other.add(a=1,b=2)
  print(response.result) # 3
  ```
  getting the response with the return value.








  ```python
  import uvicorn
  from fastapi import FastAPI
  from fastapi_ws_rpc import RpcMethodsBase, WebsocketRPCEndpoint



  class ConcatServer(RpcMethodsBase):
      async def concat(self, a="", b=""):
          return a + b



  app = FastAPI()

  endpoint = WebsocketRPCEndpoint(ConcatServer())

  endpoint.register_route(app, "/ws")


  uvicorn.run(app, host="0.0.0.0", port=9000)
  ```


  ```python
  import asyncio
  from fastapi_ws_rpc import RpcMethodsBase, WebSocketRpcClient


  async def run_client(uri):
      async with WebSocketRpcClient(uri, RpcMethodsBase()) as client:
          
          response = await client.other.concat(a="hello", b=" world")
          
          print(response.result)  # will print "hello world"



  asyncio.get_event_loop().run_until_complete(
    run_client("ws://localhost:9000/ws")
  )
  ```

  See the [examples](/examples) and [tests](/tests) folders for more server and client examples



  - Clients can call ```client.other.method()```
      - which is a shortcut for ```channel.other.method()```
  - Servers also get the channel object and can call remote methods via ```channel.other.method()```
  - See the [bidirectional call example](examples/bidirectional_server_example.py) for calling client from server and server events (e.g. ```on_connect```).



  Websockets are ideal to create bi-directional realtime connections over the web.
   - Push updates
   - Remote control mechanism
   - Pub / Sub (see [fastapi_websocket_pubsub](https://github.com/permitio/fastapi_websocket_pubsub))
   - Trigger events (see "tests/trigger_flow_test.py")
   - Node negotiations (see "tests/advanced_rpc_test.py :: test_recursive_rpc_calls")



  - [RpcChannel](fastapi_ws_rpc/rpc_channel.py) - implements the RPC-protocol over the websocket
      - Sending RpcRequests per method call
      - Creating promises to track them (via unique call ids), and allow waiting for responses
      - Executing methods on the remote side and serializing return values as
      - Receiving RpcResponses and delivering them to waiting callers
  - [RpcMethods](fastapi_ws_rpc/rpc_methods.py) - classes passed to both client and server-endpoint inits to expose callable methods to the other side.
      - Simply derive from RpcMethodsBase and add your own async methods
      - Note currently only key-word arguments are supported
      - Checkout RpcUtilityMethods for example methods, which are also useful debugging utilities


  - Foundations:

      - Based on [asyncio](https://docs.python.org/3/library/asyncio.html) for the power of Python coroutines

      - Server Endpoint:
          - Based on [FAST-API](https://github.com/tiangolo/fastapi): enjoy all the benefits of a full ASGI platform, including Async-io and dependency injections (for example to authenticate connections)

          - Based on [Pydantic](https://pydantic-docs.helpmanual.io/): easily serialize structured data as part of RPC requests and responses (see 'tests/basic_rpc_test.py :: test_structured_response' for an example)

      - Client :
          - Based on [Tenacity](https://tenacity.readthedocs.io/en/latest/index.html): allowing configurable retries to keep to connection alive
              - see WebSocketRpcClient.__init__'s retry_config
          - Based on python [websockets](https://websockets.readthedocs.io/en/stable/intro.html) - a more comprehensive client than the one offered by Fast-api


  fastapi-websocket-rpc provides a helper logging module to control how it produces logs for you.
  See [fastapi_websocket_rpc/logger.py](fastapi_ws_rpc/logger.py).
  Use ```logging_config.set_mode``` or the 'WS_RPC_LOGGING' environment variable to choose the logging method you prefer or override completely via default logging config.

  example:

  ```python

  from fastapi_ws_rpc.logger import logging_config, LoggingModes

  logging_config.set_mode(LoggingModes.UVICORN)
  ```


  - Please include tests for new features


pkgId: c21eb8a347107282163c7a4a2c959740775b5035178fef3cfe09beb7849c2b12
name: python-fastbootstrap-help
arch: noarch
version: 1.1.0
epoch: 0
release: 1
summary: Development documents and examples for fastbootstrap
url: https://github.com/timofeytkachenko/fastbootstrap
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastbootstrap-1.1.0-1.src.rpm
location_href: Packages/python-fastbootstrap-help-1.1.0-1.noarch.rpm
checksum_type: sha256
description:
  Fast Python implementation of statistical bootstrap
  ___

  ```bash
  pip install fastbootstrap
  ```
  ___

  ```python
  import numpy as np
  from fastbootstrap.bootstrap import two_sample_bootstrap

  n = 10000

  sample_1 = np.random.exponential(scale=1 / 0.001, size=n)
  sample_2 = np.random.exponential(scale=1 / 0.00101, size=n)

  p_value, boot_mean, boot_conf_interval = two_sample_bootstrap(sample_1, sample_2, plot=True)
  ```
  ![img.png](img.png)
  ___
  Check interactive notebook [here](https://nbviewer.org/github/timofeytkachenko/bootstrap/blob/main/bootstrap_experiment.ipynb)


pkgId: 2587d61087394066710e0641e8ddd9f69d244036550717e559de829eac448924
name: python-fastcore-help
arch: noarch
version: 1.7.27
epoch: 0
release: 1
summary: Development documents and examples for fastcore
url: https://github.com/AnswerDotAI/fastcore/
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastcore-1.7.27-1.src.rpm
location_href: Packages/python-fastcore-help-1.7.27-1.noarch.rpm
checksum_type: sha256
description:
  <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

  Python is a powerful, dynamic language. Rather than bake everything into
  the language, it lets the programmer customize it to make it work for
  them. `fastcore` uses this flexibility to add to Python features
  inspired by other languages we’ve loved, like multiple dispatch from
  Julia, mixins from Ruby, and currying, binding, and more from Haskell.
  It also adds some “missing features” and clean up some rough edges in
  the Python standard library, such as simplifying parallel processing,
  and bringing ideas from NumPy over to Python’s `list` type.



  To install fastcore run: `conda install fastcore -c fastai` (if you use
  Anaconda, which we recommend) or `pip install fastcore`. For an
  [editable
  install](https://stackoverflow.com/questions/35064426/when-would-the-e-editable-option-be-useful-with-pip-install),
  clone this repo and run: `pip install -e ".[dev]"`. fastcore is tested
  to work on Ubuntu, macOS and Windows (versions tested are those shown
  with the `-latest` suffix
  [here](https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources)).

  `fastcore` contains many features, including:

  - `fastcore.test`: Simple testing functions
  - `fastcore.foundation`: Mixins, delegation, composition, and more
  - `fastcore.xtras`: Utility functions to help with functional-style
    programming, parallel processing, and more
  - `fastcore.dispatch`: Multiple dispatch methods
  - `fastcore.transform`: Pipelines of composed partially reversible
    transformations

  To get started, we recommend you read through [the fastcore
  tour](https://fastcore.fast.ai/tour.html).



  After you clone this repository, please run `nbdev_install_hooks` in
  your terminal. This sets up git hooks, which clean up the notebooks to
  remove the extraneous stuff stored in the notebooks (e.g. which cells
  you ran) which causes unnecessary merge conflicts.

  To run the tests in parallel, launch `nbdev_test`.

  Before submitting a PR, check that the local library and notebooks
  match.

  - If you made a change to the notebooks in one of the exported cells,
    you can export it to the library with `nbdev_prepare`.
  - If you made a change to the library, you can export it back to the
    notebooks with `nbdev_update`.


pkgId: 259228925a8ec7f5bfe5ebf9051ff0a1b91afb71b98b946db4e45da96b24cbd7
name: python-fastcrud-help
arch: noarch
version: 0.15.2
epoch: 0
release: 1
summary: Development documents and examples for fastcrud
url: https://github.com/igorbenav/fastcrud
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastcrud-0.15.2-1.src.rpm
location_href: Packages/python-fastcrud-help-0.15.2-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
    <a href="https://igorbenav.github.io/fastcrud/">
      <img src="https://github.com/igorbenav/fastcrud/blob/main/assets/fastcrud.png?raw=true" alt="FastCRUD written in white with a drawing of a gear and inside this gear a bolt." width="45%" height="auto">
    </a>
  </p>
  <p align="center" markdown=1>
    <i>Powerful CRUD methods and automatic endpoint creation for FastAPI.</i>
  </p>
  <p align="center" markdown=1>
  <a href="https://github.com/igorbenav/fastcrud/actions/workflows/tests.yml">
    <img src="https://github.com/igorbenav/fastcrud/actions/workflows/tests.yml/badge.svg" alt="Tests"/>
  </a>
  <a href="https://pypi.org/project/fastcrud/">
    <img src="https://img.shields.io/pypi/v/fastcrud?color=%2334D058&label=pypi%20package" alt="PyPi Version"/>
  </a>
  <a href="https://pypi.org/project/fastcrud/">
    <img src="https://img.shields.io/pypi/pyversions/fastcrud.svg?color=%2334D058" alt="Supported Python Versions"/>
  </a>
  <a href="https://codecov.io/gh/igorbenav/fastcrud" >
    <img src="https://codecov.io/gh/igorbenav/fastcrud/graph/badge.svg?token=J7XUP29RKU"/>
  </a>
  </p>
  <hr>
  <p align="justify">
  <b>FastCRUD</b> is a Python package for <b>FastAPI</b>, offering robust async CRUD operations and flexible endpoint creation utilities, streamlined through advanced features like <b>auto-detected join</b> conditions, <b>dynamic sorting</b>, and offset and cursor <b>pagination</b>.
  </p>
  <p><b>Documentation</b>: <a href="https://igorbenav.github.io/fastcrud/">igorbenav.github.io/fastcrud</a></p>
  <hr>
  <h2>Features</h2>

  - ⚡️ **Fully Async**: Leverages Python's async capabilities for non-blocking database operations.
  - 📚 **SQLAlchemy 2.0**: Works with the latest SQLAlchemy version for robust database interactions.
  - 🦾 **Powerful CRUD Functionality**: Full suite of efficient CRUD operations with support for joins.
  - ⚙️ **Dynamic Query Building**: Supports building complex queries dynamically, including filtering, sorting, and pagination.
  - 🤝 **Advanced Join Operations**: Facilitates performing SQL joins with other models with automatic join condition detection.
  - 📖 **Built-in Offset Pagination**: Comes with ready-to-use offset pagination.
  - ➤ **Cursor-based Pagination**: Implements efficient pagination for large datasets, ideal for infinite scrolling interfaces.
  - 🤸‍♂️ **Modular and Extensible**: Designed for easy extension and customization to fit your requirements.
  - 🛣️ **Auto-generated Endpoints**: Streamlines the process of adding CRUD endpoints with custom dependencies and configurations.

  <h2>Requirements</h2>
  <p>Before installing FastCRUD, ensure you have the following prerequisites:</p>
  <ul>
    <li><b>Python:</b> Version 3.9 or newer.</li>
    <li><b>FastAPI:</b> FastCRUD is built to work with FastAPI, so having FastAPI in your project is essential.</li>
    <li><b>SQLAlchemy:</b> Version 2.0.21 or newer. FastCRUD uses SQLAlchemy for database operations.</li>
    <li><b>Pydantic:</b> Version 2.4.1 or newer. FastCRUD leverages Pydantic models for data validation and serialization.</li>
    <li><b>SQLAlchemy-Utils:</b> Optional, but recommended for additional SQLAlchemy utilities.</li>
  </ul>

  <h2>Installing</h2>

  To install, just run:

  ```sh
  pip install fastcrud
  ```

  Or, if using poetry:

  ```sh
  poetry add fastcrud
  ```

  <h2>Usage</h2>

  FastCRUD offers two primary ways to use its functionalities:

  1. By using `crud_router` for automatic endpoint creation.
  2. By integrating `FastCRUD` directly into your FastAPI endpoints for more control.

  Below are examples demonstrating both approaches:

  <h3>Using crud_router for Automatic Endpoint Creation</h3>

  Here's a quick example to get you started:

  <h4>Define Your Model and Schema</h4>

  **models.py**

  ```python
  from sqlalchemy import Column, Integer, String
  from sqlalchemy.orm import DeclarativeBase

  class Base(DeclarativeBase):
      pass

  class Item(Base):
      __tablename__ = 'items'
      id = Column(Integer, primary_key=True)
      name = Column(String)
      description = Column(String)
  ```

  **schemas.py**

  ```python
  from pydantic import BaseModel

  class ItemCreateSchema(BaseModel):
      name: str
      description: str

  class ItemUpdateSchema(BaseModel):
      name: str
      description: str
  ```

  <h4>Set Up FastAPI and FastCRUD</h4>

  **main.py**

  ```python
  from typing import AsyncGenerator

  from fastapi import FastAPI
  from fastcrud import FastCRUD, crud_router
  from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
  from sqlalchemy.orm import sessionmaker

  from yourapp.models import Base, Item
  from yourapp.schemas import ItemCreateSchema, ItemUpdateSchema


  DATABASE_URL = "sqlite+aiosqlite:///./test.db"
  engine = create_async_engine(DATABASE_URL, echo=True)
  async_session = sessionmaker(engine, class_=AsyncSession, expire_on_commit=False)


  async def get_session() -> AsyncGenerator[AsyncSession, None]:
      async with async_session() as session:
          yield session


  async def lifespan(app: FastAPI):
      async with engine.begin() as conn:
          await conn.run_sync(Base.metadata.create_all)
      yield


  app = FastAPI(lifespan=lifespan)


  item_router = crud_router(
      session=get_session,
      model=Item,
      create_schema=ItemCreateSchema,
      update_schema=ItemUpdateSchema,
      path="/items",
      tags=["Items"],
  )

  app.include_router(item_router)

  ```

  <h3>Using FastCRUD in User-Defined FastAPI Endpoints</h3>

  For more control over your endpoints, you can use FastCRUD directly within your custom FastAPI route functions. Here's an example:

  **main.py**

  ```python
  from typing import AsyncGenerator

  from fastapi import FastAPI, Depends, HTTPException
  from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
  from sqlalchemy.orm import sessionmaker
  from fastcrud import FastCRUD

  from models import Base, Item
  from schemas import ItemCreateSchema, ItemUpdateSchema


  DATABASE_URL = "sqlite+aiosqlite:///./test.db"
  engine = create_async_engine(DATABASE_URL, echo=True)
  async_session = sessionmaker(engine, class_=AsyncSession, expire_on_commit=False)


  async def get_session() -> AsyncGenerator[AsyncSession, None]:
      async with async_session() as session:
          yield session


  async def lifespan(app: FastAPI):
      async with engine.begin() as conn:
          await conn.run_sync(Base.metadata.create_all)
      yield


  app = FastAPI(lifespan=lifespan)


  item_crud = FastCRUD(Item)

  @app.post("/custom/items/")
  async def create_item(
      item_data: ItemCreateSchema, db: AsyncSession = Depends(get_session)
  ):
      return await item_crud.create(db, item_data)

  @app.get("/custom/items/{item_id}")
  async def read_item(item_id: int, db: AsyncSession = Depends(get_session)):
      item = await item_crud.get(db, id=item_id)
      if not item:
          raise HTTPException(status_code=404, detail="Item not found")
      return item


  ```

  In this example, we define custom endpoints for creating and reading items using FastCRUD directly, providing more flexibility in how the endpoints are structured and how the responses are handled.

  To read more detailed descriptions, go to the <a href="https://igorbenav.github.io/fastcrud/">documentation</a>.



  - This project was heavily inspired by CRUDBase in [`FastAPI Microservices`](https://github.com/Kludex/fastapi-microservices) by [@kludex](https://github.com/kludex).
  - Thanks [@ada0l](https://github.com/ada0l) for the PyPI package name!



  - **[flask-muck](https://github.com/dtiesling/flask-muck)** - _"I'd love something like this for flask"_ There you have it
  - **[FastAPI CRUD Router](https://github.com/awtkns/fastapi-crudrouter)** - Supports multiple ORMs, but currently unmantained
  - **[FastAPI Quick CRUD](https://github.com/LuisLuii/FastAPIQuickCRUD)** - Same purpose, but only for SQLAlchemy 1.4



  [`MIT`](LICENSE.md)



  Igor Magalhaes – [@igormagalhaesr](https://twitter.com/igormagalhaesr) – igormagalhaesr@gmail.com
  [github.com/igorbenav](https://github.com/igorbenav/)


pkgId: 56ede120513777f5d56bde1a11c397cac83757180db9d66cc8ffc17bd916eb38
name: python-fastcs-help
arch: noarch
version: 0.8.0
epoch: 0
release: 1
summary: Development documents and examples for fastcs
url: https://pypi.org/project/fastcs/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastcs-0.8.0-1.src.rpm
location_href: Packages/python-fastcs-help-0.8.0-1.noarch.rpm
checksum_type: sha256
description:
  <img alt="FastCS Logo" align="right" width="100" height="100" src="https://raw.githubusercontent.com/DiamondLightSource/FastCS/main/docs/images/fastcs.svg" target=https://github.com/DiamondLightSource/FastCS>

  [![CI](https://github.com/DiamondLightSource/FastCS/actions/workflows/ci.yml/badge.svg)](https://github.com/DiamondLightSource/FastCS/actions/workflows/ci.yml)
  [![Coverage](https://codecov.io/gh/DiamondLightSource/FastCS/branch/main/graph/badge.svg)](https://codecov.io/gh/DiamondLightSource/FastCS)
  [![PyPI](https://img.shields.io/pypi/v/fastcs.svg)](https://pypi.org/project/fastcs)
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)



  Source          | <https://github.com/DiamondLightSource/FastCS>
  :---:           | :---:
  PyPI            | `pip install fastcs`
  Documentation   | <https://diamondlightsource.github.io/FastCS>
  Releases        | <https://github.com/DiamondLightSource/FastCS/releases>

  FastCS is a control system agnostic framework for building Device support in Python that
  will work for both EPICS and Tango without depending on either.

  <!-- README only content. Anything below this line won't be included in index.md -->

  See https://diamondlightsource.github.io/FastCS for more detailed documentation.

rpm_license:
  Apache License Version 2.0, January 2004 http://www.apache.org/licenses/  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION  1. Definitions.  "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.  "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.  "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.  "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.  "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.  "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.  "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).  "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.  "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."  "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.  2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.  3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.  4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:  (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and  (b) You must cause any modified files to carry prominent notices stating that You changed the files; and  (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and  (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.  You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.  5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.  6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.  7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.  8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.  9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.  END OF TERMS AND CONDITIONS  APPENDIX: How to apply the Apache License to your work.  To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!)  The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.  Copyright {yyyy} {name of copyright owner}  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


pkgId: c1f2f84ed2e1782de1f09538edef6d100b415cad3e412aae8a4fa392a5043482
name: python-fastdev-help
arch: noarch
version: 0.1.10
epoch: 0
release: 1
summary: Development documents and examples for fastdev
url: https://fastdev.jianglongye.com/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastdev-0.1.10-1.src.rpm
location_href: Packages/python-fastdev-help-0.1.10-1.noarch.rpm
checksum_type: sha256
description:
  > Type Less, Code More

  - Reasearch-oriented: Offers a set of tools specifically designed for deep learning research.
  - User-friendly: Provide simple yet flexible APIs to minimize boilerplate code.
  - Strong-typed: Ensures type checking and code completion for a smoother development experience.

  The package is available on PyPI, you can install it via pip:
  ```shell
  pip install fastdev
  ```
  Or you can install the latest version from the source code: (not available yet)
  ```shell
  pip install "git+https://github.com/jianglongye/fastdev.git"
  ```

  This project borrows code from following excellent projects:
  - [PyTorch3D](https://github.com/facebookresearch/pytorch3d)


pkgId: 9fdb0245382b0936cc832187c0b2c579405b464b381fb66e2bdcb2ccaef017a5
name: python-fastlabel-help
arch: noarch
version: 0.19.0
epoch: 0
release: 1
summary: Development documents and examples for fastlabel
url: https://pypi.org/project/fastlabel/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-fastlabel-0.19.0-1.src.rpm
location_href: Packages/python-fastlabel-help-0.19.0-1.noarch.rpm
checksum_type: sha256
description:
  - [Installation](#installation)
  - [Usage](#usage)
    - [Limitation](#limitation)
  - [Task](#task)
    - [Image](#image)
    - [Image Classification](#image-classification)
    - [Multi Image Classification](#multi-image-classification)
    - [Sequential Image](#sequential-image)
    - [Video](#video)
    - [Video Classification](#video-classification)
    - [Text](#text)
    - [Text Classification](#text-classification)
    - [Audio](#audio)
    - [Audio Classification](#audio-classification)
    - [PCD](#pcd)
    - [Sequential PCD](#sequential-pcd)
    - [DICOM](#dicom)
    - [Common](#common)
  - [Appendix](#appendix)
  - [Annotation](#annotation)
  - [Project](#project)
  - [Dataset](#dataset)
  - [Converter](#converter)
    - [FastLabel To COCO](#fastlabel-to-coco)
    - [FastLabel To YOLO](#fastlabel-to-yolo)
    - [FastLabel To Pascal VOC](#fastlabel-to-pascal-voc)
    - [FastLabel To labelme](#fastlabel-to-labelme)
    - [FastLabel To Segmentation](#fastlabel-to-segmentation)
    - [COCO To FastLabel](#coco-to-fastlabel)
    - [YOLO To FastLabel](#yolo-to-fastlabel)
    - [Pascal VOC To FastLabel](#pascal-voc-to-fastlabel)
    - [labelme To FastLabel](#labelme-to-fastlabel)
    - [Mask To FastLabel Segmentation Points](#mask-to-fastlabel-segmentation-points)
  - [Model](#model)
  - [API Docs](#api-docs)



  ```bash
  pip install --upgrade fastlabel
  ```

  > Python version 3.8 or greater is required



  Configure API Key in environment variable.

  ```bash
  export FASTLABEL_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
  ```

  Initialize fastlabel client.

  ```python
  import fastlabel
  client = fastlabel.Client()
  ```



  API is allowed to call 10000 times per 10 minutes. If you create/delete a large size of tasks, please wait a second for every requests.





  Supported following project types:

  - Image - Bounding Box
  - Image - Polygon
  - Image - Keypoint
  - Image - Line
  - Image - Segmentation
  - Image - Pose Estimation
  - Image - All



  Create a new task.

  ```python
  task_id = client.create_image_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.jpg",
      file_path="./sample.jpg"
  )
  ```

  Create a new task with pre-defined annotations. (Class should be configured on your project in advance)

  ```python
  task_id = client.create_image_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.jpg",
      file_path="./sample.jpg",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      annotations=[{
          "type": "bbox",
          "value": "annotation-value",
          "attributes": [
              {
                  "key": "attribute-key",
                  "value": "attribute-value"
              }
          ],
          "points": [
              100,  # top-left x
              100,  # top-left y
              200,  # bottom-right x
              200   # bottom-right y
          ]
      }]
  )
  ```

  > Check [examples/create_image_task.py](/examples/create_image_task.py).



  - You can upload up to a size of 20 MB.



  Create a new task by integrated image.
  (Project storage setting should be configured in advance.)

  ```python
  task_id = client.create_integrated_image_task(
      project="YOUR_PROJECT_SLUG",
      file_path="<integrated-storage-dir>/sample.jpg",
      storage_type="gcp",
  )
  ```

  Create a new task with pre-defined annotations. (Class should be configured on your project in advance)

  ```python
  task_id = client.create_image_task(
      project="YOUR_PROJECT_SLUG",
      file_path="<integrated-storage-dir>/sample.jpg",
      storage_type="gcp",
      annotations=[{
          "type": "bbox",
          "value": "annotation-value",
          "attributes": [
              {
                  "key": "attribute-key",
                  "value": "attribute-value"
              }
          ],
          "points": [
              100,  # top-left x
              100,  # top-left y
              200,  # bottom-right x
              200   # bottom-right y
          ]
      }]
  )
  ```



  - You can upload up to a size of 20 MB.



  Find a single task.

  ```python
  task = client.find_image_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_image_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 1000 tasks)

  ```python
  tasks = client.get_image_tasks(project="YOUR_PROJECT_SLUG")
  ```

  - Filter and Get tasks. (Up to 1000 tasks)

  ```python
  tasks = client.get_image_tasks(
      project="YOUR_PROJECT_SLUG",
      status="approved", # status can be 'pending', 'registered', 'completed', 'skipped', 'reviewed' 'sent_back', 'approved', 'declined'
      tags=["tag1", "tag2"] # up to 10 tags
  )
  ```

  Get a large size of tasks. (Over 1000 tasks)

  ```python
  import time


  all_tasks = []
  offset = None
  while True:
      time.sleep(1)

      tasks = client.get_image_tasks(project="YOUR_PROJECT_SLUG", offset=offset)
      all_tasks.extend(tasks)

      if len(tasks) > 0:
          offset = len(all_tasks)  # Set the offset
      else:
          break
  ```

  > Please wait a second before sending another requests!



  Update a single task.

  ```python
  task_id = client.update_image_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      annotations=[
          {
              "type": "bbox",
              "value": "cat"
              "attributes": [
                  { "key": "kind", "value": "Scottish field" }
              ],
              "points": [
                  100,  # top-left x
                  100,  # top-left y
                  200,  # bottom-right x
                  200   # bottom-right y
              ]
          }
      ],
      
      relations=[
        {
          "startIndex": 1,
          "endIndex": 0,
        },
        {
          "startIndex": 2,
          "endIndex": 0
        }
      ]
  )
  ```



  Example of a single image task object

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "cat.jpg",
      "width": 100,   # image width
      "height": 100,  # image height
      "url": "YOUR_TASK_URL",
      "status": "registered",
      "externalStatus": "registered",
      "priority": 10,
      "tags": [],
      "assignee": "ASSIGNEE_NAME",
      "reviewer": "REVIEWER_NAME",
      "externalAssignee": "EXTERNAL_ASSIGNEE_NAME",
      "externalReviewer": "EXTERNAL_REVIEWER_NAME",
      "annotations": [
          {
              "attributes": [
                  { "key": "kind", "name": "Kind", "type": "text", "value": "Scottish field" }
              ],
              "color": "#b36d18",
              "points": [
                  100,  # top-left x
                  100,  # top-left y
                  200,  # bottom-right x
                  200   # bottom-right y
              ],
              "rotation": 0,
              "title": "Cat",
              "type": "bbox",
              "value": "cat"
          }
      ],
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```

  Example when the project type is Image - Pose Estimation

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "person.jpg",
      "width": 255,   # image width
      "height": 255,  # image height
      "url": "YOUR_TASK_URL",
      "status": "registered",
      "externalStatus": "registered",
      "priority": 10,
      "tags": [],
      "assignee": "ASSIGNEE_NAME",
      "reviewer": "REVIEWER_NAME",
      "externalAssignee": "EXTERNAL_ASSIGNEE_NAME",
      "externalReviewer": "EXTERNAL_REVIEWER_NAME",
      "annotations":[
         {
            "type":"pose_estimation",
            "title":"jesture",
            "value":"jesture",
            "color":"#10c414",
            "attributes": [],
            "keypoints":[
               {
                  "name":"頭",
                  "key":"head",
                  "value":[
                     102.59, # x
                     23.04,  # y
                     1       # 0:invisible, 1:visible
                  ],
                  "edges":[
                     "right_shoulder",
                     "left_shoulder"
                  ]
               },
               {
                  "name":"右肩",
                  "key":"right_shoulder",
                  "value":[
                     186.69,
                     114.11,
                     1
                  ],
                  "edges":[
                     "head"
                  ]
               },
               {
                  "name":"左肩",
                  "key":"left_shoulder",
                  "value":[
                     37.23,
                     109.29,
                     1
                  ],
                  "edges":[
                     "head"
                  ]
               }
            ]
         }
      ],
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```



  Get tasks and export images with annotations.
  Only support the following image extension.

  - jpeg
  - jpg
  - png
  - tif
  - tiff
  - bmp

  ```python
  tasks = client.get_image_tasks(project="YOUR_PROJECT_SLUG")
  client.export_image_with_annotations(
      tasks=tasks, image_dir="IMAGE_DIR", output_dir="OUTPUT_DIR"
  )
  ```



  This function is alpha version. It is subject to major changes in the future.

  Integration is possible only when tasks are registered from the objects divided by the dataset.
  Only bbox and polygon annotation types are supported.

  In the case of a task divided under the following conditions.

  - Dataset slug: `image`
  - Object name: `cat.jpg`
  - Split count: `3×3`

  Objects are registered in the data set in the following form.

  - image/cat/1.jpg
  - image/cat/2.jpg
  - image/cat/3.jpg
  - (omit)
  - image/cat/9.jpg

  The annotations at the edges of the image are combined. However, annotations with a maximum length of 300px may not work.

  In this case, SPLIT_IMAGE_TASK_NAME_PREFIX specifies `image/cat`.

  ```python
  task = client.find_integrated_image_task_by_prefix(
      project="YOUR_PROJECT_SLUG",
      prefix="SPLIT_IMAGE_TASK_NAME_PREFIX",
  )
  ```



  Example of a integrated image task object

  ```python
  {
      'name': 'image/cat.jpg',
      "annotations": [
          {
              "attributes": [],
              "color": "#b36d18",
              "confidenceScore"; -1,
              "keypoints": [],
              "points": [200,200,300,400],
              "rotation": 0,
              "title": "Bird",
              "type": "polygon",
              "value": "bird"
          }
      ],
  }
  ```



  Supported following project types:

  - Image - Classification



  Create a new task.

  ```python
  task_id = client.create_image_classification_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.jpg",
      file_path="./sample.jpg",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      attributes=[
          {
              "key": "attribute-key",
              "value": "attribute-value"
          }
      ],
  )
  ```



  - You can upload up to a size of 20 MB.



  Create a new classification task by integrated image.
  (Project storage setting should be configured in advance.)

  ```python
  task_id = client.create_integrated_image_classification_task(
      project="YOUR_PROJECT_SLUG",
      file_path="<integrated-storage-dir>/sample.jpg",
      storage_type="gcp",
  )
  ```



  Find a single task.

  ```python
  task = client.find_image_classification_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_image_classification_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 1000 tasks)

  ```python
  tasks = client.get_image_classification_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_image_classification_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      attributes=[
          {
              "key": "attribute-key",
              "value": "attribute-value"
          }
      ],
  )
  ```



  Example of a single image classification task object

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "cat.jpg",
      "width": 100,   # image width
      "height": 100,  # image height
      "url": "YOUR_TASK_URL",
      "status": "registered",
      "externalStatus": "registered",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      "tags": [],
      "assignee": "ASSIGNEE_NAME",
      "reviewer": "REVIEWER_NAME",
      "externalAssignee": "EXTERNAL_ASSIGNEE_NAME",
      "externalReviewer": "EXTERNAL_REVIEWER_NAME",
      "attributes": [
          {
              "key": "kind",
              "name": "Kind",
              "type": "text",
              "value": "Scottish field"
          }
      ],
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```



  Supported following project types:

  - Multi Image - Classification



  Create a new task.

  ```python
  task = client.create_multi_image_classification_task(
      project="YOUR_PROJECT_SLUG",
      name="sample",
      folder_path="./sample",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      attributes=[
          {
              "type": "text",
              "key": "attribute-key",
              "value": "attribute-value"
          }
      ]
  )
  ```



  - You can upload up to a size of 20 MB.
  - You can upload up to a total size of 2 GB.
  - You can upload up to 6 files in total.



  Find a single task.

  ```python
  task = client.find_multi_image_classification_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_multi_image_classification_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks.

  ```python
  tasks = client.get_multi_image_classification_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_multi_image_classification_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      attributes=[
          {
              "type": "text",
              "key": "attribute-key",
              "value": "attribute-value"
          }
      ]
  )
  ```



  Example of a single task object

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "sample",
      "contents": [
          {
              "name": "content-name-1",
              "url": "content-url-1",
              "width": 100,
              "height": 100,
          },
          {
              "name": "content-name-2",
              "url": "content-url-2",
              "width": 100,
              "height": 100,
          }
      ],
      "status": "registered",
      "externalStatus": "registered",
      "priority": 10,
      "tags": [],
      "assignee": "ASSIGNEE_NAME",
      "reviewer": "REVIEWER_NAME",
      "externalAssignee": "EXTERNAL_ASSIGNEE_NAME",
      "externalReviewer": "EXTERNAL_REVIEWER_NAME",
      "attributes": [
          {
              "type": "text",
              "key": "attribute-key-1",
              "value": "attribute-value-1"
          },
          {
              "type": "text",
              "key": "attribute-key-2",
              "value": "attribute-value-2"
          }
      ],
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```



  Supported following project types:

  - Sequential Image - Bounding Box
  - Sequential Image - Polygon
  - Sequential Image - Keypoint
  - Sequential Image - Line
  - Sequential Image - Segmentation



  Create a new task.

  ```python
  task = client.create_sequential_image_task(
      project="YOUR_PROJECT_SLUG",
      name="sample",
      folder_path="./sample",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      annotations=[{
          "type": "segmentation",
          "value": "annotation-value",
          "attributes": [
              {
                  "key": "attribute-key",
                  "value": "attribute-value"
              }
          ],
          "content": "01.jpg",
          "points": [[[
              100,
              100,
              300,
              100,
              300,
              300,
              100,
              300,
              100,
              100
          ]]] # clockwise rotation
      }]
  )
  ```



  - You can upload up to a size of 20 MB.
  - You can upload up to a total size of 512 MB.
  - You can upload up to 250 files in total.



  Find a single task.

  ```python
  task = client.find_sequential_image_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_sequential_image_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks.

  ```python
  tasks = client.get_sequential_image_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_sequential_image_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      annotations=[
          {
              "type": "bbox",
              "value": "cat",
              "content": "cat1.jpg",
              "attributes": [
                  { "key": "key", "value": "value1" }
              ],
              "points": [990, 560, 980, 550]
          }
      ]
  )
  ```



  Example of a single task object

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "cat.jpg",
      "contents": [
          {
              "name": "content-name",
              "url": "content-url",
              "width": 100,
              "height": 100,
          }
      ],
      "status": "registered",
      "externalStatus": "registered",
      "priority": 10,
      "tags": [],
      "assignee": "ASSIGNEE_NAME",
      "reviewer": "REVIEWER_NAME",
      "externalAssignee": "EXTERNAL_ASSIGNEE_NAME",
      "externalReviewer": "EXTERNAL_REVIEWER_NAME",
      "annotations": [
          {
              "content": "content-name"
              "attributes": [],
              "color": "#b36d18",
              "points": [[[
                  100,
                  100,
                  300,
                  100,
                  300,
                  300,
                  100,
                  300,
                  100,
                  100
              ]]]
              "title": "Cat",
              "type": "bbox",
              "value": "cat"
          }
      ],
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```



  Supported following project types:

  - Video - Bounding Box
  - Video - Keypoint
  - Video - Line



  Create a new task.

  ```python
  task_id = client.create_video_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.mp4",
      file_path="./sample.mp4"
  )
  ```

  Create a new task with pre-defined annotations. (Class should be configured on your project in advance)

  ```python
  task_id = client.create_video_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.mp4",
      file_path="./sample.mp4",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      annotations=[{
          "type": "bbox",
          "value": "person",
          "points": {
              "1": {  # number of frame
                  "value": [
                      100,  # top-left x
                      100,  # top-left y
                      200,  # bottom-right x
                      200   # bottom-right y
                  ],
                  
                  
                  "autogenerated": False
              },
              "2": {
                  "value": [
                      110,
                      110,
                      220,
                      220
                  ],
                  "autogenerated": True
              },
              "3": {
                  "value": [
                      120,
                      120,
                      240,
                      240
                  ],
                  "autogenerated": False
              }
          }
      }]
  )
  ```



  - You can upload up to a size of 250 MB.
  - You can upload only videos with H.264 encoding.
  - You can upload only MP4 file format.



  Find a single task.

  ```python
  task = client.find_video_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_video_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 10 tasks)

  ```python
  tasks = client.get_video_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_video_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      annotations=[{
          "type": "bbox",
          "value": "bird",
          "points": {
              "1": {
                  "value": [
                      100,
                      100,
                      200,
                      200
                  ],
                  "autogenerated": False
              },
              "2": {
                  "value": [
                      110,
                      110,
                      220,
                      220
                  ],
                  "autogenerated": True
              },
              "3": {
                  "value": [
                      120,
                      120,
                      240,
                      240
                  ],
                  "autogenerated": False
              }
          }
      }]
  )
  ```



  This function is alpha version. It is subject to major changes in the future.

  Integration is possible only when tasks are registered from the objects divided by the dataset.

  In the case of a task divided under the following conditions.

  - Dataset slug: `video`
  - Object name: `cat.mp4`
  - Split count: `3`

  Objects are registered in the data set in the following form.

  - video/cat/1.mp4
  - video/cat/2.mp4
  - video/cat/3.mp4

  In this case, SPLIT_VIDEO_TASK_NAME_PREFIX specifies `video/cat`.

  ```python
  task = client.find_integrated_video_task_by_prefix(
      project="YOUR_PROJECT_SLUG",
      prefix="SPLIT_VIDEO_TASK_NAME_PREFIX",
  )
  ```



  Example of a single vide task object

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "cat.jpg",
      "width": 100,   # image width
      "height": 100,  # image height
      "fps": 30.0,    # frame per seconds
      "frameCount": 480,  # total frame count of video
      "duration": 16.0,   # total duration of video
      "url": "YOUR_TASK_URL",
      "status": "registered",
      "externalStatus": "registered",
      "priority": 10,
      "tags": [],
      "assignee": "ASSIGNEE_NAME",
      "reviewer": "REVIEWER_NAME",
      "externalAssignee": "EXTERNAL_ASSIGNEE_NAME",
      "externalReviewer": "EXTERNAL_REVIEWER_NAME",
      "annotations": [
          {
              "attributes": [],
              "color": "#b36d18",
              "points": {
                  "1": {  # number of frame
                      "value": [
                          100,  # top-left x
                          100,  # top-left y
                          200,  # bottom-right x
                          200   # bottom-right y
                      ],
                      "autogenerated": False  # False when annotated manually. True when auto-generated by system.
                  },
                  "2": {
                      "value": [
                          110,
                          110,
                          220,
                          220
                      ],
                      "autogenerated": True
                  },
                  "3": {
                      "value": [
                          120,
                          120,
                          240,
                          240
                      ],
                      "autogenerated": False
                  }
              },
              "title": "Cat",
              "type": "bbox",
              "value": "cat"
          }
      ],
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```



  Supported following project types:

  - Video - Classification (Single)



  Create a new task.

  ```python
  task_id = client.create_video_classification_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.mp4",
      file_path="./sample.mp4",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      attributes=[
          {
              "key": "attribute-key",
              "value": "attribute-value"
          }
      ],
  )
  ```



  - You can upload up to a size of 250 MB.



  Find a single task.

  ```python
  task = client.find_video_classification_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_video_classification_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 1000 tasks)

  ```python
  tasks = client.get_video_classification_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_video_classification_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      attributes=[
          {
              "key": "attribute-key",
              "value": "attribute-value"
          }
      ],
  )
  ```



  Supported following project types:

  - Text - NER



  Create a new task.

  ```python
  task_id = client.create_text_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.txt",
      file_path="./sample.txt"
  )
  ```

  Create a new task with pre-defined annotations. (Class should be configured on your project in advance)

  ```python
  task_id = client.create_text_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.txt",
      file_path="./sample.txt",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      annotations=[{
          "type": "ner",
          "value": "person",
          "start": 0,
          "end": 10,
          "text": "1234567890"
      }]
  )
  ```



  - You can upload up to a size of 2 MB.



  Find a single task.

  ```python
  task = client.find_text_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_text_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 10 tasks)

  ```python
  tasks = client.get_text_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_text_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      annotations=[{
          "type": "bbox",
          "value": "bird",
          "start": 0,
          "end": 10,
          "text": "0123456789"
      }]
  )
  ```



  Example of a single text task object

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "cat.txt",
      "url": "YOUR_TASK_URL",
      "status": "registered",
      "externalStatus": "registered",
      "priority": 10,
      "tags": [],
      "assignee": "ASSIGNEE_NAME",
      "reviewer": "REVIEWER_NAME",
      "externalAssignee": "EXTERNAL_ASSIGNEE_NAME",
      "externalReviewer": "EXTERNAL_REVIEWER_NAME",
      "annotations": [
          {
              "attributes": [],
              "color": "#b36d18",
              "text": "0123456789",
              "start": 0,
              "end": 10,
              "title": "Cat",
              "type": "ner",
              "value": "cat"
          }
      ],
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```



  Supported following project types:

  - Text - Classification (Single)



  Create a new task.

  ```python
  task_id = client.create_text_classification_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.txt",
      file_path="./sample.txt",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      attributes=[
          {
              "key": "attribute-key",
              "value": "attribute-value"
          }
      ],
  )
  ```



  - You can upload up to a size of 2 MB.



  Find a single task.

  ```python
  task = client.find_text_classification_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_text_classification_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 1000 tasks)

  ```python
  tasks = client.get_text_classification_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_text_classification_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      attributes=[
          {
              "key": "attribute-key",
              "value": "attribute-value"
          }
      ],
  )
  ```



  Supported following project types:

  - Audio - Segmentation



  Create a new task.

  ```python
  task_id = client.create_audio_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.mp3",
      file_path="./sample.mp3"
  )
  ```

  Create a new task with pre-defined annotations. (Class should be configured on your project in advance)

  ```python
  task_id = client.create_audio_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.mp3",
      file_path="./sample.mp3",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      annotations=[{
          "type": "segmentation",
          "value": "person",
          "start": 0.4,
          "end": 0.5
      }]
  )
  ```



  - You can upload up to a size of 120 MB.



  Find a single task.

  ```python
  task = client.find_audio_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_audio_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 10 tasks)

  ```python
  tasks = client.get_audio_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_audio_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      annotations=[{
          "type": "segmentation",
          "value": "bird",
          "start": 0.4,
          "end": 0.5
      }]
  )
  ```



  Example of a single audio task object

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "cat.mp3",
      "url": "YOUR_TASK_URL",
      "status": "registered",
      "externalStatus": "registered",
      "priority": 10,
      "tags": [],
      "assignee": "ASSIGNEE_NAME",
      "reviewer": "REVIEWER_NAME",
      "externalAssignee": "EXTERNAL_ASSIGNEE_NAME",
      "externalReviewer": "EXTERNAL_REVIEWER_NAME",
      "annotations": [
          {
              "attributes": [],
              "color": "#b36d18",
              "start": 0.4,
              "end": 0.5,
              "title": "Bird",
              "type": "segmentation",
              "value": "bird"
          }
      ],
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```



  This function is alpha version. It is subject to major changes in the future.

  Integration is possible only when tasks are registered from the objects divided by the dataset.

  In the case of a task divided under the following conditions.

  - Dataset slug: `audio`
  - Object name: `voice.mp3`
  - Split count: `3`

  Objects are registered in the data set in the following form.

  - audio/voice/1.mp3
  - audio/voice/2.mp3
  - audio/voice/3.mp3

  Annotations are combined when the end point specified in the annotation is the end time of the task and the start point of the next task is 0 seconds.

  In this case, SPLIT_AUDIO_TASK_NAME_PREFIX specifies `audio/voice`.

  ```python
  task = client.find_integrated_audio_task_by_prefix(
      project="YOUR_PROJECT_SLUG",
      prefix="SPLIT_AUDIO_TASK_NAME_PREFIX",
  )
  ```



  Example of a integrated audio task object

  ```python
  {
      'name': 'audio/voice.mp3',
      "annotations": [
          {
              "attributes": [],
              "color": "#b36d18",
              "start": 0.4,
              "end": 0.5,
              "title": "Bird",
              "type": "segmentation",
              "value": "bird"
          }
      ],
  }
  ```



  Supported following project types:

  - Audio - Classification (Single)



  Create a new task.

  ```python
  task_id = client.create_audio_classification_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.mp3",
      file_path="./sample.mp3",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      attributes=[
          {
              "key": "attribute-key",
              "value": "attribute-value"
          }
      ],
  )
  ```



  - You can upload up to a size of 120 MB.



  Find a single task.

  ```python
  task = client.find_audio_classification_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_audio_classification_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 1000 tasks)

  ```python
  tasks = client.get_audio_classification_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_audio_classification_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      attributes=[
          {
              "key": "attribute-key",
              "value": "attribute-value"
          }
      ],
  )
  ```



  Supported following project types:

  - PCD - Cuboid
  - PCD - Segmentation



  Create a new task.

  ```python
  task_id = client.create_pcd_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.pcd",
      file_path="./sample.pcd"
  )
  ```

  Create a new task with pre-defined annotations. (Class should be configured on your project in advance)

  Annotation Type: cuboid

  ```python
  task_id = client.create_pcd_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.pcd",
      file_path="./sample.pcd",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      annotations=[
          {
              "type": "cuboid",
              "value": "car",
              "points": [ # For cuboid, it is a 9-digit number.
                  1, # Coordinate X
                  2, # Coordinate Y
                  3, # Coordinate Z
                  1, # Rotation x
                  1, # Rotation Y
                  1, # Rotation Z
                  2, # Length X
                  2, # Length Y
                  2  # Length Z
              ],
          }
      ],
  )
  ```

  Annotation Type: segmentation

  ```python
  task_id = client.create_pcd_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.pcd",
      file_path="./sample.pcd",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      annotations=[
          {
              "type": "segmentation",
              "value": "car",
              "points": [1, 2, 3, 4, 5], # For segmentation, it is an arbitrary numeric array.
          }
      ],
  )
  ```



  - You can upload up to a size of 30 MB.



  Find a single task.

  ```python
  task = client.find_pcd_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_pcd_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 1000 tasks)

  ```python
  tasks = client.get_pcd_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_pcd_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      annotations=[
          {
              "type": "cuboid",
              "value": "car",
              "points": [ # For cuboid, it is a 9-digit number.
                  1, # Coordinate X
                  2, # Coordinate Y
                  3, # Coordinate Z
                  1, # Rotation x
                  1, # Rotation Y
                  1, # Rotation Z
                  2, # Length X
                  2, # Length Y
                  2  # Length Z
              ],
          }
      ],
  )
  ```



  Example of a single PCD task object

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "sample.pcd",
      "url": "YOUR_TASK_URL",
      "status": "registered",
      "externalStatus": "registered",
      "priority": 10,
      "tags": ["tag1", "tag2"],
      "assignee": "ASSIGNEE_NAME",
      "reviewer": "REVIEWER_NAME",
      "approver": "APPROVER_NAME",
      "externalAssignee": "EXTERNAL_ASSIGNEE_NAME",
      "externalReviewer": "EXTERNAL_REVIEWER_NAME",
      "externalApprover": "EXTERNAL_APPROVER_NAME",
      "annotations": [
          {
              "attributes": [],
              "color": "#b36d18",
              "title": "Car",
              "type": "segmentation",
              "value": "car",
              "points": [1, 2, 3, 1, 1, 1, 2, 2, 2],
          }
      ],
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```



  Supported following project types:

  - Sequential PCD - Cuboid



  Create a new task.

  ```python
  task_id = client.create_sequential_pcd_task(
      project="YOUR_PROJECT_SLUG",
      name="drive_record",
      folder_path="./drive_record/", # Path where sequence PCD files are directory
  )
  ```

  The order of frames is determined by the ascending order of PCD file names located in the specified directory.
  File names are optional, but we recommend naming them in a way that makes the order easy to understand.

  ```
  ./drive_record/
  ├── 0001.pcd => frame 1
  ├── 0002.pcd => frame 2
  ...
  └── xxxx.pcd => frame n
  ```

  Create a new task with pre-defined annotations. (Class should be configured on your project in advance)

  ```python
  task_id = client.create_sequential_pcd_task(
      project="YOUR_PROJECT_SLUG",
      name="drive_record",
      folder_path="./drive_record/",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      annotations=[
          {
              "type": "cuboid", # annotation class type
              "value": "human", # annotation class value
              "points": {
                  "1": { # number of frame
                      "value": [ # For cuboid, it is a 9-digit number.
                          1, # Coordinate X
                          2, # Coordinate Y
                          3, # Coordinate Z
                          1, # Rotation x
                          1, # Rotation Y
                          1, # Rotation Z
                          2, # Length X
                          2, # Length Y
                          2  # Length Z
                      ],
                      
                      
                      "autogenerated": False,
                  },
                  "2": {
                      "value": [
                          11,
                          12,
                          13,
                          11,
                          11,
                          11,
                          12,
                          12,
                          12
                      ],
                      "autogenerated": True,
                  },
                  "3": {
                      "value": [
                          21,
                          22,
                          23,
                          21,
                          21,
                          21,
                          22,
                          22,
                          22
                      ],
                      "autogenerated": False,
                  },
              },
          },
      ]
  )
  ```



  You can upload up to a size of 30 MB per file.



  Find a single task.

  ```python
  task = client.find_sequential_pcd_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  task = client.find_sequential_pcd_task(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 10 tasks)

  ```python
  tasks = client.get_sequential_pcd_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_sequential_pcd_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      assignee="USER_SLUG",
      tags=["tag1", "tag2"],
      annotations=[
          {
              "type": "cuboid",
              "value": "human",
              "points": {
                  "1": {
                      "value": [
                          1,
                          2,
                          3,
                          1,
                          1,
                          1,
                          2,
                          2,
                          2
                      ],
                      "autogenerated": False,
                  },
                  "2": {
                      "value": [
                          11,
                          12,
                          13,
                          11,
                          11,
                          11,
                          12,
                          12,
                          12
                      ],
                      "autogenerated": False,
                  },
              },
          },
      ]
  )
  ```



  Example of a single Sequential PCD task object

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "YOUR_TASK_NAME",
      "status": "registered",
      "externalStatus": "registered",
      "priority": 10,
      "annotations": [
          {
              "id": "YOUR_TASK_ANNOTATION_ID",
              "type": "cuboid",
              "title": "human",
              "value": "human",
              "color": "#4bdd62",
              "attributes": [],
              "points": {
                  "1": {
                      "value": [2.61, 5.07, 0, 0, 0, 0, 2, 2, 2],
                      "autogenerated": False,
                  },
                  "2": {
                      "value": [2.61, 5.07, 0, 0, 0, 0, 2, 2, 2],
                      "autogenerated": True,
                  },
                  "3": {
                      "value": [2.61, 5.07, 0, 0, 0, 0, 2, 2, 2],
                      "autogenerated": False,
                  },
              },
          },
          {
              "id": "YOUR_TASK_ANNOTATION_ID",
              "type": "cuboid",
              "title": "building",
              "value": "building",
              "color": "#223543",
              "attributes": [],
              "points": {
                  "1": {
                      "value": [2.8, -8.64, 0.15, 0, 0, 0, 4.45, 4.2, 2],
                      "autogenerated": False,
                  },
                  "2": {
                      "value": [2.8, -8.64, 0.15, 0, 0, 0, 4.45, 4.2, 2],
                      "autogenerated": True,
                  },
                  "3": {
                      "value": [2.8, -8.64, 0.15, 0, 0, 0, 4.45, 4.2, 2],
                      "autogenerated": True,
                  },
                  "4": {
                      "value": [2.8, -8.64, 0.15, 0, 0, 0, 4.45, 4.2, 2],
                      "autogenerated": True,
                  },
                  "5": {
                      "value": [2.8, -8.64, 0.15, 0, 0, 0, 4.45, 4.2, 2],
                      "autogenerated": True,
                  },
              },
          },
      ],
      "tags": [],
      "assignee": None,
      "reviewer": None,
      "approver": None,
      "externalAssignee": None,
      "externalReviewer": None,
      "externalApprover": None,
      "createdAt": "2023-03-24T08:39:08.524Z",
      "updatedAt": "2023-03-24T08:39:08.524Z",
  }
  ```



  Supported following project types:

  - DICOM -Bounding Box



  Create a new task.
  You should receive task import history status [Find Task Import History](#find-task-import-history).
  Once you receive the status completed, you can get the task.

  ```python
  history = client.create_dicom_task(
      project="YOUR_PROJECT_SLUG",
      file_path="./sample.zip"
  )
  ```



  - You can upload up to a size of 2 GB per file.



  Find a single task.

  ```python
  task = client.find_dicom_task(task_id="YOUR_TASK_ID")
  ```

  Find a single task by name.

  ```python
  tasks = client.find_dicom_task_by_name(project="YOUR_PROJECT_SLUG", task_name="YOUR_TASK_NAME")
  ```



  Get tasks. (Up to 1000 tasks)

  ```python
  tasks = client.get_dicom_tasks(project="YOUR_PROJECT_SLUG")
  ```



  Update a single task.

  ```python
  task_id = client.update_dicom_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      assignee="USER_SLUG",
      tags=["tag1", "tag2"]
  )
  ```



  Example of a single dicom task object

  ```python
  {
      "id": "YOUR_TASK_ID",
      "name": "dicom.zip",
      "url": "YOUR_TASK_URL",
      'height': 512,
      'width': 512,
      "status": "registered",
      "externalStatus": "registered",
      "tags": [],
      "assignee": "ASSIGNEE_NAME",
      "reviewer": "REVIEWER_NAME",
      "externalAssignee": "EXTERNAL_ASSIGNEE_NAME",
      "externalReviewer": "EXTERNAL_REVIEWER_NAME",
      "annotations": [
          {
              "attributes": [],
              "color": "#b36d18",
              "contentId": "CONTENT_ID"
              "points": [100, 200, 100, 200],
              "title": "Heart",
              "type": "bbox",
              "value": "heart"
          }
      ],
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```



  APIs for update and delete and count are same over all tasks.



  Update a single task status, tags and assignee.

  ```python
  task_id = client.update_task(
      task_id="YOUR_TASK_ID",
      status="approved",
      priority=10, # (optional) none: 0, low: 10, medium: 20, high: 30
      tags=["tag1", "tag2"],
      assignee="USER_SLUG"
  )
  ```



  Delete a single task.

  ```python
  client.delete_task(task_id="YOUR_TASK_ID")
  ```



  Delete annotations in a task.

  ```python
  client.delete_task_annotations(task_id="YOUR_TASK_ID")
  ```



  ```python
  id_name_map = client.get_task_id_name_map(project="YOUR_PROJECT_SLUG")
  ```



  ```python
  task_count = client.count_tasks(
      project="YOUR_PROJECT_SLUG",
      status="approved", # status can be 'pending', 'registered', 'completed', 'skipped', 'reviewed' 'sent_back', 'approved', 'declined'
      tags=["tag1", "tag2"] # up to 10 tags
  )
  ```



  Task creation from S3.

  - Support project

    - Image
    - Video
    - Audio
    - Text

  - To use it, you need to set the contents of the following link.
    <https://docs.fastlabel.ai/docs/integrations-aws-s3>

  - Setup AWS S3 properties

  ```python
  status = client.update_aws_s3_storage(
      project="YOUR_PROJECT_SLUG",
      bucket_name="S3_BUCKET_NAME",
      bucket_region="S3_REGIONS",
  )
  ```

  - Run create task from AWS S3

  ```python
  history = client.create_task_from_aws_s3(
      project="YOUR_PROJECT_SLUG",
  )
  ```

  - Get AWS S3 import status

  ```python
  history = client.get_aws_s3_import_status_by_project(
      project="YOUR_PROJECT_SLUG",
  )
  ```



  Find a single history.

  ```python
  history = client.find_history(history_id="YOUR_HISTORY_ID")
  ```



  ```python
  histories = client.get_histories(project="YOUR_PROJECT_SLUG")
  ```



  Example of a single history object

  ```python
  {
      "id": "YOUR_HISTORY_ID",
      "storageType": "zip",
      "status": "running",
      "createdAt": "2021-02-22T11:25:27.158Z",
      "updatedAt": "2021-02-22T11:25:27.158Z"
  }
  ```



  Processing of various types of appendix information is supported.



  Import camera calibration and image appendix information for tasks in pcd and sequential pcd projects.

  ```python
  client.import_appendix_file(project="YOUR_PROJECT_SLUG", file_path="ZIP_FILE_PATH")
  ```

  The folder structure inside the ZIP file is as follows

  ```
  .
  └── task_name
      ├── content_name_1.pcd
      │   ├── 000001.png
      │   └── 000001.yaml
      └── content_name_2.pcd
          ├── 000002.png
          ├── 000002.yaml
          ├── 000003.png
          └── 000003.yaml
  ```



  ```python
  appendix_data = client.get_appendix_data(
      project="YOUR_PROJECT_SLUG"
      
      status=None,
      external_status=None,
      tags=None,
      task_name=None,
      offset=None,
      limit=10000,
  )
  ```

  Result data

  ```
      [{
          id: uuid
          url: image file download url
          format: calibration format (yml or kitti or None)
          imageFileName: {task_name}/{content_name}/{image_file_name}
          calibrationFileName: {task_name}/{content_name}/{yml_or_txt_fileName} or None
          calibration: Camera calibration data to write to the calibration file
      },...]
  ```





  Create a new annotation.

  ```python
  annotation_id = client.create_annotation(
      project="YOUR_PROJECT_SLUG", type="bbox", value="cat", title="Cat")
  ```

  Create a new annotation with color and attributes.

  ```python
  attributes = [
      {
          "type": "text",
          "name": "Kind",
          "key": "kind"
      },
      {
          "type": "select",
          "name": "Size",
          "key": "size",
          "options": [ # select, radio and checkbox type requires options
              {
                  "title": "Large",
                  "value": "large"
              },
              {
                  "title": "Small",
                  "value": "small"
              },
          ]
      },
  ]
  annotation_id = client.create_annotation(
      project="YOUR_PROJECT_SLUG", type="bbox", value="cat", title="Cat", color="#FF0000", attributes=attributes)
  ```

  Create a new classification annotation.

  ```python
  annotation_id = client.create_classification_annotation(
      project="YOUR_PROJECT_SLUG", attributes=attributes)
  ```



  Find an annotation.

  ```python
  annotation = client.find_annotation(annotation_id="YOUR_ANNOTATION_ID")
  ```

  Find an annotation by value.

  ```python
  annotation = client.find_annotation_by_value(project="YOUR_PROJECT_SLUG", value="cat")
  ```

  Find an annotation by value in classification project.

  ```python
  annotation = client.find_annotation_by_value(
      project="YOUR_PROJECT_SLUG", value="classification") # "classification" is fixed value
  ```



  Get annotations. (Up to 1000 annotations)

  ```python
  annotations = client.get_annotations(project="YOUR_PROJECT_SLUG")
  ```



  Example of an annotation object

  ```python
  {
      "id": "YOUR_ANNOTATION_ID",
      "type": "bbox",
      "value": "cat",
      "title": "Cat",
      "color": "#FF0000",
      "order": 1,
      "vertex": 0,
      "attributes": [
          {
              "id": "YOUR_ATTRIBUTE_ID",
              "key": "kind",
              "name": "Kind",
              "options": [],
              "order": 1,
              "type": "text",
              "value": ""
          },
          {
              "id": "YOUR_ATTRIBUTE_ID",
              "key": "size",
              "name": "Size",
              "options": [
                  {"title": "Large", "value": "large"},
                  {"title": "Small", "value": "small"}
              ],
              "order": 2,
              "type": "select",
              "value": ""
          }
      ],
      "createdAt": "2021-05-25T05:36:50.459Z",
      "updatedAt": "2021-05-25T05:36:50.459Z"
  }
  ```

  Example when the annotation type is Pose Estimation

  ```python
  {
     "id":"b12c81c3-ddec-4f98-b41b-cef7f77d26a4",
     "type":"pose_estimation",
     "title":"jesture",
     "value":"jesture",
     "color":"#10c414",
     "order":1,
     "attributes": [],
     "keypoints":[
        {
           "id":"b03ea998-a2f1-4733-b7e9-78cdf73bd38a",
           "name":"頭",
           "key":"head",
           "color":"#0033CC",
           "edges":[
              "195f5852-c516-498b-b392-24513ce3ea67",
              "06b5c968-1786-4d75-a719-951e915e5557"
           ],
           "value": []
        },
        {
           "id":"195f5852-c516-498b-b392-24513ce3ea67",
           "name":"右肩",
           "key":"right_shoulder",
           "color":"#0033CC",
           "edges":[
              "b03ea998-a2f1-4733-b7e9-78cdf73bd38a"
           ],
           "value": []
        },
        {
           "id":"06b5c968-1786-4d75-a719-951e915e5557",
           "name":"左肩",
           "key":"left_shoulder",
           "color":"#0033CC",
           "edges":[
              "b03ea998-a2f1-4733-b7e9-78cdf73bd38a"
           ],
           "value": []
        }
     ],
     "createdAt":"2021-11-21T09:59:46.714Z",
     "updatedAt":"2021-11-21T09:59:46.714Z"
  }
  ```



  Update an annotation.

  ```python
  annotation_id = client.update_annotation(
      annotation_id="YOUR_ANNOTATION_ID", value="cat2", title="Cat2", color="#FF0000")
  ```

  Update an annotation with attributes.

  ```python
  attributes = [
      {
          "id": "YOUR_ATTRIBUTE_ID",  # check by sdk get methods
          "type": "text",
          "name": "Kind2",
          "key": "kind2"
      },
      {
          "id": "YOUR_ATTRIBUTE_ID",
          "type": "select",
          "name": "Size2",
          "key": "size2",
          "options": [
              {
                  "title": "Large2",
                  "value": "large2"
              },
              {
                  "title": "Small2",
                  "value": "small2"
              },
          ]
      },
  ]
  annotation_id = client.update_annotation(
      annotation_id="YOUR_ANNOTATION_ID", value="cat2", title="Cat2", color="#FF0000", attributes=attributes)
  ```

  Update a classification annotation.

  ```python
  annotation_id = client.update_classification_annotation(
      project="YOUR_PROJECT_SLUG", attributes=attributes)
  ```



  Delete an annotation.

  ```python
  client.delete_annotation(annotation_id="YOUR_ANNOTATION_ID")
  ```





  Create a new project.

  ```python
  project_id = client.create_project(
      type="image_bbox", name="ImageNet", slug="image-net")
  ```



  Find a project.

  ```python
  project = client.find_project(project_id="YOUR_PROJECT_ID")
  ```

  Find a project by slug.

  ```python
  project = client.find_project_by_slug(slug="YOUR_PROJECT_SLUG")
  ```



  Get projects. (Up to 1000 projects)

  ```python
  projects = client.get_projects()
  ```



  Example of a project object

  ```python
  {
      "id": "YOUR_PROJECT_ID",
      "type": "image_bbox",
      "slug": "YOUR_PROJECT_SLUG",
      "name": "YOUR_PROJECT_NAME",
      "isPixel": False,
      "jobSize": 10,
      "status": "active",
      "createdAt": "2021-04-20T03:20:41.427Z",
      "updatedAt": "2021-04-20T03:20:41.427Z",
  }
  ```



  Update a project.

  ```python
  project_id = client.update_project(
      project_id="YOUR_PROJECT_ID", name="NewImageNet", slug="new-image-net", job_size=20)
  ```



  Delete a project.

  ```python
  client.delete_project(project_id="YOUR_PROJECT_ID")
  ```



  Copy a project.

  ```python
  project_id = client.copy_project(project_id="YOUR_PROJECT_ID")
  ```





  Get tags. (Up to 1000 tags)

  keyword are search terms in the tag name (Optional).
  offset is the starting position number to fetch (Optional).
  limit is the max number to fetch (Optional).

  If you need to fetch more than 1000 tags, please loop this method using offset and limit.
  In the sample code below, you can fetch 1000 tags starting from the 2001st position.

  ```python
  projects = client.get_tags(
      project="YOUR_PROJECT_SLUG",
      keyword="dog", # (Optional)
      offset=2000,  # (Optional)
      limit=1000,  # (Optional. Default is 100.)
  )
  ```



  Example of tags object

  ```python
  [
      {
          "id": "YOUR_TAG_ID",
          "name": "YOUR_TAG_NAME",
          "order": 1,
          "createdAt": "2023-08-14T11: 32: 36.462Z",
          "updatedAt": "2023-08-14T11: 32: 36.462Z"
      }
  ]
  ```



  Delete tags.

  ```python
  client.delete_tags(
      tag_ids=[
          "YOUR_TAG_ID_1",
          "YOUR_TAG_ID_2",
      ],
  )
  ```





  Create a new dataset.

  ```python
  dataset = client.create_dataset(
      name="object-detection", # Only lowercase alphanumeric characters + hyphen is available
      tags=["cat", "dog"], # max 5 tags per dataset.
      visibility="workspace", # visibility can be 'workspace' or 'public' or 'organization'
  )
  ```



  See API docs for details.

  ```python
  {
      'id': 'YOUR_DATASET_ID',
      'name': 'object-detection',
      'tags': ['cat', 'dog'],
      'visibility': 'workspace',
      'license': 'The MIT License',
      'createdAt': '2022-10-31T02:20:00.248Z',
      'updatedAt': '2022-10-31T02:20:00.248Z'
  }
  ```



  Find a single dataset.

  ```python
  dataset = client.find_dataset(dataset_id="YOUR_DATASET_ID")
  ```

  Success response is the same as when created.



  Get all datasets in the workspace. (Up to 1000 tasks)

  ```python
  datasets = client.get_datasets()
  ```

  The success response is the same as when created, but it is an array.

  You can filter by keywords and visibility, tags.

  ```python
  datasets = client.get_datasets(
      keyword="dog",
      tags=["cat", "dog"], # max 5 tags per dataset.
      visibility="workspace", # visibility can be 'workspace' or 'public' or 'organization'.
  )
  ```

  If you wish to retrieve more than 1000 datasets, please refer to the Task [sample code](#get-tasks).



  Update a single dataset.

  ```python
  dataset = client.update_dataset(
      dataset_id="YOUR_DATASET_ID", name="object-detection", tags=["cat", "dog"]
  )
  ```

  Success response is the same as when created.



  Delete a single dataset.

  **⚠️ The dataset object and its associated tasks that dataset has will also be deleted, so check carefully before executing.**

  ```python
  client.delete_dataset(dataset_id="YOUR_DATASET_ID")
  ```



  Create object in the dataset.

  The types of objects that can be created are "image", "video", and "audio".
  There are type-specific methods. but they can be used in the same way.

  Created object are automatically assigned to the "latest" dataset version.

  ```python
  dataset_object = client.create_dataset_object(
      dataset="YOUR_DATASET_NAME",
      name="brushwood_dog.jpg",
      file_path="./brushwood_dog.jpg",
      tags=["dog"], # max 5 tags per dataset object.
      licenses=["MIT", "my-license"],  # max 10 licenses per dataset object
      annotations=[
          {
              "keypoints": [
                  {
                      "value": [
                          102.59,
                          23.04,
                          1
                      ],
                      "key": "head"
                  }
              ],
              "attributes": [
                  {
                      "type": "text",
                      "value": "Scottish field",
                      "key": "kind"
                  }
              ],
              "confidenceScore": 0,
              "rotation": 0,
              "points": [
                  0
              ],
              "value": "dog",
              "type": "bbox" # type can be 'bbox', 'segmentation'.
          }
      ],
      custom_metadata={
        "key": "value",
        "metadata": "metadata-value"
      }
  )
  ```

  If you would like to create a new dataset object with classification type annotations, please pass empty points and value of the annotation named 'classification'.

  ```python
  dataset_object = client.create_dataset_object(
      dataset="YOUR_DATASET_NAME",
      name="brushwood_dog.jpg",
      file_path="./brushwood_dog.jpg",
      tags=["dog"], # max 5 tags per dataset object.
      licenses=["MIT", "my-license"],  # max 10 licenses per dataset object
      annotations=[
          {
              "type": "classification",
              "value": "classification",
              "points": [],
              "attributes": [
                  {
                      "type": "text",
                      "value": "Scottish field",
                      "key": "kind"
                  }
              ]
          }
      ]
  )
  ```



  See API docs for details.

  ```python
  {
      'name': 'brushwood_dog.jpg',
      'size': 6717,
      'height': 225,
      'width': 225,
      'tags': [
          'dog'
      ],
      "annotations": [
          {
              "id": "YOUR_DATASET_OBJECT_ANNOTATION_ID",
              "type": "bbox",
              "title": "dog",
              "value": "dog",
              "points": [
                  0
              ],
              "attributes": [
                  {
                      "value": "Scottish field",
                      "key": "kind",
                      "name": "Kind",
                      "type": "text"
                  }
              ],
              "keypoints": [
                  {
                      "edges": [
                          "right_shoulder",
                          "left_shoulder"
                      ],
                      "value": [
                          102.59,
                          23.04,
                          1
                      ],
                      "key": "head",
                      "name": "頭"
                  }
              ],
              "rotation": 0,
              "color": "#FF0000",
              "confidenceScore": -1
          }
      ],
    "customMetadata": {
      "key": "value",
      "metadata": "metadata-value"
    },
      'createdAt': '2022-10-30T08:32:20.748Z',
      'updatedAt': '2022-10-30T08:32:20.748Z'
  }
  ```



  Find a single dataset object.

  ```python
  dataset_object = client.find_dataset_object(
      dataset_id="YOUR_DATASET_ID",
      object_name="brushwood_dog.jpg"
  )
  ```

  You can find a object of specified revision by version or revision_id.

  ```python
  dataset_object = client.find_dataset_object(
      dataset_id="YOUR_DATASET_ID",
      object_name="brushwood_dog.jpg",
      version="YOUR_VERSION_NAME" # default is "latest"
  )
  ```

  ```python
  dataset_object = client.find_dataset_object(
      dataset_id="YOUR_DATASET_ID",
      object_name="brushwood_dog.jpg",
      revision_id="YOUR_REVISION_ID" # 8 characters or more
  )
  ```

  Success response is the same as when created.



  Get all dataset object in the dataset. (Up to 1000 tasks)

  ```python
  dataset_objects = client.get_dataset_objects(dataset="YOUR_DATASET_NAME")
  ```

  The success response is the same as when created, but it is an array.

  You can filter by version or revision_id, licenses and tags.

  ```python
  dataset_objects = client.get_dataset_objects(
      dataset="YOUR_DATASET_NAME",
      version="latest", # default is "latest"
      tags=["cat"],
      licenses=["fastlabel"],
      types=["train", "valid"],  # choices are "train", "valid", "test" and "none" (Optional)
      offset=0,  # default is 0 (Optional)
      limit=1000,  # default is 1000, and must be less than 1000 (Optional)
  )
  ```

  ```python
  dataset_objects = client.get_dataset_objects(
      dataset="YOUR_DATASET_NAME",
      revision_id="YOUR_REVISION_ID" # 8 characters or more
  )
  ```



  Download dataset objects in the dataset to specific directories.

  You can filter by version, tags and types.

  ```python
  client.download_dataset_objects(
    dataset="YOUR_DATASET_NAME",
    path="YOUR_DOWNLOAD_PATH",
    version="latest", # default is "latest"
    tags=["cat"],
    types=["train", "valid"],  # choices are "train", "valid", "test" and "none" (Optional)
    licenses=["fastlabel"],
    offset=0,  # default is 0 (Optional)
    limit=1000,  # default is 1000, and must be less than 1000 (Optional)
  )
  ```



  ```python
  dataset_object = client.update_dataset_object(
      dataset_id="YOUR_DATASET_ID",
      object_name="brushwood_dog.jpg",
      tags=["dog"], # max 5 tags per dataset object.
      licenses=["MIT", "my-license"],  # max 10 licenses per dataset object
      annotations=[
          {
              "keypoints": [
                  {
                      "value": [
                          102.59,
                          23.04,
                          1
                      ],
                      "key": "head"
                  }
              ],
              "attributes": [
                  {
                      "value": "Scottish field",
                      "key": "kind"
                  }
              ],
              "confidenceScore": 0,
              "rotation": 0,
              "points": [
                  0
              ],
              "value": "dog",
              "type": "bbox" # type can be 'bbox', 'segmentation'.
          }
      ],
      custom_metadata={
        "key": "value",
        "metadata": "metadata-value"
      }
  )
  ```



  Delete a single dataset object.

  ```python
  client.delete_dataset_object(
      dataset_id="YOUR_DATASET_ID",
      object_name="brushwood_dog.jpg"
  )
  ```





  Support the following annotation types.

  - bbox
  - polygon
  - pose estimation

  Get tasks and export as a [COCO format](https://cocodataset.org/#format-data) file.

  ```python
  project_slug = "YOUR_PROJECT_SLUG"
  tasks = client.get_image_tasks(project=project_slug)
  client.export_coco(project=project_slug, tasks=tasks)
  ```

  Export with specifying output directory and file name.

  ```python
  client.export_coco(project="YOUR_PROJECT_SLUG", tasks=tasks, output_dir="YOUR_DIRECTROY", output_file_name="YOUR_FILE_NAME")
  ```

  If you would like to export pose estimation type annotations, please pass annotations.

  ```python
  project_slug = "YOUR_PROJECT_SLUG"
  tasks = client.get_image_tasks(project=project_slug)
  annotations = client.get_annotations(project=project_slug)
  client.export_coco(project=project_slug, tasks=tasks, annotations=annotations, output_dir="YOUR_DIRECTROY", output_file_name="YOUR_FILE_NAME")
  ```



  Support the following annotation types.

  - bbox
  - polygon
  - segmentation

  Get tasks and export as YOLO format files.

  ```python
  project_slug = "YOUR_PROJECT_SLUG"
  tasks = client.get_image_tasks(project=project_slug)
  client.export_yolo(project=project_slug, tasks=tasks, output_dir="YOUR_DIRECTROY")
  ```

  Get tasks and export as YOLO format files with classes.txt
  You can use fixed classes.txt and arrange order of each annotaiton file's order

  ```python
  project_slug = "YOUR_PROJECT_SLUG"
  tasks = client.get_image_tasks(project=project_slug)
  annotations = client.get_annotations(project=project_slug)
  classes = list(map(lambda annotation: annotation["value"], annotations))
  client.export_yolo(project=project_slug, tasks=tasks, classes=classes, output_dir="YOUR_DIRECTROY")
  ```



  Support the following annotation types.

  - bbox
  - polygon

  Get tasks and export as Pascal VOC format files.

  ```python
  project_slug = "YOUR_PROJECT_SLUG"
  tasks = client.get_image_tasks(project=project_slug)
  client.export_pascalvoc(project=project_slug, tasks=tasks)
  ```



  Support the following annotation types.

  - bbox
  - polygon
  - points
  - line

  Get tasks and export as labelme format files.

  ```python
  tasks = client.get_image_tasks(project="YOUR_PROJECT_SLUG")
  client.export_labelme(tasks)
  ```



  Get tasks and export index color instance/semantic segmentation (PNG files).
  Only support the following annotation types.

  - bbox
  - polygon
  - segmentation

  ```python
  tasks = client.get_image_tasks(project="YOUR_PROJECT_SLUG")
  client.export_instance_segmentation(tasks)
  ```

  ```python
  tasks = client.get_image_tasks(project="YOUR_PROJECT_SLUG")
  client.export_semantic_segmentation(tasks)
  ```



  Supported bbox , polygon or pose_estimation annotation type.

  Convert annotation file of [COCO format](https://cocodataset.org/#format-data) as a Fastlabel format and create task.

  file_path: COCO annotation json file path

  ```python
  annotations_map = client.convert_coco_to_fastlabel(file_path="./sample.json", annotation_type="bbox")


  task_id = client.create_image_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.jpg",
      file_path="./sample.jpg",
      annotations=annotations_map.get("sample.jpg")
  )
  ```

  Example of converting annotations to create multiple tasks.

  In the case of the following tree structure.

  ```
  dataset
  ├── annotation.json
  ├── sample1.jpg
  └── sample2.jpg
  ```

  Example source code.

  ```python
  import fastlabel

  project = "YOUR_PROJECT_SLUG"
  input_file_path = "./dataset/annotation.json"
  input_dataset_path = "./dataset/"

  annotations_map = client.convert_coco_to_fastlabel(file_path=input_file_path)
  for image_file_path in glob.iglob(os.path.join(input_dataset_path, "**/**.jpg"), recursive=True):
      time.sleep(1)
      name = image_file_path.replace(os.path.join(*[input_dataset_path, ""]), "")
      file_path = image_file_path
      annotations = annotations_map.get(name) if annotations_map.get(name) is not None else []
      task_id = client.create_image_task(
          project=project,
          name=name,
          file_path=file_path,
          annotations=annotations
      )
  ```



  Supported bbox and segmentation annotation type.

  Convert annotation file of YOLO format as a Fastlabel format and create task.

  classes_file_path: YOLO classes text file path
  dataset_folder_path: Folder path containing YOLO Images and annotation

  ```python
  annotations_map = client.convert_yolo_to_fastlabel(
      classes_file_path="./classes.txt",
      dataset_folder_path="./dataset/"
  )
  task_id = client.create_image_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.jpg",
      file_path="./dataset/sample.jpg",
      annotations=annotations_map.get("sample.jpg")
  )
  ```

  Example of converting annotations to create multiple tasks.

  In the case of the following tree structure.

  ```
  yolo
  ├── classes.txt
  └── dataset
      ├── sample1.jpg
      ├── sample1.txt
      ├── sample2.jpg
      └── sample2.txt
  ```

  Example source code.

  ```python
  import fastlabel

  project = "YOUR_PROJECT_SLUG"
  input_file_path = "./classes.txt"
  input_dataset_path = "./dataset/"
  annotations_map = client.convert_yolo_to_fastlabel(
      classes_file_path=input_file_path,
      dataset_folder_path=input_dataset_path
  )
  for image_file_path in glob.iglob(os.path.join(input_dataset_path, "**/**.jpg"), recursive=True):
      time.sleep(1)
      name = image_file_path.replace(os.path.join(*[input_dataset_path, ""]), "")
      file_path = image_file_path
      annotations = annotations_map.get(name) if annotations_map.get(name) is not None else []
      task_id = client.create_image_task(
          project=project,
          name=name,
          file_path=file_path,
          annotations=annotations
      )
  ```



  Supported bbox annotation type.

  Convert annotation file of Pascal VOC format as a Fastlabel format and create task.

  folder_path: Folder path including pascal VOC format annotation files

  ```python
  annotations_map = client.convert_pascalvoc_to_fastlabel(folder_path="./dataset/")
  task_id = client.create_image_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.jpg",
      file_path="./dataset/sample.jpg",
      annotations=annotations_map.get("sample.jpg")
  )
  ```

  Example of converting annotations to create multiple tasks.

  In the case of the following tree structure.

  ```
  dataset
  ├── sample1.jpg
  ├── sample1.xml
  ├── sample2.jpg
  └── sample2.xml
  ```

  Example source code.

  ```python
  import fastlabel

  project = "YOUR_PROJECT_SLUG"
  input_dataset_path = "./dataset/"

  annotations_map = client.convert_pascalvoc_to_fastlabel(folder_path=input_dataset_path)
  for image_file_path in glob.iglob(os.path.join(input_dataset_path, "**/**.jpg"), recursive=True):
      time.sleep(1)
      name = image_file_path.replace(os.path.join(*[input_dataset_path, ""]), "")
      file_path = image_file_path
      annotations = annotations_map.get(name) if annotations_map.get(name) is not None else []
      task_id = client.create_image_task(
          project=project,
          name=name,
          file_path=file_path,
          annotations=annotations
      )
  ```



  Support the following annotation types.

  - bbox
  - polygon
  - points
  - line

  Convert annotation file of labelme format as a Fastlabel format and create task.

  folder_path: Folder path including labelme format annotation files

  ```python
  annotations_map = client.convert_labelme_to_fastlabel(folder_path="./dataset/")
  task_id = client.create_image_task(
      project="YOUR_PROJECT_SLUG",
      name="sample.jpg",
      file_path="./sample.jpg",
      annotations=annotations_map.get("sample.jpg")
  )
  ```

  Example of converting annotations to create multiple tasks.

  In the case of the following tree structure.

  ```
  dataset
  ├── sample1.jpg
  ├── sample1.json
  ├── sample2.jpg
  └── sample2.json
  ```

  Example source code.

  ```python
  import fastlabel

  project = "YOUR_PROJECT_SLUG"
  input_dataset_path = "./dataset/"

  annotations_map = client.convert_labelme_to_fastlabel(folder_path=input_dataset_path)
  for image_file_path in glob.iglob(os.path.join(input_dataset_path, "**/**.jpg"), recursive=True):
      time.sleep(1)
      name = image_file_path.replace(os.path.join(*[input_dataset_path, ""]), "")
      file_path = image_file_path
      annotations = annotations_map.get(name) if annotations_map.get(name) is not None else []
      task_id = client.create_image_task(
          project=project,
          name=name,
          file_path=file_path,
          annotations=annotations
      )
  ```

  > Please check const.COLOR_PALLETE for index colors.



  Convert mask image to FastLabel's segmentation coordinate format.

  ```python
  points = client.mask_to_fastlabel_segmentation_points(
      mask_image = binary_image_path (or binary_image_array)
  )
  ```





  Get training jobs.

  ```python
  def get_training_jobs() -> list[dict]:
      all_training_jobs = []
      offset = None
      while True:
          time.sleep(1)

          training_jobs = client.get_training_jobs(offset=offset)
          all_training_jobs.extend(training_jobs)

          if len(training_jobs) > 0:
              offset = len(all_training_jobs)
          else:
              break
      return all_training_jobs

  ```



  Find a single training job.

  ```python
  task = client.find_training_job(id="YOUR_TRAINING_ID")
  ```



  Example of two training jobs.

  ```python
  [
      {
          "trainingJobId": "f40c5838-4c3a-482f-96b7-f77e16c96fed",
          "status": "in_progress",
          "baseModelName": "FastLabel Object Detection High Accuracy - 汎用",
          "instanceType": "ml.p3.2xlarge",
          "epoch": 300,
          "projects": [
              "image-bbox"
          ],
          "statuses": [],
          "tags": [],
          "contentCount": 23,
          "userName": "Admin",
          "createdAt": "2023-10-31T07:10:28.306Z",
          "completedAt": null,
          "customModel": {
              "modelId": "",
              "modelName": "",
              "modelURL": "",
              "classes": []
          }
      },
      {
          "trainingJobId": "1d2bc86a-c7f1-40a5-8e85-48246cc3c8d2",
          "status": "completed",
          "baseModelName": "custom-object-detection-image",
          "instanceType": "ml.p3.2xlarge",
          "epoch": 300,
          "projects": [
              "image-bbox"
          ],
          "statuses": [
              "approved"
          ],
          "tags": [
              "trainval"
          ],
          "contentCount": 20,
          "userName": "Admin",
          "createdAt": "2023-10-31T06:56:28.112Z",
          "completedAt": "2023-10-31T07:08:26.000Z",
          "customModel": {
              "modelId": "a6728876-2eb7-49b5-9fd8-7dee1b8a81b3",
              "modelName": "fastlabel_object_detection-2023-10-31-07-08-29",
              "modelURL": "URL for download model file",
              "classes": [
                  "person"
              ]
          }
      }
  ]
  ```



  Get training jobs.

  ```python
  training_job = client.execute_training_job(
      dataset_name="dataset_name",
      base_model_name="fastlabel_object_detection_light",  // "fastlabel_object_detection_light" or "fastlabel_object_detection_high_accuracy" or "fastlabel_u_net_general"
      epoch=300,
      use_dataset_train_val=True,
      resize_option="fixed",  // optional, "fixed" or "none"
      resize_dimension=1024, // optional, 512 or 1024
      annotation_value="person", // Annotation value is required if choose "fastlabel_keypoint_rcnn"
      config_file_path="config.yaml", // optional, YAML file path for training config file.
  )

  ```



  Get evaluation jobs.

  ```python
  def get_evaluation_jobs() -> list[dict]:
      all_evaluation_jobs = []
      offset = None
      while True:
          time.sleep(1)

          evaluation_jobs = client.get_evaluation_jobs(offset=offset)
          all_evaluation_jobs.extend(evaluation_jobs)

          if len(evaluation_jobs) > 0:
              offset = len(all_evaluation_jobs)
          else:
              break
      return all_evaluation_jobs

  ```



  Find a single evaluation job.

  ```python
  evaluation_job = client.find_evaluation_job(id="YOUR_EVALUATION_ID")
  ```



  Example of two evaluation jobs.

  ```python

  {
    id: "50873ea1-e008-48db-a368-241ca88d6f67",
    version: 59,
    status: "in_progress",
    modelType: "builtin",
    modelName: "FastLabel Object Detection Light - 汎用",
    customModelId: None,
    iouThreshold: 0.8,
    confidenceThreshold: 0.4,
    contentCount: 0,
    gtCount: 0,
    predCount: 0,
    mAP: 0,
    recall: 0,
    precision: 0,
    f1: 0,
    confusionMatrix: None,
    duration: 0,
    evaluationSource: "dataset",
    projects: [],
    statuses: [],
    tags: [],
    datasetId: "deacbe6d-406f-4086-bd87-80ffb1c1a393",
    dataset: {
      id: "deacbe6d-406f-4086-bd87-80ffb1c1a393",
      workspaceId: "df201d3c-af00-423a-aa7f-827376fd96de",
      name: "sample-dataset",
      createdAt: "2023-12-20T10:44:12.198Z",
      updatedAt: "2023-12-20T10:44:12.198Z",
    },
    datasetRevisionId: "2d26ab64-dfc0-482d-9211-ce8feb3d480b",
    useDatasetTest: True,
    userName: "",
    completedAt: None,
    createdAt: "2023-12-21T09:08:16.111Z",
    updatedAt: "2023-12-21T09:08:18.414Z",
  };

  ```



  Execute evaluation jobs.

  ```python
  training_job = client.execute_evaluation_job(
      dataset_name="DATASET_NAME",
      model_name="fastlabel_object_detection_light",
      // If you want to use the built-in model, select the following.
      - "fastlabel_object_detection_light"
      - "fastlabel_object_detection_high_accuracy"
      - "fastlabel_fcn_resnet"
      // If you want to use the custom model, please fill　out model name.
      use_dataset_test=True,
  )

  ```



  Get auto-annotation jobs.

  ```python
  def get_auto_annotation_jobs() -> list[dict]:
      all_auto_annotation_jobs = []
      offset = None
      while True:
          time.sleep(1)

          auto_annotation_jobs = client.get_auto_annotation_jobs(project="YOUR_PROJECT_SLUG", offset=offset)
          all_auto_annotation_jobs.extend(auto_annotation_jobs)

          if len(auto_annotation_jobs) > 0:
              offset = len(all_auto_annotation_jobs)
          else:
              break
      return all_auto_annotation_jobs

  ```



  Example of a single auto-annotation job.

  ```python

  [
      {
          'audioSeconds': 0,
          'autoAnnotationType': 'image_bbox',
          'completedAt': '2024-09-24T03:27:41.000Z',
          'contentCount': 1000,
          'createdAt': '2024-09-24T03:14:26.607Z',
          'duration': 793,
          'id': 'YOUR_AUTO_ANNOTATION_JOB_ID',
          'modelName': 'Computer Vision - 汎用',
          'msgCode': 'none',
          'status': 'completed',
          'taskAnnotationCount': 2598,
          'updatedAt': '2024-09-24T03:27:40.914Z',
          'userName': 'USER_NAME',
          'version': 1
      }
  ]

  ```



  Execute auto-annotation job.

  ```python
  auto_annotation_job = client.execute_auto_annotation_job(
      project="YOUR_PROJECT_SLUG",
      model_name="Computer Vision - 汎用",
      // If you want to use the built-in model, select the following.
      // You can choose either Japanese or English name
      - "Computer Vision - 汎用(General)"
      - "Computer Vision - 顔(Face)"
      - "Segment Anything - 汎用(General)"
      - "Segment Anything 2 - 汎用(General)"
      - "Segment Anything High Quality - 汎用(General)"
      // Other built-in models require annotation class mapping.
      // See: https://fastlabel.notion.site/cf3f006766d742d5ae25ca4200fa19b4
      // If you want to use the custom model, please fill out model name.
      algorithm_type: "object_detection", // optional, "object_detection", "ocr" or "image_classification"
      update_existing: False, // optional, default: False
      confidence_threshold: 0.4, // optional, default: 0.4
      use_tta: False, // optional, default: False
      use_flip: False, // optional, default: False
      processing_speed: "low", // optional, default: "low", "low" or "medium" or "high"
      auto_creation: True, // optional, default: True
  )
  ```



  Create the endpoint from the screen at first.

  Currently, the feature to create endpoints is in alpha and is not available to users.
  If you would like to try it out, please contact a FastLabel representative.

  ```python
  import fastlabel
  import numpy as np
  import cv2
  import base64
  client = fastlabel.Client()

  ENDPOINT_NAME = "YOUR ENDPOINT NAME"
  IMAGE_FILE_PATH = "YOUR IMAGE FILE PATH"
  RESULT_IMAGE_FILE_PATH = "YOUR RESULT IMAGE FILE PATH"

  def base64_to_cv(img_str):
    if "base64," in img_str:
        img_str = img_str.split(",")[1]
    img_raw = np.frombuffer(base64.b64decode(img_str), np.uint8)
    img = cv2.imdecode(img_raw, cv2.IMREAD_UNCHANGED)
    return img

  if __name__ == '__main__':
    
    response = client.execute_endpoint(
        endpoint_name=ENDPOINT_NAME, file_path=IMAGE_PATH)

    
    print(response["json"])

    
    img = base64_to_cv(response["file"])
    cv2.imwrite(RESULT_IMAGE_FILE_PATH, img)
  ```



  You can integrate the results of model endpoint calls,
  which are targeted for aggregation in model monitoring, from an external source.

  ```python
  from datetime import datetime
  import pytz
  import fastlabel
  client = fastlabel.Client()

  jst = pytz.timezone("Asia/Tokyo")
  dt_jst = datetime(2023, 5, 8, 12, 10, 53, tzinfo=jst)

  client.create_model_monitoring_request_results(
      name="model-monitoring-name",  # The name of your model monitoring name
      results=[
          {
              "status": "success",  # success or failed
              "result": [
                  {
                      "value": "person",  # The value of the inference class returned by your model
                      "confidenceScore": 0.92,  # 0 ~ 1
                  }
              ],
              "requestAt": dt_jst.isoformat(),  # The time when your endpoint accepted the request
          }
      ],
  )
  ```



  Check [this](https://api.fastlabel.ai/docs/) for further information.


