# packages

pkgId: 345b605d9ff48bff8cfd25ea3aa9ab8d8064b07bd054a254c5aa9a348c2f71bf
name: python-aniparser
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Provides a parser to parse file names and return data based on the names
url: https://github.com/Phxntxm/aniparser
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aniparser-0.2.0-1.src.rpm
checksum_type: sha256
description:
  This is a simple parser that is built to take a file path and return data based on that file path, to determine some common information about animes.



  The usage of this is pretty simple, there are two main entry points into grabbing data
  from files. To parse through an entire directory (recursively) you can do the following
  ```
  for data in aniparser.parse_directories("/home/user/Anime"):
      print(data)
  ```

  To not search recursively, just provide False to the recursive parameter
  ```
  for data in aniparser.parse_directories("/home/user/Anime/Specific Anime Folder", recursive=False):
      print(data)
  ```

  If you want to parse just a single file
  ```
  data = aniparser.parse("/home/user/Anime/Specicific Anime Folder/Specific Anime Episode.mpv")
  print(data)
  ```


  The idea behind the parsing method in this library is to do the least amount of work possible while maintaining reliance. There are many common things that appear in a filename, and this does try to do them in some kind of "sane" order of commonality. It will only do some extra work when it's needed. Additionally, since this should always have the same output for the same input, as well as that output being a small memory footprint in of itself, this does use some aggressive caching that should help speed things up tremendously in long running uses.


pkgId: 7441918ad663d7f0d055a4dee4a4630edc3d9c28ec00d25e24763086d4662c03
name: python-anipose
arch: src
version: 1.1.13
epoch: 0
release: 1
summary: Framework for scalable DeepLabCut based analysis including 3D tracking
url: https://github.com/lambdaloop/anipose
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anipose-1.1.13-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/anipose.svg)](https://badge.fury.io/py/anipose)

  Anipose is an open-source toolkit for robust, markerless 3D pose estimation of animal behavior from multiple camera views. It leverages the machine learning toolbox [DeepLabCut](https://github.com/AlexEMG/DeepLabCut) to track keypoints in 2D, then triangulates across camera views to estimate 3D pose.

  Check out the [Anipose paper](https://www.cell.com/cell-reports/fulltext/S2211-1247(21)01179-7) for more information.

  The name Anipose comes from **Ani**mal **Pose**, but it also sounds like "any pose".



  Up to date documentation may be found at [anipose.org](http://anipose.org) .



  <p align="center">
  <img src="https://raw.githubusercontent.com/lambdaloop/anipose-docs/master/tracking_3cams_full_slower5.gif" width="70%" >
  </p>
  <p align="center">
  Videos of flies by Evyn Dickinson (slowed 5x), <a href=http://faculty.washington.edu/tuthill/>Tuthill Lab</a>
  </p>

  <p align="center">
  <img src="https://raw.githubusercontent.com/lambdaloop/anipose-docs/master/hand-demo.gif" width="70%" >
  </p>
  <p align="center">
  Videos of hand by Katie Rupp
  </p>





  Here are some references for DeepLabCut and other things this project relies upon:
  - Mathis et al, 2018, "DeepLabCut: markerless pose estimation of user-defined body parts with deep learning"
  - Romero-Ramirez et al, 2018, "Speeded up detection of squared fiducial markers"


pkgId: f7e527c476b09bdc91d2ed4d38a37539436d34913179fe35a65dc1b48f3fb28c
name: python-anipy-api
arch: src
version: 3.2.3
epoch: 0
release: 1
summary: api for anipy-cli
url: https://sdaqo.github.io/anipy-cli
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anipy-api-3.2.3-1.src.rpm
checksum_type: sha256
description:
  This is the api package for [anipy-cli](https://pypi.org/project/anipy-cli/).

  Find documentation here: [https://sdaqo.github.io/anipy-cli/getting-started-api](https://sdaqo.github.io/anipy-cli/getting-started-api)


pkgId: 78bc123838ea0abe14e212e654ceb6f6060130e8c25d4951fba055bdabec26ca
name: python-anipy-cli
arch: src
version: 3.2.2
epoch: 0
release: 1
summary: Watch and Download anime from the comfort of your Terminal
url: https://sdaqo.github.io/anipy-cli
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anipy-cli-3.2.2-1.src.rpm
checksum_type: sha256
description:
  **Anime from the comfort of your Terminal**

  <p align="center"><img src="https://github.com/sdaqo/anipy-cli/assets/63876564/1dafa5fb-4273-4dc1-a7ab-2664dd668fc9" /> </p>


  A Little tool written in python to watch and download anime from the terminal (the better way to watch anime)
  This project's main aim is to create a enjoyable anime watching and downloading experience, directly in the terminal - your favorite place.

  Since the version 3 rewrite this project is split into api and frontend this makes it easy to integrate this into your project!


  <a href="https://pypi.org/project/anipy-cli/"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/anipy-cli?style=for-the-badge&logo=pypi&label=anipy-cli"></a>

  As one wise man once said:
  > I DONT GIVE A FUCK ABOUT THE FUCKING CODE! i just want to download this stupid fucking application and use it.
  >
  > WHY IS THERE CODE??? MAKE A FUCKING .EXE FILE AND GIVE IT TO ME. these dumbfucks think that everyone is a developer and understands code. well i am not and i don't understand it. I only know to download and install applications. SO WHY THE FUCK IS THERE CODE? make an EXE file and give it to me. STUPID FUCKING SMELLY NERDS

  <sub>Please do not take this seriously this is some stupid copypasta</sub>

  We do not have a .exe but we have pipx: `pipx install anipy-cli`

  Check out [Getting Started - CLI](https://sdaqo.github.io/anipy-cli/getting-started-cli) for better instructions and advice!


  <a href="https://pypi.org/project/anipy-api/"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/anipy-api?style=for-the-badge&logo=pypi&label=anipy-api"></a>

  Feel free to - please check out [Getting Started - API](https://sdaqo.github.io/anipy-cli/getting-started-api) for instructions








  <a href="https://github.com/sdaqo/anipy-cli/graphs/contributors">
      <img src="https://contrib.rocks/image?repo=sdaqo/anipy-cli" alt="anipy-cli contributors" title="anipy-cli contributors" width="800"/>
  </a>

  If you want to contribute as well check out this: https://sdaqo.github.io/anipy-cli/contributing


pkgId: 6efba8df643c9c7ebba672c6ff46ee665d74804bc121a3796a09de05b46026f7
name: python-anirudhp-audio-similarity
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: A package for audio similarity analysis
url: https://pypi.org/project/anirudhp-audio-similarity/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anirudhp-audio-similarity-0.1.0-1.src.rpm
checksum_type: sha256
description:
  A Python library for audio similarity search using wav2vec2 embeddings and FAISS indexing. This library provides efficient audio similarity search with support for multiple index types and built-in visualization tools.
  <!-- Documentation is available at [https://AnirudhPraveen.github.io/audio_similarity](https://AnirudhPraveen.github.io/audio_similarity) -->



  - 🎵 Audio similarity search using wav2vec2 embeddings
  - 🚀 Multiple FAISS index types (Flat, IVF, HNSW, PQ)
  - 📊 Built-in visualization tools
  - 📈 Performance benchmarking
  - 🔄 Batch processing support
  - 💾 Save and load indices





  - Python 3.10 or later
  - conda package manager



  ```bash

  conda create -n audio_sim python=3.10
  conda activate audio_sim


  pip3 install --pre torch torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu


  conda install -c conda-forge faiss


  pip install audio-similarity
  ```



  ```bash

  conda create -n audio_sim python=3.12
  conda activate audio_sim


  conda install -c pytorch pytorch torchaudio faiss-cpu


  pip install audio-similarity
  ```



  ```bash

  git clone https://github.com/AnirudhPraveen/audio_similarity.git
  cd audio-similarity


  conda create -n audio_sim python=3.12
  conda activate audio_sim


  conda install -c pytorch pytorch torchaudio
  conda install -c conda-forge faiss


  pip install -e .
  ```



  ```python
  from audio_similarity import AudioSimilaritySearch, IndexType
  from pathlib import Path

  def main():
      
      searcher = AudioSimilaritySearch(index_type=IndexType.FLAT)

      
      dataset_dir = Path("dataset_directory").expanduser()
      query_file = Path("query_directory").expanduser()

      
      audio_files = list(dataset_dir.glob("**/*.wav"))
      print(f"Found {len(audio_files)} audio files")

      
      

      saved_index_dir = Path("./saved_index_folder").expanduser()
      

      
      searcher.load(saved_index_dir)

      
      print("\n1. Search Results:")
      print("-" * 50)
      results = searcher.search(str(query_file), k=5)
      for i, (file_path, distance) in enumerate(results, 1):
          print(f"{i}. File: {Path(file_path).name}")
          print(f"   Distance: {distance:.4f}")

      
      searcher.visualize_search_results(
          query_path=str(query_file),
          results=results,
          save_path="search_results.png",
          show=True
      )

      print(results)
  ```

  <!-- ## Quick Start

  ```python
  from audio_similarity import AudioSimilaritySearch, IndexType


  searcher = AudioSimilaritySearch(index_type=IndexType.FLAT)


  searcher.add_audio("path/to/audio1.wav")
  searcher.add_audio("path/to/audio2.wav")


  results = searcher.search("path/to/query.wav", k=5)


  for file_path, distance in results:
      print(f"Similar file: {file_path}, distance: {distance}")


  searcher.visualize_search_results(
      "path/to/query.wav",
      results,
      save_path="results.png"
  )
  ``` -->





  ```python
  from pathlib import Path


  audio_dir = Path("path/to/audio/files")
  audio_files = list(audio_dir.glob("*.wav"))


  searcher.add_batch(audio_files)
  ```



  ```python

  searcher = AudioSimilaritySearch(index_type=IndexType.FLAT)


  searcher = AudioSimilaritySearch(
      index_type=IndexType.IVF,
      index_params={'nlist': 100}
  )


  searcher = AudioSimilaritySearch(
      index_type=IndexType.HNSW,
      index_params={'M': 16}
  )
  ```



  ```python

  configs = [
      {'type': IndexType.FLAT},
      {'type': IndexType.IVF, 'params': {'nlist': 100}},
      {'type': IndexType.HNSW, 'params': {'M': 16}},
  ]

  results = searcher.benchmark(
      compare_with=configs,
      num_samples=1000,
      num_queries=100,
      k=5
  )


  searcher.visualize_benchmarks()
  ```



  Full documentation is available at [Read the Docs](https://AnirudhPraveen.github.io/audio_similarity).



  We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a new branch: `git checkout -b feature-name`
  3. Make your changes and commit: `git commit -am 'Add new feature'`
  4. Push to the branch: `git push origin feature-name`
  5. Submit a Pull Request



  ```bash

  pip install -e ".[dev]"


  pytest


  pytest --cov=audio_similarity tests/
  ```



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



  If you use this library in your research, please cite:

  ```bibtex
  @software{audio_similarity2024,
    author = {Anirudh Praveen},
    title = {Audio Similarity Search},
    year = {2024},
    publisher = {GitHub},
    url = {https://github.com/AnirudhPraveen/audio_similarity}
  }
  ```



  - Facebook AI Research for wav2vec2
  - Facebook Research for FAISS
  - PyTorch team for torch and torchaudio



  - GitHub Issues: [Project Issues](https://github.com/AnirudhPraveen/audio_similarity/issues)
  - Email: anirudhpraveen2000@gmail.com

rpm_license:
  MIT License  Copyright (c) [2024] [Anirudh Praveen]  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: a6991ba53b41e173367d0670c3d9c8c611a5122c04d97e332447e4aa8d5bfa0c
name: python-anitya_schema
arch: src
version: 2.3.0
epoch: 0
release: 1
summary: JSON schema definitions for messages published by Anitya
url: https://github.com/fedora-infra/anitya-messages
rpm_license: GPL-2.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anitya_schema-2.3.0-1.src.rpm
checksum_type: sha256
description:
  JSON schema definitions for messages published by
  `Anitya <https://github.com/fedora-infra/anitya>`_.
  Documentation for Anitya Message Schema could be found
  `here <https://anitya-messages.readthedocs.io/en/latest>`_.
  See http://json-schema.org/ for documentation on the schema format. See
  https://fedora-messaging.readthedocs.io/en/latest/messages.html for
  documentation on fedora-messaging.


pkgId: 75888665cbc60a5085e6e5936d1ca85abd0372f7b355cfac5aaff36388315420
name: python-aniwatch-tr
arch: src
version: 0.4.1
epoch: 0
release: 1
summary: Terminalden Türkçe anime izleme, indirme
url: https://github.com/username/aniwatch-tr
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aniwatch-tr-0.4.1-1.src.rpm
checksum_type: sha256
description:
  <h1 align="center">
  <strong> AniWatch-tr </strong>
  </h1>

  <h3 align="center">
      Terminalden Türkçe anime izleme, indirme.
  </h3>

  [![Video Thumbnail](https://github.com/user-attachments/assets/44b9d628-f96c-4baf-aec1-28e9f2472621)](https://github.com/user-attachments/assets/44b9d628-f96c-4baf-aec1-28e9f2472621)

  <h1 align="center">
      <b>Ön Gereksinim</b>
  </h1>

  Bilgisayarınızda [**mpv**](https://github.com/mpv-player/mpv) programının kurulu olduğundan emin olun. Eğer kurulu değilse, aşağıdaki adımları izleyerek kurabilirsiniz:

  **Arch:**
  ```bash
  sudo pacman -S mpv
  ```
  **Ubuntu/Debian**
  ```bash
  sudo apt-get install mpv
  ```
  **Fedora**
  ```bash
  sudo dnf install mpv
  ```

  > [!WARNING]
  > Windows'ta [MPV](https://github.com/shinchiro/mpv-winbuild-cmake/releases) uygulamasını Path'e Eklemeniz Gerekmekte.

  <h1 align="center">
      <b>Kurulum</b>
  </h1>

  **PIP**
  ```bash
  pip install aniwatch-tr
  ```

  **Manual Kurulum**
  ```bash
  cd ~ && git clone https://github.com/DeoDorqnt387/aniwatch-tr.git && bash aniwatch-tr/install.sh
  ```
  ```bash
  sudo cp ~/.aniwatch-tr/aniwatch-tr /usr/local/bin/aniwatch-tr
  ```
  **Kullanım**
  ```bash
  aniwatch-tr
  ```
  ```bash
  aniwatch-tr -v # Opsyionel VLC Kullanımı
  ```
  **Nasıl Kaldırılır?**
  ```bash
  sudo rm /usr/local/bin/aniwatch-tr && sudo rm -rf ~/.aniwatch-tr
  ```

  <hr>

  [Ani-cli](https://github.com/pystardust/ani-cli)'den Esinlenilmiştir.


pkgId: 719bbc0bcccb16b353ff7fc3ac62805d881febb821e8298b6f4dbc81aa411cae
name: python-aniworld
arch: src
version: 2.3.1
epoch: 0
release: 1
summary: Cross-platform command-line tool to download and stream anime from aniworld.to
url: https://github.com/phoenixthrush/Aniworld-Downloader
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aniworld-2.3.1-1.src.rpm
checksum_type: sha256
description:
  <a id="readme-top"></a>


  AniWorld Downloader is a command-line tool built to download and stream anime content from [aniworld.to](https://aniworld.to). With it, you can grab single episodes, download entire seasons, and organize files into neatly structured folders. It's cross-platform, so it works on Windows, macOS, and Linux for a smooth experience across all major OSes.

  ![Downloads](https://img.shields.io/pypi/dm/aniworld?label=Downloads&color=blue)
  ![License](https://img.shields.io/pypi/l/aniworld?label=License&color=blue)

  ![AniWorld Downloader - Demo](https://github.com/phoenixthrush/AniWorld-Downloader/blob/main/.github/demo.png?raw=true)

  <details>
    <summary>Table of Contents</summary>


  - [Features](#features)
  - [TODO](#todo-list)


  - [Installation](#installation)
    - [Latest Release](#installing-aniworld-downloader)
    - [Dev Version (Unstable)](#development-version-unstable)
  - [Uninstallation](#uninstallation)


  - [Usage Basics](#usage)
    - [Running with Menu](#running-with-menu)
    - [Command-Line Arguments](#aniworld-command-options)


  - [Command-Line Examples](#command-line-examples)
    - [Download a Single Episode](#example-1-download-a-single-episode)
    - [Download Multiple Episodes](#example-2-download-multiple-episodes)
    - [Watch Episodes with Aniskip](#example-3-watch-episodes-with-aniskip)
    - [Syncplay with Friends](#example-4-syncplay-with-friends)
    - [Download with Specific Provider and Language](#example-5-download-with-specific-provider-and-language)
    - [Use Episode File](#example-6-use-an-episode-file)


  - [Anime4K Setup](#anime4k-setup)


  - [FAQ](#faq)
    - [Providers](#providers)
    - [s.to & bs.to Support](#sto--bsto-support)
  - [Support](#support)


  - [Contributing](#contributing)
  - [Credits](#credits)
  - [License](#license)


  - [Star History](#star-history)
  </details>



  - **Episode Downloads**: Easily download single episodes or entire seasons in one go.
  - **Instant Streaming**: Stream episodes directly via the mpv player.
  - **Auto Play Next**: Automatically transition to the next episode for uninterrupted viewing.
  - **Flexible Providers**: Choose from Vidoza, VOE, and Streamtape, with Doodstream support coming soon.
  - **Language Options**: Switch between German Dub, English Sub, or German Sub based on your preference.
  - **Aniskip Integration**: Automatically skip intros and outros.
  - **Syncplay for Group Watching**: Enjoy synchronized anime watching sessions with friends.
  - **Proxy Compatibility**: Set up an HTTP proxy for restricted network environments.

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





  1. **Python Version**: Ensure you have **[Python 3.9](https://www.python.org/downloads/)** or higher installed.
     - **Note**: Although Python 3.13 is available, it does not include `windows-curses`, which is needed for the menu to work on Windows. To avoid issues, please use **Python 3.12** until `windows-curses` is updated. Check for updates [here](https://pypi.org/project/windows-curses/#files).

  <details>
    <summary>Python Installation Tutorial (Windows only)</summary>
    <img src="https://github.com/phoenixthrush/AniWorld-Downloader/blob/main/.github/Python_Add_to_Path_Tutorial.png?raw=true" alt="Python Installation Tutorial">
  </details>



  - To install the latest release of AniWorld Downloader, run:

      ```shell
      pip install aniworld
      ```

  - To update to the latest version, use:

      ```shell
      pip install -U aniworld
      ```



  - To install the latest development changes directly from GitHub, use:

      ```shell
      pip install --upgrade git+https://github.com/phoenixthrush/AniWorld-Downloader.git#egg=aniworld
      ```

  - To update, simply rerun the command above. These builds may be unstable, so it’s good to check regularly.



  If you prefer to have the files locally:

  1. Clone the repository:

      ```shell
      git clone https://github.com/phoenixthrush/AniWorld-Downloader aniworld
      ```

  2. Install it in editable mode:

      ```shell
      pip install -U -e ./aniworld
      ```

  3. To keep your local version up to date, run:

      ```shell
      git -C aniworld pull
      ```

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



  To uninstall AniWorld Downloader, run the following command:

  ```shell
  aniworld --uninstall
  ```

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





  To launch AniWorld Downloader with an interactive menu, use:

  ```shell
  aniworld
  ```

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



  AniWorld Downloader supports various command-line options for downloading and streaming anime without using the interactive menu. This allows access to advanced features not available in the menu (e.g., `--aniskip`, `--keep-watching`, `--syncplay-password`).



  To download episode 1 of "Demon Slayer: Kimetsu no Yaiba":

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1
  ```



  To download multiple episodes of "Demon Slayer":

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-2
  ```



  To watch an episode while skipping intros and outros:

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --action Watch --aniskip
  ```



  To syncplay a specific episode with friends:

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --action Syncplay --keep-watching
  ```



  You can choose different languages for yourself and your friends:

  - For German Dub:

      ```shell
      aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --action Syncplay --keep-watching --language "German Dub" --aniskip
      ```

  - For English Sub:

      ```shell
      aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --action Syncplay --keep-watching --language "English Sub" --aniskip
      ```

  **Note:** Anyone watching the same anime (regardless of episode) will automatically join the room if Syncplay is enabled. To restrict access to strangers, set a password for the room:

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --action Syncplay --keep-watching --language "English Sub" --aniskip --syncplay-password beans
  ```



  To download an episode using the VOE provider with English subtitles:

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --provider VOE --language "English Sub"
  ```



  You can download episodes listed in a text file. Here’s an example of what the text file (`test.txt`) should look like:

  ```

  https://aniworld.to/anime/stream/alya-sometimes-hides-her-feelings-in-russian


  https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-2


  https://aniworld.to/anime/stream/kaguya-sama-love-is-war/staffel-3/episode-13
  ```

  To download the episodes specified in the file, use:

  ```shell
  aniworld --episode-file /Users/goofball/Downloads/test.txt --language "German Dub"
  ```

  You can also combine this with `Watch` and `Syncplay` actions, along with other arguments as needed.

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



  To set up Anime4K, run the following commands based on your GPU type. This setup will install everything needed to use Anime4K in the mpv player, even outside of AniWorld.


  *(e.g., GTX 1080, RTX 2070, RTX 3060, RX 590, Vega 56, 5700XT, 6600XT, M1 Pro, M1 Max, M1 Ultra, M2 Pro, M2 Max)*

  ```shell
  aniworld --anime4k High
  ```


  *(e.g., GTX 980, GTX 1060, RX 570, M1, M2, Intel chips)*

  ```shell
  aniworld --anime4k Low
  ```


  If you want to uninstall Anime4K, use the following command:

  ```shell
  aniworld --anime4k Remove
  ```


  - This installation saves all necessary files into the **mpv** directory.
  - You can switch between settings by specifying the optimized modes (`High` or `Low`).
  - Use the `Remove` option to uninstall Anime4K easily.

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



  ```shell
  aniworld --help
  ```

  ```
  usage: aniworld [-h] [-v] [-d] [-u] [-U {mpv,yt-dlp,syncplay,all}] [-s SLUG]
                  [-l LINK] [-q QUERY] [-e EPISODE [EPISODE ...]]
                  [-f EPISODE_FILE] [-lf] [-a {Watch,Download,Syncplay}]
                  [-o OUTPUT] [-O OUTPUT_DIRECTORY]
                  [-L {German Dub,English Sub,German Sub}]
                  [-p {Vidoza,Streamtape,VOE,Doodstream}] [-A {High,Low,Remove}]
                  [-sH SYNCPLAY_HOSTNAME] [-sU SYNCPLAY_USERNAME]
                  [-sR SYNCPLAY_ROOM]
                  [-sP SYNCPLAY_PASSWORD [SYNCPLAY_PASSWORD ...]] [-k] [-K]
                  [-r [RANDOM_ANIME]] [-D] [-C] [-x PROXY] [-w]

  Parse optional command line arguments.

  options:
    -h, --help            show this help message and exit

  General Options:
    -v, --version         Print version info
    -d, --debug           Enable debug mode
    -u, --uninstall       Self uninstall
    -U {mpv,yt-dlp,syncplay,all}, --update {mpv,yt-dlp,syncplay,all}
                          Update mpv, yt-dlp, syncplay, or all.

  Search Options:
    -s SLUG, --slug SLUG  Search query - E.g. demon-slayer-kimetsu-no-yaiba
    -l LINK, --link LINK  Search query - E.g.
                          https://aniworld.to/anime/stream/demon-slayer-kimetsu-
                          no-yaiba
    -q QUERY, --query QUERY
                          Search query input - E.g. demon

  Episode Options:
    -e EPISODE [EPISODE ...], --episode EPISODE [EPISODE ...]
                          List of episode URLs
    -f EPISODE_FILE, --episode-file EPISODE_FILE
                          File path containing a list of episode URLs
    -lf, --episode-local  NOT IMPLEMENTED YET - Use local episode files instead
                          of URLs

  Action Options:
    -a {Watch,Download,Syncplay}, --action {Watch,Download,Syncplay}
                          Action to perform
    -o OUTPUT, --output OUTPUT
                          Download directory E.g. /Users/phoenixthrush/Downloads
    -O OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
                          Final download directory E.g ExampleDirectory,
                          defaults to anime name if not specified
    -L {German Dub,English Sub,German Sub}, --language {German Dub,English Sub,German Sub}
                          Language choice
    -p {Vidoza,Streamtape,VOE,Doodstream}, --provider {Vidoza,Streamtape,VOE,Doodstream}
                          Provider choice

  Anime4K Options:
    -A {High,Low,Remove}, --anime4k {High,Low,Remove}
                          Set Anime4K optimised mode (High Eg.: GTX 1080, RTX
                          2070, RTX 3060, RX 590, Vega 56, 5700XT, 6600XT; Low
                          Eg.: GTX 980, GTX 1060, RX 570, or Remove).

  Syncplay Options:
    -sH SYNCPLAY_HOSTNAME, --syncplay-hostname SYNCPLAY_HOSTNAME
                          Set syncplay hostname
    -sU SYNCPLAY_USERNAME, --syncplay-username SYNCPLAY_USERNAME
                          Set syncplay username
    -sR SYNCPLAY_ROOM, --syncplay-room SYNCPLAY_ROOM
                          Set syncplay room
    -sP SYNCPLAY_PASSWORD [SYNCPLAY_PASSWORD ...], --syncplay-password SYNCPLAY_PASSWORD [SYNCPLAY_PASSWORD ...]
                          Set a syncplay room password

  Miscellaneous Options:
    -k, --aniskip         Skip intro and outro
    -K, --keep-watching   Continue watching
    -r [RANDOM_ANIME], --random-anime [RANDOM_ANIME]
                          Select random anime (default genre is "all", Eg.:
                          Drama)
    -D, --only-direct-link
                          Output direct link
    -C, --only-command    Output command
    -x PROXY, --proxy PROXY
                          Set HTTP Proxy - E.g. http://0.0.0.0:8080
    -w, --use-playwright  Bypass fetching with a headless browser using
                          Playwright instead (EXPERIMENTAL!!!)
  ```

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



  AniWorld Downloader requires the following Python packages:

  - `requests`
  - `beautifulsoup4`
  - `npyscreen`
  - `colorlog`
  - `py7zr`
  - `packaging`
  - `yt-dlp`
  - `windows-curses` (only for Windows users)

  These packages are automatically installed when you set up AniWorld Downloader using pip.

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




  - **Command-Line Improvements**
    - [x] Implement `argparse` for command-line argument parsing.
    - [x] Refactor the code into modular Python files.
    - [x] Display season and episode names instead of full links in selections.

  - **Logging and Proxy Support**
    - [x] Integrate the Python logging module.
    - [x] Add support for proxy configurations.

  - **Automatic Installations**
    - [x] Automatically download and install the following on Windows & Linux:
      - [x] `mpv`
      - [x] `yt-dlp`
      - [x] `Syncplay`

  - **Feature Enhancements**
    - [x] Implement movie support.
    - [x] Configure Anime4K installation for:
      - [x] Windows
      - [x] MacOS
      - [x] Linux
    - [x] Add options for Syncplay room passwords.
    - [x] Add mass file support.
    - [x] Add Captcha bypass for headless browser fetches.
    - [x] Allow changing final output folder
    - [x] Add option to select a random anime optionally via genre
    - [x] Add additional installation variants.
    - [x] Add anime description

  - **Bug Fixes**
    - [x] Fix season episode count.
    - [x] Fix yt-dlp progress bar on Windows.
    - [x] Fix empty output for unavailable selected languages.
    - [x] Use anime title instead of slug on the episode list.
    - [x] Add time to cancel.
    - [x] Fix output folder for mass processed files.
    - [x] Fix Syncplay and mpv video desync issue (use Vidoza for Watch & Syncplay).
    - [x] Automatically clean up old logs.
    - [x] Separate the functionalities of aniskip and auto start & exit.
    - [x] Sanitise echo strings on Windows
    - [x] Add ascii art fallback on Windows 10
    - [x] Fix mpv auto download on Windows 10
    - [x] Fix Aniskip for seasons beyond the first
    - [x] Fix --only-direct-link and only-command


    - [ ] Syncplay support for other sites and local playback
    - [ ] Implement an ordered list for provider fallback in globals.py
    - [ ] Add support for other sites (anime-base.net)
    - [ ] Remove unnecessary dependencies
    - [ ] Optimize performance to reduce requests and eliminate duplicate function calls
    - [ ] Add generic fallback extractor
    - [ ] Anonymize logs by removing usernames
    - [ ] Add support for Doodstream

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




  Aniworld-Downloader currently supports three providers:
  - **VOE**
  - **Vidoza**
  - **Streamtape**

  **Doodstream** is not supported due to constant backend updates that block download attempts. While I initially had support for it, Doodstream's backend changes rendered my previous method obsolete.


  In older versions, the default provider for both downloading and watching with syncplay and mpv was Vidoza. However, since Vidoza and Streamtape throttle download speeds, I recommend using **VOE** for downloads, as it can fully utilize your bandwidth.

  **Drawback of VOE:**
  - Many fragments can be invalid, affecting playback with mpv. While downloads using yt-dlp work fine, invalid fragments may cause scenes to skip or glitch, leading to noticeable disruptions, especially during syncplay, where different fragment issues among viewers can result in annoying jumps.

  **Current Recommendations:**
  - **Download in this order:**
    VOE > Vidoza > Streamtape

  - **For viewing in mpv or syncplay:**
    Vidoza > Streamtape > VOE


  I previously had support for s.to in a separate branch, but it is now unmaintained and untested. Currently, I do not plan to re-implement support for s.to, as I've focused on stabilizing the existing code. Before adding new providers, I need to streamline the backend, which is somewhat messy due to redundant functions and fetches from recent feature additions.

  **Note on Adding s.to Support:**
  - Adding s.to support would not be difficult—it only requires one fewer fetch than Aniworld's current method to access streaming providers. If anyone is interested in contributing to this effort, I would be happy to merge the addition.

  There are already other tools that support s.to. For terminal-based viewing of s.to, check out my friend's project called **[gucken](https://github.com/Commandcracker/gucken)**—he’s doing great work there.

  Regarding Aniworld’s claim of hosting 1,000+ license-free anime, it’s worth noting that they also stream new shows that may require subscriptions elsewhere. Supporting s.to could mean indirectly accessing copyrighted content, such as Netflix originals. As I do not host any content but fetch it directly from streaming providers, I am not liable for any issues arising from downloading anime.

  Feel free to contribute! Any help is appreciated, and I’d be happy to merge in support for s.to or bs.to if it gets added.

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


  - **[mpv](https://github.com/mpv-player/mpv.git)**: Media player used for streaming.
  - **[yt-dlp](https://github.com/yt-dlp/yt-dlp.git)**: Tool for downloading videos.
  - **[Syncplay](https://github.com/Syncplay/syncplay.git)**: Service for synchronized playback with friends.
  - **[Anime4K](https://github.com/bloc97/Anime4K)**: A high-quality real-time upscaler for anime video.

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


  Contributions to AniWorld Downloader are welcome! Your input helps improve the project, whether it’s through:
  - Reporting bugs
  - Suggesting features
  - Submitting pull requests


  - **Lulu** (since Sep 14, 2024)
    ![wakatime](https://wakatime.com/badge/user/ebc8f6ad-7a1c-4f3a-ad43-cc402feab5fc/project/408bbea7-23d0-4d6c-846d-79628e6b136c.svg)

  - **Tmaster055** (since Oct 21, 2024)
    ![wakatime](https://wakatime.com/badge/user/79a1926c-65a1-4f1c-baf3-368712ebbf97/project/5f191c34-1ee2-4850-95c3-8d85d516c449.svg)

    Thank you [Tmaster055](https://github.com/Tmaster055) for fixing Aniskip by fetching the correct MAL ID!

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


  This project is licensed under the **[MIT License](LICENSE)**.
  For more details, see the LICENSE file.

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



  I’ve received several reports from users experiencing unexpected menu quits. Recently, streaming providers have started blocking IP addresses from downloading. You can bypass this by using a VPN. You might try using the `--use-playwright` option instead, though it's still experimental and may not be very effective. Additionally, run aniworld with the `--debug` flag.

  This will typically reveal a timeout error, indicating the domain couldn’t be reached or another issue.


  If you still need assistance with AniWorld Downloader, you can:

  - **File a report** via the [GitHub Issues](https://github.com/phoenixthrush/AniWorld-Downloader/issues) page.
  - **Contact me directly** via email at [contact@phoenixthrush.com](mailto:contact@phoenixthrush.com), on Matrix `@phoenixthrush:matrix.org`, or on Discord `phoenixthrush`.

  While I do respond to emails, opening a GitHub issue is preferable, even for installation questions, so others can find solutions too. However, I’m still happy to help via email if you prefer.

  If you enjoy AniWorld Downloader and want to support the project, please consider starring the repository on GitHub. It’s a small gesture that means a lot and motivates me to keep improving the project.

  Thank you for your support and feedback!

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



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

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


pkgId: f9c3e6272fbdd38bd4625c92ecc09b0f1b8396c0e8e3b74a88e0ecb52493f682
name: python-aniworld
arch: src
version: 2.3.2
epoch: 0
release: 1
summary: Cross-platform command-line tool to download and stream anime from aniworld.to
url: https://github.com/phoenixthrush/Aniworld-Downloader
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aniworld-2.3.2-1.src.rpm
checksum_type: sha256
description:
  <a id="readme-top"></a>


  AniWorld Downloader is a command-line tool built to download and stream anime content from [aniworld.to](https://aniworld.to). With it, you can grab single episodes, download entire seasons, and organize files into neatly structured folders. It's cross-platform, so it works on Windows, macOS, and Linux for a smooth experience across all major OSes.

  ![Downloads](https://img.shields.io/pypi/dm/aniworld?label=Downloads&color=blue)
  ![License](https://img.shields.io/pypi/l/aniworld?label=License&color=blue)

  ![AniWorld Downloader - Demo](https://github.com/phoenixthrush/AniWorld-Downloader/blob/main/.github/demo.png?raw=true)

  <details>
    <summary>Table of Contents</summary>


  - [Features](#features)
  - [Supported Sites and Extractors](#supported-sites-and-extractors)
  - [TODO](#todo-list)


  - [Installation](#installation)
    - [Latest Release](#installing-aniworld-downloader)
    - [Dev Version (Unstable)](#development-version-unstable--requires-git)
  - [Uninstallation](#uninstallation)


  - [Usage Basics](#usage)
    - [Running with Menu](#running-with-menu)
    - [Command-Line Arguments](#aniworld-command-options)


  - [Command-Line Examples](#command-line-examples)
    - [Download a Single Episode](#example-1-download-a-single-episode)
    - [Download Multiple Episodes](#example-2-download-multiple-episodes)
    - [Watch Episodes with Aniskip](#example-3-watch-episodes-with-aniskip)
    - [Syncplay with Friends](#example-4-syncplay-with-friends)
    - [Download with Specific Provider and Language](#example-5-download-with-specific-provider-and-language)
    - [Use Episode File](#example-6-use-an-episode-file)


  - [Anime4K Setup](#anime4k-setup)


  - [FAQ](#faq)
    - [Providers](#providers)
    - [s.to & bs.to Support](#sto--bsto-support)
  - [Support](#support)


  - [Contributing](#contributing)
  - [Credits](#credits)
  - [License](#license)


  - [Legal Disclaimer](#legal-disclaimer)


  - [Star History](#star-history)
  </details>

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



  - **Episode Downloads**: Easily download single episodes or entire seasons in one go.
  - **Instant Streaming**: Stream episodes directly via the mpv player.
  - **Auto Play Next**: Automatically transition to the next episode for uninterrupted viewing.
  - **Flexible Providers**: Choose from Vidoza, VOE, and Streamtape, with Doodstream support coming soon.
  - **Language Options**: Switch between German Dub, English Sub, or German Sub based on your preference.
  - **Aniskip Integration**: Automatically skip intros and outros.
  - **Syncplay for Group Watching**: Enjoy synchronized anime watching sessions with friends.
  - **Proxy Compatibility**: Set up an HTTP proxy for restricted network environments.

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



  | Site               | Supported Providers                  | Status                                                                                   |
  |--------------------|--------------------------------------|------------------------------------------------------------------------------------------|
  | **aniworld.to**    | VOE, Vidoza, Streamtape | ✔️ VOE, Vidoza, Streamtape <br> ➖ DoodStream, SpeedFiles (in progress) <br> ❌ Luluvdo, Vidmoly, Filemoon |
  | **streamkiste.tv** | Native extractor | ✔️ |
  | **hanime.tv**      | Native extractor | ✔️ |
  | **nhentai.net**    | Native extractor | ✔️ |
  | **jav.guru**       | Native extractor | ✔️ |

  > **Note:** Streamtape has been removed by aniworld.to and from the menu, but it still works and can be accessed using `--provider`.
  > **Note:** The menu currently only supports aniworld.to. To access other sites, you need to specify `--episode`.
  > **Note:** Native extractor sites require the optional dependency **playwright**. To install, run `pip install playwright` and then `playwright install` to complete the setup.

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





  1. **Python Version**: Ensure you have **[Python 3.9](https://www.python.org/downloads/)** or higher installed.
     - **Note**: Although Python 3.13 is available, it does not include `windows-curses`, which is needed for the menu to work on Windows. To avoid issues, please use **Python 3.12** until `windows-curses` is updated. Check for updates [here](https://pypi.org/project/windows-curses/#files).

  <details>
    <summary>Python Installation Tutorial (Windows only)</summary>
    <img src="https://github.com/phoenixthrush/AniWorld-Downloader/blob/main/.github/Python_Add_to_Path_Tutorial.png?raw=true" alt="Python Installation Tutorial">

  **Note:** If you've restarted the terminal and `aniworld` isn't being recognized, you have two options:
  - Add `aniworld` to your PATH so it can be found globally.
  - Run `python -m aniworld`, which should work without adding it to the PATH.

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



  - To install the latest release of AniWorld Downloader, run:

      ```shell
      pip install aniworld
      ```

  - To update to the latest version, use:

      ```shell
      pip install -U aniworld
      ```



  - To install the latest development changes directly from GitHub, use:

      ```shell
      pip install --upgrade git+https://github.com/phoenixthrush/AniWorld-Downloader.git#egg=aniworld
      ```

  - To update, simply rerun the command above. These builds may be unstable, so it’s good to check regularly.



  If you prefer to have the files locally:

  1. Clone the repository:

      ```shell
      git clone https://github.com/phoenixthrush/AniWorld-Downloader aniworld
      ```

  2. Install it in editable mode:

      ```shell
      pip install -U -e ./aniworld
      ```

  3. To keep your local version up to date, run:

      ```shell
      git -C aniworld pull
      ```

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



  To uninstall AniWorld Downloader, run the following command:

  ```shell
  aniworld --uninstall
  ```

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





  To launch AniWorld Downloader with an interactive menu, use:

  ```shell
  aniworld
  ```

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



  AniWorld Downloader supports various command-line options for downloading and streaming anime without using the interactive menu. This allows access to advanced features not available in the menu (e.g., `--aniskip`, `--keep-watching`, `--syncplay-password`).



  To download episode 1 of "Demon Slayer: Kimetsu no Yaiba":

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1
  ```



  To download multiple episodes of "Demon Slayer":

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-2
  ```



  To watch an episode while skipping intros and outros:

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --action Watch --aniskip
  ```



  To syncplay a specific episode with friends:

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --action Syncplay --keep-watching
  ```



  You can choose different languages for yourself and your friends:

  - For German Dub:

      ```shell
      aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --action Syncplay --keep-watching --language "German Dub" --aniskip
      ```

  - For English Sub:

      ```shell
      aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --action Syncplay --keep-watching --language "English Sub" --aniskip
      ```

  **Note:** Anyone watching the same anime (regardless of episode) will automatically join the room if Syncplay is enabled. To restrict access to strangers, set a password for the room:

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --action Syncplay --keep-watching --language "English Sub" --aniskip --syncplay-password beans
  ```



  To download an episode using the VOE provider with English subtitles:

  ```shell
  aniworld --episode https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-1/episode-1 --provider VOE --language "English Sub"
  ```



  You can download episodes listed in a text file. Here’s an example of what the text file (`test.txt`) should look like:

  ```

  https://aniworld.to/anime/stream/alya-sometimes-hides-her-feelings-in-russian


  https://aniworld.to/anime/stream/demon-slayer-kimetsu-no-yaiba/staffel-2


  https://aniworld.to/anime/stream/kaguya-sama-love-is-war/staffel-3/episode-13
  ```

  To download the episodes specified in the file, use:

  ```shell
  aniworld --episode-file /Users/goofball/Downloads/test.txt --language "German Dub"
  ```

  You can also combine this with `Watch` and `Syncplay` actions, along with other arguments as needed.

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



  To set up Anime4K, run the following commands based on your GPU type. This setup will install everything needed to use Anime4K in the mpv player, even outside of AniWorld.


  *(e.g., GTX 1080, RTX 2070, RTX 3060, RX 590, Vega 56, 5700XT, 6600XT, M1 Pro, M1 Max, M1 Ultra, M2 Pro, M2 Max)*

  ```shell
  aniworld --anime4k High
  ```


  *(e.g., GTX 980, GTX 1060, RX 570, M1, M2, Intel chips)*

  ```shell
  aniworld --anime4k Low
  ```


  If you want to uninstall Anime4K, use the following command:

  ```shell
  aniworld --anime4k Remove
  ```


  - This installation saves all necessary files into the **mpv** directory.
  - You can switch between settings by specifying the optimized modes (`High` or `Low`).
  - Use the `Remove` option to uninstall Anime4K easily.

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



  ```shell
  aniworld --help
  ```

  ```
  usage: aniworld [-h] [-v] [-d] [-u] [-U {mpv,yt-dlp,syncplay,all}] [-s SLUG]
                  [-l LINK] [-q QUERY] [-e EPISODE [EPISODE ...]]
                  [-f EPISODE_FILE] [-lf] [-a {Watch,Download,Syncplay}]
                  [-o OUTPUT] [-O OUTPUT_DIRECTORY]
                  [-L {German Dub,English Sub,German Sub}]
                  [-p {Vidoza,Streamtape,VOE,Doodstream}] [-A {High,Low,Remove}]
                  [-sH SYNCPLAY_HOSTNAME] [-sU SYNCPLAY_USERNAME]
                  [-sR SYNCPLAY_ROOM]
                  [-sP SYNCPLAY_PASSWORD [SYNCPLAY_PASSWORD ...]] [-k] [-K]
                  [-r [RANDOM_ANIME]] [-D] [-C] [-x PROXY] [-w]

  Parse optional command line arguments.

  options:
    -h, --help            show this help message and exit

  General Options:
    -v, --version         Print version info
    -d, --debug           Enable debug mode
    -u, --uninstall       Self uninstall
    -U {mpv,yt-dlp,syncplay,all}, --update {mpv,yt-dlp,syncplay,all}
                          Update mpv, yt-dlp, syncplay, or all.

  Search Options:
    -s SLUG, --slug SLUG  Search query - E.g. demon-slayer-kimetsu-no-yaiba
    -l LINK, --link LINK  Search query - E.g.
                          https://aniworld.to/anime/stream/demon-slayer-kimetsu-
                          no-yaiba
    -q QUERY, --query QUERY
                          Search query input - E.g. demon

  Episode Options:
    -e EPISODE [EPISODE ...], --episode EPISODE [EPISODE ...]
                          List of episode URLs
    -f EPISODE_FILE, --episode-file EPISODE_FILE
                          File path containing a list of episode URLs
    -lf, --episode-local  NOT IMPLEMENTED YET - Use local episode files instead
                          of URLs

  Action Options:
    -a {Watch,Download,Syncplay}, --action {Watch,Download,Syncplay}
                          Action to perform
    -o OUTPUT, --output OUTPUT
                          Download directory E.g. /Users/phoenixthrush/Downloads
    -O OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
                          Final download directory E.g ExampleDirectory,
                          defaults to anime name if not specified
    -L {German Dub,English Sub,German Sub}, --language {German Dub,English Sub,German Sub}
                          Language choice
    -p {Vidoza,Streamtape,VOE,Doodstream}, --provider {Vidoza,Streamtape,VOE,Doodstream}
                          Provider choice

  Anime4K Options:
    -A {High,Low,Remove}, --anime4k {High,Low,Remove}
                          Set Anime4K optimised mode (High Eg.: GTX 1080, RTX
                          2070, RTX 3060, RX 590, Vega 56, 5700XT, 6600XT; Low
                          Eg.: GTX 980, GTX 1060, RX 570, or Remove).

  Syncplay Options:
    -sH SYNCPLAY_HOSTNAME, --syncplay-hostname SYNCPLAY_HOSTNAME
                          Set syncplay hostname
    -sU SYNCPLAY_USERNAME, --syncplay-username SYNCPLAY_USERNAME
                          Set syncplay username
    -sR SYNCPLAY_ROOM, --syncplay-room SYNCPLAY_ROOM
                          Set syncplay room
    -sP SYNCPLAY_PASSWORD [SYNCPLAY_PASSWORD ...], --syncplay-password SYNCPLAY_PASSWORD [SYNCPLAY_PASSWORD ...]
                          Set a syncplay room password

  Miscellaneous Options:
    -k, --aniskip         Skip intro and outro
    -K, --keep-watching   Continue watching
    -r [RANDOM_ANIME], --random-anime [RANDOM_ANIME]
                          Select random anime (default genre is "all", Eg.:
                          Drama)
    -D, --only-direct-link
                          Output direct link
    -C, --only-command    Output command
    -x PROXY, --proxy PROXY
                          Set HTTP Proxy - E.g. http://0.0.0.0:8080
    -w, --use-playwright  Bypass fetching with a headless browser using
                          Playwright instead (EXPERIMENTAL!!!)
  ```

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



  AniWorld Downloader requires the following Python packages:

  - `requests`
  - `beautifulsoup4`
  - `npyscreen`
  - `colorlog`
  - `py7zr`
  - `packaging`
  - `yt-dlp`
  - `windows-curses` (only for Windows users)

  These packages are automatically installed when you set up AniWorld Downloader using pip.

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




  - **Command-Line Improvements**
    - [x] Implement `argparse` for command-line argument parsing.
    - [x] Refactor the code into modular Python files.
    - [x] Display season and episode names instead of full links in selections.

  - **Logging and Proxy Support**
    - [x] Integrate the Python logging module.
    - [x] Add support for proxy configurations.

  - **Automatic Installations**
    - [x] Automatically download and install the following on Windows & Linux:
      - [x] `mpv`
      - [x] `yt-dlp`
      - [x] `Syncplay`

  - **Feature Enhancements**
    - [x] Implement movie support.
    - [x] Configure Anime4K installation for:
      - [x] Windows
      - [x] MacOS
      - [x] Linux
    - [x] Add options for Syncplay room passwords.
    - [x] Add mass file support.
    - [x] Add Captcha bypass for headless browser fetches.
    - [x] Allow changing final output folder
    - [x] Add option to select a random anime optionally via genre
    - [x] Add additional installation variants.
    - [x] Add anime description

  - **Bug Fixes**
    - [x] Fix season episode count.
    - [x] Fix yt-dlp progress bar on Windows.
    - [x] Fix empty output for unavailable selected languages.
    - [x] Use anime title instead of slug on the episode list.
    - [x] Add time to cancel.
    - [x] Fix output folder for mass processed files.
    - [x] Fix Syncplay and mpv video desync issue (use Vidoza for Watch & Syncplay).
    - [x] Automatically clean up old logs.
    - [x] Separate the functionalities of aniskip and auto start & exit.
    - [x] Sanitise echo strings on Windows
    - [x] Add ascii art fallback on Windows 10
    - [x] Fix mpv auto download on Windows 10
    - [x] Fix Aniskip for seasons beyond the first
    - [x] Fix --only-direct-link and only-command


    - [ ] Syncplay support for local playback
    - [ ] Implement an ordered list for provider fallback in globals.py
    - [ ] Anonymize logs by removing usernames
    - [ ] Complete backend rewrite using OOP
    - [ ] Add support for Doodstream

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




  Aniworld-Downloader currently supports three providers:
  - **VOE**
  - **Vidoza**
  - **Streamtape**

  **Doodstream** is not supported due to constant backend updates that block download attempts. While I initially had support for it, Doodstream's backend changes rendered my previous method obsolete.


  In older versions, the default provider for both downloading and watching with syncplay and mpv was Vidoza. However, since Vidoza and Streamtape throttle download speeds, I recommend using **VOE** for downloads, as it can fully utilize your bandwidth.

  **Drawback of VOE:**
  - Many fragments can be invalid, affecting playback with mpv. While downloads using yt-dlp work fine, invalid fragments may cause scenes to skip or glitch, leading to noticeable disruptions, especially during syncplay, where different fragment issues among viewers can result in annoying jumps.

  **Current Recommendations:**
  - **Download in this order:**
    VOE > Vidoza > Streamtape

  - **For viewing in mpv or syncplay:**
    Vidoza > Streamtape > VOE


  I previously had support for s.to in a separate branch, but it is now unmaintained and untested. Currently, I do not plan to re-implement support for s.to, as I've focused on stabilizing the existing code. Before adding new providers, I need to streamline the backend, which is somewhat messy due to redundant functions and fetches from recent feature additions.

  **Note on Adding s.to Support:**
  - Adding s.to support would not be difficult—it only requires one fewer fetch than Aniworld's current method to access streaming providers. If anyone is interested in contributing to this effort, I would be happy to merge the addition.

  There are already other tools that support s.to. For terminal-based viewing of s.to, check out my friend's project called **[gucken](https://github.com/Commandcracker/gucken)**—he’s doing great work there.

  Regarding Aniworld’s claim of hosting 1,000+ license-free anime, it’s worth noting that they also stream new shows that may require subscriptions elsewhere. Supporting s.to could mean indirectly accessing copyrighted content, such as Netflix originals. As I do not host any content but fetch it directly from streaming providers, I am not liable for any issues arising from downloading anime.

  Feel free to contribute! Any help is appreciated, and I’d be happy to merge in support for s.to or bs.to if it gets added.

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


  - **[mpv](https://github.com/mpv-player/mpv.git)**: Media player used for streaming.
  - **[yt-dlp](https://github.com/yt-dlp/yt-dlp.git)**: Tool for downloading videos.
  - **[Syncplay](https://github.com/Syncplay/syncplay.git)**: Service for synchronized playback with friends.
  - **[Anime4K](https://github.com/bloc97/Anime4K)**: A high-quality real-time upscaler for anime video.
  - **[htv](https://github.com/rxqv/htv)**: Backend implementation for hanime playback and downloading.

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


  Contributions to AniWorld Downloader are welcome! Your input helps improve the project, whether it’s through:
  - Reporting bugs
  - Suggesting features
  - Submitting pull requests


  - **Lulu** (since Sep 14, 2024)
    ![wakatime](https://wakatime.com/badge/user/ebc8f6ad-7a1c-4f3a-ad43-cc402feab5fc/project/408bbea7-23d0-4d6c-846d-79628e6b136c.svg)

  - **Tmaster055** (since Oct 21, 2024)
    ![wakatime](https://wakatime.com/badge/user/79a1926c-65a1-4f1c-baf3-368712ebbf97/project/5f191c34-1ee2-4850-95c3-8d85d516c449.svg)

    Thank you [Tmaster055](https://github.com/Tmaster055) for fixing Aniskip by fetching the correct MAL ID!

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


  This project is licensed under the **[MIT License](LICENSE)**.
  For more details, see the LICENSE file.

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



  I’ve received several reports from users experiencing unexpected menu quits. Recently, streaming providers have started blocking IP addresses from downloading. You can bypass this by using a VPN. You might try using the `--use-playwright` option instead, though it's still experimental and may not be very effective. Additionally, run aniworld with the `--debug` flag.

  This will typically reveal a timeout error, indicating the domain couldn’t be reached or another issue.


  If you still need assistance with AniWorld Downloader, you can:

  - **File a report** via the [GitHub Issues](https://github.com/phoenixthrush/AniWorld-Downloader/issues) page.
  - **Contact me directly** via email at [contact@phoenixthrush.com](mailto:contact@phoenixthrush.com), on Matrix `@phoenixthrush:matrix.org`, or on Discord `phoenixthrush`.

  While I do respond to emails, opening a GitHub issue is preferable, even for installation questions, so others can find solutions too. However, I’m still happy to help via email if you prefer.

  If you enjoy AniWorld Downloader and want to support the project, please consider starring the repository on GitHub. It’s a small gesture that means a lot and motivates me to keep improving the project.

  Thank you for your support and feedback!

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



  Aniworld-Downloader is intended only for accessing publicly available content and does not support or encourage piracy or copyright infringement. As the program's creator, I am not liable for, nor associated with, any external links or the content they lead to.

  All content accessed through this program is freely available online, and the program does not host or distribute copyrighted material. The program has no control over the nature, content, or availability of the linked websites.

  If you have concerns or objections about the content accessed via this program, please address them to the relevant website owners, administrators, or hosting providers. Thank you.

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



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

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


pkgId: 3c7b83e650014c4de9b5493d0250a23b283e806afc00382e98a2055b52ec2554
name: python-anjali-aws-helper
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/anjali-aws-helper/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anjali-aws-helper-1.0.4-1.src.rpm
checksum_type: sha256
description:
  This Python package provides helper classes to interact with AWS' S3 and SNS.



  - `S3Helper`: For interacting with S3, including creating buckets and uploading files.
  - `SnsHelper`: For interacting with SNS, including creating topics, subscribing emails, and publishing messages.



  ```bash
  pip install anjali_aws_helper


pkgId: 0965d5a9b2379ee101f7617deb6b095d3d9d4347e2c2e20bc47b39e42a621082
name: python-anjani
arch: src
version: 2.14.17
epoch: 0
release: 1
summary: Telegram group management bot
url: https://userbotindo.com/anjani
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anjani-2.14.17-1.src.rpm
checksum_type: sha256
description:
  [![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)

  [![DeepSource](https://deepsource.io/gh/userbotindo/Anjani.svg/?label=active+issues)](https://deepsource.io/gh/userbotindo/Anjani/?ref=repository-badge)
  [![PyPI](https://img.shields.io/pypi/v/anjani.svg)](https://pypi.org/project/anjani/)

  Can be found on Telegram as [Anjani](https://t.me/dAnjani_bot).

  Anjani is a modern, easy-to-develop, fully async Telegram group managing bot for Telegram.



  -   Python 3.9 or higher.
  -   [Telegram API key](https://docs.pyrogram.org/intro/setup#api-keys).
  -   [Telegram Bot Token](https://t.me/botfather)
  -   [MongoDB Database](https://cloud.mongodb.com/).



  -   Easy to develop with object oriented models.
  -   Fully asynchronous with async / await.
  -   Type-hinted method making it easy to create plugins.
  -   Localization support.
  -   Class based plugin system.







  If you want to make your custom plugins, refer to [Anjani's Plugins Guide](https://userbotindo.com/anjani/docs/plugin/creating-your-own-plugin).



  -   [Marie](https://github.com/PaulSonOfLars/tgbot)
  -   [Pyrobud](https://github.com/kdrag0n/pyrobud)
  -   [All Contributors 👥](https://github.com/userbotindo/Anjani/graphs/contributors)


pkgId: 5ced4280fa6eb67e6091c3d68c945ef94f043fce0ee2ff1dc5ca34b7e4741774
name: python-anjin
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: Add your description here
url: https://pypi.org/project/anjin/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anjin-0.1.1-1.src.rpm
checksum_type: sha256
description:
  `anjin` is a tool to help you understand the impact of a new release of a Python package.  It is extremely rough around the edges.  It will not guide you to the coast of feudal Japan in order to establish a trade route to compete with the Portuguese.

  To run:
  - [install rye](https://rye.run/docs/installation)
  - `rye sync`
  - `rye run anjin -r <requirements file> -c <codebase path>`

  Right now accepts absolute paths to the requirements file and codebase.

  If you do not want to use the cache, you can run add the `--no-cache` | `-nc` flag.

  You will need to set the OPENAI_API_KEY and GITHUB_TOKEN environment variables in a `.env` file

  You can mark packages to be ignored by adding `# anjin:ignore` to the dep in the requirements file.



  https://github.com/user-attachments/assets/f837de32-0a0e-4172-9c6a-d81bad04528d


pkgId: 3bd86f72f2e71e5a84ac9f37d963410aab738d5c935bb1332f8e51abb325d6a4
name: python-ankerautotrainsdk
arch: src
version: 0.15
epoch: 0
release: 1
summary: Python Package Boilerplate
url: https://pypi.org/project/ankerautotrainsdk/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ankerautotrainsdk-0.15-1.src.rpm
checksum_type: sha256
description:
  1. 初始化SDK

  ```PYTHON
  from ankerautotrainsdk import AnkerAutoTrainSDK





  client = AnkerAutoTrainSDK(url="https://dataloop.anker-in.com")
  ```
  2. 上传文件




  file_path: str 本地文件路径(可以是视频或图片)

  directory: str 上传到minio的目录前缀名，如果不知道这个是干啥的，留空就可以

  返回值

  {
      url: str
      bucket: str
      storage_id: str
      object_name: str
      uid: str
  }

  使用示例
  ```python
  client.upload_image("test.jpeg", "test")
  ```
  3. 上传文件信息
  一个文件信息必须要对应一个文件




  raw_data: dict 上传的文件对应的文件信息

  返回值

  {
      raw_data_id: str
  }

  使用示例
  ```python

  upload_response = client.upload_image("test.jpeg", "test")


  resolution = {"width": 1920, "height": 1080}
  sourceType = "trigger"
  localEventTime = "20241024"
  storage = {"storageId": upload_response.storage_id, "bucket": upload_response.bucket, "objectName": upload_response.object_name}
  raw_data = {
      "uid": upload_response.uid,
      "fileMeta": {"resolution": resolution},
      "type": "image",
      "region": "CN",
      "securityLevel": "low",
      "storage": storage,
      "bg": "ap",
      "owner": "ivan.liu",
      "extra": {"localEventTime": localEventTime},
      "sourceInfo":{"type": sourceType}
  }
  client.upload_raw_data(raw_data)
  ```

  4. 上传文件标注
  一个文件标注必须要对应一个文件
  多个文件标注可以对应一个文件




  annotated_data: dict 上传的文件对应的标注信息

  返回值

  {
      annotation_data_id: str
  }

  使用示例
  ```python

  upload_response = client.upload_image("test.jpeg", "test")


  model_name = 'test_model'
  labelInfo = [{"bbox_xyxy": [4307,1834,4462,1952],"label": "poop","score": 1,"labelType": 0}]
  annotation_data = {
      "annotationType": "object",
      "bg": "ap",
      "owner": "name",
      "dataId": ["b20911d85ce768742def204b032a95c7"],
      "labelInfo": labelInfo,
      "labelMethod": "auto",
      "labelScope": ["wire"],
      "modelName": model_name,
      "modelVersion": "0.1"
  }
  annotation_response = client.upload_annotated_data(annotation_data)


  annotation_response.annotation_data_id
  ```

  5. 创建数据集
  数据集用于组织上传的标注文件，所以上传标注文件返回的标注annotation_data_id必须保存为一个list[]




  dataset_info: dict 创建数据集的信息

  返回值

  {
      dataset_id: str
  }

  使用示例
  ```python

  create_dataset_info = {
      "annotationBy": [],
      "annotationType": "detection",
      "bg": "ap",
      "datasetName": "test dataset",
      "datasetVersion": "v2",
      "modelType": "teacher",
      "owner": "name",
      "remark": "This is a test dataset",
      "versionType": "train"
  }
  create_datast_response = client.create_dataset(create_dataset_info)


  create_datast_response.dataset_id
  ```

  6. 链接数据集
  创建完数据集后，需要将上传标注文件返回的标注annotation_data_id链接到这个数据集上。上传的所有标注annotation_data_id必须保存为一个list[]




  annotation_id_list: list 需要组织到这个数据集的所有标注annotation_data_id list
  dataset_id: str 创建的数据集dataset_id

  使用示例
  ```python

  id_list = ["66f519f20c11b8a33cd2aa7b", "66f519f20c11b8a33cd2aa7b"]

  link_response = client.link_dataset(annotation_id_list=id_list, dataset_version_id=create_datast_response.dataset_id)
  ```

  7. 下载文件
  下载文件有两种方式，第一种是通过文件储存信息下载


  参数
  - storage_id: str 上传文件返回的storage_id
  - bucket: str 上传文件返回的bucket
  - object_name: str 上传文件返回的object_name
  - directory: str 下载到本地的路径

  使用示例
  ```python
  client.download_image("2vcrqyykgmaql", "data-sync-storage", "2024-10-24/cables_pack.jpg", "/home/save")
  ```

  第二种是通过文件uid下载

  参数
  - uid: str 上传文件返回的uid
  - directory: str 下载到本地的路径

  使用示例
  ```python
  client.download_image("b20911d85ce768742def204b032a95c7", "/home/save")
  ```

  8. 下载数据集
  组织好的数据集会包含原始文件的信息和标注的信息，通过json文件包含在一起。可以通过本接口下载json文件


  参数
  - dataset_name: str 需要下载的数据集的名在
  - dataset_version: str 需要下载的数据集的版本
  - directory: str 下载到本地的路径

  使用示例
  ```python
  download_dataset_response = client.download_dataset(dataset_name="test dataset", dataset_version="v2", directory="/home/ivan")
  ```


pkgId: f7d146b7cc40bb803012e732970208d93747763d7a4d2b9918a4597dc722e38b
name: python-ankh
arch: src
version: 1.10.0
epoch: 0
release: 1
summary: Optimized Protein Language Model
url: https://github.com/agemagician/Ankh
rpm_license: CC-BY-NC-SA-4.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ankh-1.10.0-1.src.rpm
checksum_type: sha256
description:
  * [&nbsp; Installation](#install)
  * [&nbsp; Models Availability](#models)
  * [&nbsp; Dataset Availability](#datasets)
  * [&nbsp; Usage](#usage)
  * [&nbsp; Original downstream Predictions](#results)
  * [&nbsp; Followup use-cases](#inaction)
  * [&nbsp; Comparisons to other tools](#comparison)
  * [&nbsp; Community and Contributions](#community)
  * [&nbsp; Have a question?](#question)
  * [&nbsp; Found a bug?](#bug)
  * [&nbsp; Requirements](#requirements)
  * [&nbsp; Sponsors](#sponsors)
  * [&nbsp; Team](#team)
  * [&nbsp; License](#license)
  * [&nbsp; Citation](#citation)
  <a name="install"></a>

  ```python
  python -m pip install ankh
  ```
  <a name="models"></a>

  |               Model                |              ankh                 |                        Hugging Face                        |
  |------------------------------------|-----------------------------------|-----------------------------------------------------------|
  |             Ankh Large             |     `ankh.load_large_model()`     |[Ankh Large](https://huggingface.co/ElnaggarLab/ankh-large)|
  |             Ankh Base              |     `ankh.load_base_model()`      |[Ankh Base](https://huggingface.co/ElnaggarLab/ankh-base)  |
  <a name="datasets"></a>

  |            Dataset            |                                            Hugging Face                                            |
  | ----------------------------- |---------------------------------------------------------------------------------------------------|
  |	Remote Homology       	      |    `load_dataset("proteinea/remote_homology")`                                                    |
  |	CASP12			                  |    `load_dataset("proteinea/secondary_structure_prediction", data_files={'test': ['CASP12.csv']})`|
  |	CASP14			                  |    `load_dataset("proteinea/secondary_structure_prediction", data_files={'test': ['CASP14.csv']})`|
  |	CB513			                    |    `load_dataset("proteinea/secondary_structure_prediction", data_files={'test': ['CB513.csv']})` |
  |	TS115			                    |    `load_dataset("proteinea/secondary_structure_prediction", data_files={'test': ['TS115.csv']})` |
  |	DeepLoc		                    |    `load_dataset("proteinea/deeploc")`                                                            |
  | Fluorescence                  |    `load_dataset("proteinea/fluorescence")`                                                        |
  | Solubility                    |    `load_dataset("proteinea/solubility")`                                                         |
  | Nearest Neighbor Search       |    `load_dataset("proteinea/nearest_neighbor_search")`                                            |
  <a name="usage"></a>

  * Loading pre-trained models:
  ```python
    import ankh
    
    model, tokenizer = ankh.load_large_model()
    model.eval()
    
    model, tokenizer = ankh.load_base_model()
    model.eval()
  ```
  * Feature extraction using ankh large example:
  ```python
    model, tokenizer = ankh.load_large_model()
    model.eval()
    protein_sequences = ['MKALCLLLLPVLGLLVSSKTLCSMEEAINERIQEVAGSLIFRAISSIGLECQSVTSRGDLATCPRGFAVTGCTCGSACGSWDVRAETTCHCQCAGMDWTGARCCRVQPLEHHHHHH',
    'GSHMSLFDFFKNKGSAATATDRLKLILAKERTLNLPYMEEMRKEIIAVIQKYTKSSDIHFKTLDSNQSVETIEVEIILPR']
    protein_sequences = [list(seq) for seq in protein_sequences]
    outputs = tokenizer.batch_encode_plus(protein_sequences,
                                      add_special_tokens=True,
                                      padding=True,
                                      is_split_into_words=True,
                                      return_tensors="pt")
    with torch.no_grad():
      embeddings = model(input_ids=outputs['input_ids'], attention_mask=outputs['attention_mask'])
  ```
  * Loading downstream models example:
  ```python
    
    binary_classification_model = ankh.ConvBertForBinaryClassification(input_dim=768,
                                                                       nhead=4,
                                                                       hidden_dim=384,
                                                                       num_hidden_layers=1,
                                                                       num_layers=1,
                                                                       kernel_size=7,
                                                                       dropout=0.2,
                                                                       pooling='max')
    
    multiclass_classification_model = ankh.ConvBertForMultiClassClassification(num_tokens=2,
                                                                               input_dim=768,
                                                                               nhead=4,
                                                                               hidden_dim=384,
                                                                               num_hidden_layers=1,
                                                                               num_layers=1,
                                                                               kernel_size=7,
                                                                               dropout=0.2)
    
    
    
    regression_model = ankh.ConvBertForRegression(input_dim=768,
                                                  nhead=4,
                                                  hidden_dim=384,
                                                  num_hidden_layers=1,
                                                  num_layers=1,
                                                  kernel_size=7,
                                                  dropout=0,
                                                  pooling='max',
                                                  training_labels_mean=0.38145)
  ```
  <a name="results"></a>

  <a name="q3"></a>
   * <b>&nbsp; Secondary Structure Prediction (Q3):</b><br/>
  |         Model            |      CASP12      | CASP14 (HARD) |     TS115     |    CB513     |
  |--------------------------|:----------------:|:-------------:|:-------------:|:------------:|
  |**Ankh Large**            |      83.59%      |     77.48%    |    88.22%     |    88.48%    |
  |Ankh Base                 |      80.81%      |     76.67%    |    86.92%     |    86.94%    |
  |ProtT5-XL-UniRef50        |      83.34%      |     75.09%    |    86.82%     |    86.64%    |
  |ESM2-15B                  |      83.16%      |     76.56%    |    87.50%     |    87.35%    |
  |ESM2-3B                   |      83.14%      |     76.75%    |    87.50%     |    87.44%    |
  |ESM2-650M                 |      82.43%      |     76.97%    |    87.22%     |    87.18%    |
  |ESM-1b                    |      79.45%      |     75.39%    |    85.02%     |    84.31%    |
  <a name="q8"></a>
   * <b>&nbsp; Secondary Structure Prediction (Q8):</b><br/>
  |         Model            |      CASP12      | CASP14 (HARD) |     TS115     |    CB513     |
  |--------------------------|:----------------:|:-------------:|:-------------:|:------------:|
  |**Ankh Large**            |      71.69%      |     63.17%    |    79.10%     |    78.45%    |
  |Ankh Base                 |      68.85%      |     62.33%    |    77.08%     |    75.83%    |
  |ProtT5-XL-UniRef50        |      70.47%      |     59.71%    |    76.91%     |    74.81%    |
  |ESM2-15B                  |      71.17%      |     61.81%    |    77.67%     |    75.88%    |
  |ESM2-3B                   |      71.69%      |     61.52%    |    77.62%     |    75.95%    |
  |ESM2-650M                 |      70.50%      |     62.10%    |    77.68%     |    75.89%    |
  |ESM-1b                    |      66.02%      |     60.34%    |    73.82%     |    71.55%    |
  <a name="CP"></a>
   * <b>&nbsp; Contact Prediction Long Precision Using Embeddings:</b><br/>
  |         Model            | ProteinNet (L/1) | ProteinNet (L/5) | CASP14 (L/1)  | CASP14 (L/5) |
  |--------------------------|:----------------:|:----------------:|:-------------:|:------------:|
  |**Ankh Large**            |      48.93%      |      73.49%      |    16.01%     |    29.91%    |
  |Ankh Base                 |      43.21%      |      66.63%      |    13.50%     |    28.65%    |
  |ProtT5-XL-UniRef50        |      44.74%      |      68.95%      |    11.95%     |    24.45%    |
  |ESM2-15B                  |      31.62%      |      52.97%      |    14.44%     |    26.61%    |
  |ESM2-3B                   |      30.24%      |      51.34%      |    12.20%     |    21.91%    |
  |ESM2-650M                 |      29.36%      |      50.74%      |    13.71%     |    22.25%    |
  |ESM-1b                    |      29.25%      |      50.69%      |    10.18%     |    18.08%    |
  <a name="CP"></a>
   * <b>&nbsp; Contact Prediction Long Precision Using attention scores:</b><br/>
  |         Model            | ProteinNet (L/1) | ProteinNet (L/5) | CASP14 (L/1)  | CASP14 (L/5) |
  |--------------------------|:----------------:|:----------------:|:-------------:|:------------:|
  |**Ankh Large**            |      31.44%      |      55.58%      |     11.05%    |    20.74%    |
  |Ankh Base                 |      25.93%      |      46.28%      |     9.32%     |    19.51%    |
  |ProtT5-XL-UniRef50        |      30.85%      |      51.90%      |     8.60%     |    16.09%    |
  |ESM2-15B                  |      33.32%      |      57.44%      |     12.25%    |    24.60%    |
  |ESM2-3B                   |      33.92%      |      56.63%      |     12.17%    |    21.36%    |
  |ESM2-650M                 |      31.87%      |      54.63%      |     10.66%    |    21.01%    |
  |ESM-1b                    |      25.30%      |      42.03%      |     7.77%     |    15.77%    |
  <a name="Loc"></a>
   * <b>&nbsp; Localization (Q10):</b><br/>
  |         Model            |  DeepLoc Dataset |
  |--------------------------|:----------------:|
  |**Ankh Large**            |      83.01%      |
  |Ankh Base                 |      81.38%      |
  |ProtT5-XL-UniRef50        |      82.95%      |
  |ESM2-15B                  |      81.22%      |
  |ESM2-3B                   |      81.22%      |
  |ESM2-650M                 |      82.08%      |
  |ESM-1b                    |      80.51%      |
  <a name="RH"></a>
   * <b>&nbsp; Remote Homology:</b><br/>
  |         Model            |   SCOPe (Fold)   |
  |--------------------------|:----------------:|
  |Ankh Large                |      61.01%      |
  |**Ankh Base**             |      61.14%      |
  |ProtT5-XL-UniRef50        |      59.38%      |
  |ESM2-15B                  |      54.48%      |
  |ESM2-3B                   |      59.24%      |
  |ESM2-650M                 |      51.36%      |
  |ESM-1b                    |      56.93%      |
  <a name="Sol"></a>
   * <b>&nbsp; Solubility:</b><br/>
  |         Model            |    Solubility    |
  |--------------------------|:----------------:|
  |**Ankh Large**            |      76.41%      |
  |Ankh Base                 |      76.36%      |
  |ProtT5-XL-UniRef50        |      76.26%      |
  |ESM2-15B                  |      60.52%      |
  |ESM2-3B                   |      74.91%      |
  |ESM2-650M                 |      74.56%      |
  |ESM-1b                    |      74.91%      |
  <a name="Flu"></a>
   * <b>&nbsp; Fluorescence (Spearman Correlation):</b><br/>
  |         Model            |   Fluorescence   |
  |--------------------------|:----------------:|
  |**Ankh Large**            |        0.62      |
  |Ankh Base                 |        0.62      |
  |ProtT5-XL-UniRef50        |        0.61      |
  |ESM2-15B                  |        0.56      |
  |ESM-1b                    |        0.48      |
  |ESM2-650M                 |        0.48      |
  |ESM2-3B                   |        0.46      |
  <a name="CATH"></a>
   * <b>&nbsp; Nearest Neighbor Search using Global Pooling:</b><br/>
  |         Model            |   Lookup69K (C)  |   Lookup69K (A)  |   Lookup69K (T)  |   Lookup69K (H)  |
  |--------------------------|:----------------:|:----------------:|:----------------:|:----------------:|
  |Ankh Large                |       0.83       |       0.72       |       0.60       |       0.70       |
  |**Ankh Base**             |       0.85       |       0.77       |       0.63       |       0.72       |
  |ProtT5-XL-UniRef50        |       0.83       |       0.69       |       0.57       |       0.73       |
  |ESM2-15B                  |       0.78       |       0.63       |       0.52       |       0.67       |
  |ESM2-3B                   |       0.79       |       0.65       |       0.53       |       0.64       |
  |ESM2-650M                 |       0.72       |       0.56       |       0.40       |       0.53       |
  |ESM-1b                    |       0.78       |       0.65       |       0.51       |       0.63       |
  <a name="team"></a>

  * <b>Technical University of Munich:</b><br/>
  | [Ahmed Elnaggar](https://github.com/agemagician) |       Burkhard Rost       |
  |:------------------------------------------------:|:-------------------------:|
  | <img width=120 src="https://github.com/agemagician/Ankh/blob/main/images/AhmedElNaggar.jpg?raw=true"> | <img width=120 src="https://github.com/agemagician/Ankh/blob/main/images/Rost.jpg?raw=true"> |
  * <b>Proteinea:</b><br/>
  | [Hazem Essam](https://github.com/hazemessamm) | [Wafaa Ashraf](https://github.com/wafaaashraf) | [Walid Moustafa](https://github.com/wmustafaawad) | [Mohamed Elkerdawy](https://github.com/melkerdawy) |
  |:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|
  | <img width=120 src="https://github.com/agemagician/Ankh/blob/main/images/HazemEssam.jpeg?raw=true"> | <img width=120 src="https://github.com/agemagician/Ankh/blob/main/images/WafaaAshraf.jpeg?raw=true"> | <img width=120 src="https://github.com/agemagician/Ankh/blob/main/images/WalidMoustafa.jpg?raw=true"> | <img width=120 src="https://github.com/agemagician/Ankh/blob/main/images/MohamedElKerdawy.jpeg?raw=true"> |
  * <b>University of Columbia:</b><br/>
  | [Charlotte Rochereau](https://github.com/crochereau) |
  |:----------------------------------------------------:|
  | <img width=120 src="https://github.com/agemagician/Ankh/blob/main/images/CharlotteRochereau.jpg?raw=true"> |
  <a name="sponsors"></a>

  |                                                    Google Cloud                                                         |
  <img width=120 src="https://github.com/agemagician/Ankh/blob/main/images/google_cloud_logo.jpg?raw=true"> |
  <a name="license"></a>

  Ankh pretrained models are released under the under terms of the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by/4.0/).
  <a name="community"></a>

  The Ankh project is a **open source project** supported by various partner companies and research institutions. We are committed to **share all our pre-trained models and knowledge**. We are more than happy if you could help us on sharing new ptrained models, fixing bugs, proposing new feature, improving our documentation, spreading the word, or support our project.
  <a name="question"></a>

  We are happy to hear your question in our issues page [Ankh](https://github.com/agemagician/Ankh/issues)! Obviously if you have a private question or want to cooperate with us, you can always **reach out to us directly** via [Hello](mailto:hello@proteinea.com?subject=[GitHub]Ankh).
  <a name="bug"></a>

  Feel free to **file a new issue** with a respective title and description on the the [Ankh](https://github.com/agemagician/Ankh/issues) repository. If you already found a solution to your problem, **we would love to review your pull request**!.
  <a name="citation"></a>

  If you use this code or our pretrained models for your publication, please cite the original paper:
  ```
  @article{elnaggar2023ankh,
    title={Ankh: Optimized Protein Language Model Unlocks General-Purpose Modelling},
    author={Elnaggar, Ahmed and Essam, Hazem and Salah-Eldin, Wafaa and Moustafa, Walid and Elkerdawy, Mohamed and Rochereau, Charlotte and Rost, Burkhard},
    journal={arXiv preprint arXiv:2301.06568},
    year={2023}
  }
  ```


pkgId: 83dbd352e7376e1ca8674974b96cdf0325ff77163fd579a61438933337ed62b5
name: python-anki-sm-2
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: Anki SM-2 based spaced repetition scheduler
url: https://pypi.org/project/anki-sm-2/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anki-sm-2-0.1.2-1.src.rpm
checksum_type: sha256
description:
  <div align="center">
    <img src="https://avatars.githubusercontent.com/u/96821265?s=200&v=4" height="100" alt="Open Spaced Repetition logo"/>
  </div>
  <div align="center">


  </div>

  <div align="center">
    <em>🌟 Anki's SM-2-based spaced repetition algorithm 🌟</em>
  </div>
  <br />
  <div align="center" style="text-decoration: none;">
      <a href="https://pypi.org/project/anki-sm-2/"><img src="https://img.shields.io/pypi/v/anki-sm-2"></a>
      <a href="https://github.com/open-spaced-repetition/anki-sm-2/blob/main/LICENSE" style="text-decoration: none;"><img src="https://img.shields.io/badge/License-AGPL--3.0-brightgreen.svg"></a>
  </div>
  <br />

  <div align="left">
      <strong>
      Python package implementing Anki's <a href="https://docs.ankiweb.net/deck-options.html#new-cards">SM-2-based algorithm</a> for spaced repetition scheduling.
      </strong>
  </div>



  You can install the anki-sm-2 python package from [PyPI](https://pypi.org/project/anki-sm-2/) using pip:
  ```
  pip install anki-sm-2
  ```



  Import and initialize the Anki SM-2 Scheduler

  ```python
  from anki_sm_2 import AnkiSM2Scheduler, Card, Rating

  scheduler = AnkiSM2Scheduler()
  ```

  Create a new Card object

  ```python
  card = Card()
  ```

  Choose a rating and review the card

  ```python
  """
  Rating.Again # (==0) forgot the card
  Rating.Hard # (==1) remembered the card, but with serious difficulty
  Rating.Good # (==2) remembered the card after a hesitation
  Rating.Easy # (==3) remembered the card easily
  """

  rating = Rating.Good

  card, review_log = scheduler.review_card(card, rating)

  print(f"Card rated {review_log.rating} at {review_log.review_datetime}")

  ```

  See when the card is due next
  ```python
  from datetime import datetime, timezone

  due = card.due


  time_delta = due - datetime.now(timezone.utc)

  print(f"Card due: at {due}")
  print(f"Card due in {time_delta.seconds / 60} minutes")


  ```





  Anki SM-2 uses UTC time only. You can still specify custom datetimes, but they must be UTC.

  ```python
  from anki_sm_2 import AnkiSM2Scheduler, Card, Rating, ReviewLog
  from datetime import datetime, timezone

  scheduler = AnkiSM2Scheduler()


  card = Card(created_at=datetime(2024, 1, 1, 0, 0, 0, 0, timezone.utc)) # right



  card, review_log = scheduler.review_card(card=card, rating=Rating.Good, review_datetime=datetime(2024, 1, 2, 0, 0, 0, 0, timezone.utc)) # right

  ```



  `AnkiSM2Scheduler`, `Card` and `ReviewLog` objects are all json-serializable via their `to_dict` and `from_dict` methods for easy database storage:
  ```python

  scheduler_dict = scheduler.to_dict()
  card_dict = card.to_dict()
  review_log_dict = review_log.to_dict()


  scheduler = AnkiSM2Scheduler.from_dict(scheduler_dict)
  card = Card.from_dict(card_dict)
  review_log = ReviewLog.from_dict(review_log_dict)
  ```



  This python package is currently unstable and adheres to the following versioning scheme:

  - **Minor** version will increase when a backward-incompatible change is introduced.
  - **Patch** version will increase when a bug is fixed, a new feature is added or when anything else backward compatible warrants a new release.

  Once this package is considered stable, the **Major** version will be bumped to 1.0.0 and will follow [semver](https://semver.org/).



  Checkout [CONTRIBUTING](https://github.com/open-spaced-repetition/anki-sm-2/blob/main/CONTRIBUTING.md) to help improve Anki SM-2!



  You can find the code for Anki's official Rust-based scheduler [here](https://github.com/ankitects/anki/tree/main/rslib/src/scheduler).

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


pkgId: 9eb38e8ef2bf1c50647135988f0b742c7f51c745046802c917cc00fb168b6f08
name: python-anki-sm-2
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Anki SM-2 based spaced repetition scheduler
url: https://pypi.org/project/anki-sm-2/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anki-sm-2-0.2.0-1.src.rpm
checksum_type: sha256
description:
  <div align="center">
    <img src="https://avatars.githubusercontent.com/u/96821265?s=200&v=4" height="100" alt="Open Spaced Repetition logo"/>
  </div>
  <div align="center">


  </div>

  <div align="center">
    <em>🌟 Anki's legacy SM-2-based spaced repetition algorithm 🌟</em>
  </div>
  <br />
  <div align="center" style="text-decoration: none;">
      <a href="https://pypi.org/project/anki-sm-2/"><img src="https://img.shields.io/pypi/v/anki-sm-2"></a>
      <a href="https://github.com/open-spaced-repetition/anki-sm-2/blob/main/LICENSE" style="text-decoration: none;"><img src="https://img.shields.io/badge/License-AGPL--3.0-brightgreen.svg"></a>
  </div>
  <br />

  <div align="left">
      <strong>
      Python package implementing Anki's <a href="https://docs.ankiweb.net/deck-options.html#new-cards">SM-2-based algorithm</a> for spaced repetition scheduling.
      </strong>
  </div>



  You can install the anki-sm-2 python package from [PyPI](https://pypi.org/project/anki-sm-2/) using pip:
  ```
  pip install anki-sm-2
  ```



  Import and initialize the Anki SM-2 Scheduler

  ```python
  from anki_sm_2 import Scheduler, Card, Rating

  scheduler = Scheduler()
  ```

  Create a new Card object

  ```python
  card = Card()
  ```

  Choose a rating and review the card

  ```python
  """
  Rating.Again # (==0) forgot the card
  Rating.Hard # (==1) remembered the card, but with serious difficulty
  Rating.Good # (==2) remembered the card after a hesitation
  Rating.Easy # (==3) remembered the card easily
  """

  rating = Rating.Good

  card, review_log = scheduler.review_card(card, rating)

  print(f"Card rated {review_log.rating} at {review_log.review_datetime}")

  ```

  See when the card is due next
  ```python
  from datetime import datetime, timezone

  due = card.due


  time_delta = due - datetime.now(timezone.utc)

  print(f"Card due: at {due}")
  print(f"Card due in {time_delta.seconds / 60} minutes")


  ```





  Anki SM-2 uses UTC time only. You can still specify custom datetimes, but they must be UTC.

  ```python
  from anki_sm_2 import Scheduler, Card, Rating, ReviewLog
  from datetime import datetime, timezone

  scheduler = Scheduler()


  card = Card(due=datetime(2024, 1, 1, 0, 0, 0, 0, timezone.utc)) # right



  card, review_log = scheduler.review_card(card=card, rating=Rating.Good, review_datetime=datetime(2024, 1, 2, 0, 0, 0, 0, timezone.utc)) # right

  ```



  `Scheduler`, `Card` and `ReviewLog` objects are all json-serializable via their `to_dict` and `from_dict` methods for easy database storage:
  ```python

  scheduler_dict = scheduler.to_dict()
  card_dict = card.to_dict()
  review_log_dict = review_log.to_dict()


  scheduler = Scheduler.from_dict(scheduler_dict)
  card = Card.from_dict(card_dict)
  review_log = ReviewLog.from_dict(review_log_dict)
  ```



  This python package is currently unstable and adheres to the following versioning scheme:

  - **Minor** version will increase when a backward-incompatible change is introduced.
  - **Patch** version will increase when a bug is fixed, a new feature is added or when anything else backward compatible warrants a new release.

  Once this package is considered stable, the **Major** version will be bumped to 1.0.0 and will follow [semver](https://semver.org/).



  Checkout [CONTRIBUTING](https://github.com/open-spaced-repetition/anki-sm-2/blob/main/CONTRIBUTING.md) to help improve Anki SM-2!



  You can find the code for Anki's official Rust-based scheduler [here](https://github.com/ankitects/anki/tree/main/rslib/src/scheduler).

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


pkgId: 1859ac85748445d4d69edba4617bdc88e4451e1ce681d220855d6ad5278ae3d3
name: python-anko
arch: src
version: 0.2.8
epoch: 0
release: 1
summary: Toolkit for performing anomaly detection algorithm on time series.
url: https://github.com/tanlin2013/anko
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anko-0.2.8-1.src.rpm
checksum_type: sha256
description:
  ![](docs/anko_logo.png)

  Toolkit for performing anomaly detection algorithm on 1D time series based on numpy, scipy.

  Conventional approaches that based on statistical analysis have been implemented, with mainly two approaches included:
  1. Normal Distribution
  Data samples are presumably been generated by normal distribution, and therefore anomalous data points can be targeted by analysing the standard deviation.

  2. Fitting Ansatz
  Data samples are fitted by several ansatzs, and in accordance with the residual, anomalous data points can be selected.

  Regarding model selections, models are adopted dynamically by performing normal test and by computing the (Akaike/Bayesian) information criterion.
  By default, the algorithm will first try to fit in the data into normal distribution, if it passed [normal test](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.normaltest.html).
  If this attempt suffers from the loss of convergence or it did not pass [normal test](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.normaltest.html) from begining,
  then the algorithm will pass data into the second methods and try to execute all the available fitting ansatzs simultaneously.
  The best fitting ansatz will be selected by information criterion, and finally the algorithm will pick up anomalous points in accordance with the residual.
  [click here to see all available methods.](https://tanlin2013.github.io/anko/build/html/anko.html#anko.anomaly_detector.AnomalyDetector.models)

  Future development will also include methods that are based on deep learning techniques, such as isolation forest, support vector machine, etc.


  * python >= 3.6.0
  * numpy >= 1.16.4
  * scipy >= 1.2.1


  ```
  pip install anko
  ```
  For current release version please refer to [PyPI - anko homepage](https://pypi.org/project/anko/).


  For details about anko API, see the [reference documentation](https://tanlin2013.github.io/anko/index.html).


  Run **anko_tutorial.ipynb** on your local Jupyter Notebook or host on [google colab](https://colab.research.google.com/github/tanlin2013/anko/blob/master/anko_tutorial.ipynb).


  1. Call AnomalyDetector
  ```
  from anko.anomaly_detector import AnomalyDetector
  agent = AnomalyDetector(t, series)
  ```

  2. Define policies and threshold values (optional)
  ```
  agent.thres_params["linregress_res"] = 1.5
  agent.apply_policies["z_normalization"] = True
  agent.apply_policies["info_criterion"] = 'AIC'
  ```
  for the use of [**AnomalyDetector.thres_params**](https://tanlin2013.github.io/anko/build/html/anko.html#anko.anomaly_detector.AnomalyDetector.thres_params)
  and [**AnomalyDetector.apply_policies**](https://tanlin2013.github.io/anko/build/html/anko.html#anko.anomaly_detector.AnomalyDetector.apply_policies),
  please refer to the documentation.

  3. Run check
  ```
  check_result = agent.check()
  ```

  The type of output **check_result** is [**CheckResult**](https://tanlin2013.github.io/anko/build/html/anko.html#anko.anomaly_detector.CheckResult), which is basically a dictionary that contains the following attributes:
  > model: 'increase_step_func'
  > popt: [220.3243250055105, 249.03846355234577, 74.00000107457113]
  > perr: [0.4247789247961187, 0.7166253174634686, 0.0]
  > anomalous_data: [(59, 209)]
  > residual: [10.050378152592119]
  > extra_info: ['Info: AnomalyDetector is using z normalization.', 'Info: There are more than 1 discontinuous points detected.']

  * model (str): The best fit model been selected by algorithm.
  * popt (list): Estimated fitting parameters.
  * perr (list): Corresponding errors of popt.
  * anomalous_data (list\[tuple(float, float)\]): Return a list of anomalous data points (t, series(t)), or an empty list if all data points are in order.
  * residual (list): Residual of anomalous data.
  * extra_info (list): All convergence errors, warnings, informations during the execution are stored here.



  ```
  python -m unittest discover -s test -p '*_test.py'
  ```
  or simply
  ```
  make test
  ```


pkgId: 796385f1df4d3970ad7a15fece4f80f63ea02297984f14d98d08dff39e6b681d
name: python-anls-star
arch: src
version: 0.0.11
epoch: 0
release: 1
summary: A universal metric for Generative Large Language Models (GLLMs)
url: https://pypi.org/project/anls-star/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anls-star-0.0.11-1.src.rpm
checksum_type: sha256
description:
  **🌟 A Universal Metric for Generative Large Language Models 🌟**

  <div align="center">

  <a href="">[![arXiv](https://img.shields.io/badge/arXiv-2402.03848-30C251.svg)](https://arxiv.org/abs/2402.03848)</a>
  <a href="">![Unit Tests](https://github.com/deepopinion/anls_star_metric/actions/workflows/test.yml/badge.svg)</a>

  </div>

      @misc{anls_star,
          title={ANLS* -- A Universal Document Processing Metric for Generative Large Language Models},
          author={David Peer and Philemon Schöpf and Volckmar Nebendahl and Alexander Rietzler and Sebastian Stabinger},
          year={2024},
          eprint={2402.03848},
          archivePrefix={arXiv},
          primaryClass={cs.CL}
      }


  1. `pip install anls_star`
  2. Add to your code

  ```python
  from anls_star import anls_score
  anls = anls_score("Hello World", "Hello Wrld")
  print(anls)
  ```

  4. Thats it!


  The `anls_score` function can also be used to return the object which best matches the prediction and can be derived from the ground truth by re-ordering lists, selecting options from tuples etc. by setting the `return_gt` argument to `True` (default is `False`).

  As an example:
  ```python
  gt = {'a': ('hello', 'world'), 'b': ['this', 'is', 'a', 'test']}
  pred = {'a': 'hello!', 'b': ['a', 'test', 'this', 'be']}
  score, closest_gt = anls_score(gt, pred, return_gt=True)


  ```

  This result can then be used e.g. with the [deepdiff](https://pypi.org/project/deepdiff/) package for further analysis:
  ```python
  from deepdiff import DeepDiff
  diff = DeepDiff(closest_gt, pred)


  ```


  The `anls_score` function can also return a dictionary containing aggregated ANLS* scores for dictionary keys in the ground truth and prediction. This is useful for gaining insights into what parts of the predictions are correct and what parts are incorrect. To use this feature, set the `return_key_scores` argument to `True`.

  Here's an example that demonstrates the use of `return_key_scores`:

  ```python
  from anls_star import anls_score

  gt = {
      "a": "Hello",
      "b": [{"l1": "aa", "l2": "b"}, {"l1": "c", "l2": "d"}],
      "c": "Test",
      "second_order": {
          "name": "Fluffy",
          "age": "3",
          "items": [{"id": "1", "value": "12.3"}, {"id": "2", "value": "13.4"}],
      },
  }
  pred = {
      "a": "Helloo",
      "b": [{"l1": "a", "l2": "q"}, {"l1": "c", "l2": "d"}],
      "second_order": {
          "name": "Fluffy",
          "age": "31",
          "items": [{"id": "1", "value": "12.1"}, {"id": "3", "value": "13.4"}],
      },
  }

  anls, key_scores = anls_score(gt, pred, return_key_scores=True)
  print("Key scores:")
  print(key_scores)
  ```

  This would output:

  ```
  Key scores:
  {
      'a': ScoreNode(anls_score=0.8333333333333334),
      'b': ScoreNode(
          anls_score=0.4166666666666667,
          children={
              'l1': ScoreNode(anls_score=0.75),
              'l2': ScoreNode(anls_score=0.5),
          }
      ),
      'c': ScoreNode(anls_score=0.0),
      'second_order': ScoreNode(
          anls_score=0.7083333333333334,
          children={
              'age': ScoreNode(anls_score=0.5),
              'items': ScoreNode(
                  anls_score=0.6875,
                  children={
                      'id': ScoreNode(anls_score=0.5),
                      'value': ScoreNode(anls_score=0.875),
                  }
              ),
              'name': ScoreNode(anls_score=1.0),
          }
      ),
  }
  ```

  The `key_scores` dictionary contains `ScoreNode` objects, which have `anls_score` and `children` attributes. The `anls_score` attribute represents the ANLS* score for that specific key, while the `children` attribute contains nested dictionaries of the same structure for nested keys.

  This detailed breakdown allows you to identify which parts of the prediction are accurate and which parts need improvement, providing valuable insights for error analysis and model refinement.

  The `return_key_scores` and `return_gt` arguments can be used together to get both the closest match and key scores in a single call to `anls_score`, in which case the return will be `(score, closest_gt, key_scores)`.


  Simply copy this file to your project and import the `anls_score` function from it. Then call the function with the ground truth and the predictions.

  The following types (and all combinations of it) are supported:
  - `String`: To compare strings against each other using the normalized Levenshtein similarity.
  - `None`: Sometimes questions are not answerable. With this type it can be checked, whether the model does not answer. Any answer other than None will be penalized. On the other hand, if a model generates e.g. a None key in a dictionary that is not in the ground truth, ANLS* ignores it rather than penalizing or rewarding it.
  - `Tuple`: Compare the given answer with each element in the tuple and select the element that produces the maximum ANLS* score. This is also provided by the classical ANLS metric.
  - `List`: Sometimes it is required to information in the form of lists from a document. For example, extracting all purchased items found in an invoice. While the order is not important, the list should contain all items. Note that the same item can occur multiple times in lists. Hungarian matching is used to compare the ground truth and the predicted list against each other. Both missing elements as well as hallucinated elements are penalized as previously introduced.
  - `Dict`: For document information extraction it is usually required to extract key-value pairs. For example, when extracting the date and total value from an invoice. Missing keys as well as hallucinated keys are penalized.



  The following table shows the ANLS* score for the different models and prompt methods on different datasets. Note that we evaluate the models and prompt methods on 100 samples for single page datasets and 20 samples for multi page datasets in order to reduce the execution time and costs. Note that the provided validation set is used for the report.

  <!-- Note that we link here to the github repo -- then values in pypi are automatically updated without the need to release a new package -->
  <img src="https://raw.githubusercontent.com/deepopinion/anls_star_metric/main/assets/table.png" alt="table" width="1000"/>



  1. Install all dependencies via `pip install -r requirements_dev.txt`
  2. Setup the keys
   - OpenAI: Ensure that your OpenAI API key is set as environment variable `OPENAI_API_KEY`.
   - Gemini: Ensure that your VertexAI setup is correct in case you wanna benchmark gemini-pro too.
   - Mistral: Setup the `MISTRAL_API_KEY` env variable as well as `MISTRAL_ENDPOINT` (Azure)
   - Anthropic: Setup the `ANTHROPIC_API_KEY` env variable
  3. Download all datasets - the download link is provided when executing the benchmark script for the first time. Please note that the `datasets` folder should be on the same level as the repository folder.
  4. Execute the corresponding benchmark script. For example:

  ```bash
      python3 src/benchmark_doc_vqa.py "gpt-3.5-turbo-16k" "simple"
  ```

  Note that we always benchmark the latest version of each model and report those values in the table above. In the paper, we additionally report the performance of intermediate versions of each model such as gpt-4-1106-preview and
  gpt-4-turbo-2024-04-09.


  The following prompt methods are supported:
  - `simple` - Simple text concatenation after OCR with GooleOCR
  - `latin` - Method as introduced by [Wang et al.](https://arxiv.org/abs/2306.00526)
  - `sft` - DeepOpinion internal only
  - `vision` - If images should directly be used. Requires a model with vision capabilities e.g. gpt-4-vision

  5. The final ANLS* is shown on the console.




  To run all unit tests simply execute `pytest`



  See https://packaging.python.org/en/latest/tutorials/packaging-projects/


pkgId: 8a5686cb6a6755b2cc9abe1003db18d18bf44dfa6d2d1cfaf7d7cb22c1d2e515
name: python-anmetal
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: Another Numeric optimization and Metaheuristics Library
url: https://github.com/erickfmm/ANMetaL
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anmetal-0.1.1-1.src.rpm
checksum_type: sha256
description:
  A library to do your metaheuristics and numeric combinatorial stuff.

  To install use:

  ```bash
  pip install anmetal
  ```

  See `/test` folder for examples of use.




  Iterative optimization functions (one solution)
  * Euler method
  * Newton method




  * Artificial Bee Colony (ABC)
  * Ant Colony Optimization (ACO)
  * Artificial Fish Swarm Algorithm (AFSA)
  * Bat Algorithm
  * Blackhole Algorithm
  * Cuckoo Search
  * Firefly Algorithm
  * Harmony Search (HS)
  * Particle Swarm Optimization (PSO)
  * Particle Swarm Optimization with Leap
  * Greedy
  * Greedy with Leap


  * Genetic Algorithm
  * Genetic Algorithm with Leap





  * Real problems
    * Partition problem
    * Subset problem

  * Categorical problems
    * Knapsack
    * Sudoku (without initial matrix, just random)



  * One input (1-D)
    * F1 (https://doi.org/10.1007/s00521-017-3088-3)
    * F3 (https://doi.org/10.1007/s00521-017-3088-3)

  * Two inputs (2-D)
    * Camelback (https://doi.org/10.1007/s00521-017-3088-3)
    * Goldsteinprice (https://doi.org/10.1007/s00521-017-3088-3)
    * Pshubert1 (https://doi.org/10.1007/s00521-017-3088-3)
    * Pshubert2 (https://doi.org/10.1007/s00521-017-3088-3)
    * Shubert (https://doi.org/10.1007/s00521-017-3088-3)
    * Quartic (https://doi.org/10.1007/s00521-017-3088-3)

  * N inputs (N-D)
    * Brown1 (https://doi.org/10.1007/s00521-017-3088-3)
    * Brown3 (https://doi.org/10.1007/s00521-017-3088-3)
    * F10n (https://doi.org/10.1007/s00521-017-3088-3)
    * F15n (https://doi.org/10.1007/s00521-017-3088-3)
    * Sphere (https://doi.org/10.1007/s00521-018-3512-3)
    * Rosenbrock (https://doi.org/10.1007/s00521-018-3512-3)
    * Griewank (https://doi.org/10.1007/s00521-018-3512-3)
    * Rastrigrin (https://doi.org/10.1007/s00521-018-3512-3)
    * Sumsquares (https://doi.org/10.1007/s00521-018-3512-3)
    * Michalewicz (https://doi.org/10.1007/s00521-018-3512-3)
    * Quartic (https://doi.org/10.1007/s00521-018-3512-3)
    * Schwefel (https://doi.org/10.1007/s00521-018-3512-3)
    * Penalty (https://doi.org/10.1007/s00521-018-3512-3)




  * sShape1
  * sShape2
  * sShape3
  * sShape4
  * vShape1
  * vShape2
  * vShape3
  * vShape4
  * erf


  * standard
  * complement
  * static_probability
  * elitist



  See the `/test` folder for complete examples. Here's a quick overview of running different metaheuristics:

  ```python

  from anmetal.problems.nphard_real import Partition_Real
  from anmetal.population.PSO.PSOMH_Real import PSOMH_Real


  problem = Partition_Real(seed=0, num_dims=200)


  mh = PSOMH_Real(problem.min_x, problem.max_x, problem.ndim, False,
                  problem.objective_function, problem.repair_function,
                  problem.preprocess_function)


  fitness, solution = mh.run(verbose=True, iterations=100, population=30,
                           omega=0.8, phi_g=1, phi_p=0.5, seed=115)
  ```



  Each metaheuristic has its own set of parameters. Here are some common ones:

  * **Common Parameters**
    * `iterations`: Number of iterations
    * `population`: Population size
    * `seed`: Random seed for reproducibility
    * `verbose`: Whether to print progress

  * **Algorithm-Specific Parameters**
    * ABC: `limit`
    * ACO: `evaporation_rate`, `alpha`, `beta`
    * BAT: `fmin`, `fmax`, `A`, `r0`
    * CUCKOO: `pa`
    * FIREFLY: `alpha`, `beta0`, `gamma`
    * GA: `mutation_rate`, `crossover_rate`
    * HS: `hmcr`, `par`, `bw`
    * PSO: `omega`, `phi_g`, `phi_p`

  For detailed parameter descriptions and recommended values, see the respective algorithm implementations in the source code.

rpm_license:
  MIT License  Copyright (c) 2017 Erick Francisco Merino Menares  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: d89a449708efa34afc7a53287e40899513f42c31dce58b565dbe2dd96b6563b9
name: python-anmoku
arch: src
version: 1.0.0a1
epoch: 0
release: 1
summary: A peaceful and fully typed MyAnimeList/Jikan API wrapper with caching and proper rate limiting.
url: https://pypi.org/project/anmoku/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anmoku-1.0.0a1-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

    

    <sub>A peaceful and fully typed [MyAnimeList](https://myanimelist.net/) / [Jikan](https://jikan.moe/) Python API wrapper with caching and proper rate limiting.</sub>

    <img width="550px" src="./assets/quick_showcase_1.gif">

    <br>

  </div>

  > [!NOTE]
  >
  > Anmoku is currently a work in progress so the features below may not be complete yet or experimental.


  - [x] Rate limiting 🎀 (with actual waiting).
  - [ ] Supports caching. ⚡
  - [ ] [Fully type hinted.](#type-hinting-support-) 🌌 ~~*yes you heard me correctly*~~


  Anmoku is probably the simplest Jikan API wrapper you'll ever use. All you need is the client and the resource. 🌊
  ```python
  from anmoku import Anmoku, AnimeCharacters

  client = Anmoku(debug = True)

  anime_characters = client.get(AnimeCharacters, id = 28851) # ID for the anime film "A Silent Voice".

  for character in anime_characters:
      print(f"{character.name} ({character.url})")

  client.close()
  ```
  We also have an async client:
  ```python
  import asyncio
  from anmoku import AsyncAnmoku, AnimeCharacters

  async def main():

      client = AsyncAnmoku(debug = True)

      anime_characters = await client.get(AnimeCharacters, id = 28851) # ID for the anime film "A Silent Voice".

      for character in anime_characters:
          print(f"{character.name} ({character.url})")

      await client.close()

  asyncio.run(main())
  ```


  ```sh
  [DEBUG] (anmoku) - [AsyncAnmoku] GET --> https://api.jikan.moe/v4/anime/28851/characters
  Ishida, Shouya (https://myanimelist.net/character/80491/Shouya_Ishida)
  Nishimiya, Shouko (https://myanimelist.net/character/80243/Shouko_Nishimiya)
  Headteacher (https://myanimelist.net/character/214351/Headteacher)
  Hirose, Keisuke (https://myanimelist.net/character/97569/Keisuke_Hirose)
  Ishida, Maria (https://myanimelist.net/character/97943/Maria_Ishida)
  Ishida, Sister (https://myanimelist.net/character/118723/Sister_Ishida)

  ```


  Here are some searching examples you can try:
  ```python
  from anmoku import Anmoku, Character

  client = Anmoku(debug = True)

  characters = client.search(Character, "anya forger")

  for character in characters:
      print(f"{character.name} ({character.image.url})")

  client.close()
  ```
  Merge that with gradio and you have a GUI.
  https://github.com/THEGOLDENPRO/anmoku/blob/099f6596b685daa65259319d6730bef674ced38a/examples/gradio_anime_search.py#L1-L23

  [[Gradio Video]](https://github.com/THEGOLDENPRO/anmoku/assets/66202304/75c9c35c-bf68-4c53-96e5-057dc97ca1dd)


  API responses in our library are strongly typed.

  <img src="./assets/type_hints_1.png" width="100%">

  On top of that, we even provide class interfaces if you wish for stability and ease of use.

  <img src="./assets/type_hints_3.png" width="100%">
  <img src="./assets/type_hints_2.png" width="100%">

  <br>

  <div align="center">

    <img src="./assets/logo.svg" width="600px">

    <sub>*Python's future Jikan API wrapper.*</sub>

  </div>

rpm_license:
  MIT License  Copyright (c) 2023-present Goldy  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: aa98355e03611518509df00da139b69bdc26456541c06dea21009893af1f88cd
name: python-ann_visualizer
arch: src
version: 2.5
epoch: 0
release: 1
summary: A python library for visualizing Neural Networks
url: https://github.com/Prodicode/ann-visualizer
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ann_visualizer-2.5-1.src.rpm
checksum_type: sha256
description:
  ANN Visualizer is a great visualization python library used to work with Keras. It uses python's graphviz library to create a presentable graph of the neural network you are building.

      Usage:


  from ann_visualizer.visualize import ann_viz;

  ann_viz(model)



  Documentation:

  ann_viz(model, view=True, filename="network.gv")

   model - The Keras Sequential model
   view - If True, it opens the graph preview after executed
   filename - Where to save the graph. (.gv file format)


pkgId: 28088b109d62bfd186d918a871270245316dfce4f0895bffc0774abf9c32c6d6
name: python-anna
arch: src
version: 0.5.2
epoch: 0
release: 1
summary: A Neat configuratioN Auxiliary
url: https://gitlab.com/Dominik1123/Anna
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anna-0.5.2-1.src.rpm
checksum_type: sha256
description:
  Anna helps you configure your application by building the bridge between the components of
  your application and external configuration sources. It allows you to keep your code short and
  flexible yet explicit when it comes to configuration - the necessary tinkering is performed by
  the framework.
  Anna contains lots of "in-place" documentation aka doc strings so make sure you check out those
  too ("``help`` yourself")!


pkgId: db38cda83d2abcd6271ea2b1f4c1a0a5c11e6d8d73f2fbe776af0e5656cb861f
name: python-anna-client
arch: src
version: 1.1.9
epoch: 0
release: 1
summary: anna API client
url: https://github.com/patrikpihlstrom/anna-client
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anna-client-1.1.9-1.src.rpm
checksum_type: sha256
description:
  ```$ pip install anna-client```



  ```python
  from anna_client.client import Client

  client = Client(endpoint='http://localhost:5000/graphql')
  ```

  ```python

  jobs = client.get_jobs()

  jobs = client.get_jobs(where={'id_in', [...]}, fields=('driver','site','status'))
  ```

  ```python

  jobs = client.create_jobs(data=[{'driver': 'firefox', 'site': 'test'}])
  ```

  ```python

  client.delete_jobs(where={})

  client.delete_jobs(where={'id_in': my_jobs})
  ```

  ```python

  client.update_jobs(data={'status': 'STOPPED'})

  client.delete_jobs(where={'id_in': my_jobs}, data={'status': 'STOPPED'})
  ```

  ```python

  client.reserve_jobs(worker='worker', job_ids=my_jobs)
  ```

  ```python

  url, tasks = client.get_tasks(namespace='test')
  ```


pkgId: 9a9c82ecdee82ffb9211d339c0ce4ba08b65bf75998cec56aeca8db59b90da83
name: python-annb
arch: src
version: 0.1.22
epoch: 0
release: 1
summary: A simple ANN benchmark tools
url: https://github.com/matrixji/annb
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annb-0.1.22-1.src.rpm
checksum_type: sha256
description:
  [![PyPI Version](https://img.shields.io/pypi/v/annb.svg)](https://pypi.python.org/pypi/annb)

  Note: This is a work in progress. The API/CLI is not stable yet.



  ```bash
  pip install annb



  ```









  Just run `annb-test` to start your first benchmark with a random dataset.

  ```bash
  annb-test
  ```

  It will produce a result like this:

  ```plain
  ❯ annb-test
  ... some logs ...

  BenchmarkResult:
    attributes:
      query_args: [{'nprobe': 1}]
      topk: 10
      jobs: 1
      loop: 5
      step: 10
      name: Test
      dataset: .annb_random_d256_l2_1000.hdf5
      index: Test
      dim: 256
      metric_type: MetricType.L2
      index_args: {'index': 'ivfflat', 'nlist': 128}
      started: 2023-08-14 13:03:40

    durations:
      training: 1 items, 1000 total, 1490.03266ms
      insert: 1 items, 1000 total, 132.439627ms
      query:
        nprobe=1,recall=0.2173 -> 1000 items, 18.615083ms, 53719.878659686874qps, latency=0.18615083ms, p95=0.31939ms, p99=0.41488ms
  ```

  This is a simple benchmark test with default index(faiss) with random l2 dataset.
  If you wants to generate more data or with some different specifications for the dataset, you could see below options:
    - --index-dim         The dimension of the index, default is 256
    - --index-metric-type   Index metric type, l2 or ip, default is l2
    - --topk TOPK           topk used for query, default is 10
    - --step STEP           the query step, default annb will query 10 items per query, you could set it to 0 for query all items in one query (similar like batch for ann-benchmarks)
    - --batch               batch mode, alias --step 0
    - --count COUNT         the total number of items in the dataset, default is 1000



  You could also use ann-benchmarks's [dataset](https://github.com/erikbern/ann-benchmarks#data-sets) to run benchmark. download them locally and run benchmark with `--dataset` option.

  ```bash
  annb-test --dataset sift-128-euclidean.hdf5
  ```


  You mary benchmark with different query args, e.g. different nprobe for faiss ivfflat index. you could try `--query-args` option.

  ```bash
  annb-test --query-args nprobe=10 --query-args nprobe=20
  ```

  will output below result:

  ```plain
  durations:
      training: 1 items, 1000 total, 1548.84968ms
      insert: 1 items, 1000 total, 143.402532ms
      query:
        nprobe=1,recall=0.2173 -> 1000 items, 20.074236ms, 49815.09632545916qps, latency=0.20074235999999998ms, p95=0.332276ms, p99=0.455525ms
        nprobe=10,recall=0.5221 -> 1000 items, 49.141931ms, 20349.2207092961qps, latency=0.49141931ms, p95=0.722628ms, p99=0.818012ms
        nprobe=20,recall=0.6861 -> 1000 items, 69.284072ms, 14433.331805324606qps, latency=0.69284072ms, p95=1.126946ms, p99=1.350359ms
  ```


  You may run multiple benchmarks with different index and dataset. you could use `--run-file` run benchmarks from a config file.

  Below is a example config file:

  config.yaml

  ```yaml
  default:
    index_factory: annb.anns.faiss.indexes.index_under_test_factory
    index_factory_args: {}
    index_name: Test
    dataset: gist-960-euclidean.hdf5
    topk: 10
    step: 10
    jobs: 1
    loop: 2
    result: output.pth

  runs:
    - name: faiss-gist960-gpu-ivfflat
      index_args:
        gpu: yes
        index: ivfflat
        nlist: 1024
      query_args:
        - nprobe: 1
        - nprobe: 16
        - nprobe: 256
    - name: faiss-gist960-gpu-ivfpq8
      index_args:
        gpu: yes
        index: ivfpq
        nlist: 1024
      query_args:
        - nprobe: 1
        - nprobe: 16
        - nprobe: 256
  ```

  Explanation for above config file:
  - The default section is the default config for all benchmarks.
  - The config keys are generally same as the options for `annb-test` command. e.g. `index_factory` is same as `--index-factory`.
  - You could define multiple benchmarks in `runs` section. and each run config will override the default config. In this example, we define use gist-960-euclidean.hdf5 as dataset, so it will use this dataset for all benchmarks. and we use different index and query args for each benchmark. for index_args, we use ivfflat(nlist=1024) and ivfpq(nlist=1024) as two benchmark series. and for query_args, we use nprobe=1,16,256 for each benchmark. That means we will run 6 benchmarks in total, each series will run 3 benchmarks with different nprobe.
  - The result will be saved to output.pth file by default setting. Actually, each benchmark series will save to a separate file. so in this example, we will get two files: `output-1.pth` and `output-2.pth`. you could use `annb-report` to view them.




  You could use `annb-test --help` to see more options.

  ```bash
  ❯ annb-test --help
  ```




  The `annb-report` is use to view benchmark results as plain/csv text, or export them to Chart graphic.

  ```bash
  annb-report --help
  ```



  view benchmark results as plain text

  ```bash
  annb-report output.pth
  ```

  view benchmark results as csv text

  ```bash
  annb-report output.pth --format csv
  ```

  export benchmark results to chart graphic(multiple series)

  ```bash
  annb-report output.pth --format png --output output.png output-1.pth output-2.pth
  ```


pkgId: 19fe61e394e84e0447ef80cece901c2459359dc69f1d6ab3e2c61dbdda3b9c1a
name: python-anndata
arch: src
version: 0.10.9
epoch: 0
release: 1
summary: Annotated data.
url: https://pypi.org/project/anndata/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anndata-0.10.9-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://dev.azure.com/scverse/anndata/_apis/build/status/scverse.anndata?branchName=main)](https://dev.azure.com/scverse/anndata/_build)
  [![Conda](https://img.shields.io/conda/vn/conda-forge/anndata.svg)](https://anaconda.org/conda-forge/anndata)
  [![Coverage](https://codecov.io/gh/scverse/anndata/branch/main/graph/badge.svg?token=IN1mJN1Wi8)](https://codecov.io/gh/scverse/anndata)
  [![Docs](https://readthedocs.com/projects/icb-anndata/badge/?version=latest)](https://anndata.readthedocs.io)
  [![PyPI](https://img.shields.io/pypi/v/anndata.svg)](https://pypi.org/project/anndata)
  [![Downloads](https://static.pepy.tech/badge/anndata/month)](https://pepy.tech/project/anndata)
  [![Downloads](https://static.pepy.tech/badge/anndata)](https://pepy.tech/project/anndata)
  [![Stars](https://img.shields.io/github/stars/scverse/anndata?logo=GitHub&color=yellow)](https://github.com/scverse/anndata/stargazers)
  [![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org)

  <img
    src="https://raw.githubusercontent.com/scverse/anndata/main/docs/_static/img/anndata_schema.svg"
    class="dark-light" align="right" width="350" alt="image"
  />



  anndata is a Python package for handling annotated data matrices in memory and on disk, positioned between pandas and xarray. anndata offers a broad range of computationally efficient features including, among others, sparse data support, lazy operations, and a PyTorch interface.

  - Discuss development on [GitHub](https://github.com/scverse/anndata).
  - Read the [documentation](https://anndata.readthedocs.io).
  - Ask questions on the [scverse Discourse](https://discourse.scverse.org).
  - Install via `pip install anndata` or `conda install anndata -c conda-forge`.
  - See [Scanpy's documentation](https://scanpy.readthedocs.io/) for usage related to single cell data. anndata was initially built for Scanpy.

  [//]: # (numfocus-fiscal-sponsor-attribution)

  anndata is part of the scverse project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).
  Please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.


  <a href="https://numfocus.org/project/scverse">
    <img
      src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
      width="200"
    >
  </a>



  If you use `anndata` in your work, please cite the `anndata` pre-print as follows:

  > **anndata: Annotated data**
  >
  > Isaac Virshup, Sergei Rybakov, Fabian J. Theis, Philipp Angerer, F. Alexander Wolf
  >
  > _bioRxiv_ 2021 Dec 19. doi: [10.1101/2021.12.16.473007](https://doi.org/10.1101/2021.12.16.473007).

  You can cite the scverse publication as follows:

  > **The scverse project provides a computational ecosystem for single-cell omics data analysis**
  >
  > Isaac Virshup, Danila Bredikhin, Lukas Heumos, Giovanni Palla, Gregor Sturm, Adam Gayoso, Ilia Kats, Mikaela Koutrouli, Scverse Community, Bonnie Berger, Dana Pe’er, Aviv Regev, Sarah A. Teichmann, Francesca Finotello, F. Alexander Wolf, Nir Yosef, Oliver Stegle & Fabian J. Theis
  >
  > _Nat Biotechnol._ 2023 Apr 10. doi: [10.1038/s41587-023-01733-8](https://doi.org/10.1038/s41587-023-01733-8).


pkgId: 014a97b44c88327e6b70dbdf6bf7b21e37fb1c91b344418c592f2e16159c3ab0
name: python-anndata2ri
arch: src
version: 1.3.2
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/anndata2ri/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anndata2ri-1.3.2-1.src.rpm
checksum_type: sha256
description:
  RPy2 converter from AnnData_ to SingleCellExperiment_ and back. (For **details about conversion** see the docs_)
  You can for example use it to process your data using both Scanpy_ and Seurat_, as described in this `example notebook`_


pkgId: 5782802656b5ebda2d3b4e5cabb4642565b76c41eaa41f46454c5450095f3604
name: python-annetbox
arch: src
version: 0.1.10
epoch: 0
release: 1
summary: Annet Netbox client
url: https://github.com/annetutil/annetbox
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annetbox-0.1.10-1.src.rpm
checksum_type: sha256
description:
  This project implements subset of Netbox API methods



  1. Install `sync` or `async` version

  ```shell
  pip install 'annetbox[sync]'
  ```

  2. Create client instance according to your netbox version (only some are supported)

  ```python
  from annetbox.v37.client_sync import NetboxV37

  netbox = NetboxV37(url="https://demo.netbox.dev", token="YOUR NETBOX TOKEN")
  ```

  3. Call methods

  ```python
  res = netbox.dcim_devices(limit=1)
  ```





  For sync client

  ```python
  import http.client
  import logging

  logging.basicConfig()
  http.client.HTTPConnection.debuglevel = 1
  requests_log = logging.getLogger("requests.packages.urllib3")
  requests_log.setLevel(logging.DEBUG)
  requests_log.propagate = True
  ```



  1. Create context

  ```python
  import ssl

  context = ssl.create_default_context(cafile="path/to/cacert.pem")
  ```

  2. Pass it to client

  ```python
  netbox = NetboxV37(url=url, token=token, ssl_context=context)
  ```





  1. Read openapi spec
  2. Edit `models.py`
  3. Edit `client_async.py`, do not forget adding `limit`/`offset`
  4. Convert async code to sync

  ```shell
  python transform_to_sync.py src/annetbox/v37/client_async.py > src/annetbox/v37/client_sync.py
  ```


pkgId: 6290f6129c50dfc49a966c5c4899b6c6da6eae5c9c06f356f353d5ea1baa4b85
name: python-annexremote
arch: src
version: 1.6.6
epoch: 0
release: 1
summary: git annex special remotes made easy
url: https://pypi.org/project/annexremote/
rpm_license: GPL-3.0-only
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annexremote-1.6.6-1.src.rpm
checksum_type: sha256
description:
  ![Tests](https://github.com/Lykos153/AnnexRemote/actions/workflows/unittests.yml/badge.svg) [![PyPI version](https://badge.fury.io/py/annexremote.svg)](https://badge.fury.io/py/annexremote)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)



  Helper module to easily develop special remotes for [git annex](https://git-annex.branchable.com).
  AnnexRemote handles all the protocol stuff for you, so you can focus on the remote itself.
  It implements the complete [external special remote protocol](https://git-annex.branchable.com/design/external_special_remote_protocol)
  and fulfils all specifications regarding whitespaces etc. This is ensured by an excessive test suite.

  [Documentation](https://lykos153.github.io/AnnexRemote/annexremote/)

  (Also have a look at the [examples](examples) and [git-annex-remote-googledrive](https://github.com/Lykos153/git-annex-remote-googledrive) which is based on AnnexRemote.)



  You need python3 installed on your system.


  `pip3 install annexremote`


  If you want to run the tests, copy the content of the `tests` folder to the same location as `annexremote.py`.
  Then use a test discovery like [pytest](https://github.com/pytest-dev/pytest) to run them.



  Import the necessary classes

  ```python
  from annexremote import Master
  from annexremote import SpecialRemote
  from annexremote import RemoteError
  ```

  Now create your special remote class. It must subtype ``SpecialRemote`` and implement at least the 6 basic methods:

  ```python
  class MyRemote(SpecialRemote):
      def initremote(self):
          
          

      def prepare(self):
          
          

      def transfer_store(self, key, filename):
          
          

      def transfer_retrieve(self, key, filename):
          
          

      def checkpresent(self, key):
          
          
          

      def remove(self, key):
          
          
          
  ```

  In your ``main`` function, link your remote to the master class and initialize the protocol:

  ```python
  def main():
      master = Master()
      remote = MyRemote(master)
      master.LinkRemote(remote)
      master.Listen()

  if __name__ == "__main__":
      main()
  ```

  Now save your program as ``git-annex-remote-$something`` and make it executable.

  ``chmod +x git-annex-remote-$something``
  (You'll need the sheebang line ``#!/usr/bin/env python3``)

  That's it. Now you've created your special remote.


  Import and subtype `ExportRemote` instead of `SpecialRemote`:

  ```python

  from annexremote import ExportRemote

  class MyRemote(ExportRemote):
      

      def transferexport_store(self, key, local_file, remote_file):
          
          

      def transferexport_retrieve(self, key, local_file, remote_file):
          
          

      def checkpresentexport(self, key, remote_file):
          
          
          

      def removeexport(self, key, remote_file):
          
          
          

      def removeexportdirectory(self, remote_directory):
          
          
          

      def renameexport(self, key, filename, new_filename):
          
          

  ```


  This module includes a StreamHandler to send log records to git annex via the special remote protocol (using DEBUG). You can use it like this:

  ```python
  ...
  import logging
  ...

  def main():
      master = Master()
      remote = MyRemote(master)
      master.LinkRemote(remote)

      logger = logging.getLogger()
      logger.addHandler(master.LoggingHandler())

      master.Listen()

  if __name__ == "__main__":
      main()
  ```




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


pkgId: f6ee585d82238179d430bef863c89a4dfdf9431d0aadfdc4267eeb982129d481
name: python-annextimelog
arch: src
version: 0.14.0
epoch: 0
release: 1
summary: Track time spent on projects, backed by Git Annex
url: https://gitlab.com/nobodyinperson/annextimelog
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annextimelog-0.14.0-1.src.rpm
checksum_type: sha256
description:
  [![coverage report](https://gitlab.com/nobodyinperson/annextimelog/badges/main/coverage.svg)](https://gitlab.com/nobodyinperson/annextimelog/-/commits/main)
  [![PyPI version](https://badge.fury.io/py/annextimelog.svg)](https://badge.fury.io/py/annextimelog)
  [![REUSE status](https://api.reuse.software/badge/gitlab.com/nobodyinperson/annextimelog)](https://api.reuse.software/info/gitlab.com/nobodyinperson/annextimelog)

  > ⚠️  This tool is in alpha stage. The most basic time tracking features recording, deletion, editing, search as well as syncing are implemented, but a lot of features (especially nice visual summaries) are missing.

  ![[annextimelog workflow terminal screenshot](https://fosstodon.org/@nobodyinperson/111772833299502409)](https://cdn.fosstodon.org/media_attachments/files/111/772/809/056/293/179/original/8d46177b3fbc9a0f.png)



  This is a brainstorm for a [Git Annex](https://git-annex.branchable.com)-backed time tracker.
  The idea originated across some of my Mastodon threads:

  - https://fosstodon.org/@nobodyinperson/109596495108921683
  - https://fosstodon.org/@nobodyinperson/109159397807119512
  - https://fosstodon.org/@nobodyinperson/111591979214726456

  The gist is that I was (and still am) unhappy with the existing time tracking solutions. I worked with [hledger's timeclock](https://hledger.org/1.32/hledger.html#timeclock-format) and [timewarrior](https://timewarrior.net/) each for quite some time and built my own workflow and scripts around them.



  Over the years, the below features turned out to be **my** personal requirements for a time-tracking system (**TL;DR**: easy and intuitive recording, hassle-free syncing, data export for further analysis).
  Here is a table comparing annextimelog with [timewarrior](https://timewarrior.net/) and [hledger timeclock](https://hledger.org/1.32/hledger.html#timeclock-format):

  ✅ = feature available, 🟡 = partly available, ❌ = not available

  | feature                                            | `timewarrior` | `hledger` timeclock    | `annextimelog`                       |
  |----------------------------------------------------|---------------|------------------------|--------------------------------------|
  | precise **start and end times**                    | ✅            | ✅                     | ✅ as git-annex metadata             |
  | tracking of overlapping/simultaneous periods       | ❌            | 🟡 (separate files)    | ✅ backend can do it                 |
  | nice, colourful, **graphical summary**             | ✅            | 🟡                     | ✅ with Python `rich`, more planned  |
  | **plain text** data storage                        | ✅            | ✅                     | 🟡 buried in `git-annex` branch      |
  | git-friendly, **merge conflict free data format**  | 🟡¹           | 🟡¹                    | ✅ git-annex’ own merge strategy     |
  | arbitrary **tags** attachable to tracked periods   | ✅            | 🟡 hledger tags²       | ✅ just git-annex metadata           |
  | arbitrary **notes** attachable to tracked periods  | 🟡³           | 🟡 hledger tags²       | ✅ just git-annex metadata           |
  | tags can have **values**                           | ❌            | ✅ hledger tags²       | ✅ just git-annex metadata           |
  | **files** attach-/linkable to tracked periods      | ❌            | 🟡 path as `file:` tag | 🟡 annexed files, linking is planned |
  | **cli** to start, stop, edit, etc. tracked periods | ✅⁴           | ❌ own scripts needed  | 🟡 recording and editing             |
  | **plugin system**                                  | 🟡⁵           | 🟡⁶ (hledger’s own)    | ❌ git-style plugin system planned   |
  | **data export** to common format                   | ✅ (JSON)     | ✅ (CSV, JSON)         | ✅ as timeclock, JSON, cli commands  |
  | **syncing** functionality built-in                 | ❌            | ❌                     | ✅ git-annex’s purpose is syncing    |
  | **multi-user** support                             | ❌            | ❌                     | ✅ nothing in the way, just use tags |

  ¹last line is always modified, merge conflicts can arise when working from different machines

  ²[hledger tags](https://hledger.org/1.32/hledger.html#tags) have limitations, e.g. no spaces, colons, commas, etc.

  ³timewarrior annotations can't contain newlines for example. I wrote an extension to edit your annotation in your `$EDITOR` and optionally GPG-encrypt it, which lets you add newlines. Quite an inconvenience.

  ⁴timewarrior’s cli has some nasty inconveniences (e.g. no shortcut for ‘yesterday’, must painfully type out the full date, no intelligence to operate only on yesterday, gets confused and errors out in certain combinations of start/end times, etc…)

  ⁵timewarrior extensions ([here mine](https://gitlab.com/-/snippets/2498711)) are just fed the data via STDIN, not other command-line arguments. Not as useful as the git-style plugin system.

  ⁶for the analysis part, `hledger` plugins can be used. But as there is no actual cli to manage the data, there’s no plugin system for that.



  To learn more about how `annextimelog` works under the hood with git-annex as backend, have a look at [doc/implementation](doc/implementation.md).



  You can run this tool if you have [nix](https://nixos.org) installed:

  ```bash

  nix shell gitlab:nobodyinperson/annextimelog


  nix profile install gitlab:nobodyinperson/annextimelog
  ```

  On Arch Linux you can install from the [AUR](https://aur.archlinux.org/packages/annextimelog) with your favorite helper, or directly with pacman from [this user repository](https://wiki.archlinux.org/title/Unofficial_user_repositories#alerque).

  ```bash

  paru -S annextimelog
  ```

  Otherwise, you can install it like any other Python package, e.g. with `pip` or better `pipx`:

  ```bash
  pipx install annextimelog


  pipx install git+https://gitlab.com/nobodyinperson/annextimelog
  ```

  Note that in this case you will need to install [git-annex](https://git-annex.branchable.com) manually.

  Any of the above makes the `annextimelog` (or `atl`) command available.



  ```bash
  usage: annextimelog [-h] [--no-config] [-c key=value] [--repo REPO] [-n]
                      [--force] [-v] [-q] [-O {rich,console,json,timeclock,cli}]
                      [--version | --version-only]
                      {test,git,config,sync,sy,track,tr,delete,del,rm,remove,edit,ed,mod,change,upd,update,stop,cont,summary,su,ls,list,find,search}
                      ...

  ⏱️ Time tracker based on Git Annex

  options:
    -h, --help            show this help message and exit
    --no-config           Ignore config from git
    -c key=value          Set a temporary config 'key=value' or just 'key' (implicit '=true'). If not present, 'annextimelog.' will be prepended to the key. The following keys are available: emojis, color, commit, confirm, fast, weekstartssunday, longlist, listall, matchconditions, outputformat, dryrun, slowdown.
    --force               Just do it. Ignore potential data loss.
    --version             show version information and exit
    --version-only        show only version and exit

  Data:
    --repo REPO           Backend repository to use. Defaults to $ANNEXTIMELOGREPO, $ANNEXTIMELOG_REPO or $XDG_DATA_HOME/annextimelog (currently: /tmp/annextimelog)
    -n, --dry-run         don't actually store, modify or delete events in the repo. Useful for testing what exactly commands would do.Note that the automatic repo creation is still performed.

  Output:
    Options changing output behaviour

    -v, --verbose         verbose output. More -v ⮕ more output
    -q, --quiet           less output. More -q ⮕ less output
    -O {rich,console,json,timeclock,cli}, --output-format {rich,console,json,timeclock,cli}
                          Select output format. Defaults to 'console'.

  Subcommands:
    {test,git,config,sync,sy,track,tr,delete,del,rm,remove,edit,ed,mod,change,upd,update,stop,cont,summary,su,ls,list,find,search}
      test                run test suite
      git                 Access the underlying git repository
      config              Convenience wrapper around 'atl git config [annextimelog.]key [value], e.g. 'atl config emojis false' will set the annextimelog.emojis config to false.
      sync (sy)           sync data
      track (tr)          record a time period
      delete (del, rm, remove)
                          delete an event
      edit (ed, mod, change, upd, update)
                          modify an event
      stop                set end of seleted currently open-end events to now
      cont                continue a closed event now or at a given time
      summary (su, ls, list, find, search)
                          show a summary of tracked periods

  🛠️ Usage

  Logging events:

  > atl tr work @office     # an open event starting now
  > atl stop work           # some time later, sets end of the latest 'work' event
  > atl cont work           # next day, copy the latest work event and start it now
  > atl tr work for 4h @home with client=smallcorp on project=topsecret    # a past event of 4h duration
  > atl tr 10 - 11 @doctor
  > atl tr y22:00 - 30min ago sleep @home quality=meh
  > atl -vvv tr ... # debug problems

      Note: Common prepositions like 'with', 'about', etc. are ignored. See the full list with
      > python -c 'from annextimelog.token import Noop;print(Noop.FILLERWORDS)'

  Listing events:

  > atl
  > atl ls
  > atl ls .open      # list events that don't have both start and end set
  > atl ls .openend   # list events that don't have an end set („currently running”)
  > atl ls week
  > atl ls yesterday
  > atl ls until 2days ago
  > atl -O json ls -a  # dump all data as JSON
  > atl -O timeclock ls -a | hledger -f timeclock:- bal --daily   # analyse with hledger

  Editing events:

  > atl stop                               # stop all open-end events
  > atl mod .openend set end=now           # same but manually
  > atl mod id=jajekwka project=secret     # add custom tag to specific event
  > atl mod id=LXKGrBGA end=now            # change end of specific event
  > atl mod id=LXKGrBGA until 18           # change end of specific event
  > atl mod @home where note=text          # add 'home' to location where note contains 'text'

  Continuing events:

  > atl cont work @office           # continues the last matching closed event as a new event
  > atl cont work @office until 15  # same, but sets the end time to 15:00 today
  > atl cont work set project=A     # continue and add/override metadata

  Removing events:

  > atl rm id=O3YzvZ4m   # delete by ID
  > atl rm @work sleep   # delete all events where you slept at work 😉

  Syncing:


  > atl git remote add git@gitlab.com:you/yourrepo

  > atl sync

  Configuration

  > atl -c key=value ... # temporarily set config
  > atl config key value # permanently set config
  > atl config color ... # whether colored output should be used. The default 'true' decides based on the typical $TERM and $NO_COLOR envvars.
  > atl config commit ... # whether events should be committed upon modification. Setting this to false can improve performance but will reduce granularity to undo changes.
  > atl config confirm ... # whether to ask before actually touching anything
  > atl config dryrun ... # equivalent of -n / --dry-run
  > atl config emojis ... # whether emojis should be shown in pretty-formated event output
  > atl config fast ... # setting this to false will cause annextimelog be be more sloppy (and possible faster) by leaving out some non-critical cleanup steps.
  > atl config listall ... # equivalent of specifying --all (e.g. atl ls -a)
  > atl config longlist ... # equivalent of specifying --long (e.g. atl ls -l)
  > atl config matchconditions ... # equivalent of atl ls --match (set to 'all' or 'any')
  > atl config outputformat ... # equivalent of -O / --output-format
  > atl config slowdown ... # a float value like 0.1 (ms) to make finding events *even* slower 😅 (for debugging purposes)
  > atl config weekstartssunday ... # whether the week should start on Sunday instead of Monday (the default)
  ```



  This project uses [poetry](https://python-poetry.org/), so you can run the following in this repository to get into a development environment:

  ```bash
  poetry install
  poetry shell

  ```

  Other:

  ```bash

  just watch-mypy


  just watch-test


  just test-tokens work @home note=bla myfield+=one,two,three 2h ago until now


  just test-with-python-version 3.10
  ```


pkgId: 8fc079995942143219648bc2ee100c7c7b57e76c70c14e3c58adc87f8ea85caa
name: python-annie-lappd
arch: src
version: 0.1
epoch: 0
release: 1
summary: A package that processes the ASCII data generated by the ACDC boards.
url: https://github.com/marvlad/annie_lappd/tree/main
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annie-lappd-0.1-1.src.rpm
checksum_type: sha256
description:
  This is a Python package that reads and processes the ASCII files



  You can install the package using pip:

  ```bash
  pip install annie_lappd
  ```



  ```bash
  from annie_lappd import plotLAPPD

  events = 2
  data = 'datafile.txt'
  pedestal1 = 'pedestal01.txt'
  pedestal2 = 'pedestal02.txt'

  pedestals = [pedestal1, pedestal2]

  lappd = plotLAPPD(data, pedestals)
  lappd.pedestalSubtraction
  lappd.convertADCtoVoltage
  lappd.correctingACDCmetadata
  lappd.convertACDCtoStripIndex
  lappd.baselineCorrection(50)
  lappd.filterFFT

  lappd.displayEvent(4, 1, 1)
  ```


pkgId: 888eb5ee62787c45b5859762bc8a19b41ba62c0bd43ae3e32f1ef45998e6c75d
name: python-annif
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: Automated subject indexing and classification tool
url: https://annif.org
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annif-1.2.0-1.src.rpm
checksum_type: sha256
description:
  <img src="https://annif.org/static/img/annif-RGB.svg" width="150">

  [![DOI](https://zenodo.org/badge/100936800.svg)](https://zenodo.org/badge/latestdoi/100936800)
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
  [![Container image](https://img.shields.io/badge/container_image-quay.io-blue.svg)](https://quay.io/repository/natlibfi/annif)
  [![CI/CD](https://github.com/NatLibFi/Annif/actions/workflows/cicd.yml/badge.svg)](https://github.com/NatLibFi/Annif/actions/workflows/cicd.yml)
  [![codecov](https://codecov.io/gh/NatLibFi/Annif/branch/main/graph/badge.svg)](https://codecov.io/gh/NatLibFi/Annif)
  [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/NatLibFi/Annif/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/NatLibFi/Annif/?branch=main)
  [![Code Climate](https://codeclimate.com/github/NatLibFi/Annif/badges/gpa.svg)](https://codeclimate.com/github/NatLibFi/Annif)
  [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/NatLibFi/Annif/badge)](https://securityscorecards.dev/viewer/?uri=github.com/NatLibFi/Annif)
  [![codebeat badge](https://codebeat.co/badges/7a8ef539-0094-48b8-84c2-c413b4a50d57)](https://codebeat.co/projects/github-com-natlibfi-annif-main)
  [![CodeQL](https://github.com/NatLibFi/Annif/actions/workflows/codeql.yml/badge.svg)](https://github.com/NatLibFi/Annif/actions/workflows/codeql.yml)
  [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=NatLibFi_Annif&metric=alert_status)](https://sonarcloud.io/dashboard?id=NatLibFi_Annif)
  [![docs](https://readthedocs.org/projects/annif/badge/?version=latest)](https://annif.readthedocs.io/en/latest/index.html)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![Open in GitHub Codespaces](https://img.shields.io/static/v1?&label=Tutorial+in+Codespaces&message=Open&color=brightgreen&logo=github)](https://codespaces.new/NatLibFi/Annif-tutorial/tree/codespaces)

  Annif is an automated subject indexing toolkit. It was originally created as
  a statistical automated indexing tool that used metadata from the
  [Finna.fi](https://finna.fi) discovery interface as a training corpus.

  This repo contains a rewritten production version of Annif based on the
  [prototype](https://github.com/osma/annif).

  [Finto AI](https://ai.finto.fi/) is a service based on Annif; see the [source code of Finto AI](https://github.com/NatLibFi/FintoAI)
  and the [🤗 Hugging Face Hub collection](https://huggingface.co/collections/NatLibFi/annif-models-65b35fb98b7c508c8e8a1570) containing the models Finto AI uses.



  Annif is developed and tested on Linux. If you want to run Annif on Windows or Mac OS, the recommended way is to use Docker (see below) or a Linux virtual machine.

  You will need Python 3.9-3.12 to install Annif.

  The recommended way is to install Annif from
  [PyPI](https://pypi.org/project/annif/) into a virtual environment.

      python3 -m venv annif-venv
      source annif-venv/bin/activate
      pip install annif

  Start up the application:

      annif

  See [Getting Started](https://github.com/NatLibFi/Annif/wiki/Getting-started)
  in the wiki for more details.


  Annif supports tab-key completion in bash, zsh and fish shells for commands and options
  and project id, vocabulary id and path parameters.

  To enable the completion support in your current terminal session use `annif completion`
  command with the option according to your shell to produce the completion script and
  source it. For example, run

      source <(annif completion --bash)

  To enable the completion support in all new sessions first add the completion script in
  your home directory:

      annif completion --bash > ~/.annif-complete.bash

  Then make the script to be automatically sourced for new terminal sessions by adding the
  following to your `~/.bashrc` file (or in some [alternative startup
  file](https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html)):

      source ~/.annif-complete.bash

  For details and usage for other shells see
  [Click documentation](https://click.palletsprojects.com/en/8.1.x/shell-completion/).


  You can use Annif as a pre-built Docker container image from [quay.io/natlibfi/annif](https://quay.io/repository/natlibfi/annif) repository. Please see the
  [wiki documentation](https://github.com/NatLibFi/Annif/wiki/Usage-with-Docker)
  for details.



  A development version of Annif can be installed by cloning the [GitHub
  repository](https://github.com/NatLibFi/Annif).
  [Poetry](https://python-poetry.org/) is used for managing dependencies and virtual environment for the development version.

  See [CONTRIBUTING.md](CONTRIBUTING.md) for information on [unit tests](CONTRIBUTING.md#unit-tests), [code style](CONTRIBUTING.md#code-style), [development flow](CONTRIBUTING.md#development-flow) etc. details that are useful when participating in Annif development.



  Clone the repository.

  Switch into the repository directory.

  Install [pipx](https://pypa.github.io/pipx/) and Poetry if you don't have them. First pipx:

      python3 -m pip install --user pipx
      python3 -m pipx ensurepath

  Open a new shell, and then install Poetry:

      pipx install poetry

  Poetry can be installed also without pipx: check the [Poetry documentation](https://python-poetry.org/docs/master/#installation).

  Create a virtual environment and install dependencies:

      poetry install

  By default development dependencies are included. Use option `-E` to install dependencies for selected optional features (`-E "extra1 extra2"` for multiple extras), or install all of them with `--all-extras`. By default the virtual environment directory is not under the project directory, but there is a [setting for selecting this](https://python-poetry.org/docs/configuration/#virtualenvsin-project).

  Enter the virtual environment:

      poetry shell

  Start up the application:

      annif


  Annif can be tried out in the [GitHub Codespaces](https://docs.github.com/en/codespaces). Just open a page for configuring a new codespace via the badge below, start the codespace from the green "Create codespace" button, and a terminal session will start in your browser with the contents of the [Annif-tutorial](https://github.com/NatLibFi/Annif-tutorial) repository:

  [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/NatLibFi/Annif-tutorial/tree/codespaces)



  Many resources are available:

   * [Usage documentation in the wiki](https://github.com/NatLibFi/Annif/wiki)
   * [Annif tutorial](https://github.com/NatLibFi/Annif-tutorial) for learning to use Annif
   * [annif-users](https://groups.google.com/forum/#!forum/annif-users) discussion forum
   * [Internal API documentation](https://annif.readthedocs.io) on ReadTheDocs
   * [annif.org](https://annif.org) project web site



  See below for some articles about Annif in peer-reviewed Open Access
  journals. The software itself is also archived on Zenodo and
  has a [citable DOI](https://doi.org/10.5281/zenodo.5654173).



  See "Cite this repository" in the details of the repository.


  <ul>
  <li>
  Golub, K.; Suominen, O.; Mohammed, A.; Aagaard, H.; Osterman, O, 2024.
  Automated Dewey Decimal Classification of Swedish library metadata using Annif software.
  Journal of Documentation, in press.
  https://doi.org/10.1108/JD-01-2022-0026
  <details>
  <summary>See BibTex</summary>

      @article{golub2024annif,
        title={Automated Dewey Decimal Classification of Swedish library metadata using Annif software},
        author={Golub, Koraljka and Suominen, Osma and Mohammed, Ahmed Taiye and Aagaard, Harriet and Osterman, Olof},
        journal={J. Doc.},
        year={in press},
        doi = {10.1108/JD-01-2022-0026},
        url={https://www.emerald.com/insight/content/doi/10.1108/JD-01-2022-0026},
      }
  </details>
  </li>
  <li>
  Suominen, O.; Inkinen, J.; Lehtinen, M., 2022.
  Annif and Finto AI: Developing and Implementing Automated Subject Indexing.
  JLIS.It, 13(1), pp. 265–282. URL:
  https://www.jlis.it/index.php/jlis/article/view/437
  <details>
  <summary>See BibTex</summary>

      @article{suominen2022annif,
        title={Annif and Finto AI: Developing and Implementing Automated Subject Indexing},
        author={Suominen, Osma and Inkinen, Juho and Lehtinen, Mona},
        journal={JLIS.it},
        volume={13},
        number={1},
        pages={265--282},
        year={2022},
        doi = {10.4403/jlis.it-12740},
        url={https://www.jlis.it/index.php/jlis/article/view/437},
      }
  </details>
  </li>
  <li>
  Suominen, O.; Koskenniemi, I, 2022.
  Annif Analyzer Shootout: Comparing text lemmatization methods for automated subject indexing.
  Code4Lib Journal, (54). URL:
  https://journal.code4lib.org/articles/16719
  <details>
  <summary>See BibTex</summary>

      @article{suominen2022analyzer,
        title={Annif Analyzer Shootout: Comparing text lemmatization methods for automated subject indexing},
        author={Suominen, Osma and Koskenniemi, Ilkka},
        journal={Code4Lib J.},
        number={54},
        year={2022},
        url={https://journal.code4lib.org/articles/16719},
      }
  </details>
  </li>
  <li>
  Suominen, O., 2019. Annif: DIY automated subject indexing using multiple
  algorithms. LIBER Quarterly, 29(1), pp.1–25. DOI:
  https://doi.org/10.18352/lq.10285
  <details>
  <summary>See BibTex</summary>

      @article{suominen2019annif,
        title={Annif: DIY automated subject indexing using multiple algorithms},
        author={Suominen, Osma},
        journal={{LIBER} Quarterly},
        volume={29},
        number={1},
        pages={1--25},
        year={2019},
        doi = {10.18352/lq.10285},
        url = {https://doi.org/10.18352/lq.10285}
      }
  </details>
  </li>
  </ul>



  The code in this repository is licensed under Apache License 2.0, except for the
  dependencies included under `annif/static/css` and `annif/static/js`,
  which have their own licenses, see the file headers for details.
  Please note that the [YAKE](https://github.com/LIAAD/yake) library is licended
  under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.txt), while Annif is
  licensed under the Apache License 2.0. The licenses are compatible, but
  depending on legal interpretation, the terms of the GPLv3 (for example the
  requirement to publish corresponding source code when publishing an executable
  application) may be considered to apply to the whole of Annif+Yake if you
  decide to install the optional Yake dependency.


pkgId: 8e3d1fb45a9e7792f573c05b56babe844176c1350722981148792879b27d18f1
name: python-annobee
arch: src
version: 0.6.1
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/variantAnnotation/annobee-sdk
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annobee-0.6.1-1.src.rpm
checksum_type: sha256
description:
  <!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 -->
  <a name="readme-top"></a>

  <!-- ABOUT THE PROJECT -->
  <h1>Annobee</h1>
  <h2>About The Project</h2>
  <p>
      <code>annobee</code> is designed to analyze genetic variants to determine their pathogenicity using multiple established criteria. It integrates several functions to set various genetic criteria based on evolutionary conservation, allele frequency, and ACMG/AMP standards. The main functionality is centralized in the <code>main.py</code>.
  </p>

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

  <h3>Built With</h3>
  <ul>
      <li><a href="https://www.python.org/">Python</a></li>
  </ul>

  <!-- GETTING STARTED -->
  <h2>Getting Started</h2>
  <p>To get a local copy up and running follow these simple example steps.</p>

  <h3>Prerequisites</h3>
  <ul>
      <li>MongoDB: You can download it from <a href="https://www.mongodb.com/download-center/community">MongoDB Download Center</a>.</li>
      <li>Python: Download Python <a href="https://www.python.org/downloads/">here</a>.</li>
  </ul>

  <h3>Requirements</h3>
  <ul>
      <li>flask==2.0.1</li>
      <li>numpy==1.23.5</li>
      <li>pandas==1.5.3</li>
      <li>requests==2.25.1</li>
      <li>tqdm==4.65.0</li>
  </ul>

  <h3>Installation</h3>
  <ol>
      <li>Clone the repo
          <pre><code>git clone https://github.com/variantAnnotation/annobee-sdk.git</code></pre>
      </li>
      <li>Follow to directory where you clone the repo:
          <pre><code>cd annobee-sdk</code></pre>
      </li>
      <li>Install requirements and dependencies:
          <pre><code>pip install -r requirements.txt</code></pre>
      </li>
  </ol>

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

  <!-- USAGE EXAMPLES -->
  <h2>Usage</h2>

  <h3>Starting the Flask API</h3>
  <p>To start the Flask API that the SDK communicates with:</p>
  <pre><code>python app.py</code></pre>

  <h3>Command-Line Interface</h3>

  <p>To use the <code>annobee-sdk</code>, you can execute the CLI tool with various options to evaluate genetic variant criteria.</p>

  <h4> </4>

  <h4>Example 1: Evaluate Specific Criteria (PS1)</h4>
  <pre><code>python cli.py 1-14973-A-AG --endpoint http://localhost:5000/api/interpret -ps1</code></pre>

  <h4>Example 2: Evaluate All Criteria</h4>
  <pre><code>python cli.py 1-14973-A-AG --endpoint http://localhost:5000/api/interpret -all</code></pre>

  <h3>Using the Annobee Class in a Python Script</h3>
  <p>Here's an example script that evaluates multiple variants using the <code>Annobee</code> class:</p>

  <pre><code>import json
  from cli import Annobee

  def evaluate_variant(annobee, variant, criteria):
      variant_info = annobee.get_criteria(variant)
      results = {}

      if criteria == 'all':
          results = annobee.get_all(variant_info)
      else:
          for criterion in criteria:
              if criterion == 'PS1':
                  results['PS1'] = annobee.get_ps1(variant_info)
              elif criterion == 'PM5':
                  results['PM5'] = annobee.get_pm5(variant_info)
              elif criterion == 'BP7':
                  results['BP7'] = annobee.get_bp7(variant_info)
              elif criterion == 'PVS1':
                  results['PVS1'] = annobee.get_pvs1(variant_info)
              

      return results

  if __name__ == '__main__':
      
      endpoint = 'http://localhost:5000/api/interpret'
      annobee = Annobee(endpoint=endpoint)

      
      variants = [
          '1-14973-A-AG',
          '2-23214-G-T',
          '3-45321-C-A',
          '4-55423-T-G',
          '5-67432-A-C'
      ]

      
      print("Evaluating one criterion (PS1) for one variant:")
      result_one_criterion = evaluate_variant(annobee, variants[0], ['PS1'])
      print(json.dumps(result_one_criterion, indent=4))

      
      print("\nEvaluating three criteria (PS1, PM5, BP7) for one variant:")
      result_three_criteria = evaluate_variant(annobee, variants[0], ['PS1', 'PM5', 'BP7'])
      print(json.dumps(result_three_criteria, indent=4))

      
      print("\nEvaluating all criteria for one variant:")
      result_all_criteria = evaluate_variant(annobee, variants[0], 'all')
      print(json.dumps(result_all_criteria, indent=4))
  </code></pre>

  <h3>Running the Test Script</h3>
  <p>Ensure your Flask API is running and that the <code>cli.py</code> script with the <code>Annobee</code> class is in the same directory or properly installed. Then run the <code>test.py</code> script:</p>

  <pre><code>python test.py</code></pre>
  <p>This will print the results of evaluating both one criterion, three criteria, and all criteria for the first variant in the list using the specified endpoint. Adjust the criteria and variant list as needed for your specific use case.</p>

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

  <!-- ROADMAP -->
  <h2>Roadmap</h2>
  <ul>
      <li>Adding testing metrics regarding the performance of the platform</li>
  </ul>

  <!-- CONTRIBUTING -->
  <h2>Contributing</h2>
  <p>Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are <strong>greatly appreciated</strong>.</p>

  <p>If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!</p>

  <ol>
      <li>Fork the Project</li>
      <li>Create your Feature Branch (<code>git checkout -b feature/AmazingFeature</code>)</li>
      <li>Commit your Changes (<code>git commit -m 'Add some AmazingFeature'</code>)</li>
      <li>Push to the Branch (<code>git push origin feature/AmazingFeature</code>)</li>
      <li>Open a Pull Request</li>
  </ol>

  <!-- LICENSE -->
  <h2>License</h2>
  <p>Distributed under the MIT License. See <code>LICENSE.txt</code> for more information.</p>

  <!-- MARKDOWN LINKS & IMAGES -->
  <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
  </body>
  </html>


pkgId: cc7c7954fa9b76e6563faf132da2e6af802fb984b378d77b5991ecbe0d2ff17c
name: python-annofabapi
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Python Clinet Library of Annofab WebAPI (https://annofab.com/docs/api/)
url: https://github.com/kurusugawa-computer/annofab-api-python-client
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annofabapi-1.0.0-1.src.rpm
checksum_type: sha256
description:
  [Annofab Web API](https://annofab.com/docs/api/) のPythonクライアントライブラリです。

  [![Build Status](https://app.travis-ci.com/kurusugawa-computer/annofab-api-python-client.svg?branch=main)](https://app.travis-ci.com/kurusugawa-computer/annofab-api-python-client)
  [![CodeQL](https://github.com/kurusugawa-computer/annofab-api-python-client/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/kurusugawa-computer/annofab-api-python-client/actions/workflows/codeql-analysis.yml)
  [![PyPI version](https://badge.fury.io/py/annofabapi.svg)](https://badge.fury.io/py/annofabapi)
  [![Python Versions](https://img.shields.io/pypi/pyversions/annofabapi.svg)](https://pypi.org/project/annofabapi/)
  [![Documentation Status](https://readthedocs.org/projects/annofab-api-python-client/badge/?version=latest)](https://annofab-api-python-client.readthedocs.io/en/latest/?badge=latest)




  * **Annofab Web API Documentation:** https://annofab.com/docs/api/
  * **Reference Documentation:** https://annofab-api-python-client.readthedocs.io/en/latest/
  * **annofab-cli** https://github.com/kurusugawa-computer/annofab-cli
      * 「タスクの一括差し戻し」や、「プロジェクト間の差分表示」など、Annofabの画面で実施するには時間がかかる操作を、CLIツールとして提供しています。
  * **開発者用ドキュメント**: [README_for_developer.md](https://github.com/kurusugawa-computer/annofab-api-python-client/blob/main/README_for_developer.md)





  * 作者または著作権者は、ソフトウェアに関してなんら責任を負いません。
  * 現在、APIは開発途上版です。予告なく互換性のない変更がある可能性をご了承ください。
  * put, post, delete系のメソッドを間違えて実行してしまわないよう、注意してください。特に「プロジェクト削除」や「アノテーション仕様更新」のAPIには十分注意してください。


  現在ありません。



  cURLやPostmanなどよりも簡単にAnnofab Web APIにアクセスできます。

  * ログインを意識せずに、APIを利用できます。
  * アクセス過多などで失敗した場合は、リトライされます。
  * 「画像を入力データとして登録する」機能など、APIを組み合わせた機能も利用できます。




  * Python 3.8+



  ```
  $ pip install annofabapi
  ```

  https://pypi.org/project/annofabapi/







  ```python

  from annofabapi import build


  user_id = "XXXXXX"
  password = "YYYYYY"

  service = build(user_id, password)
  ```



  ```python

  from annofabapi import build


  pat = "XXXXXX"

  service = build(pat = pat)
  ```



  `.netrc`ファイルに、AnnofabのユーザIDとパスワードを記載します。

  ```plain:.netrc
  machine annofab.com
  login annofab_user_id
  password annofab_password
  ```

  ```python
  from annofabapi import build_from_netrc
  service = build_from_netrc()
  ```



  * パスは`$HOME/.netrc`
  * `$ chmod 600 $HOME/.netrc`でパーミッションを変更する




  * パスは`%USERPROFILE%\.netrc`





  * IDとパスワードで認証する場合
      * 環境変数`ANNOFAB_USER_ID`、`ANNOFAB_PASSWORD`にユーザIDとパスワードを設定します。
  * パーソナルアクセストークンで認証する場合
      * 環境変数`ANNOFAB_PAT`にトークンを設定します。
      * `ANNOFAB_PAT`が設定されている場合、`ANNOFAB_USER_ID`、`ANNOFAB_PASSWORD`は無視されます。

  ```python
  from annofabapi import build_from_env
  service = build_from_env()
  ```



  ``build()`` を実行すると、環境変数または `.netrc` ファイルから認証情報を読み込みます。

  ```python
  from annofabapi import build
  service = build()
  ```

  優先順位は以下の通りです。
  1. 環境変数
      1. `ANNOFAB_PAT`
      2. `ANNOFAB_USER_ID`及び`ANNOFAB_PASSWORD`
  2. `.netrc`




  * `service.api`には、Web APIに対応するメソッドが定義されています。
  * メソッド名は、[Annofab Web APIのOpenAPI specification](https://annofab.com/docs/api/swagger.yaml)に記載されている`operationId`を、スネークケースに変換したものです。
  * 各メソッドの戻り値の型は`Tupple[Content, Response]`です。
  Responseは[requestsモジュールのReponseオブジェクト](https://2.python-requests.org/en/master/api/#requests.Response)です。
  ContentはReponseの中身です。

  ```python
  project_id = "ZZZZZZ"

  content, response = service.api.get_tasks(project_id, query_params={"status": "complete"})

  print(type(content))

  print(content)


  print(type(response))

  print(response.headers["Content-Type"])

  ```



  `service.wrapper`には、`server.api`を組み合わせたメソッドが定義されています。


  ```python

  tasks = service.wrapper.get_all_tasks(project_id, query_params={"status": "complete"})
  print(type(tasks))

  print(tasks)




  service.wrapper.download_annotation_archive(project_id, 'output_dir')


  service.wrapper.put_input_data_from_file(project_id, 'sample_input_data_id', f'sample.png')
  ```


  ダウンロードしたアノテーションzipを、JSONファイルごとに読み込みます。
  zipファイルを展開したディレクトリも読み込み可能です。

  ```python
  import zipfile
  from pathlib import Path
  from annofabapi.parser import lazy_parse_simple_annotation_dir, lazy_parse_simple_annotation_zip, SimpleAnnotationZipParser, SimpleAnnotationDirParser, lazy_parse_simple_annotation_zip_by_task



  iter_parser = lazy_parse_simple_annotation_zip(Path("simple-annotation.zip"))
  for parser in iter_parser:
      simple_annotation = parser.parse()
      print(simple_annotation)


  iter_parser = lazy_parse_simple_annotation_dir(Path("simple-annotation-dir"))
  for parser in iter_parser:
      simple_annotation = parser.parse()
      print(simple_annotation)


  task_iter_parser = lazy_parse_simple_annotation_zip_by_task(Path("simple-annotation.zip"))
  for task_parser in task_iter_parser:
      print(task_parser.task_id)
      for parser in task_parser.lazy_parse():
          simple_annotation = parser.parse()
          print(simple_annotation)



  with zipfile.ZipFile('simple-annotation.zip', 'r') as zip_file:
      parser = SimpleAnnotationZipParser(zip_file, "task01/12345678-abcd-1234-abcd-1234abcd5678.json")
      simple_annotation = parser.parse()
      print(simple_annotation)


  parser = SimpleAnnotationDirParser(Path("task01/12345678-abcd-1234-abcd-1234abcd5678.json"))
  simple_annotation = parser.parse()
  print(simple_annotation)


  ```


  `annofabapi.segmentation` には、アノテーションZIPに格納されている塗りつぶし画像を扱うための関数が用意されています。
  利用する場合は、以下のコマンドを実行してください。

  ```
  $ pip install annofabapi[segmentation]
  ```




  `annofabapi.dataclass`に、データ構造用のクラスがあります。
  これらのクラスを利用すれば、属性で各値にアクセスできます。

  ```python
  from annofabapi.dataclass.task import Task
  dict_task, _ = service.api.get_task(project_id, task_id)
  task = Task.from_dict(dict_task)

  print(task.task_id)
  print(task.status)

  ```








  ```python
  import logging
  logging_formatter = '-8s : s : s : s'
  logging.basicConfig(format=logging_formatter)
  logging.getLogger("annofabapi").setLevel(level=logging.DEBUG)
  ```


pkgId: b35723536c7f05ec697ee60df8015defb1ce5cd6a5be238624308457326c29c6
name: python-annofabcli
arch: src
version: 1.90.0
epoch: 0
release: 1
summary: Utility Command Line Interface for AnnoFab
url: https://github.com/kurusugawa-computer/annofab-cli
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annofabcli-1.90.0-1.src.rpm
checksum_type: sha256
description:
  [Annofab](https://annofab.com/)のCLI(Command Line Interface)ツールです。
  「タスクの一括差し戻し」や、「タスク一覧出力」など、Annofabの画面で実施するには時間がかかる操作を、コマンドとして提供しています。

  [![Build Status](https://app.travis-ci.com/kurusugawa-computer/annofab-cli.svg?branch=main)](https://app.travis-ci.com/kurusugawa-computer/annofab-cli)
  [![PyPI version](https://badge.fury.io/py/annofabcli.svg)](https://badge.fury.io/py/annofabcli)
  [![Python Versions](https://img.shields.io/pypi/pyversions/annofabcli.svg)](https://pypi.org/project/annofabcli/)
  [![Documentation Status](https://readthedocs.org/projects/annofab-cli/badge/?version=latest)](https://annofab-cli.readthedocs.io/ja/latest/?badge=latest)


  * [Annofab](https://annofab.com/)
  * [annofab-cliのドキュメント](https://annofab-cli.readthedocs.io/ja/latest/)
  * [開発用ドキュメント](https://github.com/kurusugawa-computer/annofab-cli/blob/main/README_for_developer.md)




  * 作者または著作権者は、ソフトウェアに関してなんら責任を負いません。
  * 予告なく互換性のない変更がある可能性をご了承ください。
  * Annofabプロジェクトに大きな変更を及ぼすコマンドも存在します。間違えて実行してしまわないよう、注意してご利用ください。






  * JMESPathを指定できる `--query`を削除します。使いどころがあまりないのと、`jq`コマンドでも対応できるためです。
  * `--wait_options`を削除します。使いどころがあまりないためです。


  * Python 3.8+



  ```
  $ pip install annofabcli
  ```

  https://pypi.org/project/annofabcli/


  [GitHubのリリースページ](https://github.com/kurusugawa-computer/annofab-cli/releases)から`annofabcli-vX.X.X-windows.zip`をダウンロードしてください。
  zipの中にある`annofabcli.exe`が実行ファイルになります。




  https://annofab-cli.readthedocs.io/ja/latest/user_guide/configurations.html 参照


  https://annofab-cli.readthedocs.io/ja/latest/user_guide/index.html 参照


  https://annofab-cli.readthedocs.io/ja/latest/command_reference/index.html





  "car"ラベルの"occluded"属性のアノテーションルールに間違いがあったため、以下の条件を満たすタスクを一括で差し戻します。
  * "car"ラベルの"occluded"チェックボックスがONのアノテーションが、タスクに1つ以上存在する。

  前提条件
  * プロジェクトのオーナが、annofabcliコマンドを実行する


  ```

  $ annofabcli task list --project_id prj1  --task_query '{"status": "complete","phase":"acceptance"}' \
   --format task_id_list --output acceptance_complete_task_id.txt


  $ annofabcli annotation list_count --project_id prj1 --task_id file://task.txt --output annotation_count.csv \
   --annotation_query '{"label_name_en": "car", "attributes":[{"additional_data_definition_name_en": "occluded", "flag": true}]}'





  $ annofabcli task reject --project_id prj1 --task_id file://tasks.txt --cancel_acceptance \
    --comment "carラベルのoccluded属性を見直してください"

  ```




  WindowsのコマンドプロンプトやPowerShellでannofabcliを使う場合、JSON文字列内の二重引用をエスケープする必要があります。

  ```
  > annofabcli task list --project_id prj1  --task_query '{"\status\": \"complete\"}'
  ```


pkgId: de7a1e96956a2f9c4292759373d2b4d7fbddc3f07b608cdab526430511eae496
name: python-annotated-types
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: Reusable constraint types to use with typing.Annotated
url: https://github.com/annotated-types/annotated-types
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annotated-types-0.7.0-1.src.rpm
checksum_type: sha256
description:
  [![CI](https://github.com/annotated-types/annotated-types/workflows/CI/badge.svg?event=push)](https://github.com/annotated-types/annotated-types/actions?query=event%3Apush+branch%3Amain+workflow%3ACI)
  [![pypi](https://img.shields.io/pypi/v/annotated-types.svg)](https://pypi.python.org/pypi/annotated-types)
  [![versions](https://img.shields.io/pypi/pyversions/annotated-types.svg)](https://github.com/annotated-types/annotated-types)
  [![license](https://img.shields.io/github/license/annotated-types/annotated-types.svg)](https://github.com/annotated-types/annotated-types/blob/main/LICENSE)

  [PEP-593](https://peps.python.org/pep-0593/) added `typing.Annotated` as a way of
  adding context-specific metadata to existing types, and specifies that
  `Annotated[T, x]` _should_ be treated as `T` by any tool or library without special
  logic for `x`.

  This package provides metadata objects which can be used to represent common
  constraints such as upper and lower bounds on scalar values and collection sizes,
  a `Predicate` marker for runtime checks, and
  descriptions of how we intend these metadata to be interpreted. In some cases,
  we also note alternative representations which do not require this package.



  ```bash
  pip install annotated-types
  ```



  ```python
  from typing import Annotated
  from annotated_types import Gt, Len, Predicate

  class MyClass:
      age: Annotated[int, Gt(18)]                         # Valid: 19, 20, ...
                                                          
      factors: list[Annotated[int, Predicate(is_prime)]]  # Valid: 2, 3, 5, 7, 11, ...
                                                          

      my_list: Annotated[list[int], Len(0, 10)]           # Valid: [], [10, 20, 30, 40, 50]
                                                          
  ```



  _While `annotated-types` avoids runtime checks for performance, users should not
  construct invalid combinations such as `MultipleOf("non-numeric")` or `Annotated[int, Len(3)]`.
  Downstream implementors may choose to raise an error, emit a warning, silently ignore
  a metadata item, etc., if the metadata objects described below are used with an
  incompatible type - or for any other reason!_



  Express inclusive and/or exclusive bounds on orderable values - which may be numbers,
  dates, times, strings, sets, etc. Note that the boundary value need not be of the
  same type that was annotated, so long as they can be compared: `Annotated[int, Gt(1.5)]`
  is fine, for example, and implies that the value is an integer x such that `x > 1.5`.

  We suggest that implementors may also interpret `functools.partial(operator.le, 1.5)`
  as being equivalent to `Gt(1.5)`, for users who wish to avoid a runtime dependency on
  the `annotated-types` package.

  To be explicit, these types have the following meanings:

  * `Gt(x)` - value must be "Greater Than" `x` - equivalent to exclusive minimum
  * `Ge(x)` - value must be "Greater than or Equal" to `x` - equivalent to inclusive minimum
  * `Lt(x)` - value must be "Less Than" `x` - equivalent to exclusive maximum
  * `Le(x)` - value must be "Less than or Equal" to `x` - equivalent to inclusive maximum



  `Interval(gt, ge, lt, le)` allows you to specify an upper and lower bound with a single
  metadata object. `None` attributes should be ignored, and non-`None` attributes
  treated as per the single bounds above.



  `MultipleOf(multiple_of=x)` might be interpreted in two ways:

  1. Python semantics, implying `value % multiple_of == 0`, or
  2. [JSONschema semantics](https://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.6.2.1),
     where `int(value / multiple_of) == value / multiple_of`.

  We encourage users to be aware of these two common interpretations and their
  distinct behaviours, especially since very large or non-integer numbers make
  it easy to cause silent data corruption due to floating-point imprecision.

  We encourage libraries to carefully document which interpretation they implement.



  `Len()` implies that `min_length <= len(value) <= max_length` - lower and upper bounds are inclusive.

  As well as `Len()` which can optionally include upper and lower bounds, we also
  provide `MinLen(x)` and `MaxLen(y)` which are equivalent to `Len(min_length=x)`
  and `Len(max_length=y)` respectively.

  `Len`, `MinLen`, and `MaxLen` may be used with any type which supports `len(value)`.

  Examples of usage:

  * `Annotated[list, MaxLen(10)]` (or `Annotated[list, Len(max_length=10))`) - list must have a length of 10 or less
  * `Annotated[str, MaxLen(10)]` - string must have a length of 10 or less
  * `Annotated[list, MinLen(3))` (or `Annotated[list, Len(min_length=3))`) - list must have a length of 3 or more
  * `Annotated[list, Len(4, 6)]` - list must have a length of 4, 5, or 6
  * `Annotated[list, Len(8, 8)]` - list must have a length of exactly 8



  * `min_inclusive` has been renamed to `min_length`, no change in meaning
  * `max_exclusive` has been renamed to `max_length`, upper bound is now **inclusive** instead of **exclusive**
  * The recommendation that slices are interpreted as `Len` has been removed due to ambiguity and different semantic
    meaning of the upper bound in slices vs. `Len`

  See [issue #23](https://github.com/annotated-types/annotated-types/issues/23) for discussion.



  `Timezone` can be used with a `datetime` or a `time` to express which timezones
  are allowed. `Annotated[datetime, Timezone(None)]` must be a naive datetime.
  `Timezone[...]` ([literal ellipsis](https://docs.python.org/3/library/constants.html#Ellipsis))
  expresses that any timezone-aware datetime is allowed. You may also pass a specific
  timezone string or [`tzinfo`](https://docs.python.org/3/library/datetime.html#tzinfo-objects)
  object such as `Timezone(timezone.utc)` or `Timezone("Africa/Abidjan")` to express that you only
  allow a specific timezone, though we note that this is often a symptom of fragile design.



  * `Timezone` accepts [`tzinfo`](https://docs.python.org/3/library/datetime.html#tzinfo-objects) objects instead of
    `timezone`, extending compatibility to [`zoneinfo`](https://docs.python.org/3/library/zoneinfo.html) and third party libraries.



  `Unit(unit: str)` expresses that the annotated numeric value is the magnitude of
  a quantity with the specified unit. For example, `Annotated[float, Unit("m/s")]`
  would be a float representing a velocity in meters per second.

  Please note that `annotated_types` itself makes no attempt to parse or validate
  the unit string in any way. That is left entirely to downstream libraries,
  such as [`pint`](https://pint.readthedocs.io) or
  [`astropy.units`](https://docs.astropy.org/en/stable/units/).

  An example of how a library might use this metadata:

  ```python
  from annotated_types import Unit
  from typing import Annotated, TypeVar, Callable, Any, get_origin, get_args


  Meters = Annotated[float, Unit("m")]




  T = TypeVar("T")
  def cast_unit(tp: Any, unit_cls: Callable[[str], T]) -> T | None:
      if get_origin(tp) is Annotated:
          for arg in get_args(tp):
              if isinstance(arg, Unit):
                  return unit_cls(arg.unit)
      return None



  import pint
  pint_unit = cast_unit(Meters, pint.Unit)



  import astropy.units as u
  astropy_unit = cast_unit(Meters, u.Unit)
  ```



  `Predicate(func: Callable)` expresses that `func(value)` is truthy for valid values.
  Users should prefer the statically inspectable metadata above, but if you need
  the full power and flexibility of arbitrary runtime predicates... here it is.

  For some common constraints, we provide generic types:

  * `IsLower       = Annotated[T, Predicate(str.islower)]`
  * `IsUpper       = Annotated[T, Predicate(str.isupper)]`
  * `IsDigit       = Annotated[T, Predicate(str.isdigit)]`
  * `IsFinite      = Annotated[T, Predicate(math.isfinite)]`
  * `IsNotFinite   = Annotated[T, Predicate(Not(math.isfinite))]`
  * `IsNan         = Annotated[T, Predicate(math.isnan)]`
  * `IsNotNan      = Annotated[T, Predicate(Not(math.isnan))]`
  * `IsInfinite    = Annotated[T, Predicate(math.isinf)]`
  * `IsNotInfinite = Annotated[T, Predicate(Not(math.isinf))]`

  so that you can write e.g. `x: IsFinite[float] = 2.0` instead of the longer
  (but exactly equivalent) `x: Annotated[float, Predicate(math.isfinite)] = 2.0`.

  Some libraries might have special logic to handle known or understandable predicates,
  for example by checking for `str.isdigit` and using its presence to both call custom
  logic to enforce digit-only strings, and customise some generated external schema.
  Users are therefore encouraged to avoid indirection like `lambda s: s.lower()`, in
  favor of introspectable methods such as `str.lower` or `re.compile("pattern").search`.

  To enable basic negation of commonly used predicates like `math.isnan` without introducing introspection that makes it impossible for implementers to introspect the predicate we provide a `Not` wrapper that simply negates the predicate in an introspectable manner. Several of the predicates listed above are created in this manner.

  We do not specify what behaviour should be expected for predicates that raise
  an exception.  For example `Annotated[int, Predicate(str.isdigit)]` might silently
  skip invalid constraints, or statically raise an error; or it might try calling it
  and then propagate or discard the resulting
  `TypeError: descriptor 'isdigit' for 'str' objects doesn't apply to a 'int' object`
  exception.  We encourage libraries to document the behaviour they choose.



  `doc()` can be used to add documentation information in `Annotated`, for function and method parameters, variables, class attributes, return types, and any place where `Annotated` can be used.

  It expects a value that can be statically analyzed, as the main use case is for static analysis, editors, documentation generators, and similar tools.

  It returns a `DocInfo` class with a single attribute `documentation` containing the value passed to `doc()`.

  This is the early adopter's alternative form of the [`typing-doc` proposal](https://github.com/tiangolo/fastapi/blob/typing-doc/typing_doc.md).



  Implementers may choose to provide a convenience wrapper that groups multiple pieces of metadata.
  This can help reduce verbosity and cognitive overhead for users.
  For example, an implementer like Pydantic might provide a `Field` or `Meta` type that accepts keyword arguments and transforms these into low-level metadata:

  ```python
  from dataclasses import dataclass
  from typing import Iterator
  from annotated_types import GroupedMetadata, Ge

  @dataclass
  class Field(GroupedMetadata):
      ge: int | None = None
      description: str | None = None

      def __iter__(self) -> Iterator[object]:
          
          
          
          if self.ge is not None:
              yield Ge(self.ge)
          if self.description is not None:
              yield Description(self.description)
  ```

  Libraries consuming annotated-types constraints should check for `GroupedMetadata` and unpack it by iterating over the object and treating the results as if they had been "unpacked" in the `Annotated` type.  The same logic should be applied to the [PEP 646 `Unpack` type](https://peps.python.org/pep-0646/), so that `Annotated[T, Field(...)]`, `Annotated[T, Unpack[Field(...)]]` and `Annotated[T, *Field(...)]` are all treated consistently.

  Libraries consuming annotated-types should also ignore any metadata they do not recongize that came from unpacking a `GroupedMetadata`, just like they ignore unrecognized metadata in `Annotated` itself.

  Our own `annotated_types.Interval` class is a `GroupedMetadata` which unpacks itself into `Gt`, `Lt`, etc., so this is not an abstract concern.  Similarly, `annotated_types.Len` is a `GroupedMetadata` which unpacks itself into `MinLen` (optionally) and `MaxLen`.



  We intend to not be prescriptive as to _how_ the metadata and constraints are used, but as an example of how one might parse constraints from types annotations see our [implementation in `test_main.py`](https://github.com/annotated-types/annotated-types/blob/f59cf6d1b5255a0fe359b93896759a180bec30ae/tests/test_main.py#L94-L103).

  It is up to the implementer to determine how this metadata is used.
  You could use the metadata for runtime type checking, for generating schemas or to generate example data, amongst other use cases.



  This package was designed at the PyCon 2022 sprints by the maintainers of Pydantic
  and Hypothesis, with the goal of making it as easy as possible for end-users to
  provide more informative annotations for use by runtime libraries.

  It is deliberately minimal, and following PEP-593 allows considerable downstream
  discretion in what (if anything!) they choose to support. Nonetheless, we expect
  that staying simple and covering _only_ the most common use-cases will give users
  and maintainers the best experience we can. If you'd like more constraints for your
  types - follow our lead, by defining them and documenting them downstream!


pkgId: c6f7424fcb147e1e9206218e60a0b2a426ea1a6d757e47a636410a844303c0cb
name: python-annotation-tool
arch: src
version: 0.10.0
epoch: 0
release: 1
summary: Tool for annotating time series data from sources such as IMUs, MoCap, Videos and more.
url: https://github.com/TUD-Patrec/annotation-tool
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annotation-tool-0.10.0-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

  ![PyPI - Version](https://img.shields.io/pypi/v/annotation-tool)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/annotation-tool)
  ![PyPI - License](https://img.shields.io/pypi/l/annotation-tool?color=brightgreen)
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/annotation-tool)

  </div>



  All stable versions can be installed from [PyPI] by using [pip] or your favorite package manager

      pip install annotation-tool

  You can get pre-published versions from [TestPyPI] or this repository

  **Test PyPI:**

      pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ annotation-tool

  **From Source:**

      pip install git+https://github.com/TUD-Patrec/annotation-tool@master

  After installation the annotation tool can be run as simple as

      annotation-tool



  **Requirements:**
  - Python 3.8 or higher
  - [poetry] 1.2 or higher
  - [make]
  - [docker] (if you want to build the binaries)

  For installing the development environment run

  ```bash
  make setup
  ```

  [docker]: https://www.docker.com/
  [make]: https://www.gnu.org/software/make/
  [pip]: https://pypi.org/project/pip/
  [poetry]: https://python-poetry.org/
  [pypi]: https://pypi.org/
  [testpypi]: https://test.pypi.org/project/annotation-tool/


pkgId: 7dd239df9c8b9d7289810728188a05b86f9280babf43772cb966f75dc1a99f88
name: python-annotell-auth
arch: src
version: 2.0.1
epoch: 0
release: 1
summary: Annotell Authentication
url: https://github.com/annotell/annotell-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annotell-auth-2.0.1-1.src.rpm
checksum_type: sha256
description:
  Python 3 library providing foundations for Annotell Authentication
  on top of the `requests` or `httpx` libraries.

  Install with `pip install annotell-auth[requests]` or `pip install annotell-auth[httpx]`

  Builds on the standard OAuth 2.0 Client Credentials flow. There are a few ways to provide auth credentials to our api
   clients. Annotell Python clients such as in `annotell-input-api` accept an `auth` parameter that
    can be set explicitly or you can omit it and use environment variables.

  There are a few ways to set your credentials in `auth`.
  1. Set the environment variable `ANNOTELL_CREDENTIALS` to point to your Annotell Credentials file.
  The credentials will contain the Client Id and Client Secret.
  2. Set to the credentials file path like `auth="~/.config/annotell/credentials.json"`
  3. Set environment variables `ANNOTELL_CLIENT_ID` and`ANNOTELL_CLIENT_SECRET`
  4. Set to credentials tuple `auth=(client_id, client_secret)`

  API clients such as the `InputApiClient` accept this `auth` parameter.

  Under the hood, they commonly use the AuthSession class which is implements a `requests` session with automatic token
   refresh. An `httpx` implementation is also available.
  ```python
  from annotell.auth.requests.auth_session import RequestsAuthSession

  sess = RequestsAuthSession()


  sess.get("https://api.annotell.com")
  ```




  Refactor for backend separation, with optional dependencies for either `httpx` or `requests`.


  - Initial support for httpx (BETA). Solves refresh token expiry by reset without the `FaultTolerantAuthRequestSession`
  - The library will be refactored by a breaking 2.0 release, and make the same changes to the requests version.
  The `authsession` module backed by `requests` is untouched for now.


  - Fix compatibility issue with authlib >= 1.0.0. Resetting the auth session failed, when the refresh token had expired.


  - Expose underlying `requests.Session` on `FaultTolerantAuthRequestSession`
  - Fix some thread locks


  - Add `FaultTolerantAuthRequestSession` that handles token refresh on long running sessions.


  - Add support for `auth` parameter, with path to credentials file or `AnnotellCredentials` object
  - Drop support for legacy API token


pkgId: 2c2dade2ce7414fd927d8ad868f63fcda68d8cbf4f59a0457a0adccd20b8cf6b
name: python-annotell-input-api
arch: src
version: 1.3.1
epoch: 0
release: 1
summary: Annotell Input Api Client
url: https://github.com/annotell/annotell-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annotell-input-api-1.3.1-1.src.rpm
checksum_type: sha256
description:
  Python 3 library providing access to Annotell Input API

  To install with pip run `pip install annotell-input-api`



  Documentation about how to use the library can be found [here](https://annotell.github.io/annotell-python/)



  All notable changes to this project will be documented in this file.




  - Changed naming in PrincipalPointDistortionCalibration




  - Added PrincipalPointDistortionCalibration





  - Fixed error when using deprecated calibration model `annotell.input_api.model.calibration.sensors.LidarCalibration`
      - We encourage updating to use the newer, typed calibration models in `annotell.input_api.model.calibration.{camera, lidar}.*`,
        [refer to the calibration documentation for details](https://annotell.github.io/annotell-python/docs/input-api/calibration/).





  - Changed from `internalId` to `sceneUuid` on initialize input



  - Fixed error when using deprecated calibration model `annotell.input_api.model.calibration.sensors.CameraCalibration`
      - We encourage updating to use the newer, typed calibration models in `annotell.input_api.model.calibration.{camera, lidar}.*`,
        [refer to the calibration documentation for details](https://annotell.github.io/annotell-python/docs/input-api/calibration/).





  - Fix bug where not specifying feature flags led to a runtime error.





  - Feature flags can be specified when creating inputs. This can be used to disable motion compensation.





  - Ability to specify field of view on LIDAR sensor calibrations.




  - Ability to create inputs from a scene
  - Ability to create pre-annotations (limited support)




  - `annotell-base-clients` is now a dependency for `annotell-input-api`, used for http requests and file uploads
  - The generator produced by `client.annotation.get_project_annotations` will now reliably iterate projects with thousands of annotations


  - Include `annotation_types` in `Input`
  - Method to remove annotation types from an input: `remove_annotation_types`




  - Added 'archived' as ProjectBatchStatus





  - MetaDataContainer added with reserved keyword `region`.
  - Added ImageMetaData for shutter start and end times, used for high accuracy multi-sensor projections




  - Fixed download of annotations





  - Refactor of `file_resource_client.py`, split upload and download into separate classes.



  - New parameter `timeout` to `InputApiClient`, which decides what the timeout in seconds is for calls to Annotell API:s and Google Cloud Storage.
  - Retries when a `ConnectionError` is raised during uploading/downloading of resources to/from Google Cloud Storage.
  - New input status `Pending`. An input will have this status if the input has been validated, but the server is waiting for the associated data to
    be uploaded. When all data is uploaded the status of the input will change to `Processing`.





  - Fixed import statement to work with python < 3.9





  - Two new methods has been added for downloading annotations: `client.annotation.get_annotation` and `client.annotation.get_project_annotations`. These two methods will serve annotations
    in the OpenLABEL format. With this change the previous method for fetching annotations,
    `client.annotation.get_annotations` has become deprecated.

  - Stricter typing for the calibrations, specifically the camera calibrations. Each of the supported camera calibration models now have their own class in `annotell.input_api.model.calibration.camera`. Documentation regarding use can be found here: [Documentation](https://annotell.github.io/annotell-python/docs/input-api/calibration)
  - Field of View support for camera calibrations
  - New Parameter Xi for Fisheye camera calibration model



  - Two constructor arguments in `InputApiClient` and `FileResourceClient` have been renamed from `max_upload_retry_attemps`, `max_upload_retry_wait_time`
    to `max_retry_attempts`, `max_retry_wait_time` respectively.

  - The old camera calibration class will be deprecated in favour of the new classes





  - A new method has been added, `get_inputs_with_uuids`, which can fetch inputs using only the `input_uuid`.
  - `annoutil` has a new flag when fetching inputs, `annoutil inputs --uuids <comma_separated_uuids>`.
  - `lidars` and `lidars_sequence` inputs now available through the client.
  - A new method has been added, `add_annotation_type`, which adds additional annotation types to be performed for an input.



  - `client.calibration.get_calibration()` now properly deserializes calibration into `SensorCalibrationEntry` instead of keeping it as a dict.





  - `created` timestamp when querying `get_inputs`
  - Method `get_annotation_types`



  - `input_list_id` replaced with `annotation_types` for all createable resources (`Cameras`, `CamerasSeq`, `LidarsAndCameras`, `LidarsAndCamerasSeq`).





  - `calibration_id` now available for created inputs via the `client.input.get_inputs` method.
  - It is now possible to create your project batches on your own using the
    `client.project.create_batch` method. Please contact Annotell's Professional Services
    before using. More information available in the [documentation](https://annotell.github.io/annotell-python/).





  - Changed the height/width in the unity calibration created in the examples to match the image/videos.
  - Added new field in the Input class, view_link. If the Input was successfully created it will contain an URL to view the input in the Annotell app.



  - Fixed issue where `invalidate_inputs` did not properly discard response content.





  - Added support for providing metadata in the form of a flat KV-pair both on an input-level for all input types, as well as on a frame-level for all sequential input types.



  - Made SensorSpecification Optional for all input types



  - Removed sensor_settings from SensorSpecification. The pixel dimensions are now
    automatically inferred from videos and images.





  - Added an example for download_annotations
  - Added check so that `input_list_id` and `project` is not used simultaneously when creating inputs



  - Made client and file_client internal
  - Fixed bug where client sometimes didn't raise exception when http calls return error codes
  - Bugfix where annoutil didn't work due to missing import
  - Clarified examples with different images/videos for different sensors and frames.



  - Removed unnecessary parameters `frame_id` and `relative_timestamp` from `lidars_and_cameras`



  - Use backport of `dataclasses` to support python 3.6.



  - New major release of client. Reworked to be more internally consistent between input types, and use of project and batch identifiers across methods. See [docs](https://annotell.github.io/annotell-python/) for more info.
  - `client.lidar_and_cameras.create` replaces `client.create_inputs_point_cloud_with_images`
  - `client.cameras.create` replaces `client.upload_and_create_images_input_job`
  - `client.annotations.get_annotations` replaces `client.download_annotations`



  - Remove unused dependency on annotell-cloud-storage



  - Fixed import bug in annoutil CLI tool.





  - Changed url for the `get_calibration_data` method. Does not affect
    usage of the method in any way.





  - Removed unused property `deadline` from project





  - Renamed method `upload_and_create_images_input_job` to `create_inputs_images`.
  - Renamed method `list_projects` to `get_projects`.
  - Renamed method `list_project_batches` to `get_project_batches`.
  - Changed behaviour of method `download_annotations`. The previously optional argumnet `request_id` has been removed. Additionally, the return
    signature is changed to return a list of annotations for each input, instead of a dict as before.
  - Behaviour of `get_inputs` has changed. It now receives `project` (identifier, not numerical id anymore), as well as three optional parameters `batch`, `external_ids` and `include_invalidated`. Returns all inputs belonging to the project, with the option of filtering on batch, external ID and whether or not including invalidated inputs. The returned list of classes had additional fields describing which batch each input belongs to, as well as their status (`created`, `processing`, `failed`, `invalidated`).
  - Changed name of argument `input_ids` to `input_internal_ids` for method `invalidate_inputs`.
  - Use backport of `dataclasses` to support python 3.6.
  - Add missing dependency on `python-dateutil`.



  - Methods `count_inputs_for_external_ids`, `get_internal_ids_for_external_ids`, `mend_input_data`, `remove_inputs_from_input_list`, `list_input_lists`, `publish_batch`, `get_requests_for_request_ids`, `get_requests_for_input_lists`, `get_input_status`, `get_input_jobs_status`, `get_requests_for_project_id`, `get_datas_for_inputs_by_internal_ids` and `get_datas_for_inputs_by_external_ids` have all been removed.





  - Removed getting started documentation from `README.md` and instead link to new docs.





  - Deserialization bugfix in models for `InputBatch` and `InputBatch`.





  - Minor fix in annoutil





  - Bump of required python version to >=3.7
  - New explicit models for `lidar` and `camera calibration` added.
  - `publish_batch` which accepts project identifier and batch identifier and marks the batch as ready for annotation.



  - Deprecation warning for the old `lidar` and `camera calibration` models. No other change in functionality.





  - `get_inputs` which accepts a project ID or project identifier (external ID) and returns inputs connected to the project. `invalidated` filter parameter to optionally filter only invalidated inputs. Also exposed in annoutil as `annoutil projects 1 --invalidated`.



  - `invalidate_inputs` now accepts annotell `internal_ids (UUID)` instead of Annotell specific input ids.





  - bug fix related to oauth session





  - SLAM - add cuboid timespans, `dynamic_objects` not includes both `cuboids` and `cuboid_timespans`





  - Add support for `project` and `batch` identifiers for input request.
    Specifying project and batch adds input to specified batch.
    When only sending project, inputs are added to the latest open batch for the project.



  - `input_list_id` will be removed in the 0.4.x version





  - SLAM - add required `sub_sequence_id` and optional `settings`





  - SLAM - add required `sequence_id`





  - SLAM - startTs and endTs not optional in Slam request





  - If the upload of point clouds or images crashes and returns status code 429, 408 or 5xx the script will
    retry the upload before crashing. The default settings may be changed when initializing the `InputApiClient`
    by specifying values to the `max_upload_retry_attempts` and `max_upload_retry_wait_time` parameters.





  - The method `create_inputs_point_cloud_with_images` in `InputApiClient` now takes an extra parameter: `dryrun: bool`.
    If set to `True` all the validation checks will be run but no inputJob will be created, and
    if it is set to `False` an inputJob will be created if the validation checks all pass.



  - Fixed bug where the uploading of .csv files to GCS crashed if run on some windows machines.





  - New public method in `InputApiClient`: `count_inputs_for_external_ids`.





  - Docstrings for all public methods in the `InputApiClient` class





  - Require time specification to be send when posting slam requests





  - Removed `CalibrationSpec` from `CalibratedSceneMetaData` and `SlamMetaData`. Updated
    so that `create_calibration_data` in `InputApiClient` only takes a `CalibrationSpec`
    as parameter.





  - Fixed issue where a path including a "~" would not expand correctly.





  - Changed pointcloud_with_images model. Images and point clouds are now represented as `Image` and `PointCloud` containing filename and source. Consequently, `images_to_source` is removed from `SourceSpecification`.



  - create Image inputs via `create_images_input_job`
  - It's now possible to invalidate erroneous inputs via `invalidate_inputs`
  - Support for removing specific inputs via `remove_inputs_from_input_list`
  - SLAM support (not generally available)



  - Fixed issue where annoutils would not deserialize datas correctly when querying datas by internalId





  - Changed how timestamps are represented when receiving responses.





  - Methods `get_datas_for_inputs_by_internal_ids` and `get_datas_for_inputs_by_external_ids` can be used to get which `Data` are part of an `Input`, useful in order to check which images, lidar-files have been uploaded. Both are also available in the CLI via :

  ```console
  $ annoutil inputs --get-datas <internal_ids>
  $ annoutil inputs-externalid --get-datas <external_ids>
  ```

  - Support has been added for `Kannala` camera types. Whenever adding calibration for `Kannala` undistortion coefficients must also be added.
  - Calibration is now represented as a class and is no longer just a dictionary, making it easier to understand how the Annotell format is structured and used.





  - Change constructor to disable legacy api token support and only accept an `auth` parameter





  - Method `get_input_jobs_status` now accepts lists of internal_ids and external_ids as arguments.


pkgId: 418b479ad667187bd86c2d7ba9a11c1fccd57515cfea1f3751d762c3733be602
name: python-annotell-openlabel
arch: src
version: 0.1.4
epoch: 0
release: 1
summary: Annotell OpenLABEL Datamodel
url: https://github.com/annotell/annotell-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annotell-openlabel-0.1.4-1.src.rpm
checksum_type: sha256
description:
  Install the Annotell OpenLABEL package from pip with

      pip install annotell-openlabel



  Since all models inherit from `pydantic`'s `BaseModel`, serialization and deserialization from dicts or json strings are relatively straight forward.

  ```py
  data = {
      "openlabel": {
          "metadata": {
              "schema_version": "1.0.0"
          }
      }
  }

  import annotell.openlabel.models as OLM


  openlabel_annotation = OLM.OpenLabelAnnotation.parse_obj(data)


  json_data = openlabel_annotation.json(exclude_none=True)


  openlabel_annotation = OLM.OpenLabelAnnotation.parse_raw(json_data)


  dict_data = openlabel_annotation.dict(exclude_none=True)
  ```


  https://www.asam.net/project-detail/asam-openlabel-v100/



  - Improved serializability for enum classes


  - Fixed issues with version 0.1.2


  - Updated several fields with multiple types to fix issues with serialization and deserialization.
  For example, the coordinates on `Poly2d` objects were previously always parsed to strings.
    This update means that an attempt to parse them to floats is made. If this fails the they will be parsed to strings.


  - Updated stream properties model generation to be nicer to work with


  - Updated json schema and model to be true to the 1.0.0 release of openlabel. Previously it was based on the release-candidate


pkgId: 0d7a8a249fa8bdd687c14b8b6004cdd017daeda83078e0be013dc9cf5e6a5b47
name: python-annotrack
arch: src
version: 0.0.3
epoch: 0
release: 1
summary: napari plugin for annotating tracks to estimate error rates
url: https://github.com/abigailmcgovern/annotrack
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annotrack-0.0.3-1.src.rpm
checksum_type: sha256
description:
  Annotrack is a napari plugin for annotating errors in object trajectories. The plugin will help you take a sample of track segments along with a small section of corresponding image and segmentation. Annotrack allows you to annotate three types of errors: (1) ID swap errors (track jumps between objects), (2) false starts (track starts on a pre-existing object) and false terminations (track ends but object still exists). By looking at the combined rates of false starts and false terminations you can assess track discontinutation errors.

  **Please note:** Images and segmentations must be in zarr format. Tracks should be in parquet format.



  There are three main ways to install annotrack:


  *Please note that this is planned/under development*

  Type the following into your terminal (MacOS or Ubuntu) or annaconda prompt (windows):

  ```bash
  pip install annotrack
  ```


  *Please note that this is planned/under development*

  Type the following into your terminal (MacOS or Ubuntu) or annaconda prompt (windows):

  ```bash
  install napari
  napari
  ```

  Once napari has opened (this may take a second the first time you open it), go to the pannel at the top of the screen and select the 'plugins' dropdown. Then select install/uninstall plugins. A new window will open showing available plugins. Either scroll down to or search 'annotrack' and click 'install'.


  *please use this for now*

  Type the following into your terminal (MacOS or Ubuntu) or annaconda prompt (windows):

  ```bash
  git clone https://github.com/AbigailMcGovern/annotrack.git
  cd annotrack
  pip install .
  ```


  Once annotrack is properly installed you will be able to open annotrack by opening napari. You can open napari through the command line (terminal (MacOS or Ubuntu) or annaconda prompt (windows)) as follows:

  ```bash
  napari
  ```

  You can find the annotrack widgets by selecting the dropdown 'plugins' at the pannel at the top of the screen and hovering over 'annotrack'.



  To sample your tracks you will need to supply the file paths for the images, segmentations, and tracks. You supply this in a csv that is structured as shown below:

   ![csv_structure widget](https://github.com/AbigailMcGovern/annotrack/blob/main/media/csv_structure.png)

  In this csv, you may also specify how many samples are to be taken from each file. If this is not provided, annotrack will use the value you supply to the `sample_from_csv` widget. The csv must contain a column that specifies a category to which each sample belongs (e.g., species, experimental condition, drug, etc.).  If this isnt important for your samples, just add a dummy category (e.g., sample_type : [A, A, A, A]).

  To access the widget and sample track segments, go to the top of the screen, go to **plugins > annotrack > sample_from_csv**. When the widget is displayed, select the csv file, select a directory into which to save results, and proivide a name for the summary data file (i.e., where your annotations will be written).

   ![sample_from_csv widget](https://github.com/AbigailMcGovern/annotrack/blob/main/media/sample_from_csv.png)


  - **path to csv**:
          The path storing the info from which to generate the samples.
          The CSV should have the columns: image_path, labels_path, tracks_path, <category_col>,
          You can also add an optional n_samples column if you would like to
          specify how many samples to take from each individual file. Otherwise,
          the default "n_samples" you've supplied will be used.
  - **output dir**:
          Where will the output be saved?
  - **output name**:
          What will output summary files/directories be called?
  - **n samples**:
          How many samples to be obtained from each file. Will be overwritten
          if there is a valid integer number in the n_samples colum of the csv.
  - **tzyx cols**:
          What are the names of the columns denoting time (in frames) and coordinate
          positions (in pixels) in the file containing tracks? The order should be:
          t, z, y, x.
  - **id col**:
          What is the name of the column denoting the specific ID for each tracked
          object?
  - **scale**:
          size of pixels (e.g., in um) for the z, y, and x coordinates (in that
          order)
  - **frames**:
          Approximate maximum number of frames of track segment.
          Max frames = frames (if even) or frames - 1 (if odd)
  - **box size**:
          Approximate size of bounding box (in pixels).
  - **min track len**:
          You can set a minimum track len to include in the search.
          This can help to eliminate less useful data. This should be at least 1 to only include tracked objects. Set higher only if you are specifically interested in longer lived tracks.
  - **image channel**:
          This denotes the index of the channel from which to get
          image data (0: channel 1, 1: channel 2, 2: channel 3, 3: channel 4)



  In the case that we are annotating multiple conditions to compare, we want to show them in the one session in randomised order with the annotator blinded to where the sample has originated from. We want to be able to annotated unannotated data from the sample without having the burden of having to do this all at once. The annotations are therefore saved into the saved sample. A selected number of samples saved from the various tracking experiments can be annotated using the following code. If you re-execute this code, you will only be shown not yet annotated data, unless you request otherwise.

  Keys to navagate and annotate samples
  - '2' - move to next sample
  - '1' - move to previous sample
  - 'y' - annotate as correct (will move to the next sample automatically)
  - 'n' - annotate as containing an error (will move to the next sample automatically)
  - 'i' - annotate the frame following a ID swap error
  - 't' - annotate the fame following an incorrect termination
  - 'Shift-t' - annotate the frame containing a false start error
  - 's' - annotate an error ('i', 't', or 'Shift-t') as being associated with a segmentation error (merge or split of objects)

  When an error is associated the specific frame ('i', 't', 'Shift-t', or 's'), the frame number (within the original image) will be added to a list of errors for the sample within the sample's (.smpl) info data frame. E.g., you may have a list of ID swaps for your sampled track segment (`[108, 111, 112]`) and a corresponding list of segmentation error associations (`[108, 112]`).


  If you have already saved a sample and want to annotate it, you can load the sample data using the `annotate_existing_sample` widget. This might be useful if you want to have several annotators annotate the same sample. To access this widget, open napari

   ![annotate_existing_sample widget](https://github.com/AbigailMcGovern/annotrack/blob/main/media/annotate_existing_sample.png)



  **User support:** If you have an issue with annotrack please add an issue (go to the Issues tab at the top of the GitHub page). If your issue is a bug, please include as much information as possible to help debug the problem. Examples of information include: details about the image and segmentation data (dimensions), number of images, number of samples you are trying to take. If you are requesting an improvement, try to be as clear as possible about what you need.

  **Contributing:** If you want to contribute to annotrack, please fork the repo and if you want to make changes make a pull request with as much detail about the change as possible. Please ensure any changes you want to make don't break the existing functions.


pkgId: f400ca12048b18939c9c86754aec3bb3805c3de04a40214528a8403e00880d34
name: python-annotypes
arch: src
version: 0.21
epoch: 0
release: 1
summary: Annotating type hints and comments with extra metatdata
url: https://github.com/dls-controls/annotypes
rpm_license: APACHE
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annotypes-0.21-1.src.rpm
checksum_type: sha256
description:
  |build_status| |coverage| |pypi_version|
  Adding annotations to Python types while still being compatible with mypy_ and PyCharm_
  You can write things like:
      from annotypes import Anno, WithCallTypes
      with Anno("The exposure time for the camera"):
          AExposure = float
      with Anno("The full path to the text file to write"):
          APath = str
      class Simple(WithCallTypes):
          def __init__(self, exposure, path="/tmp/file.txt"):
              
              self.exposure = exposure
              self.path = path
  or the Python3 alternative:
      from annotypes import Anno, WithCallTypes
      with Anno("The exposure time for the camera"):
          AExposure = float
      with Anno("The full path to the text file to write"):
          APath = str
      class Simple(WithCallTypes):
          def __init__(self, exposure: AExposure, path: APath = "/tmp/file.txt"):
              self.exposure = exposure
              self.path = path
  And at runtime see what you should pass to call it and what it will return:
      >>> from annotypes.py2_examples.simple import Simple
      >>> list(Simple.call_types)
      ['exposure', 'path']
      >>> Simple.call_types['exposure']
      Anno(name='AExposure', typ=<type 'float'>, description='The exposure time for the camera')
      >>> Simple.return_type
      Anno(name='Instance', typ=<class 'annotypes.py2_examples.simple.Simple'>, description='Class instance')
  For more examples see the `Python 2 examples`_ or `Python 3 examples`_.


pkgId: 7b67da9f60bd51027335670bd1803d0ccbdaab6d803644e57de50098d4f5a8d7
name: python-annoworkcli
arch: src
version: 3.8.3
epoch: 0
release: 1
summary: AnnoworkのCLI(Command Line Interface)
url: https://github.com/kurusugawa-computer/annowork-cli
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annoworkcli-3.8.3-1.src.rpm
checksum_type: sha256
description:
  AnnoworkのCLIです。


  [![Build Status](https://app.travis-ci.com/kurusugawa-computer/annowork-cli.svg?branch=main)](https://app.travis-ci.com/kurusugawa-computer/annowork-cli)
  [![CodeQL](https://github.com/kurusugawa-computer/annowork-cli/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/kurusugawa-computer/annowork-cli/actions/workflows/codeql-analysis.yml)
  [![PyPI version](https://badge.fury.io/py/annoworkcli.svg)](https://badge.fury.io/py/annoworkcli)
  [![Python Versions](https://img.shields.io/pypi/pyversions/annoworkcli.svg)](https://pypi.org/project/annoworkcli/)
  [![Documentation Status](https://readthedocs.org/projects/annowork-cli/badge/?version=latest)](https://annowork-cli.readthedocs.io/ja/latest/?badge=latest)



  * Python3.9+



  ```
  $ pip install annoworkcli
  ```









  `$HOME/.netrc`ファイルに以下を記載する。

  ```
  machine annowork.com
  login annowork_user_id
  password annowork_password
  ```



  * 環境変数`ANNOWORK_USER_ID` , `ANNOWORK_PASSWORD`


  `annoworkcli annofab`コマンドはannofabのwebapiにアクセスするため、annofabのwebapiの認証情報を指定する必要があります。
  * 環境変数`ANNOFAB_USER_ID` , `ANNOFAB_PASSWORD`または`ANNOFAB_PAT`






  ```

  $ annoworkcli actual_working_time list_daily --workspace_id foo \
   --start_date 2022-05-01 --end_date 2022-05-10 --output out.csv

  $ cat out.csv
  date,job_id,job_name,workspace_member_id,user_id,username,actual_working_hours,notes
  2022-05-02,5c39a2e8-90dd-4f20-b0a6-39d7f5129e3d,MOON,52ff73fb-c1d6-4ad6-a185-64386ee7169f,alice,Alice,11.233333333333334,
  2022-05-02,5c39a2e8-90dd-4f20-b0a6-39d7f5129e3d,MARS,c66acd58-c893-4908-bdcc-1414978bf06b,bob,Bob,8.0,

  ```








  https://github.com/kurusugawa-computer/annowork-cli/blob/main/README_for_developer.md


pkgId: 76b3d42b943616c4f348f1fef276297a33cf693c8e45ab5e3c7ae1dd688c7eee
name: python-annsel
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: A Narwhals powered DataFrame-style selection, filtering and indexing operations on AnnData Objects.
url: https://github.com/srivarra/annsel
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annsel-0.0.1-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

  |             |                                                                                                                                                           |
  | :---------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------: |
  | **Status**  | [![Build][badge-build]][link-build] [![Tests][badge-test]][link-test] [![Documentation][badge-docs]][link-docs] [![codecov][badge-codecov]][link-codecov] |
  |  **Meta**   |     [![Hatch project][badge-hatch]][link-hatch] [![Ruff][badge-ruff]][link-ruff] [![uv][badge-uv]][link-uv] [![License][badge-license]][link-license]     |
  | **Package** |                                       [![PyPI][badge-pypi]][link-pypi] [![PyPI][badge-python-versions]][link-pypi]                                        |
  |             |                                                                                                                                                           |

  </div>

  [badge-build]: https://github.com/srivarra/annsel/actions/workflows/build.yaml/badge.svg
  [badge-test]: https://github.com/srivarra/annsel/actions/workflows/test.yaml/badge.svg
  [badge-docs]: https://img.shields.io/readthedocs/annsel?logo=readthedocs
  [badge-codecov]: https://codecov.io/gh/srivarra/annsel/graph/badge.svg?token=ST0ST1BTWU
  [badge-ruff]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
  [badge-uv]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json
  [badge-license]: https://img.shields.io/badge/License-MIT-yellow.svg
  [badge-hatch]: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg
  [badge-pypi]: https://img.shields.io/pypi/v/annsel.svg?logo=pypi&label=PyPI&logoColor=gold
  [badge-python-versions]: https://img.shields.io/pypi/pyversions/annsel.svg?logo=python&label=Python&logoColor=gold

  `annsel` brings familiar DataFrame-style operations to [`AnnData`](https://anndata.readthedocs.io/en/latest/) objects, making filtering and selection intuitive and straightforward. Built on the [narwhals][link-narwhals] library, it provides a seamless interface for manipulating complex biological datasets stored in `AnnData` format.



  Please refer to the [documentation][link-docs],
  in particular, the [API documentation][link-api].



  You need to have Python 3.10 or newer installed on your system. If you don't have
  Python installed, we recommend installing [uv][link-uv].
  There are several alternative options to install `annsel`:

  1. Install the latest development version:

      With `pip`:

      ```zsh
      pip install git+https://github.com/srivarra/annsel.git@main
      ```

      With `uv`:

      ```zsh
      uv add git+https://github.com/srivarra/annsel
      ```



  See the [changelog][changelog].



  For questions and help requests, you can reach out in the [scverse discourse][scverse-discourse] or the [discussions] tab.
  If you found a bug, please use the [issue tracker][issue-tracker].



  > t.b.a

  [scverse-discourse]: https://discourse.scverse.org/
  [issue-tracker]: https://github.com/srivarra/annsel/issues
  [changelog]: https://annsel.readthedocs.io/latest/changelog.html
  [link-docs]: https://annsel.readthedocs.io
  [link-api]: https://annsel.readthedocs.io/en/latest/api.html
  [link-pypi]: https://pypi.org/project/annsel
  [link-codecov]: https://codecov.io/gh/srivarra/annsel
  [link-test]: https://github.com/srivarra/annsel/actions/workflows/test.yml
  [link-build]: https://github.com/srivarra/annsel/actions/workflows/build.yaml
  [link-ruff]: https://github.com/astral-sh/ruff
  [link-uv]: https://github.com/astral-sh/uv
  [link-license]: https://opensource.org/licenses/MIT
  [link-hatch]: https://github.com/pypa/hatch
  [link-narwhals]: https://github.com/narwhals-dev/narwhals
  [link-disucssions]: https://github.com/srivarra/annsel/discussions

rpm_license:
  MIT License  Copyright (c) 2024, Sricharan Reddy Varra  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: 74e4195bbfb701c35244748cdddde66a64a33de5e7de766b60baf5606f326764
name: python-annuvce2
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: A collection of educational ML and ANN functions
url: https://github.com/Ganesh57803/annuvce2
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-annuvce2-0.1.2-1.src.rpm
checksum_type: sha256
description:
  - [Installation](#installation)
  - [Features](#features)
  - [Usage](#usage)
  - [Examples](#examples)
  - [Contributing](#contributing)


pkgId: 78aa742bb6000bed37a88230a39e98577e393d151c0eb3318e55c239485e509d
name: python-anodb
arch: src
version: 12.2
epoch: 0
release: 1
summary: Convenient Wrapper around AioSQL and a Database Connection
url: https://pypi.org/project/anodb/
rpm_license: CC0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anodb-12.2-1.src.rpm
checksum_type: sha256
description:
  Convenient Wrapper around [aiosql](https://github.com/nackjicholson/aiosql)
  and a [Database Connection](https://www.python.org/dev/peps/pep-0249).

  ![Status](https://github.com/zx80/anodb/actions/workflows/anodb-package.yml/badge.svg?branch=main&style=flat)
  ![Tests](https://img.shields.io/badge/tests-16%20✓-success)
  ![Coverage](https://img.shields.io/badge/coverage-100%25-success)
  ![Python](https://img.shields.io/badge/python-3-informational)
  ![Databases](https://img.shields.io/badge/databases-6-informational)
  ![Drivers](https://img.shields.io/badge/drivers-15-informational)
  ![Version](https://img.shields.io/pypi/v/anodb)
  ![Badges](https://img.shields.io/badge/badges-9-informational)
  ![License](https://img.shields.io/pypi/l/anodb?style=flat)



  This class creates a persistent database connection and imports
  SQL queries from a file as simple Python functions.

  If the connection is broken, a new connection is attempted with increasing
  throttling delays.

  Compared to `aiosql`, the point is not to need to pass a connection
  as an argument on each call: The `DB` class embeds both connection
  *and* query methods.

  For concurrent programming (threads, greenlets…), a relevant setup
  should also consider thread-locals and pooling issues at some higher level.



  Install the module with `pip install anodb` or whatever method you like.
  Once available:

  ```python
  import anodb

  db = anodb.DB("sqlite3", "test.db", "test.sql", kwargs_only=True)

  db.create_stuff()
  db.do_some_insert(key=1, val="hello")
  db.do_some_update(key=1, val="world")
  print("data", db.do_some_select(key=1))
  print("norm", db.compute_norm(c=3+4j))
  db.commit()

  db.close()
  ```

  With file `test.sql` containing something like:

  ```sql
  -- name: create_stuff#
  CREATE TABLE Stuff(key INTEGER PRIMARY KEY, val TEXT NOT NULL);

  -- name: do_some_select^
  SELECT * FROM Stuff WHERE key = :key;

  -- name: do_some_insert!
  INSERT INTO Stuff(key, val) VALUES (:key, :val);

  -- name: do_some_update!
  UPDATE Stuff SET val = :val WHERE key = :key;

  -- name: compute-norm$
  SELECT SQRT(:c.real * :c.real + :c.imag * :c.imag);
  ```



  The `anodb` module provides the `DB` class which embeds both a
  [PEP 249](https://peps.python.org/pep-0249/) database connection
  (providing methods `commit`, `rollback`, `cursor`, `close` and
  its `connect` counterpart to re-connect) *and* SQL queries wrapped
  into dynamically generated functions by
  [aiosql](https://pypi.org/project/aiosql/).
  Such functions may be loaded from a string (`add_queries_from_str`) or a
  path (`add_queries_from_path`).

  The `DB` constructor main parameters are:

  - `db` the name of the database driver: `sqlite3`, `psycopg`, `pymysql`, see
    [aiosql documentation](https://nackjicholson.github.io/aiosql/database-driver-adapters.html)
    for a list of supported drivers.
  - `conn` an optional connection string used to initiate a connection with the driver.
    For instance, `psycopg` accepts a
    [libpq connection string](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING)
    such as: `"host=db1.my.org port=5432 dbname=acme user=calvin …"`.
  - `queries` a path name or list of path names from which to read query definitions.
  - `conn_args` and `conn_kwargs` a list and dictionary of further connection parameters.
  - `auto_reconnect` whether to attempt a reconnection if the connection is lost.
    Default is _True_. Reconnection attempts are throttled exponentially
    following powers of two delays from _0.001_ and capped at _30.0_ seconds.
  - `auto_rollback` whether to rollback internaly on query errors, before re-raising them.
    Default is _True_.
  - `kwargs_only` whether to only accept named parameters to python functions.
    This helps avoiding silly bugs!
    Default is _False_.
  - `debug` whether to generate debugging messages through `logging`.
    Default is _False_.
  - `cacher` factory to wrap functions for caching `SELECT` queries designated
    as such because `CACHED` appears in their doctring.
    The cacher is passed the query name and underlying function, and must
    return the wrapped function.
    See `test_cache` in the non regression tests for a simple example with
    [`CacheToolsUtils`](https://pypi.org/project/CacheToolsUtils/).
  - other named parameters are passed as additional connection parameters.
    For instance you might consider using `autocommit=True` with `psycopg`.

  ```python
  import anodb

  db = anodb.DB("sqlite3", "acme.db", "acme-queries.sql")
  db = anodb.DB("duckdb", "acme.db", "acme-queries.sql")
  db = anodb.DB("psycopg", "host=localhost dbname=acme", "acme-queries.sql", autocommit=True)
  db = anodb.DB("psycopg", None, "acme-queries.sql", host="localhost", user="calvin", password="...", dbname="acme")
  db = anodb.DB("psycopg2", "host=localhost dbname=acme", "acme-queries.sql")
  db = anodb.DB("pygresql", None, "acme-queries.sql", host="localhost:5432", user="calvin", password="...", database="acme")
  db = anodb.DB("pg8000", None, "acme-queries.sql", host="localhost", port=5432, user="calvin", password="...", database="acme")
  db = anodb.DB("MySQLdb", None, "acme-queries.sql", host="localhost", port=3306, user="calvin", password="...", database="acme")
  db = anodb.DB("pymysql", None, "acme-queries.sql", host="localhost", port=3306, user="calvin", password="...", database="acme")
  db = anodb.DB("mysql-connector", None, "acme-queries.sql", host="localhost", port=3306, user="calvin", password="...", database="acme")
  db = anodb.DB("mariadb", None, "acme-queries.sql", host="localhost", port=3306, user="calvin", password="...", database="acme")
  db = anodb.DB("pymssql", None, "acme-queries.sql", server="localhost", port=1433, user="sa", password="...", database="acme", as_dict=True, autocommit=False)
  ```

  See DB docstring for knowing about all parameters.



  This code is [Public Domain](https://creativecommons.org/publicdomain/zero/1.0/).

  All software has bug, this is software, hence… Beware that you may lose your
  hairs or your friends because of it. If you like it, feel free to send a
  postcard to the author.



  [Sources](https://github.com/zx80/anodb),
  [documentation](https://zx80.github.io/anodb/) and
  [issues](https://github.com/zx80/anodb/issues)
  are available on [GitHub](https://github.com/).

  See [all versions](VERSIONS.md) and
  get [packages](https://pypi.org/project/anodb/) from [PyPI](https://pypi.org/).


pkgId: a46fd446a90048de52442b369da2743b0e4a9f52de80f4663f71a70e19780b72
name: python-anodb
arch: src
version: 13.0
epoch: 0
release: 1
summary: Convenient Wrapper around AioSQL and a Database Connection
url: https://pypi.org/project/anodb/
rpm_license: CC0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anodb-13.0-1.src.rpm
checksum_type: sha256
description:
  Convenient Wrapper around [aiosql](https://github.com/nackjicholson/aiosql)
  and a [Database Connection](https://www.python.org/dev/peps/pep-0249).

  ![Status](https://github.com/zx80/anodb/actions/workflows/anodb-package.yml/badge.svg?branch=main&style=flat)
  ![Tests](https://img.shields.io/badge/tests-16%20✓-success)
  ![Coverage](https://img.shields.io/badge/coverage-100%25-success)
  ![Python](https://img.shields.io/badge/python-3-informational)
  ![Databases](https://img.shields.io/badge/databases-6-informational)
  ![Drivers](https://img.shields.io/badge/drivers-15-informational)
  ![Version](https://img.shields.io/pypi/v/anodb)
  ![Badges](https://img.shields.io/badge/badges-9-informational)
  ![License](https://img.shields.io/pypi/l/anodb?style=flat)



  This class creates a persistent database connection and imports
  SQL queries from a file as simple Python functions.

  If the connection is broken, a new connection is attempted with increasing
  throttling delays.

  Compared to `aiosql`, the point is not to need to pass a connection
  as an argument on each call: The `DB` class embeds both connection
  *and* query methods.

  For concurrent programming (threads, greenlets…), a relevant setup
  should also consider thread-locals and pooling issues at some higher level.



  Install the module with `pip install anodb` or whatever method you like.
  Once available:

  ```python
  import anodb

  db = anodb.DB("sqlite3", "test.db", "test.sql")

  db.create_stuff()
  db.do_some_insert(key=1, val="hello")
  db.do_some_update(key=1, val="world")
  print("data", db.do_some_select(key=1))
  print("norm", db.compute_norm(c=3+4j))
  db.commit()

  db.close()
  ```

  With file `test.sql` to define parametric queries such as:

  ```sql
  -- name: create_stuff#
  CREATE TABLE Stuff(key INTEGER PRIMARY KEY, val TEXT NOT NULL);

  -- name: do_some_select(key)^
  SELECT * FROM Stuff WHERE key = :key;

  -- name: do_some_insert(key, val)!
  INSERT INTO Stuff(key, val) VALUES (:key, :val);

  -- name: do_some_update(key, val)!
  UPDATE Stuff SET val = :val WHERE key = :key;

  -- name: compute-norm(c)$
  SELECT SQRT(:c.real * :c.real + :c.imag * :c.imag);
  ```



  The `anodb` module provides the `DB` class which embeds both a
  [PEP 249](https://peps.python.org/pep-0249/) database connection
  (providing methods `commit`, `rollback`, `cursor`, `close` and
  its `connect` counterpart to re-connect) *and* SQL queries wrapped
  into dynamically generated functions by
  [aiosql](https://pypi.org/project/aiosql/).
  Such functions may be loaded from a string (`add_queries_from_str`) or a
  path (`add_queries_from_path`).

  The `DB` constructor main parameters are:

  - `db` the name of the database driver: `sqlite3`, `psycopg`, `pymysql`, see
    [aiosql documentation](https://nackjicholson.github.io/aiosql/database-driver-adapters.html)
    for a list of supported drivers.
  - `conn` an optional connection string used to initiate a connection with the driver.
    For instance, `psycopg` accepts a
    [libpq connection string](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING)
    such as: `"host=db1.my.org port=5432 dbname=acme user=calvin …"`.
  - `queries` a path name or list of path names from which to read query definitions.
  - `conn_args` and `conn_kwargs` a list and dictionary of further connection parameters.
  - `auto_reconnect` whether to attempt a reconnection if the connection is lost.
    Default is _True_. Reconnection attempts are throttled exponentially
    following powers of two delays from _0.001_ and capped at _30.0_ seconds.
  - `auto_rollback` whether to rollback internaly on query errors, before re-raising them.
    Default is _True_.
  - `kwargs_only` whether to only accept named parameters to python functions.
    This helps avoiding silly bugs!
    Default is _False_.
  - `debug` whether to generate debugging messages through `logging`.
    Default is _False_.
  - `cacher` factory to wrap functions for caching `SELECT` queries designated
    as such because `CACHED` appears in their doctring.
    The cacher is passed the query name and underlying function, and must
    return the wrapped function.
    See `test_cache` in the non regression tests for a simple example with
    [`CacheToolsUtils`](https://pypi.org/project/CacheToolsUtils/).
  - other named parameters are passed as additional connection parameters.
    For instance you might consider using `autocommit=True` with `psycopg`.

  ```python
  import anodb

  db = anodb.DB("sqlite3", "acme.db", "acme-queries.sql")
  db = anodb.DB("duckdb", "acme.db", "acme-queries.sql")
  db = anodb.DB("psycopg", "host=localhost dbname=acme", "acme-queries.sql", autocommit=True)
  db = anodb.DB("psycopg", None, "acme-queries.sql", host="localhost", user="calvin", password="...", dbname="acme")
  db = anodb.DB("psycopg2", "host=localhost dbname=acme", "acme-queries.sql")
  db = anodb.DB("pygresql", None, "acme-queries.sql", host="localhost:5432", user="calvin", password="...", database="acme")
  db = anodb.DB("pg8000", None, "acme-queries.sql", host="localhost", port=5432, user="calvin", password="...", database="acme")
  db = anodb.DB("MySQLdb", None, "acme-queries.sql", host="localhost", port=3306, user="calvin", password="...", database="acme")
  db = anodb.DB("pymysql", None, "acme-queries.sql", host="localhost", port=3306, user="calvin", password="...", database="acme")
  db = anodb.DB("mysql-connector", None, "acme-queries.sql", host="localhost", port=3306, user="calvin", password="...", database="acme")
  db = anodb.DB("mariadb", None, "acme-queries.sql", host="localhost", port=3306, user="calvin", password="...", database="acme")
  db = anodb.DB("pymssql", None, "acme-queries.sql", server="localhost", port=1433, user="sa", password="...", database="acme", as_dict=True, autocommit=False)
  ```

  See DB docstring for knowing about all parameters.



  This code is [Public Domain](https://creativecommons.org/publicdomain/zero/1.0/).

  All software has bug, this is software, hence… Beware that you may lose your
  hairs or your friends because of it. If you like it, feel free to send a
  postcard to the author.



  [Sources](https://github.com/zx80/anodb),
  [documentation](https://zx80.github.io/anodb/) and
  [issues](https://github.com/zx80/anodb/issues)
  are available on [GitHub](https://github.com/).

  See [all versions](VERSIONS.md) and
  get [packages](https://pypi.org/project/anodb/) from [PyPI](https://pypi.org/).


pkgId: 49ab2f0e7bbec2fed36d15fa2546163ad9ecb91f8ee188ad51fa3cdf0025e03f
name: python-anoexpress
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: A package to access insecticide resistance gene expression meta analyse in Anopheles mosquitoes
url: https://github.com/sanjaynagi/AnoExpress
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anoexpress-0.3.0-1.src.rpm
checksum_type: sha256
description:
  ![image](https://raw.githubusercontent.com/sanjaynagi/AnoExpress/main/docs/logo.png)

  [![Execute notebook](https://github.com/sanjaynagi/AnoExpress/workflows/Execute%20notebook/badge.svg)](https://github.com/sanjaynagi/AnoExpress/actions?query=workflow:"Execute+notebook")
  [![GitHub release](https://img.shields.io/github/release/sanjaynagi/AnoExpress?include_prereleases=&sort=semver&color=blue)](https://github.com/sanjaynagi/AnoExpress/releases/)

  **<ins>*Ano</ins>pheles* gene <ins>exp</ins>ression in <ins>res</ins>istance <ins>s</ins>tudies**

  **Authors:**
  *Sanjay Curtis Nagi* and *Victoria A Ingham*

  A python package, colab notebooks and results from a meta-analysis of RNA-Sequencing studies investigating insecticide resistance in *Anopheles gambiae s.l* and *Anopheles funestus*. Analyses can be launched in Google Colab using the badges below, allowing users to explore gene expression in their own genes of interest.

  Documentation: https://sanjaynagi.github.io/AnoExpress/

  [![Custom badge](https://img.shields.io/endpoint?color=gold&logo=Google%20Colab&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsanjaynagi%2FAnoExpress%2Fmain%2Fgraphics%2Fbadge-expression.json)](https://colab.research.google.com/github/sanjaynagi/AnoExpress/blob/main/workflow/notebooks/plot-gene-expression.ipynb)

  [![Custom badge](https://img.shields.io/endpoint?color=darkblue&logo=Google%20Colab&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsanjaynagi%2FAnoExpress%2Fmain%2Fgraphics%2Fbadge-gwes.json)](https://colab.research.google.com/github/sanjaynagi/AnoExpress/blob/main/workflow/notebooks/genome-wide-expression-scans.ipynb)

  [![Custom badge](https://img.shields.io/endpoint?color=grey&logo=Google%20Colab&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsanjaynagi%2FAnoExpress%2Fmain%2Fgraphics%2Fbadge-utilities.json)](https://colab.research.google.com/github/sanjaynagi/AnoExpress/blob/main/workflow/notebooks/utility-functions.ipynb)

  [![Custom badge](https://img.shields.io/endpoint?color=turqoise&logo=Google%20Colab&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsanjaynagi%2FAnoExpress%2Fmain%2Fgraphics%2Fbadge-families.json)](https://colab.research.google.com/github/sanjaynagi/AnoExpress/blob/main/workflow/notebooks/plot-families-expression.ipynb)

  [![Custom badge](https://img.shields.io/endpoint?color=black&logo=Google%20Colab&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsanjaynagi%2FAnoExpress%2Fmain%2Fgraphics%2Fbadge-candidates.json)](https://colab.research.google.com/github/sanjaynagi/AnoExpress/blob/main/workflow/notebooks/expression-candidates.ipynb)

  [![Custom badge](https://img.shields.io/endpoint?color=skyblue&logo=Google%20Colab&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsanjaynagi%2FAnoExpress%2Fmain%2Fgraphics%2Fbadge-enrichment.json)](https://colab.research.google.com/github/sanjaynagi/AnoExpress/blob/main/workflow/notebooks/enrichment.ipynb)

  [![Custom badge](https://img.shields.io/endpoint?color=maroon&logo=Google%20Colab&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsanjaynagi%2FAnoExpress%2Fmain%2Fgraphics%2Fbadge-heatmaps.json)](https://colab.research.google.com/github/sanjaynagi/AnoExpress/blob/main/workflow/notebooks/misc/cluster-heatmaps-16-12-22.ipynb)

  [![Custom badge](https://img.shields.io/endpoint?color=orange&logo=Google%20Colab&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsanjaynagi%2FAnoExpress%2Fmain%2Fgraphics%2Fbadge-grn.json)](https://colab.research.google.com/github/sanjaynagi/AnoExpress/blob/main/workflow/notebooks/gene-regulatory-network.ipynb)

  <br></br>

  [![Custom badge](https://img.shields.io/endpoint?color=white&logo=Google%20Colab&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsanjaynagi%2FAnoExpress%2Fmain%2Fgraphics%2Fbadge-diffexp.json)](https://colab.research.google.com/github/sanjaynagi/AnoExpress/blob/main/workflow/notebooks/differential-expression-meta-analysis.ipynb)




  If you would like to contribute a dataset from a major malaria vector, please raise an [issue](https://github.com/sanjaynagi/AnoExpress/issues) or [email me!](mailto:sanjay.c.nagi@gmail.com?subject=AnoExpress-datasets)


pkgId: b40a7e035a9eb9030bc91d139564ae9adb65928a02c3f238c22ae03372432a0c
name: python-anomalib
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: anomalib - Anomaly Detection Library
url: https://pypi.org/project/anomalib/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anomalib-1.1.1-1.src.rpm
checksum_type: sha256
description:
  [Key Features](#key-features) •
  [Docs](https://anomalib.readthedocs.io/en/latest/) •
  [Notebooks](notebooks) •
  [License](LICENSE)
  [![python](https://img.shields.io/badge/python-3.7%2B-green)]()
  [![pytorch](https://img.shields.io/badge/pytorch-1.8.1%2B-orange)]()
  [![openvino](https://img.shields.io/badge/openvino-2022.3.0-purple)]()
  [![Pre-Merge Checks](https://github.com/openvinotoolkit/anomalib/actions/workflows/pre_merge.yml/badge.svg)](https://github.com/openvinotoolkit/anomalib/actions/workflows/pre_merge.yml)
  [![Documentation Status](https://readthedocs.org/projects/anomalib/badge/?version=latest)](https://anomalib.readthedocs.io/en/latest/?badge=latest)
  [![codecov](https://codecov.io/gh/openvinotoolkit/anomalib/branch/main/graph/badge.svg?token=Z6A07N1BZK)](https://codecov.io/gh/openvinotoolkit/anomalib)
  [![Downloads](https://static.pepy.tech/personalized-badge/anomalib?period=total&units=international_system&left_color=grey&right_color=green&left_text=PyPI%20Downloads)](https://pepy.tech/project/anomalib)
  [![Discord](https://img.shields.io/discord/1230798452577800237?style=plastic)](https://discord.com/channels/1230798452577800237)

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 (C) 2020-2021 Intel Corporation  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: 7945ab340571b02a0e0a5255a8723bfba05c1fdab987ed8e2683e58a3eb5edc8
name: python-anomalo
arch: src
version: 0.23.0
epoch: 0
release: 1
summary: Python bindings for the Anomalo API
url: https://anomalo.com
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anomalo-0.23.0-1.src.rpm
checksum_type: sha256
description:
  A basic REST API client and command line client for [Anomalo][anomalo]


  [anomalo]: https://anomalo.com


pkgId: b02e8357130accc48a2cf7f863ce0df99fbd2d7e89677c0863df4bfe6e26366a
name: python-anomaly-detection-framework
arch: src
version: 0.0.21
epoch: 0
release: 1
url: https://github.com/caglanakpinar/tsad
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anomaly-detection-framework-0.0.21-1.src.rpm
checksum_type: sha256
summary:
  Anomaly Detection Framework allows us to calculate Anomalities on any Time - Series Data Sets. It has an interface which is easy to manage to train - predict with given dataset.

description:
  **1. You have to specify you directory**
  ```
  from anomaly_detection import ad_execute as ad_exec
  ad = ad_exec.AnomalyDetection(path='./Desktop', environment='local)
  ad.init(apis=None)
  ```
  Once, you have assigned the path, a folder called ***Anomaly_Detection_Framework*** will be created inside of it. This folder includes models, data, logs, and docs folders.Trained models will be imported to the ***models*** folder. ***logs*** folder for both ***ml_execute***, ***model_iso_f***, ***model_prophet***, and ***model_lstm*** of log files will be created at logs file.
  Your ***.csv***, ***.json*** or ***.yaml*** data source file must be copied to the data folder which is at the ***Anomaly_Detection_Framework*** folder. If you are connecting to Google Big Query data source, Big Query API (.json file) must be copied into the "data" folder. Once, prediction jobs have been initialized output .csv file is imported to the ***data*** folder.
  The given path will be your workspace where all data-source you can store or get from it. By using "AnomalyDetection" module of ***path*** argument you can specify the path. If there are files which are already exists on the given path, you may remove them by using ***remove_existed = True*** (default ***False***)
  - ###### ***anomaly_detection.AnomalyDetection***:
      - **AnomalyDetection**
          ***path :*** The location where you are willing to create models and prediction data set.
          ***enviroment :** local or docker
          ***host :*** local or docker
          ***remove_existed :*** remove data from the location where you have entered as a path.
          ***master_node :*** if ***False***, you must enter the services of information manually (port host, etc.). This allows the user to initialize each service on different locations or servers or workers.
          If ***False*** there will not be a web interface. Once you create a master node, in order to use other services, you have to clarify these services on it. The master node will lead the other services  which has additional web interface service that runs on it
      - **init**
          This initializes the folders. Checks the available ports for services in the range between *6000 - 7000*. Updates the ***apis.yaml*** if it is necessary.
          ***apis :***
          ```
           services = {
                       'model_iso_f': {'port': 6000, 'host': '127.0.0.1'},
                       'model_lstm': {'port': 6001, 'host': '127.0.0.1'}
                      }
          ad = ad_exec.AnomalyDetection(path='./Desktop', environment='local, master_node=False)
          ad.init(apis=services)
          ```
          Example above, It will initializes ***model_iso_f*** and ***model_lstm*** services. Both will be run on a given host with given ports. However given ports are used, it will assign another port automatically.
  ****
  **2. Run The PLatform**
  ```
  ad.run_platform()
  ```
  This process initializes the platform. Once you have run the code above you may have seen the services are running.
  If you assign ***master_node = True*** you may use enter to web interface from [http://127.0.0.1:7002/](http://127.0.0.1:7002/).
  If ***7002*** port is used from another platform directly platform assigns +1 port. (7003,7004, 7005, ..)
  **2. Data Source**
  You can connect to data source from [Data Source Configuraitons](http://127.0.0.1:7002/configs).
  There is two option to connect to a data source. You can integrate on the web interface or you can use ***AnomalyDetection*** method in order to able to connect a data source.
  ```
  from anomaly_detection import ad_execute as ad_exec

  ad = ad_exec.AnomalyDetection(path='./Desktop', environment='local')

  ad.init()

  ad.run_platform()

  ad.create_data_source(data_source_type='googlebigquery',
                        data_query_path="""
                                              SELECT
                                                fullVisitorId,
                                                TIMESTAMP_SECONDS(visitStartTime) as date,
                                                CASE WHEN type = 'PAGE' THEN 'PAGE'
                                                ELSE eventAction END as event_type_and_category,
                                                MIN(time) / 1000 as time_diff
                                              FROM (SELECT
                                                      geoNetwork.city as city,
                                                      device.browser browser,
                                                      device.deviceCategory deviceCategory,
                                                      visitStartTime,
                                                      hits.eventInfo.eventAction eventAction,
                                                      hits.eventInfo.eventCategory eventCategory,
                                                      hits.type type,
                                                      hits.page.pageTitle pageTitle,
                                                      hits.time time,
                                                      fullVisitorId as fullVisitorId
                                                    FROM `bigquery-public-data.google_analytics_sample.ga_sessions_*`,
                                                         UNNEST(hits) as hits
                                                   ) as a
                                              WHERE pageTitle != 'Home'
                                              GROUP BY
                                                          visitStartTime,
                                                          deviceCategory,
                                                          browser,
                                                          city,
                                                          eventAction,
                                                          eventCategory,
                                                          type,
                                                          pageTitle,
                                                          eventCategory,
                                                          fullVisitorId
                                              ORDER BY fullVisitorId, visitStartTime
                        """,
                        db='flash-clover-**********.json',
                        host=None,
                        port=None,
                        user=None,
                        pw=None)
  ```
  Example above, it is created a connector to Google BigQuery by using ***AnomalyDtection*** method.
  -   **Connection PostgreSQL - MS  SQL**
  ![connection_postgre](https://user-images.githubusercontent.com/26736844/83358571-27ab5200-a37d-11ea-95b9-b91b1ee38269.gif)
  ****
  -   **Connection .csv - .json - .yaml**
  ![Screen Recording 2020-06-06 at 12 33 AM](https://user-images.githubusercontent.com/26736844/83924666-d1c81700-a78d-11ea-8972-d2c14682440d.gif)
  ****
  -   **Connection Google BigQuery**
  ![Screen Recording 2020-06-06 at 12 49 AM](https://user-images.githubusercontent.com/26736844/83925434-d1308000-a78f-11ea-8753-847e48f73ff7.gif)
  ****
  -   **Create Tasks**
      -   ***Model Dimensions :*** You may want to Train your model with separated Groups. The platform automatically finds the date part as dimensions from the ***Date Indicator***. However external dimension can be included by assigning from here.
      -   ***Date Indicator :*** You have to specify the date column from your raw data set. ***This is a mandatory field***.
      -   ***Anomaly Feature :*** In order to find the anomaly values, you have to specify which column we are investigating for. ***This is a mandatory field***.
      -   ***Train :*** Choose the schedule time period for train task. The chosen period will be started depending on the time where it is assigned at **Train Job Dates - Start***. If **Train Job Dates - Start*** is not assigned, the job date will automatically assign as the current date and it can be started immediately. Parameter Tunning also runs when train task runs for the first time.
      -   ***Prediction :*** As like Train Task, Prediction task also be scheduled similar way. However, you have to assign ***Prediction Job Dates - Start *** while you are creating task.
      -   ***Parameter Tuning :*** Parameter Tuning also is able to be scheduled. However, the starting date is assigning related to ***Train Job Dates - Start***. Parameter tunning also runs when train task runs for the first time.
      -   ***Here are the schedule options :***
          -   *Daily :* Each day, the job process will start with a given time where you assign at ***Train Job Dates - Start***.
          -   *only once :* It can be triggered just once.
          -   *Mondays ... Sundays :* Assigned day of the week, the job will start.
          -   *Weekly :* Job will run every 7 days after it is started.
          -   *Every 2 Weeks :* 14 days of the time period.
          -   *Monthly :* every 30 days of the time period.
          -   *Every Minute :* Every minute job can be triggered.
          -   *Every Second :* Every each second job can be triggered.
  You can create 3 main Machine Learning task which generally uses for each Data Scientist. You may create a task and schedule them separately. For instance, train can run every week, prediction can create outputs daily, and every each month parameters can be optimized by parameter tunning task.
  This process is only available after Data Source is created.
  Once you create the data source you can see the column names on ***Model Dimensions***, ***Date Indicator***, ***Anomaly Feature***.
  You can not create tasks separately.
  ![create_tasks](https://user-images.githubusercontent.com/26736844/83358834-e320b600-a37e-11ea-91d7-a0dbb351ea91.gif)
  - **Job Run**
  Once, you create tasks, jobs are eligible to run periodically. You can also run below codes rather than using application interface;
  ```
  ad.manage_train(stop=False)
  ad.manage_prediction(stop=False)
  ad.manage_parameter_tuning(stop=False)
  ```
  *** AnomalyDetection.manage_train :***
      ***-   stop :*** If False stops running training scheduled task.
  *** AnomalyDetection.manage_prediction :***
      ***-   stop :*** If False stops running prediction scheduled task.
  *** AnomalyDetection.manage_parameter_tuning :***
      ***-   stop :*** If False stops running parameter tuning scheduled task.
  ![Job Run 2020-06-06 at 01 25 AM](https://user-images.githubusercontent.com/26736844/83927175-cc21ff80-a794-11ea-885b-e7ec5bd38097.gif)
  - **Dashboard**
  Once you assign the data source connection and create the task automatically, the dashboard will be created directly according to the model dimension.
  After ***Data Source*** and ***Create Task*** are done, in order to initialize the platform with the code below;
  ```
  ad = anomaly_detection.Ad_execute.AnomalyDetection(path='./Desktop', environment='local').reset_web_app()
  ad.reset_web_app()
  ```
  ![Dashboard 2020-06-20 at 05 03 PM](https://user-images.githubusercontent.com/26736844/85203715-3b146200-b318-11ea-8e01-7c074db804e3.gif)


pkgId: 8b72e501cc41a651a54bf7ac1673f9750119308d7692e9dfc12c9735b4c61a69
name: python-anomalytda-client
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: The AnomalyTDA Client Library
url: https://pypi.org/project/anomalytda-client/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anomalytda-client-0.1.0-1.src.rpm
checksum_type: sha256
description:
  **Readme**

  The AnomalyTDA Client Library is a Python API toolkit that facilitates seamless integration between your Python code and the DataRefiner AnomalyTDA platform, allowing users to perform inference on their data using models exported from the AnomalyTDA platform.

  **Website**: [https://datarefiner.com](https://datarefiner.com)



  * Perform anomaly detection using exported models
  * Perform detection using supervised models exported from AnomalyTDA platform
  * Generate anomaly heatmaps and bounding boxes images




  ```
  import os
  from typing import List, Tuple

  import numpy as np
  import matplotlib.pyplot as plt
  from PIL import Image
  from scipy.ndimage import zoom

  from tqdm.notebook import tqdm

  from anomalytda_client import AnomalyModel
  from anomalytda_client.files import get_filenames
  from anomalytda_client.tools import get_images_amaps_score, find_bounding_boxes

  anomaly_model_filepath: str = "models/exported_model.anomaly"
  image_folder: str = "data/myimages"


  anomaly_model: AnomalyModel = AnomalyModel(
      anomaly_model_filepath=anomaly_model_filepath,
      crop_rows=2, # Grid crop "rows" parameter used during the model training
      crop_cols=2, # Grid crop "columns" parameter used during the model training
      batch_size=8
  )
  amap_list: List[np.ndarray] = anomaly_model.inference(test_images_set)


  img_list, score_list = get_images_amaps_score(images_set=test_images_set, amap_list=amap_list)
  filenames: List[str] = ["".join((image_folder, test_image.filename.split(image_folder)[-1])) for test_image in test_images_set]


  threshold = np.percentile(np.array(amap_list), 99)


  import matplotlib.patches as patches

  for i in np.array(score_list).argsort()[::-1][:200]:
      print('score:', score_list[i], 'filename:', filenames[i])
      img, ano_map = img_list[i]
      data = amap_list[i]
      fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3))
      ax1.imshow(img)
      ax1.axis('off')
      ax2.imshow(ano_map)
      ax2.axis('off')

      for x_min, y_min, x_max, y_max in find_bounding_boxes(
          amap=data, image_size=np.shape(img), threshold=threshold
      ):
          ax2.add_patch(patches.Rectangle(
              xy=(x_min, y_min), width=x_max - x_min, height=y_max - y_min,
              linewidth=2, edgecolor="red", facecolor="none",
          ))

      plt.tight_layout()
      plt.show()
  ```




  ```
  import os
  import math
  from typing import List

  import cv2
  import numpy as np
  import onnxruntime as ort
  import matplotlib.pyplot as plt
  from PIL import Image
  from tqdm.auto import trange

  from anomalytda_client import DetectionModel
  from anomalytda_client.files import get_filenames

  detection_model_filepath: str = "models/exported_model.detection"
  image_folder: str = "data/myimages"


  test_images_set: List[Image.Image] = [Image.open(filename) for filename in get_filenames(image_folder)]
  len(test_images_set)


  detection_model: DetectionModel = DetectionModel(
      anomaly_model_filepath=detection_model_filepath, batch_size=16
  )


  outputs: List[np.ndarray] = detection_model.inference(
      images_set=test_images_set,
      conf=0.1,
      iou=0.45,
      image_size=(640, 640)
  )


  for i, result in enumerate(outputs):
      image: np.ndarray = np.array(test_images_set[i].convert("RGB"))
      image = image[:, :, ::-1].copy()
      print(f"Filename: {os.path.basename(test_images_set[i].filename)}")
      for box, score, class_ in result:
          print(f"Score: {score:.2f}, class: {class_} = {result.names[class_]}")
          x1, y1, x2, y2 = box[0], box[1], box[0] + box[2], box[1] + box[3]
          cv2.rectangle(image, (x1, y1), (x2, y2), (0, 0, 255), 2)
          cv2.putText(image, f"{result.names[class_]}: {score:.2f}", (x1, y1 - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 0, 255), 2)

      
      _, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3))
      ax1.imshow(test_images_set[i])
      ax1.axis('off')
      ax2.imshow(cv2.cvtColor(image, cv2.COLOR_RGB2BGR))
      ax2.axis('off')
      plt.tight_layout()
      plt.show()
  ```


pkgId: 6b05bbfbaa23661598d6228a8a9e3af14213dcb7564528ce97ef4e11836a8d54
name: python-anomalytics
arch: src
version: 0.2.2
epoch: 0
release: 1
summary: The ultimate anomaly detection library.
url: https://pypi.org/project/anomalytics/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anomalytics-0.2.2-1.src.rpm
checksum_type: sha256
description:
  <h1 align=center><strong>Anomalytics</strong></h1>

  <h3 align=center><i>Your Ultimate Anomaly Detection & Analytics Tool</i></h3>

  <p align="center">
      <a href="https://app.codecov.io/gh/Aeternalis-Ingenium/anomalytics/tree/trunk" >
          <img src="https://codecov.io/gh/Aeternalis-Ingenium/anomalytics/graph/badge.svg?token=eC84pMmUz8"/>
      </a>
      <a href="https://results.pre-commit.ci/latest/github/Aeternalis-Ingenium/anomalytics/trunk">
          <img src="https://results.pre-commit.ci/badge/github/Aeternalis-Ingenium/anomalytics/trunk.svg" alt="pre-commit.ci status">
      </a>
      <a href="https://github.com/psf/black">
          <img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
      </a>
      <a href="https://pycqa.github.io/isort/">
          <img src="https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336" alt="Imports: isort">
      </a>
      <a href="#">
          <img src="https://img.shields.io/badge/mypy-checked-blue" alt="mypy checked">
      </a>
      <a href="https://github.com/Aeternalis-Ingenium/anomalytics/actions/workflows/build.yaml">
          <img src="https://github.com/Aeternalis-Ingenium/anomalytics/actions/workflows/build.yaml/badge.svg" alt="CI - Build">
      </a>
      <a href="https://github.com/Aeternalis-Ingenium/anomalytics/actions/workflows/code-quality.yaml">
          <img src="https://github.com/Aeternalis-Ingenium/anomalytics/actions/workflows/code-quality.yaml/badge.svg" alt="CI - Code Quality">
      </a>
      <a href="https://github.com/Aeternalis-Ingenium/anomalytics/actions/workflows/test.yaml">
          <img src="https://github.com/Aeternalis-Ingenium/anomalytics/actions/workflows/test.yaml/badge.svg" alt="CI - Automated Testing">
      </a>
      <a href="https://github.com/Aeternalis-Ingenium/anomalytics/blob/trunk/LICENSE">
          <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT">
      </a>
      <a href="https://github.com/Aeternalis-Ingenium/anomalytics/blob/trunk/README.md">
          <img src="https://img.shields.io/badge/docs-passing-brightgreen.svg" alt="Documentation">
      </a>
      <a href="https://pypi.org/project/anomalytics/">
          <img src="https://img.shields.io/badge/PyPi-v0.2.1-blue.svg" alt="PyPi">
      </a>
  </p>



  `anomalytics` is a Python library that aims to implement all statistical methods for the purpose of detecting any sort of anomaly e.g. extreme events, high or low anomalies, etc. This library utilises external dependencies such as:

  - [Pandas 2.1.1](https://pandas.pydata.org/)
  - [NumPy 1.26.0](https://numpy.org/)
  - [SciPy 1.11.3](https://scipy.org/)
  - [Matplotlib 3.8.2](https://matplotlib.org/)
  - [Pytest-Cov 4.1.0.](https://pytest-cov.readthedocs.io/en/latest/)
  - [Black 23.10.0](https://black.readthedocs.io/en/stable/)
  - [Isort 5.12.0](https://pycqa.github.io/isort/)
  - [MyPy 1.6.1](https://mypy.readthedocs.io/en/stable/)
  - [Bandit 1.7.5](https://bandit.readthedocs.io/en/latest/)

  `anomalytics` supports the following Python's versions: `3.10.x`, `3.11.x`, `3.12.0`.



  To use the library, you can install as follow:

  ```shell

  $ pip3 install anomalytics


  $ pip3 install "anomalytics[extra]"
  ```

  As a contributor/collaborator, you may want to consider installing all external dependencies for development purposes:

  ```shell

  $ pip3 install "anomalytics[codequality,docs,security,testcov,extra]"
  ```



  `anomalytics` can be used to analyze anomalies in your dataset (both as `pandas.DataFrame` or `pandas.Series`). To start, let's follow along with this minimum example where we want to detect extremely high anomalies in our dataset.

  Read the walkthrough below, or the concrete examples here:
  * [Extreme Anomaly Analysis - DataFrame](https://github.com/Aeternalis-Ingenium/anomalytics/blob/trunk/docs/examples/extreme_anomaly_df_analysis.ipynb)
  * [Battery Water Level Analysis - Time Series](https://github.com/Aeternalis-Ingenium/anomalytics/blob/trunk/docs/examples/battery_water_level_analysis.ipynb)



  1. Import `anomalytics` and initialise our time series of 100_002 rows:

      ```python
      import anomalytics as atics

      df = atics.read_ts("./ad_impressions.csv", "csv")
      df.head()
      ```
      ```shell

                     datetime	    xandr	      gam	    adobe
      0	2023-10-18 09:01:00	52.483571	71.021131	35.681915
      1	2023-10-18 09:02:00	49.308678	73.651996	60.347246
      2	2023-10-18 09:03:00	53.238443	65.690813	48.120805
      3	2023-10-18 09:04:00	57.615149	80.944393	59.550775
      4	2023-10-18 09:05:00	48.829233	76.445099	26.710413
      ```

  2. Initialize the needed detector object. Each detector utilises a different statistical method for detecting anomalies. In this example, we'll use POT method and a high anomaly type. Pay attention to the time period that is directly created where the `t2` is 1 by default because "real-time" always targets the "now" period hence 1 (sec, min, hour, day, week, month, etc.):

      ```python
      pot_detector = atics.get_detector(method="POT", dataset=ts, anomaly_type="high")

      print(f"T0: {pot_detector.t0}")
      print(f"T1: {pot_detector.t1}")
      print(f"T2: {pot_detector.t2}")

      pot_detector.plot(ptype="line-dataset-df", title=f"Page Impressions Dataset", xlabel="Minute", ylabel="Impressions", alpha=1.0)
      ```
      ```shell
      T0: 42705
      T1: 16425
      T2: 6570
      ```

      ![Ad Impressions Dataset](https://github.com/Aeternalis-Ingenium/anomalytics/raw/trunk/docs/assets/readme/01-AdImpressionDatasetDistributions.png)

  3. The purpose of using the detector object instead the standalone is to have a simple fix detection flow. In case you want to customize the time window, we can call the `reset_time_window()` to reset `t2` value, even though that will beat the purpose of using a detector object. Pay attention to the period parameters because the method expects a percentage representation of the distribution of period (ranging 0.0 to 1.0):

      ```python
      pot_detector.reset_time_window(
          "historical",
          t0_pct=0.65,
          t1_pct=0.25,
          t2_pct=0.1
      )

      print(f"T0: {pot_detector.t0}")
      print(f"T1: {pot_detector.t1}")
      print(f"T2: {pot_detector.t2}")

      pot_detector.plot(ptype="hist-dataset-df", title="Dataset Distributions", xlabel="Distributions", ylabel="Page Impressions", alpha=1.0, bins=100)
      ```
      ```shell
      T0: 65001
      T1: 25001
      T2: 10000
      ```

      ![Ad Impressions Hist](https://github.com/Aeternalis-Ingenium/anomalytics/raw/trunk/docs/assets/readme/02-AdImpressionsNormDistributions.png)

  4. Now, we can extract exceedances by giving the expected `q`uantile:

      ```python
      pot_detector.get_extremes(0.95)
      pot_detector.exeedance_thresholds.head()
      ```
      ```shell
              xandr	      gam	    adobe	           datetime
      0	58.224653	85.177029	60.362306	2023-10-18 09:01:00
      1	58.224653	85.177029	60.362306	2023-10-18 09:02:00
      2	58.224653	85.177029	60.362306	2023-10-18 09:03:00
      3	58.224653	85.177029	60.362306	2023-10-18 09:04:00
      4	58.224653	85.177029	60.362306	2023-10-18 09:05:00
      ```

  5. Let's visualize the exceedances and its threshold to have a clearer understanding of our dataset:

      ```python
      pot_detector.plot(ptype="line-exceedance-df", title="Peaks Over Threshold", xlabel="Minute", ylabel="Page Impressions", alpha=1.0)
      ```

      ![Exceedance-POT](https://github.com/Aeternalis-Ingenium/anomalytics/raw/trunk/docs/assets/readme/03-AdImpressionsExceedances.png)

  6. Now that we have the exceedances, we can fit our data into the chosen distribution, in this example the "Generalized Pareto Distribution". The first couple rows will be zeroes which is normal because we only fit data that are greater than zero into the wanted distribution:

      ```python
      pot_detector.fit()
      pot_detector.fit_result.head()
      ```
      ```shell
          xandr_anomaly_score gam_anomaly_score   adobe_anomaly_score	total_anomaly_score	           datetime
      0	           1.087147	         0.000000              0.000000	           1.087147	2023-11-17 00:46:00
      1	           0.000000	         0.000000              0.000000	           0.000000	2023-11-17 00:47:00
      2	           0.000000	         0.000000              0.000000	           0.000000	2023-11-17 00:48:00
      3	           0.000000	         1.815875              0.000000	           1.815875	2023-11-17 00:49:00
      4	           0.000000	         0.000000              0.000000	           0.000000	2023-11-17 00:50:00
      ...
      ```

  7. Let's inspect the GPD distributions to get the intuition of our pareto distribution:

      ```python
      pot_detector.plot(ptype="hist-gpd-df", title="GPD - PDF", xlabel="Page Impressions", ylabel="Density", alpha=1.0, bins=100)
      ```

      ![GPD-PDF](https://github.com/Aeternalis-Ingenium/anomalytics/raw/trunk/docs/assets/readme/04-AdImpressionsGPDPDF.png)

  8. The parameters are stored inside the detector class:

      ```python
      pot_detector.params
      ```
      ```shell
      {0: {'xandr': {'c': -0.11675297447288158,
      'loc': 0,
      'scale': 2.3129766056305603,
      'p_value': 0.9198385927065513,
      'anomaly_score': 1.0871472537998},
      'gam': {'c': 0.0,
      'loc': 0.0,
      'scale': 0.0,
      'p_value': 0.0,
      'anomaly_score': 0.0},
      'adobe': {'c': 0.0,
      'loc': 0.0,
      'scale': 0.0,
      'p_value': 0.0,
      'anomaly_score': 0.0},
      'total_anomaly_score': 1.0871472537998},
      1: {'xandr': {'c': 0.0,
      'loc': 0.0,
      'scale': 0.0,
      'p_value': 0.0,
      'anomaly_score': 0.0},
      'gam': {'c': 0.0,
      'loc': 0.0,
      'scale': 0.0,
      'p_value': 0.0,
      ...
      'scale': 0.0,
      'p_value': 0.0,
      'anomaly_score': 0.0},
      'total_anomaly_score': 0.0},
      ...}
      ```

  9.  Last but not least, we can now detect the extremely large (high) anomalies:

      ```python
      pot_detector.detect(0.95)
      pot_detector.detection_result
      ```
      ```shell
      16425    False
      16426    False
      16427    False
      16428    False
      16429    False
              ...
      22990    False
      22991    False
      22992    False
      22993    False
      22994    False
      Name: detected data, Length: 6570, dtype: bool
      ```

  10. Now we can visualize the anomaly scores from the fitting with the anomaly threshold to get the sense of the extremely large values:

      ```python
      pot_detector.plot(ptype="line-anomaly-score-df", title="Anomaly Score", xlabel="Minute", ylabel="Page Impressions", alpha=1.0)
      ```

      ![Anomaly Scores](https://github.com/Aeternalis-Ingenium/anomalytics/raw/trunk/docs/assets/readme/05-AdImpressionsAnomalyScore.png)

  11. Now what? Well, while the detection process seems quite straight forward, in most cases getting the details of each anomalous data is quite tidious! That's why `anomalytics` provides a comfortable method to get the summary of the detection so we can see when, in which row, and how the actual anomalous data look like:

      ```python
      pot_detector.detection_summary.head(5)
      ```
      ```shell
                                row	    xandr	      gam	    adobe	xandr_anomaly_score	gam_anomaly_score	adobe_anomaly_score	total_anomaly_score	anomaly_threshold
      2023-11-28 12:06:00	    59225	64.117135	76.425925	47.772929	          21.445759	        0.000000	          0.000000	          21.445759	        19.689885
      2023-11-28 12:25:00	    59244	40.513415	94.526021	65.921644	          0.000000	        19.557962	          2.685337	          22.243299	        19.689885
      2023-11-28 12:45:00	    59264	52.362039	54.191719	79.972860	          0.000000	        0.000000	          72.313273	          72.313273	        19.689885
      2023-11-28 16:48:00	    59507	64.753203	70.344142	42.540168	          32.543021	        0.000000	          0.000000	          32.543021	        19.689885
      2023-11-28 16:53:00	    59512	35.912221	52.572939	75.621003	          0.000000	        0.000000	          22.199505	          22.199505	        19.689885
      ```

  12. In every good analysis there is a test! We can evaluate our analysis result with "Kolmogorov Smirnov" 1 sample test to see how far the statistical distance between the observed sample distributions to the theoretical distributions via the fitting parameters (the smaller the `stats_distance` the better!):

      ```python
      pot_detector.evaluate(method="ks")
      pot_detector.evaluation_result
      ```
      ```shell
          column	total_nonzero_exceedances	stats_distance	p_value	        c	loc	    scale
      0	 xandr	                     3311	      0.012901	0.635246 -0.128561	  0	 2.329005
      1	 gam	                     3279	      0.011006	0.817674 -0.140479	  0	 3.852574
      2	 adobe	                     3298	      0.019479	0.161510 -0.133019	  0	 6.007833
      ```

  13. If 1 test is not enough for evaluation, we can also visually test our analysis result with "Quantile-Quantile Plot" method to observed the sample quantile vs. the theoretical quantile:

      ```python
      
      pot_detector.evaluate(method="qq")

      
      pot_detector.evaluate(method="qq", is_random=True)
      ```

      ![QQ-Plot GPD](https://github.com/Aeternalis-Ingenium/anomalytics/raw/trunk/docs/assets/readme/06-AdImpressionsQQPlot.png)



  You have a project that only needs to be fitted? To be detected? Don't worry! `anomalytics` also provides standalone functions as well in case users want to start the anomaly analysis from a different starting points. It is more flexible, but many processing needs to be done by you. LEt's take an example with a different dataset, thistime the water level Time Series!

  1. Import `anomalytics` and initialise your time series:

      ```python
      import anomalytics as atics

      ts = atics.read_ts(
          "water_level.csv",
          "csv"
      )
      ts.head()
      ```
      ```shell
      2008-11-03 06:00:00    0.219
      2008-11-03 07:00:00   -0.041
      2008-11-03 08:00:00   -0.282
      2008-11-03 09:00:00   -0.368
      2008-11-03 10:00:00   -0.400
      Name: Water Level, dtype: float64
      ```

  2. Set the time windows of t0, t1, and t2 to compute dynamic expanding period for calculating the threshold via quantile:

      ```python
      t0, t1, t2 = atics.set_time_window(
          total_rows=ts.shape[0],
          method="POT",
          analysis_type="historical",
          t0_pct=0.65,
          t1_pct=0.25,
          t2_pct=0.1
      )

      print(f"T0: {t0}")
      print(f"T1: {t1}")
      print(f"T2: {t2}")
      ```
      ```shell
      T0: 65001
      T1: 25001
      T2: 10000
      ```

  3. Extract exceedances and indicate that it is a `"high"` anomaly type and what's the `q`uantile:

      ```python
      pot_thresholds = get_threshold_peaks_over_threshold(dataset=ts, t0=t0, "high", q=0.90)
      pot_exceedances = atics.get_exceedance_peaks_over_threshold(
          dataset=ts,
          threshold_dataset=pot_thresholds,
          anomaly_type="high"
      )

      exceedances.head()
      ```
      ```shell
      2008-11-03 06:00:00    0.859
      2008-11-03 07:00:00    0.859
      2008-11-03 08:00:00    0.859
      2008-11-03 09:00:00    0.859
      2008-11-03 10:00:00    0.859
      Name: Water Level, dtype: float64
      ```

  4. Compute the anomaly scores for each exceedance and initialize a params for further analysis and evaluation:

      ```python
      params = {}
      anomaly_scores = atics.get_anomaly_score(
          exceedance_dataset=pot_exceedances,
          t0=t0,
          gpd_params=params
      )

      anomaly_scores.head()
      ```
      ```shell
      2016-04-03 15:00:00    0.0
      2016-04-03 16:00:00    0.0
      2016-04-03 17:00:00    0.0
      2016-04-03 18:00:00    0.0
      2016-04-03 19:00:00    0.0
      Name: anomaly scores, dtype: float64
      ...
      ```

  5. Inspect the parameters:

      ```python
      params
      ```
      ```shell
      {0: {'index': Timestamp('2016-04-03 15:00:00'),
      'c': 0.0,
      'loc': 0.0,
      'scale': 0.0,
      'p_value': 0.0,
      'anomaly_score': 0.0},
      1: {'index': Timestamp('2016-04-03 16:00:00'),
      ...
      'c': 0.0,
      'loc': 0.0,
      'scale': 0.0,
      'p_value': 0.0,
      'anomaly_score': 0.0},
      ...}
      ```

  6. Detect anomalies:

      ```python
      anomaly_threshold = get_anomaly_threshold(
          anomaly_score_dataset=anomaly_scores,
          t1=t1,
          q=0.90
      )
      detection_result = get_anomaly(
          anomaly_score_dataset=anomaly_scores,
          threshold=anomaly_threshold,
          t1=t1
      )

      detection_result.head()
      ```
      ```shell
      2020-03-31 19:00:00    False
      2020-03-31 20:00:00    False
      2020-03-31 21:00:00    False
      2020-03-31 22:00:00    False
      2020-03-31 23:00:00    False
      Name: anomalies, dtype: bool
      ```

  7. For the test, kolmogorov-smirnov and qq plot are also accessible via standalone functions, but the params need to be processed so it only contains a non-zero parameters since there are no reasons to calculate a zero 😂

      ```python
      nonzero_params = []

      for row in range(0, t1 + t2):
          if (
              params[row]["c"] != 0
              or params[row]["loc"] != 0
              or params[row]["scale"] != 0
          ):
              nonzero_params.append(params[row])

      ks_result = atics.evals.ks_1sample(
          dataset=pot_exceedances,
          stats_method="POT",
          fit_params=nonzero_params
      )

      ks_result
      ```
      ```shell
      {'total_nonzero_exceedances': [5028], 'stats_distance': [0.0284] 'p_value': [0.8987], 'c': [0.003566], 'loc': [0], 'scale': [0.140657]}
      ```

  8. Visualize via qq plot:

      ```python
      nonzero_exceedances = exceedances[exceedances.values > 0]

      visualize_qq_plot(
          dataset=nonzero_exceedances,
          stats_method="POT",
          fit_params=nonzero_params,
      )
      ```



  We have anomaly you said? Don't worry, `anomalytics` has the implementation to send an alert via E-Mail or Slack. Just ensure that you have your email password or Slack webhook ready. This example shows both application (please read the comments 😎):

  1. Initialize the wanted platform:

      ```python
      
      gmail = atics.get_notification(
          platform="email",
          sender_address="my-cool-email@gmail.com",
          password="AIUEA13",
          recipient_addresses=["my-recipient-1@gmail.com", "my-recipient-2@web.de"],
          smtp_host="smtp.gmail.com",
          smtp_port=876,
      )

      
      slack = atics.get_notification(
          platform="slack",
          webhook_url="https://slack.com/my-slack/YOUR/SLACK/WEBHOOK",
      )

      print(gmail)
      print(slack)
      ```
      ```shell
      'Email Notification'
      'Slack Notification'
      ```

  2. Prepare the data for the notification! If you use standalone, you need to process the `detection_result` to become a DataFrame with `row`, ``

      ```python
      
      detected_anomalies = detection_result[detection_result.values == True]
      anomalous_data = ts[detected_anomalies.index]
      standalone_detection_summary = pd.DataFrame(
          index=anomalous.index.flatten(),
          data=dict(
              row=[ts.index.get_loc(index) + 1 for index in anomalous.index],
              anomalous_data=[data for data in anomalous.values],
              anomaly_score=[score for score in anomaly_score[anomalous.index].values],
              anomaly_threshold=[anomaly_threshold] * anomalous.shape[0],
          )
      )

      
      detector_detection_summary = pot_detector.detection_summary

      ```

  1. Prepare the notification payload and a custome message if needed:

      ```python
      
      gmail.setup(
          detection_summary=detection_summary,
          message="Extremely large anomaly detected! From Ad Impressions Dataset!"
      )

      
      slack.setup(
          detection_summary=detection_summary,
          message="Extremely large anomaly detected! From Ad Impressions Dataset!"
      )
      ```

  2. Send your notification! Beware that the scheduling is not implemented since it always depends on the logic of the use case:

      ```python
      
      gmail.send

      
      slack.send
      ```
      ```shell
      'Notification sent successfully.'
      ```

  3. Check your email or slack, this example produces the following notification via Slack:

      ![Anomaly SLack Notification](https://github.com/Aeternalis-Ingenium/anomalytics/raw/trunk/docs/assets/readme/07-AdImpressionsNotification.jpeg)



  * Nakamura, C. (2021, July 13). On Choice of Hyper-parameter in Extreme Value Theory Based on Machine Learning Techniques. arXiv:2107.06074 [cs.LG]. https://doi.org/10.48550/arXiv.2107.06074

  * Davis, N., Raina, G., & Jagannathan, K. (2019). LSTM-Based Anomaly Detection: Detection Rules from Extreme Value Theory. In Proceedings of the EPIA Conference on Artificial Intelligence 2019. https://doi.org/10.48550/arXiv.1909.06041

  * Arian, H., Poorvasei, H., Sharifi, A., & Zamani, S. (2020, November 13). The Uncertain Shape of Grey Swans: Extreme Value Theory with Uncertain Threshold. arXiv:2011.06693v1 [econ.GN]. https://doi.org/10.48550/arXiv.2011.06693

  * Yiannis Kalliantzis. (n.d.). Detect Outliers: Expert Outlier Detection and Insights. Retrieved [23-12-04T15:10:12.000Z], from https://detectoutliers.com/



  I am deeply grateful to have met and guided by wonderful people who inspired me to finish my capstone project for my study at CODE university of applied sciences in Berlin (2023). Thank you so much for being you!

  * Sabrina Lindenberg
  * Adam Roe
  * Alessandro Dolci
  * Christian Leschinski
  * Johanna Kokocinski
  * Peter Krauß

rpm_license:
  MIT License  Copyright (c) 2023 Nino Lindenberg  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: 99d6778f4884f69c84ccdbc10e6e22d8f5ce8de04fa384e25deebc57e596112a
name: python-anomed-challenge
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: A library aiding to create challenges for the AnoMed competition platform.
url: https://pypi.org/project/anomed-challenge/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anomed-challenge-0.0.1-1.src.rpm
checksum_type: sha256
description:
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  ![pipeline status](https://git.uni-luebeck.de/its/anomed/challenge/badges/main/pipeline.svg?ignore_skipped=true)
  ![coverage](https://git.uni-luebeck.de/its/anomed/challenge/badges/main/coverage.svg?job=run_tests)



  A library aiding to create challenges for the AnoMed competition platform.



  ```python
  import challenge
  import challenge_server
  import numpy as np
  from challenge import InMemoryNumpyArrays


  example_challenge = challenge.SupervisedLearningMIAChallenge(
      training_data=InMemoryNumpyArrays(X=np.arange(70), y=np.arange(70)),
      tuning_data=InMemoryNumpyArrays(X=np.arange(30), y=np.arange(30)),
      validation_data=InMemoryNumpyArrays(X=np.arange(20), y=np.arange(20)),
      anonymizer_evaluator=challenge.strict_binary_accuracy,
      MIA_evaluator=challenge.evaluate_MIA,
  )
  app = challenge_server.supervised_learning_MIA_challenge_server_factory(
      example_challenge
  )
  ```

rpm_license:
  MIT License  Copyright (c) 2024 Yannik Potdevin  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: b68e8976ca0b2cccb6e0d6fab406793d94f15a6fe8dddd08e818ac757a888ea0
name: python-anonapi
arch: src
version: 2.0.1
epoch: 0
release: 1
summary: Client and tools for working with the anoymization web API
url: https://pypi.org/project/anonapi/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anonapi-2.0.1-1.src.rpm
checksum_type: sha256
description:
  * Interact with IDIS anonymization server web API via https
  * Create, modify, cancel anonymization jobs
  * CLI (Command Line Interface) for quick overview of jobs and cancel/restart job.
  * Python code with examples for fully automated interaction


pkgId: 3acf3b3a1bbb3d1a906fd1659fc10cececc8c689950faf57a1aaa2de2e0ad33b
name: python-anonipy
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: The data anonymization package
description: **Documentation:** [https://eriknovak.github.io/anonipy](https://eriknovak.github.io/anonipy)
url: https://pypi.org/project/anonipy/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anonipy-0.2.0-1.src.rpm
checksum_type: sha256
rpm_license:
  BSD 2-Clause License  Copyright (c) 2024, Erik Novak All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  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: c924aba49264daa4d4bb21a409922b1b26067dfa5ed1637cdfa38090ce0e6e62
name: python-anonlink
arch: src
version: 0.15.3
epoch: 0
release: 1
summary: Anonymous linkage using cryptographic hashes and bloom filters
url: https://github.com/data61/anonlink
rpm_license: Apache
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anonlink-0.15.3-1.src.rpm
checksum_type: sha256
description:
  Install a precompiled wheel from PyPi::
      pip install anonlink
  Or (if your system has a C++ compiler) you can locally install from source::
      pip install -r requirements.txt
      pip install -e .


pkgId: c577810aa5eec604935bbfa8b0bba432a2dc5bc75818c117238cd69f3d667317
name: python-anonlink-client
arch: src
version: 0.1.9
epoch: 0
release: 1
summary: Client side tool for clkhash and blocklib
url: https://github.com/data61/anonlink-client
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anonlink-client-0.1.9-1.src.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/data61/anonlink-client/branch/main/graph/badge.svg)](https://codecov.io/gh/data61/anonlink-client)
  [![Documentation Status](https://readthedocs.org/projects/anonlink-client/badge/?version=latest)](http://anonlink-client.readthedocs.io/en/latest/?badge=latest)
  [![Testing](https://github.com/data61/anonlink-client/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/data61/anonlink-client/actions/workflows/ci.yml)
  [![Requirements Status](https://requires.io/github/data61/anonlink-client/requirements.svg?branch=main)](https://requires.io/github/data61/anonlink-client/requirements/?branch=main)
  [![Downloads](https://pepy.tech/badge/anonlink-client)](https://pepy.tech/project/anonlink-client)



  Client-facing API to interact with anonlink system including command line tools and Rest API communication.
  Anonlink system needs the following three components to work together:

  * [clkhash](https://github.com/data61/clkhash)
  * [blocklib](https://github.com/data61/blocklib)

  This package provides an easy-to-use API to interact with the above packages to complete a record linkage job.

  The way to interact with anonlink system is via Command Line Tool `anonlink`. You can encode data containing PI (Personal
   Identifying Information) locally using `anonlink encode` and generate candidate blocks locally to scale up record linkage
   using `anonlink block`.



  Install with pip/poetry etc.:

  ```shell
  pip install anonlink-client
  ```



  https://anonlink-client.readthedocs.io/en/stable/



  After installation, you should have a `anonlink` program in your path. For
  example, to encode PII data  `alice.csv` locally with schema `schema.json` and secret `horse`, run:
  ```bash
  $ anonlink encode 'alice.csv' 'horse' 'schema.json' 'encoded-entities.json'
  ```

  It will generate the CLK output and store in `clk.json`. To find out how to define the schema
  for your PII data, please refer [this page](https://clkhash.readthedocs.io/en/stable/schema.html) for
  details.


pkgId: 1d77ef07174511cf72011cd8c2fb9ca767200db7b563b44393affb8addc21aa5
name: python-anonupload
arch: src
version: 1.3.0
epoch: 0
release: 1
summary: upload and download to anonfiles server
url: https://github.com/jakbin/anonupload
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anonupload-1.3.0-1.src.rpm
checksum_type: sha256
description:
  An upload script for anonfiles.com made in python. Supports multiple files.

   [![Publish package](https://github.com/jakbin/anonupload/actions/workflows/publish.yml/badge.svg)](https://github.com/jakbin/anonupload/actions/workflows/publish.yml)
   [![PyPI version](https://badge.fury.io/py/anonupload.svg)](https://pypi.org/project/anonupload/)
   [![Downloads](https://pepy.tech/badge/anonupload/month)](https://pepy.tech/project/anonupload)
   [![Downloads](https://static.pepy.tech/personalized-badge/anonupload?period=total&units=international_system&left_color=green&right_color=blue&left_text=Total%20Downloads)](https://pepy.tech/project/anonupload)
   ![GitHub Contributors](https://img.shields.io/github/contributors/jakbin/anonupload)
   ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/jakbin/anonupload)
   ![GitHub last commit](https://img.shields.io/github/last-commit/jakbin/anonupload)
   ![Python 3.6](https://img.shields.io/badge/python-3.6-yellow.svg)



  - Progress bar
  - upload urls will save in a file.
  - You can change file name before upload on anonfile server




  ```sh
  pip3 install anonupload
  ```


  ```sh
  anon up {path-to-file_1} {path-to-file _2} ...  # upload file to anonfile server
  anon d {url1} {url2} ...              # and upload directly to anonfiles
  ```



  The anonfile-upload client is also usable through an API (for test integration, automation, etc)



  ```py
  from anonupload import upload

  upload(filename)
  ```

  ```py
  from anonupload import changefile_and_upload
  changefile_and_upload([file1, file2])
  ```



  ```py
  from anonupload import download

  download(url)
  ```



  ```py
  from anonupload import downloads

  downloads([url1, url2])
  ```


pkgId: 8df450453ddcff020aed0d809cb005ddee602a66f0c6dfdd99e6b13957f48e5d
name: python-anonymity-api
arch: src
version: 1.0.2
epoch: 0
release: 1
summary: A Python library offering conventional anonymity functions, as well as Workload-Aware anonymity.
url: https://github.com/farosilva0/anonymity_api
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anonymity-api-1.0.2-1.src.rpm
checksum_type: sha256
description:
  This is a Python library that offers conventional anonymization techniques, utility metrics, and verification methods.



  You can install the package via the command line:

  ```bat
  pip install anonymity-api
  ```



  The package is divided into three different modules, as mentioned previously:
  * anonymity
  * utility
  * verifier



  This module contains the functions to anonymize data.

  The conventional anonymization functions available are:
  * k-anonymity
  * distinct l-diversity
  * entropy l-diversity
  * recursive (c,l)-diversity
  * t-closeness

  Another available function is the suggestion function that, given a dataset and its characteristics ( list with quasi-identifiers and sensitive attributes), suggests an anonymization to use, returning an anonymized dataset without choosing a technique. This is helpful for users who may not know how to anonymize data or aren't familiar with it.

  We also offer Workload-Aware anonymization techniques. These take the usual anonymization parameters also present in the conventional anonymization techniques but, in addition to that, the user can give a query representing to work to be done on the dataset. This ensures higher utility over the tasks to be done.

  | Technique|      Query|
  |----------|:-------------:|
  | Simple query |  (*quasi-identifier* (operation*) *value* ) |
  | Keeping correlation|    corr( *quasi-identifier*, *sensitive-attribute* )|
  | Grouping | group( *quasi-identifier*, *value* ) |

  *operation can be: >, >=, =, < or <=



  The utility module offers some utility techniques and a function that given an anonymized dataset, replaces the interval on the quasi-identifiers with a value comprehended in it.

  The utility metrics available are:
  * Discernibility Metric
  * Average Equivalence Class Size Metric
  * Normalized Certainty Penalty



  This module given an anonymized dataset offers funtions for each of the conventional techniques in the Anonymization module.

  These functions will say which parameter was used to anonymize the dataset. For instance, it would give the K for k-anonymity, l for distinct l-diversity, and so forth.


pkgId: 5a88378fc5afad3af101338f98640b4bbc9319f67a438d10e0456af5e4e78438
name: python-anonymization
arch: src
version: 0.1.9
epoch: 0
release: 1
summary: Text anonymization using Faker
url: https://github.com/alterway/anonymization
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anonymization-0.1.9-1.src.rpm
checksum_type: sha256
description:
  Text anonymization in many languages for python3.6+ using [Faker](https://github.com/joke2k/faker).



  ```bash
  pip install anonymization
  ```





  This example use NamedEntitiesAnonymizer which require [spacy](https://spacy.io) and a spacy model.

  ```bash
  pip install spacy
  python -m spacy download en_core_web_lg
  ```

  ```python
  >>> from anonymization import Anonymization, AnonymizerChain, EmailAnonymizer, NamedEntitiesAnonymizer

  >>> text = "Hi John,\nthanks for you for subscribing to Superprogram, feel free to ask me any question at secret.mail@Superprogram.com \n Superprogram the best program!"
  >>> anon = AnonymizerChain(Anonymization('en_US'))
  >>> anon.add_anonymizers(EmailAnonymizer, NamedEntitiesAnonymizer('en_core_web_lg'))
  >>> anon.anonymize(text)
  'Hi Holly,\nthanks for you for subscribing to Ariel, feel free to ask me any question at shanestevenson@gmail.com \n Ariel the best program!'
  ```

  Or make it reversible with pseudonymize:

  ```python
  >>> from anonymization import Anonymization, AnonymizerChain, EmailAnonymizer, NamedEntitiesAnonymizer

  >>> text = "Hi John,\nthanks for you for subscribing to Superprogram, feel free to ask me any question at secret.mail@Superprogram.com \n Superprogram the best program!"
  >>> anon = AnonymizerChain(Anonymization('en_US'))
  >>> anon.add_anonymizers(EmailAnonymizer, NamedEntitiesAnonymizer('en_core_web_lg'))
  >>> clean_text, patch = anon.pseudonymize(text)

  >>> print(clean_text)
  'Christopher, \nthanks for you for subscribing to Audrey, feel free to ask me any question at colemanwesley@hotmail.com \n Audrey the best program!'

  revert_text = anon.revert(clean_text, patch)

  >>> print(text == revert_text)
  true
  ```



  Our solution supports many languages along with their specific information formats.

  For example, we can generate a french phone number:

  ```python
  >>> from anonymization import Anonymization, PhoneNumberAnonymizer
  >>>
  >>> text = "C'est bien le 0611223344 ton numéro ?"
  >>> anon = Anonymization('fr_FR')
  >>> phoneAnonymizer = PhoneNumberAnonymizer(anon)
  >>> phoneAnonymizer.anonymize(text)
  "C'est bien le 0144939332 ton numéro ?"
  ```

  More examples in [/examples](https://github.com/alterway/anonymization/tree/master/examples)





  | name                                                                         | lang                        |
  |------------------------------------------------------------------------------|-----------------------------|
  | [FilePathAnonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/fileAnonymizers.py)           | -                           |



  | name                                                                         | lang                        |
  |------------------------------------------------------------------------------|-----------------------------|
  | [EmailAnonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/internetAnonymizers.py)          | -                           |
  | [UriAnonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/internetAnonymizers.py)            | -                           |
  | [MacAddressAnonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/internetAnonymizers.py)     | -                           |
  | [Ipv4Anonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/internetAnonymizers.py)           | -                           |
  | [Ipv6Anonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/internetAnonymizers.py)           | -                           |



  | name                                                                         | lang                        |
  |------------------------------------------------------------------------------|-----------------------------|
  | [PhoneNumberAnonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/phoneNumberAnonymizers.py) | [47+](https://github.com/joke2k/faker/tree/master/faker/providers/phone_number) |
  | [msisdnAnonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/fileAnonymizers.py)             | [47+](https://github.com/joke2k/faker/tree/master/faker/providers/phone_number) |



  | name                                                                         | lang                        |
  |------------------------------------------------------------------------------|-----------------------------|
  | [DateAnonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/dateAnonymizers.py)               | -                           |



  | name                                                                         | lang                        |
  |------------------------------------------------------------------------------|-----------------------------|
  | [NamedEntitiesAnonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/spacyAnonymizers.py)     | [7+](https://spacy.io/usage/models) |
  | [DictionaryAnonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/dictionaryAnonymizers.py)   | -                           |
  | [SignatureAnonymizer](https://github.com/alterway/anonymization/blob/master/anonymization/anonymizers/signatureAnonymizers.py)     | [7+](https://spacy.io/usage/models) |
  -



  Custom anonymizers can be easily created to fit your needs:

  ```python
  class CustomAnonymizer():
      def __init__(self, anonymization: Anonymization):
          self.anonymization = anonymization

      def anonymize(self, text: str) -> str:
          return modified_text
          
          return self.anonymization.regex_anonymizer(text, pattern, provider)
          
          return self.anonymization.replace_all(text, matchs, provider)
  ```

  You may also add new faker provider with the helper `Anonymization.add_provider(FakerProvider)` or access the faker instance directly `Anonymization.faker`.



  This module is benchmarked on [synth_dataset](benchmark/data/synth_dataset.txt) from [presidio-research](https://github.com/microsoft/presidio-research) and returns accuracy result(**0.79**) better than Microsoft's solution(**0.75**)

  You can run the benchmark using docker:

  ```bash
  docker build . -f ./benchmark/dockerfile -t anonbench
  docker run -it --rm --name anonbench anonbench
  ```



  MIT


pkgId: dfd779185f571ddb25ba1e60d6f3cd7d3008c56057193004408fafae7ae72a13
name: python-anonymizedf
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: a convenient way to anonymize your data for analytics
url: https://github.com/AlexFrid/anonymizedf
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anonymizedf-1.0.1-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/anonymizedf)](https://pypi.org/project/anonymizedf)
  [![PyPI - Status](https://img.shields.io/pypi/status/anonymizedf)](https://pypi.org/project/anonymizedf)
  [![PyPI - License](https://img.shields.io/pypi/l/anonymizedf)](https://github.com/AlexFrid/anonymizedf/blob/master/LICENSE)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)



  **Anonymize df** is a package that helps you quickly and easily generate realistic
  fake data from a Pandas DataFrame.


  - You're hiring consultants to work on your data but need to anonymize it first
  - You're a consultant and created something great that you want to make into a template



  You can install anonymizedf using pip:
  ```bash
  pip install anonymizedf
  ```
  This will also try downloading the tableau hyper api and pandas packages
  if you don't have them already.

  If you don't want to use pip you can also download this repository and execute:
  ```bash
  python setup.py install
  ```



  ```python
  import pandas as pd
  from anonymizedf.anonymizedf import anonymize


  df = pd.read_csv("https://query.data.world/s/shcktxndtu3ojonm46tb5udlz7sp3e")


  an = anonymize(df)




  an.fake_names("Customer Name")
  an.fake_ids("Customer ID")
  an.fake_whole_numbers("Loyalty Reward Points")
  an.fake_categories("Segment")
  an.fake_dates("Date")
  an.fake_decimal_numbers("Fraction")


  fake_df = (
      an
      .fake_names("Customer Name", chaining=True)
      .fake_ids("Customer ID", chaining=True)
      .fake_whole_numbers("Loyalty Reward Points", chaining=True)
      .fake_categories("Segment", chaining=True)
      .fake_dates("Date", chaining=True)
      .fake_decimal_numbers("Fraction", chaining=True)
      .show_data_frame()
  )


  fake_df = an.fake_names("Customer Name")
  fake_df = an.fake_ids("Customer ID")
  fake_df = an.fake_whole_numbers("Loyalty Reward Points")
  fake_df = an.fake_categories("Segment")
  fake_df = an.fake_dates("Date")
  fake_df = an.fake_decimal_numbers("Fraction")

  fake_df.to_csv("fake_customers.csv", index=False)






  for column in column_list:
      an.fake_categories(column)

  ```



  <table border="1" class="dataframe">
    <thead>
      <tr style="text-align: right;">
        <th></th>
        <th>Customer ID</th>
        <th>Customer Name</th>
        <th>Loyalty Reward Points</th>
        <th>Segment</th>
        <th>Date</th>
        <th>Fraction</th>
        <th>Fake_Customer Name</th>
        <th>Fake_Customer ID</th>
        <th>Fake_Loyalty Reward Points</th>
        <th>Fake_Segment</th>
        <th>Fake_Date</th>
        <th>Fake_Fraction</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <th>0</th>
        <td>AA-10315</td>
        <td>Alex Avila</td>
        <td>76</td>
        <td>Consumer</td>
        <td>01/01/2000</td>
        <td>7.6</td>
        <td>Christian Metcalfe-Reid</td>
        <td>YEJP71011502726136</td>
        <td>558</td>
        <td>Segment 1</td>
        <td>1978-11-09</td>
        <td>29.96</td>
      </tr>
      <tr>
        <th>1</th>
        <td>AA-10375</td>
        <td>Allen Armold</td>
        <td>369</td>
        <td>Consumer</td>
        <td>02/01/2000</td>
        <td>36.9</td>
        <td>Helen Taylor</td>
        <td>XWOB83170110594048</td>
        <td>286</td>
        <td>Segment 1</td>
        <td>1989-12-29</td>
        <td>72.50</td>
      </tr>
      <tr>
        <th>2</th>
        <td>AA-10480</td>
        <td>Andrew Allen</td>
        <td>162</td>
        <td>Consumer</td>
        <td>03/01/2000</td>
        <td>16.2</td>
        <td>Joanne Price</td>
        <td>VVCJ28547588747677</td>
        <td>742</td>
        <td>Segment 1</td>
        <td>1982-09-23</td>
        <td>79.77</td>
      </tr>
      <tr>
        <th>3</th>
        <td>AA-10645</td>
        <td>Anna Andreadi</td>
        <td>803</td>
        <td>Consumer</td>
        <td>04/01/2000</td>
        <td>80.3</td>
        <td>Rhys Jones</td>
        <td>OXCI12190813836802</td>
        <td>206</td>
        <td>Segment 1</td>
        <td>2000-10-14</td>
        <td>7.15</td>
      </tr>
      <tr>
        <th>4</th>
        <td>AB-10015</td>
        <td>Aaron Bergman</td>
        <td>935</td>
        <td>Consumer</td>
        <td>05/01/2000</td>
        <td>93.5</td>
        <td>Nigel Baldwin-Cook</td>
        <td>JOXS05799252235987</td>
        <td>914</td>
        <td>Segment 1</td>
        <td>2018-01-30</td>
        <td>40.66</td>
      </tr>
    </tbody>
  </table>


  - [Pandas](https://pandas.pydata.org)
  - [Faker](https://github.com/joke2k/faker)


pkgId: 6585ca751b61663511b3e6b020475c8746cde3d68b956042e29ed31935eb1f09
name: python-anonymizeip
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Python library for anonymizing IP addresses
url: https://github.com/samuelmeuli/anonymize-ip
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anonymizeip-1.0.0-1.src.rpm
checksum_type: sha256
description:
  This is a simple Python library for anonymizing IP addresses. Both IPv4 and IPv6 addresses are supported.

  Examples:

  * IPv4: `95.239.169.11` → `95.239.169.0`
  * IPv6: `5219:3a94:fdc5:19e1:70a3:b2c4:40ef:ae03` → `5219:3a94:fdc5:19e1::`




  ```
  pip install anonymizeip
  ```

  ```py
  from anonymizeip import anonymize_ip

  address = "fe80::0202:b3ff:fe1e:8329"
  anonymized = anonymize_ip(address)
  print(anonymized)


  ```




  The number of address blocks that are set to 0 can be customized.

  Besides the IP address, the function `anonymize_ip` takes two optional parameters:

  ```py
  anonymize_ip(
    address,
    ipv4_mask="...",
    ipv6_mask="..."
  )
  ```

  * `ipv4_mask`: Defaults to `255.255.255.0`, i.e. the last octet will be anonymized (set to 0)
  * `ipv6_mask`: Defaults to `ffff:ffff:ffff:ffff::` (same as `ffff:ffff:ffff:ffff:0:0:0:0`), i.e. the last four blocks will be anonymized (set to 0)




  1. `git clone`
  2. `pipenv install --dev`
  3. Make your code modifications
  4. `pipenv run test`
  5. `pipenv run lint`

  Contributions are always welcome. Please first discuss changes via issue before submitting a pull request.




  The implementation of this library was strongly inspired by [php-ip-anonymizer](https://github.com/geertw/php-ip-anonymizer) by Geert Wirken.


pkgId: 62024a55a40530521840821ae1b111f55334e4513d760245ba8ff3290a847c2e
name: python-anosql
arch: src
version: 1.0.2
epoch: 0
release: 1
summary: Easy SQL in Python
url: https://github.com/honza/anosql
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anosql-1.0.2-1.src.rpm
checksum_type: sha256
description:
  A Python library for using SQL
  Inspired by the excellent `Yesql`_ library by Kris Jenkins.  In my mother
  tongue, *ano* means *yes*.
  If you are on python3.6+ or need ``anosql`` to work with ``asyncio``-based database drivers, see the related project, `aiosql <https://github.com/nackjicholson/aiosql>`_.
  Complete documentation is available at `Read The Docs <https://anosql.readthedocs.io/en/latest/>`_.


pkgId: be3bd2873b7724d6d9bfeec9eac2ec711e3f1e8e87ddcdd35e900b7c843ee46d
name: python-another-fastapi-jwt-auth
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: Another iteration of fastapi-jwt-auth
url: https://github.com/delrey1/another-fastapi-jwt-auth
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-another-fastapi-jwt-auth-0.1.3-1.src.rpm
checksum_type: sha256
description:
  [//]: # (**Documentation**: <a href="https://indominusbyte.github.io/fastapi-jwt-auth" target="_blank">https://indominusbyte.github.io/fastapi-jwt-auth</a>)
  **Source Code**:


pkgId: f60b4ed9934b90be3446e1299964979261f15173da4c4146659317ad0b3b8f7d
name: python-another-sd-client
arch: src
version: 1.14.0
epoch: 0
release: 1
summary: Client for communicating with SD Løn
url: https://magenta.dk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-another-sd-client-1.14.0-1.src.rpm
checksum_type: sha256
description:
  SD client library for communicating with SD Løn



  To make it easy for you to get started with GitLab, here's a list of recommended next steps.

  Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!



  - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
  - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:

  ```
  cd existing_repo
  git remote add origin https://git.magenta.dk/rammearkitektur/another-sd-client.git
  git branch -M master
  git push -uf origin master
  ```



  - [ ] [Set up project integrations](https://git.magenta.dk/rammearkitektur/another-sd-client/-/settings/integrations)



  - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
  - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
  - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
  - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
  - [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)



  Use the built-in continuous integration in GitLab.

  - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
  - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
  - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
  - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
  - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)

  ***



  When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.


  Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.


  Choose a self-explaining name for your project.


  Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.


  On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.


  Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.


  Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.


  Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.


  Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.


  If you have ideas for releases in the future, it is a good idea to list them in the README.


  State if you are open to contributions and what your requirements are for accepting them.

  For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.

  You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.


  Show your appreciation to those who have contributed to the project.


  For open source projects, say how it is licensed.


  If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.


pkgId: 45cd31c4b1345cc2174ff7d9376f886e53a902b840cd1af16d8a2aeec644b9f1
name: python-anova-wifi
arch: src
version: 0.17.1
epoch: 0
release: 1
summary: A package to get read only data from Anova precision cookers with wifi
url: https://github.com/Lash-L/anova_wifi
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anova-wifi-0.17.1-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <a href="https://github.com/Lash-L/anova-wifi/actions?query=workflow%3ACI">
      <img src="https://img.shields.io/github/workflow/status/Lash-L/anova-wifi/CI/main?label=CI&logo=github&style=flat-square" alt="CI Status" >
    </a>
    <a href="https://anova-wifi.readthedocs.io">
      <img src="https://img.shields.io/readthedocs/anova-wifi.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
    </a>
    <a href="https://codecov.io/gh/Lash-L/anova-wifi">
      <img src="https://img.shields.io/codecov/c/github/Lash-L/anova-wifi.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
    </a>
  </p>
  <p align="center">
    <a href="https://python-poetry.org/">
      <img src="https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=" alt="Poetry">
    </a>
    <a href="https://github.com/ambv/black">
      <img src="https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square" alt="black">
    </a>
    <a href="https://github.com/pre-commit/pre-commit">
      <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
    </a>
  </p>
  <p align="center">
    <a href="https://pypi.org/project/anova-wifi/">
      <img src="https://img.shields.io/pypi/v/anova-wifi.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
    </a>
    <img src="https://img.shields.io/pypi/pyversions/anova-wifi.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
    <img src="https://img.shields.io/pypi/l/anova-wifi.svg?style=flat-square" alt="License">
  </p>

  A package to get read only data from Anova precision cookers with wifi



  Install this via pip (or your favourite package manager):

  `pip install anova-wifi`



  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

  <!-- prettier-ignore-start -->
  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
  <!-- prettier-ignore-start -->
  <!-- markdownlint-disable -->
  <table>
    <tbody>
      <tr>
        <td align="center" valign="top" width="14.28%"><a href="https://github.com/Lash-L"><img src="https://avatars.githubusercontent.com/u/20257911?v=4?s=80" width="80px;" alt="Luke"/><br /><sub><b>Luke</b></sub></a><br /><a href="https://github.com/Lash-L/anova-wifi/commits?author=Lash-L" title="Code">💻</a> <a href="#ideas-Lash-L" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/Lash-L/anova-wifi/commits?author=Lash-L" title="Documentation">📖</a></td>
      </tr>
    </tbody>
  </table>

  <!-- markdownlint-restore -->
  <!-- prettier-ignore-end -->

  <!-- ALL-CONTRIBUTORS-LIST:END -->
  <!-- prettier-ignore-end -->

  This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
  Contributions of any kind welcome!



  This package was created with
  [Copier](https://copier.readthedocs.io/) and the
  [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
  project template.

  This is heavily based off of information
  from [this reddit post](https://www.reddit.com/r/sousvide/comments/p43k18/tracking_my_anovas_status_over_time_using_the_api/)
  by [/u/InitializedVariable](https://www.reddit.com/user/InitializedVariable)


pkgId: 91409fc2cb138aeffbaabebf7410e2b2ad8cc7f017bf33fe3ff6400ffb1cd6f1
name: python-anpy
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: Python client for assemblee-nationale.fr website
url: https://github.com/regardscitoyens/anpy
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-anpy-0.2.1-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/anpy.svg)](https://badge.fury.io/py/anpy)
  [![Build Status](https://travis-ci.org/regardscitoyens/anpy.svg)](https://travis-ci.org/regardscitoyens/anpy)
  [![Coverage Status](https://coveralls.io/repos/github/regardscitoyens/anpy/badge.svg?branch=master)](https://coveralls.io/github/regardscitoyens/anpy?branch=master)

  ANpy is a python library for easily scraping data from http://assemblee-nationale.fr website

  Forget the ugly html, just get data:

      >>> from anpy.dossier import Dossier
      >>> url = 'http://www.assemblee-nationale.fr/14/dossiers/republique_numerique.asp'
      >>> dossier = Dossier.download_and_build(url)
      >>> dossier.title
      'Economie : pour une République numérique'
      >>> dossier.legislature
      14
      >>> r.procedure
      'PPL'
      >>> r.senat_url
      'http://www.senat.fr/dossier-legislatif/pjl15-325.html'
      >>> r.steps
      [{'type': 'AN_PREMIERE_LECTURE', 'acts': [...]}]




  ANpy currently provides the following features:

  - Amendement parsing
  - Amendement search
  - Question parsing
  - Question search
  - Dossier parsing (two differents formats)
  - Scrutin parsing

  ANpy supports Python 3.5.


  ```bash
  pip install anpy
  ```



  Documentation is available at http://anpy.readthedocs.io/en/latest



  A script anpy-cli is installed with the package, it provides the following commands :


  ```bash
  anpy-cli show_amendement http://www.assemblee-nationale.fr/14/amendements/1847/CION-DVP/CD266.asp
  ```


  ```bash
  anpy-cli show_amendements_summary --start-date 2014-06-01
  ```


  ```bash
  anpy-cli show_amendements_order 33299 --id-examen 4073
  ```


  ```bash
  anpy-cli show_question http://questions.assemblee-nationale.fr/q14/14-73499QE.htm
  ```



  Format is like [senapy](https://github.com/regardscitoyens/senapy) and the Open Data of [lafabriquedelaloi.fr](https://www.lafabriquedelaloi.fr)

  *There's more work done on this parser to make it work across many cases*

  ```bash
  anpy-cli parse http://www.assemblee-nationale.fr/14/dossiers/sante.asp
  [
      {
          "assemblee_id": "14-sante",
          "assemblee_legislature": 14,
          "assemblee_slug": "sante",
          "beginning": "2014-10-15",
          "long_title": "Questions sociales et santé : modernisation de notre système de santé",
          "steps": [
              {
                  "date": "2014-10-15",
                  "institution": "assemblee",
                  "source_url": "http://www.assemblee-nationale.fr/14/projets/pl2302.asp",
                  "stage": "1ère lecture",
                  "step": "depot"
              },
              {
                  "date": "2015-03-20",
                  "institution": "assemblee",
                  "source_url": "http://www.assemblee-nationale.fr/14/ta-commission/r2673-a0.asp",
                  "stage": "1ère lecture",
                  "step": "commission"
              },
              {
                  "date": "2015-04-14",
                  "institution": "assemblee",
                  "source_url": "http://www.assemblee-nationale.fr/14/ta/ta0505.asp",
                  "stage": "1ère lecture",
                  "step": "hemicycle"
              },
  ...
  ```

  Features:
  - Merging the law project across legislatures
  - Parse from Open Data when available or fallback to scraping HTML
  - Returns an array of law projects since a page can contains many law projects (ex: organic + non-organic)


  You can also parse many of them by giving a list of urls:

  ```bash
  anpy-cli doslegs_urls | anpy-cli parse_many an_doslegs/
  ```



  *This parser is still a work-in-progress*

  ```bash
  anpy-cli show_dossier http://www.assemblee-nationale.fr/14/dossiers/sante.asp
  {
      "legislature": "14",
      "procedure": "PJL",
      "senat_url": "http://www.senat.fr/dossier-legislatif/pjl14-406.html",
      "steps": [
          {
              "acts": [
                  {
                      "date": "2014-10-15T00:00:00",
                      "type": "DEPOT_INITIATIVE",
                      "url": "http://www.assemblee-nationale.fr/14/projets/pl2302.asp"
                  },
                  {
                      "type": "ETUDE_IMPACT",
                      "url": "http://www.assemblee-nationale.fr/14/projets/pl2302-ei.asp"
                  },
                  {
                      "date": "2015-03-16T00:00:00",
                      "type": "PROCEDURE_ACCELEREE"
                  },
                  {
                      "date": "2015-03-20T00:00:00",
                      "type": "DEPOT_RAPPORT",
                      "url": "http://www.assemblee-nationale.fr/14/rapports/r2673.asp"
                  },
                  {
                      "date": "2015-03-24T00:00:00",
                      "type": "TEXTE_COMMISSION",
                      "url": "http://www.assemblee-nationale.fr/14/ta-commission/r2673-a0.asp"
                  },
                  {
                      "date": "2015-02-11T00:00:00",
                      "type": "DEPOT_RAPPORT",
                      "url": "http://www.assemblee-nationale.fr/14/rap-info/i2581.asp"
                  },
                  {
  ...
  ```



  ```bash
  anpy-cli doslegs_urls
  ```


  ```bash
  anpy-cli show_scrutin http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/14/(num)/1212
  ```



  ```bash
  pip install -U -r test_requirements.txt
  pip install -e .
  pycodestyle --exclude=tests,docs .
  flake8 --exclude=tests,docs .
  py.test --cov=anpy
  ```


pkgId: 49726878910fdf60f613089d08fef1672a2fa95c721f8349db16336ce7994a4c
name: python-ansaittua
arch: src
version: 2022.7.30
epoch: 0
release: 1
summary: Earned Value Management (Finnish: ansaittua arvonhallintaa) when coding swiftly.
url: https://git.sr.ht/~sthagen/ansaittua
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ansaittua-2022.7.30-1.src.rpm
checksum_type: sha256
description:
  Earned Value Management (Finnish: ansaittua arvonhallintaa) when coding swiftly.

  [License: MIT](https://git.sr.ht/~sthagen/ansaittua/tree/default/item/LICENSE)

  [![version](https://img.shields.io/pypi/v/ansaittua.svg?style=flat)](https://pypi.python.org/pypi/ansaittua/)
  [![downloads](https://img.shields.io/pypi/dm/ansaittua.svg?style=flat)](https://pypi.python.org/pypi/ansaittua/)
  [![wheel](https://img.shields.io/pypi/wheel/ansaittua.svg?style=flat)](https://pypi.python.org/pypi/ansaittua/)
  [![supported-versions](https://img.shields.io/pypi/pyversions/ansaittua.svg?style=flat)](https://pypi.python.org/pypi/ansaittua/)
  [![supported-implementations](https://img.shields.io/pypi/implementation/ansaittua.svg?style=flat)](https://pypi.python.org/pypi/ansaittua/)



  User and developer [documentation of ansaittua](https://codes.dilettant.life/docs/ansaittua).



  Feature requests and bug reports are bested entered in the [todos of ansaittua](https://todo.sr.ht/~sthagen/ansaittua).



  The primary source repository of [ansaittua is at sourcehut](https://git.sr.ht/~sthagen/ansaittua)
  a collection of tools useful for software development.



  Experimental.

  **Note**: The default branch is `default`.


pkgId: 8aa6c358c64be22af8751db557a1399c751d60e4ed43c6f99375e1bf7ddc5bab
name: python-ansar-connect
arch: src
version: 1.1.44
epoch: 0
release: 1
summary: Tools and runtime for network messaging
url: https://pypi.org/project/ansar-connect/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ansar-connect-1.1.44-1.src.rpm
checksum_type: sha256
description:
  The **ansar-connect** library implements clear and concise network messaging for a wide range
  of networking requirements. From multi-processing within a single host through to messaging
  beween different LANs on the Internet. There is a single send method that does it all.


pkgId: a785295805db5593a90a3e5a9d0553b5ea22a9f37d7e2e5ebe8b0734702bff9b
name: python-ansar-create
arch: src
version: 1.0.47
epoch: 0
release: 1
summary: Tools and runtime for asynchronous programming
url: https://pypi.org/project/ansar-create/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ansar-create-1.0.47-1.src.rpm
checksum_type: sha256
description:
  The **ansar-create** library uses multi-threading and multi-processing to solve difficult
  software challenges such as concurrency, interruption and cancellation. It wraps those
  platform facilities in a standard runtime model, giving developers the ability to express
  that type of software in a clear and consistent manner.
  This type of software is often referred to as asynchronous, event-driven or reactive
  software. It acknowledges the fundamental fact that significant events can occur at
  any time, and that software must be able to respond to those events in a reliable
  and timely manner.


pkgId: 99984f96f8f43fa9702c4802afa3e5b9051fd5cc572f9124369282b4517dd2a7
name: python-ansi-escapes
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: ANSI escape codes for manipulating the terminal
url: https://github.com/shawwn/ansi-escapes-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ansi-escapes-0.1.1-1.src.rpm
checksum_type: sha256
description:
  > [ANSI escape codes](https://web.archive.org/web/20200413124215/http://www.termsys.demon.co.uk/vtansi.htm) for manipulating the terminal


  A port of the Node.js package [`ansi-escapes`](https://github.com/sindresorhus/ansi-escapes) to Python.



  ```
  python3 -m pip install -U ansi-escapes
  ```



  ```py
  from ansi_escapes import ansiEscapes
  import sys


  sys.stdout.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft)

  ```






  Set the absolute position of the cursor. `x0` `y0` is the top left of the screen.



  Set the position of the cursor relative to its current position.



  Move cursor up a specific amount of rows. Default is `1`.



  Move cursor down a specific amount of rows. Default is `1`.



  Move cursor forward a specific amount of columns. Default is `1`.



  Move cursor backward a specific amount of columns. Default is `1`.



  Move cursor to the left side.



  Save cursor position.



  Restore saved cursor position.



  Get cursor position.



  Move cursor to the next line.



  Move cursor to the previous line.



  Hide cursor.



  Show cursor.



  Erase from the current cursor position up the specified amount of rows.



  Erase from the current cursor position to the end of the current line.



  Erase from the current cursor position to the start of the current line.



  Erase the entire current line.



  Erase the screen from the current line down to the bottom of the screen.



  Erase the screen from the current line up to the top of the screen.



  Erase the screen and move the cursor the top left position.



  Scroll display up one line.



  Scroll display down one line.



  Clear the terminal screen. (Viewport)



  Clear the whole terminal, including scrollback buffer. (Not just the visible part of it)



  Output a beeping sound.



  Create a clickable link.

  [Supported terminals.](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) Use [`supports-hyperlinks`](https://github.com/jamestalmage/supports-hyperlinks) to detect link support.



  (Not yet implemented.)

  Display an image.

  *Currently only supported on iTerm2 >=3*

  See [term-img](https://github.com/sindresorhus/term-img) for a higher-level module.



  Type: `Buffer`

  Buffer of an image. Usually read in with `fs.readFile()`.



  Type: `object`




  Type: `string | number`

  The width and height are given as a number followed by a unit, or the word "auto".

  - `N`: N character cells.
  - `Npx`: N pixels.
  - `N%`: N percent of the session's width or height.
  - `auto`: The image's inherent size will be used to determine an appropriate dimension.



  Type: `boolean`\
  Default: `true`



  Type: `string`\
  Default: `process.cwd()`

  [Inform iTerm2](https://www.iterm2.com/documentation-escape-codes.html) of the current directory to help semantic history and enable [Cmd-clicking relative paths](https://coderwall.com/p/b7e82q/quickly-open-files-in-iterm-with-cmd-click).



  Creates an escape code to display an "annotation" in iTerm2.

  An annotation looks like this when shown:

  <img src="https://user-images.githubusercontent.com/924465/64382136-b60ac700-cfe9-11e9-8a35-9682e8dc4b72.png" width="500">

  See the [iTerm Proprietary Escape Codes documentation](https://iterm2.com/documentation-escape-codes.html) for more information.



  Type: `string`

  The message to display within the annotation.

  The `|` character is disallowed and will be stripped.



  Type: `object`



  Type: `number`\
  Default: The remainder of the line

  Nonzero number of columns to annotate.



  Type: `number`\
  Default: Cursor position

  Starting X coordinate.

  Must be used with `y` and `length`.



  Type: `number`\
  Default: Cursor position

  Starting Y coordinate.

  Must be used with `x` and `length`.



  Type: `boolean`\
  Default: `false`

  Create a "hidden" annotation.

  Annotations created this way can be shown using the "Show Annotations" iTerm command.



  - [ansi-styles](https://github.com/shawwn/ansi-styles-python) - ANSI escape codes for styling strings in the terminal



  MIT



  A library by [Shawn Presser](https://www.shawwn.com). If you found it useful, please consider [joining my patreon](https://www.patreon.com/shawwn)!

  My Twitter DMs are always open; you should [send me one](https://twitter.com/theshawwn)! It's the best way to reach me, and I'm always happy to hear from you.

  - Twitter: [@theshawwn](https://twitter.com/theshawwn)
  - Patreon: [https://www.patreon.com/shawwn](https://www.patreon.com/shawwn)
  - HN: [sillysaurusx](https://news.ycombinator.com/threads?id=sillysaurusx)
  - Website: [shawwn.com](https://www.shawwn.com)


pkgId: 57d081856048536b5f718d3be0b32eb5349a3751e84b225573c6a199bb7106b1
name: python-ansi-string
arch: src
version: 1.0.6
epoch: 0
release: 1
summary: ANSI String Formatter in Python for CLI Color and Style Formatting
url: https://github.com/Tails86/ansi-string
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ansi-string-1.0.6-1.src.rpm
checksum_type: sha256
description:
  ANSI String Formatter in Python for CLI Color and Style Formatting



  This code was originally written for [greplica](https://pypi.org/project/greplica/), but I felt it deserved its own, separate library.

  The main goals for this project are:
  - To provide a simple way to construct a string-like object with embedded ANSI formatting without requiring the developer to know how ANSI formatting works
  - Provide a way to further format the object using format string
  - Allow for concatenation of the object



  Feel free to open a bug report or make a merge request on [github](https://github.com/Tails86/ansi-string/issues).


  This project is uploaded to PyPI at https://pypi.org/project/ansi-string

  To install, ensure you are connected to the internet and execute: `python3 -m pip install ansi-string --upgrade`



  ![Examples](https://raw.githubusercontent.com/Tails86/ansi-string/9d49f88da0275c7a77a63b6d6a90a4e75a80585a/docs/examples.jpg)

  Refer to the [test file](https://github.com/Tails86/ansi-string/blob/main/tests/test_ansi_string.py) for more examples on how to use the AnsiString class.



  To begin, import AnsiString from the ansi_string module.

  ```py
  from ansi_string import en_tty_ansi, AnsiFormat, AnsiString
  ```



  Windows requires ANSI formatting to be enabled before it can be used. This can either be set in the environment or by simply calling the following before printing so that ANSI is enabled locally.
  ```py
  en_tty_ansi()
  ```

  If this also needs to be enabled for stderr, stderr may also be passed to this method.
  ```py
  import sys
  en_tty_ansi(sys.stderr)
  ```

  For Windows, this returns True if the given IO is a TTY (i.e. not piped to a file) and enabling ANSI was successful. For all other operating systems, this will return True if and only if the given IO is a TTY (i.e. isatty()); no other action is taken.



  The AnsiString class contains the following `__init__` method.

  ```py
  class AnsiString:
      def __init__(self, s:str='', *setting_or_settings:Union[List[str], str, List[int], int, List[AnsiFormat], AnsiFormat]): ...
  ```

  The first argument, `s`, is a string to be formatted. The next 0 to N arguments are formatting setting directives that can be applied to the entire string. These arguments can be in the form of any of the following.
  - An AnsiFormat enum (ex: `AnsiFormat.BOLD`)
  - The result of calling `AnsiFormat.rgb()`, `AnsiFormat.fg_rgb()`, `AnsiFormat.bg_rgb()`, `AnsiFormat.ul_rgb()`, or `AnsiFormat.dul_rgb()`
  - A string color or formatting name (i.e. any name of the AnsiFormat enum in lower or upper case)
  - An `rgb(...)` function directive as a string (ex: `"rgb(255, 255, 255)"`)
      - `rgb(...)` or `fg_rgb(...)` to adjust text color
      - `bg_rgb(...)` to adjust background color
      - `ul_rgb(...)` to enable underline and set the underline color
      - `dul_rgb(...)` to enable double underline and set the underline color
      - Value given may be either a 24-bit integer or 3 x 8-bit integers, separated by commas
      - Each given value within the parenthesis is treated as hexadecimal if the value starts with "0x", otherwise it is treated as a decimal value

  A formatting setting may also be any of the following, but it's not advised to specify settings in any of these ways unless there is a specific reason to do so.
  - An AnsiSetting object
  - A string containing known ANSI directives (ex: `"01;31"` for BOLD and FG_RED)
      - The string will normally be parsed into separate settings unless the character "[" is the first character of the string (ex: `"[38;5;214"`)
      - Never specify the reset directive (0) because this is implicitly handled internally
  - A single ANSI directive as an integer

  Examples:

  ```py





  s = AnsiString("This is an ANSI string", "light_sea_green", AnsiFormat.BG_CHOCOLATE, "ul_rgb(0x808080)", "3", 1)
  print(s)
  ```



  - The static method `AnsiString.join()` is provided to join together 0 to many `str` and `AnsiString` values into a single `AnsiString`.
  - The `+` operator may be used to join an `AnsiString` with another `AnsiString` or `str` into a new `AnsiString`
      - The `+` operator may not be used if the left-hand-side value is a `str` and the right-hand-side values is an `AnsiString`
  - The `+=` operator may be used to append an `AnsiString` or `str` to an `AnsiString`

  Examples:

  ```py
  s = AnsiString.join("This ", AnsiString("string", AnsiFormat.BOLD))
  s += AnsiString(" contains ") + AnsiString("multiple", AnsiFormat.BG_BLUE)
  s += AnsiString(" color ", AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC) + "settings accross different ranges"
  print(s)
  ```





  The method `AnsiString.apply_formatting()` is provided to append formatting to a previously constructed `AnsiString`.

  Example:

  ```py
  s = AnsiString("This string contains multiple color settings across different ranges")
  s.apply_formatting(AnsiFormat.BOLD, 5, 11)
  s.apply_formatting(AnsiFormat.BG_BLUE, 21, 29)
  s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)
  print(s)
  ```



  A format string may be used to format an AnsiString before printing. The format specification string must be in the format `"[string_format][:ansi_format]"` where `string_format` is the standard string format specifier and `ansi_format` contains 0 or more ANSI directives separated by semicolons (;). The ANSI directives may be any of the same string values that can be passed to the `AnsiString` constructor. If no `string_format` is desired, then it can be set to an empty string.

  Examples:

  ```py
  ansi_str = AnsiString("This is an ANSI string")

  print("{:>100:bold;red}".format(ansi_str))

  print("{::bold;red}".format(ansi_str))

  print("{::bold;rgb(255, 0, 0)}".format(ansi_str))

  print(f"{ansi_str::bold;red}")

  fg_color = 0x8A2BE2
  bg_colors = [100, 232, 170]
  ul_colors = [0xFF, 0x63, 0x47]
  print(f"{ansi_str::rgb({fg_color});bg_rgb({bg_colors});ul_rgb({ul_colors})}")
  ```



  The method `AnsiString.format_matching()` and `AnsiString.unformat_matching()` are provided to apply or remove formatting of an `AnsiString` based on a match specification.

  Example:

  ```py
  s = AnsiString("Here is a strING that I will match formatting", AnsiFormat.BOLD)

  s.format_matching("[A-Za-z]+ing", "cyan", AnsiFormat.BG_PINK, regex=True, match_case=True)

  s.unformat_matching("[A-Za-z]+ing", AnsiFormat.BOLD, regex=True)
  print(s)
  ```



  Calling the method `AnsiString.clear_formatting()` will clear all formatting applied.



  The method `AnsiString.assign_str()` may be used to assign the internal string and adjust formatting as necessary.



  The attribute `AnsiString.base_str` may be used to retrieve the unformatted base string.



  The methods `AnsiString.ansi_settings_at()` and `AnsiString.settings_at()` may be used to retrieve the settings applied over a single character.



  Many other methods that are found in the `str` class such as `replace()` are available in `AnsiString` which manipulate the string while applying formatting where necessary.

  - capitalize
  - casefold
  - center
  - count
  - encode
  - endswith
  - expandtabs
  - find
  - index
  - isalnum
  - isalpha
  - isascii
  - isdecimal
  - isdigit
  - isidentifier
  - islower
  - isnumeric
  - isprintable
  - isspace
  - istitle
  - isupper
  - ljust
  - lower
  - lstrip
  - partition
  - removeprefix
  - removesuffix
  - replace
  - rfind
  - rindex
  - rjust
  - rpartition
  - rsplit
  - rstrip
  - split
  - splitlines
  - strip
  - swapcase
  - title
  - upper
  - zfill


pkgId: 1e6432a7c7d86c3a1cbc8c481d5bdfd61841a01894ab557decce06c687817580
name: python-ansi-string
arch: src
version: 1.1.4
epoch: 0
release: 1
summary: ANSI String Formatter in Python for CLI Color and Style Formatting
url: https://github.com/Tails86/ansi-string
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ansi-string-1.1.4-1.src.rpm
checksum_type: sha256
description:
  ANSI String Formatter in Python for CLI Color and Style Formatting



  This code was originally written for [greplica](https://pypi.org/project/greplica/), but I felt it deserved its own, separate library.

  The main goals for this project are:
  - To provide a simple way to construct a string-like object with embedded ANSI formatting without requiring the developer to know how ANSI formatting works
  - Provide a way to further format the object using format string
  - Allow for concatenation of the object



  Feel free to open a bug report or make a merge request on [github](https://github.com/Tails86/ansi-string/issues).


  This project is uploaded to PyPI at https://pypi.org/project/ansi-string

  To install, ensure you are connected to the internet and execute: `python3 -m pip install ansi-string --upgrade`






  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('This string is red and bold', AnsiFormat.BOLD, AnsiFormat.RED)
  print(s)
  ```
  Output:
  ![Example 1 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out1.png)



  Code:
  ```py
  from ansi_string import AnsiString, AnsiFormat
  s = AnsiString.join('This ', AnsiString('string', AnsiFormat.BOLD))
  s += AnsiString(' contains ') + AnsiString('multiple', AnsiFormat.BG_BLUE)
  s += ' color settings across different ranges'
  s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)

  s.apply_formatting(AnsiFormat.FG_BLUE, 21, 44, topmost=False)
  print(s)
  ```
  Output:
  ![Example 2 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out2.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('This string will be formatted bold and red, right justify')


  print('{:>90:bold;red}'.format(s))
  ```
  Output:
  ![Example 3 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out3.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('This string will be formatted bold and red')

  print('{::bold;red}'.format(s))
  ```
  Output:
  ![Example 4 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out4.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s1 = 'This is a normal string'
  s2 = AnsiString('This is an ANSI string')

  print(f'String 1: "{s1}" String 2: "{s2::bold;purple}"')
  ```
  Output:
  ![Example 5 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out5.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('Manually adjust colors of foreground, background, and underline')
  print(f'{s::rgb(0x8A2BE2);bg_rgb(100, 232, 170);ul_rgb(0xFF, 0x63, 0x47)}')
  ```
  Output:
  ![Example 6 Output](https://raw.githubusercontent.com/Tails86/ansi-string/76fd7fe127ab65c2b0ff5215f1b1ce9e253d50e9/docs/out6.png)



  Code:
  ```py
  from ansi_string import AnsiString, AnsiFormat
  s = AnsiString(
      'This example shows how to format and unformat matching',
      AnsiFormat.dul_rgb(0xFF, 0x80, 0x00),
      AnsiFormat.ITALIC
  )
  s.format_matching('[a-z]*mat', AnsiFormat.RED, match_case=True, regex=True)
  s.unformat_matching('unformat') # don't specify any format to remove all formatting in matching range
  print(s)
  ```
  Output:
  ![Example 7 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out7.png)



  Refer to the [AnsiString test file](https://github.com/Tails86/ansi-string/blob/main/tests/test_ansi_string.py) for more examples on how to use the AnsiString class.



  AnsiStr is an immutable version of AnsiString. The advantage of this object is that isinstance(AnsiStr(), str) returns True. The disadvantage is that all formatting functionality return a new object rather than formatting in-place.


  Code:
  ```py
  from ansi_string import AnsiStr
  s = AnsiStr('This string is red and bold', AnsiFormat.BOLD, AnsiFormat.RED)
  print(s)
  ```
  Output:
  ![Example 1 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out1.png)



  Code:
  ```py
  from ansi_string import AnsiStr, AnsiFormat
  s = AnsiStr.join('This ', AnsiStr('string', AnsiFormat.BOLD))
  s += AnsiStr(' contains ') + AnsiStr('multiple', AnsiFormat.BG_BLUE)
  s += ' color settings across different ranges'

  s = s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)

  s = s.apply_formatting(AnsiFormat.FG_BLUE, 21, 44, topmost=False)
  print(s)
  ```
  Output:
  ![Example 2 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out2.png)



  Code:
  ```py
  from ansi_string import AnsiStr
  s = AnsiStr('This string will be formatted bold and red, right justify')


  print('{:>90:bold;red}'.format(s))
  ```
  Output:
  ![Example 3 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out3.png)



  Code:
  ```py
  from ansi_string import AnsiStr
  s = AnsiStr('This string will be formatted bold and red')

  print('{::bold;red}'.format(s))
  ```
  Output:
  ![Example 4 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out4.png)



  Code:
  ```py
  from ansi_string import AnsiStr
  s1 = 'This is a normal string'
  s2 = AnsiStr('This is an ANSI string')

  print(f'String 1: "{s1}" String 2: "{s2::bold;purple}"')
  ```
  Output:
  ![Example 5 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out5.png)



  Code:
  ```py
  from ansi_string import AnsiStr
  s = AnsiStr('Manually adjust colors of foreground, background, and underline')
  print(f'{s::rgb(0x8A2BE2);bg_rgb(100, 232, 170);ul_rgb(0xFF, 0x63, 0x47)}')
  ```
  Output:
  ![Example 6 Output](https://raw.githubusercontent.com/Tails86/ansi-string/76fd7fe127ab65c2b0ff5215f1b1ce9e253d50e9/docs/out6.png)



  Code:
  ```py
  from ansi_string import AnsiStr, AnsiFormat
  s = AnsiStr(
      'This example shows how to format and unformat matching',
      AnsiFormat.dul_rgb(0xFF, 0x80, 0x00),
      AnsiFormat.ITALIC
  )

  s = s.format_matching('[a-z]*mat', AnsiFormat.RED, match_case=True, regex=True)
  s = s.unformat_matching('unformat') # don't specify any format to remove all formatting in matching range
  print(s)
  ```
  Output:
  ![Example 7 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out7.png)



  Refer to the [AnsiStr test file](https://github.com/Tails86/ansi-string/blob/main/tests/test_ansi_str.py) for examples on how to use AnsiStr.



  To begin, import `AnsiString` and/or `AnsiStr` from the ansi_string module.

  ```py
  from ansi_string import en_tty_ansi, AnsiFormat, AnsiString, AnsiStr
  ```



  Windows requires ANSI formatting to be enabled before it can be used. This can either be set in the environment or by simply calling the following before printing so that ANSI is enabled locally.
  ```py
  en_tty_ansi()
  ```

  If this also needs to be enabled for stderr, stderr may also be passed to this method.
  ```py
  import sys
  en_tty_ansi(sys.stderr)
  ```

  For Windows, this returns True if the given IO is a TTY (i.e. not piped to a file) and enabling ANSI was successful. For all other operating systems, this will return True if and only if the given IO is a TTY (i.e. isatty()); no other action is taken.



  The AnsiString and AnsiStr classes contains the following `__init__` method.

  ```py
      def __init__(self, s:str='', *setting_or_settings:Union[List[str], str, List[int], int, List[AnsiFormat], AnsiFormat]): ...
  ```

  The first argument, `s`, is a string to be formatted. If this string contains ANSI directives, they will be parsed and added into the internal format dictionary. The next 0 to N arguments are formatting setting directives that can be applied to the entire string. These arguments can be in the form of any of the following.

  - An AnsiFormat enum (ex: `AnsiFormat.BOLD`)
  - The result of calling `AnsiFormat.rgb()`, `AnsiFormat.fg_rgb()`, `AnsiFormat.bg_rgb()`,
      `AnsiFormat.ul_rgb()`, or `AnsiFormat.dul_rgb()`
  - A string color or formatting name (i.e. any name of the AnsiFormat enum in lower or upper case)
  - An `rgb(...)` function directive as a string (ex: `"rgb(255, 255, 255)"`)
      - `rgb(...)` or `fg_rgb(...)` to adjust text color
      - `bg_rgb(...)` to adjust background color
      - `ul_rgb(...)` to enable underline and set the underline color
      - `dul_rgb(...)` to enable double underline and set the underline color
      - Value given may be either a 24-bit integer or 3 x 8-bit integers, separated by commas
      - Each given value within the parenthesis is treated as hexadecimal if the value starts with "0x",
          otherwise it is treated as a decimal value
  - A string containing known ANSI directives (ex: `"01;31"` for BOLD and FG_RED)
      - Only non-negative integers are valid; all other values will cause a ValueError exception
      - This string will be parsed to determine if optimizable (see is_optimizable())
      - To subsequently force invalid/redundant values to be thrown out, call simplify()
  - Integer values which will be parsed in a similar way to above string ANSI directives

  A setting may also be any of the following. These are not advised because they will be used verbatim,
  no exceptions will be thrown, and optimization of codes on string output will not occur.
  - An AnsiSetting object
  - A string which starts with the character `"["` plus ANSI directives (ex: `"[38;5;214"`)

  Examples:

  ```py





  s = AnsiString("This is an ANSI string", "light_sea_green", AnsiFormat.BG_CHOCOLATE, "ul_rgb(0x808080)", "3", 1)
  print(s)
  ```



  - The static methods `AnsiString.join()` and `AnsiStr.join()` are provided to join together 0 to many `AnsiStr`, `AnsiString`, and `str` values into a single `AnsiString` or `AnsiStr`.
  - The `+` operator may be used to join an `AnsiString` or `AnsiStr` with another `AnsiStr`, `AnsiString`, or `str` into a new object
      - The `+` operator may not be used if the left-hand-side value is a `str` and the right-hand-side values is an `AnsiString` or `AnsiStr`
  - The `+=` operator may be used to append an `AnsiStr`, `AnsiString`, or `str` to an `AnsiString` or `AnsiStr`

  Examples:

  ```py
  s = AnsiString.join("This ", AnsiStr("string", AnsiFormat.BOLD))
  s += AnsiStr(" contains ") + AnsiStr("multiple", AnsiFormat.BG_BLUE)
  s += AnsiString(" color ", AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC) + "settings accross different ranges"
  print(s)
  ```





  The method `AnsiString.apply_formatting()` is provided to append formatting to a previously constructed `AnsiString`. The method `AnsiStr.apply_formatting()` works similarly except it returns a new object since `AnsiStr` is immutable.

  Example:

  ```py
  s = AnsiString("This string contains multiple color settings across different ranges")
  s.apply_formatting(AnsiFormat.BOLD, 5, 11)
  s.apply_formatting(AnsiFormat.BG_BLUE, 21, 29)
  s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)
  print(s)


  s = AnsiStr("This string contains multiple color settings across different ranges")
  s = s.apply_formatting(AnsiFormat.BOLD, 5, 11)
  s = s.apply_formatting(AnsiFormat.BG_BLUE, 21, 29)
  s = s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)
  print(s)
  ```



  A format string may be used to format an AnsiString before printing. The format specification string must be in the format `"[string_format][:ansi_format]"` where `string_format` is the standard string format specifier and `ansi_format` contains 0 or more ANSI directives separated by semicolons (;). The ANSI directives may be any of the same string values that can be passed to the `AnsiString` constructor. If no `string_format` is desired, then it can be set to an empty string. This same functionality is available in `AnsiStr`.

  Examples:

  ```py
  ansi_str = AnsiString("This is an ANSI string")

  print("{:>100:bold;red}".format(ansi_str))

  print("{::bold;red}".format(ansi_str))

  print("{::bold;rgb(255, 0, 0)}".format(ansi_str))

  print(f"{ansi_str::bold;red}")

  fg_color = 0x8A2BE2
  bg_colors = [100, 232, 170]
  ul_colors = [0xFF, 0x63, 0x47]
  print(f"{ansi_str::rgb({fg_color});bg_rgb({bg_colors});ul_rgb({ul_colors})}")
  ```



  The methods `AnsiString.is_optimizable()` and `AnsiStr.is_optimizable()` are provided to determine if the provided formatting settings are considered valid and therefore optimizable.



  The method `AnsiString.simplify()` will simplify formatting settings when called by removing invalid and redundant codes. The method `AnsiStr.simplify()` works similarly except it returns a new object since `AnsiStr` is immutable.



  The methods `AnsiString.format_matching()` and `AnsiString.unformat_matching()` are provided to apply or remove formatting of an `AnsiString` based on a match specification. The methods `AnsiStr.format_matching()` and `AnsiStr.unformat_matching()` work similarly except they return a new object since `AnsiStr` is immutable.

  Example:

  ```py
  s = AnsiString("Here is a strING that I will match formatting", AnsiFormat.BOLD)

  s.format_matching("[A-Za-z]+ing", "cyan", AnsiFormat.BG_PINK, regex=True, match_case=True)

  s.unformat_matching("[A-Za-z]+ing", AnsiFormat.BOLD, regex=True)
  print(s)


  s = AnsiStr("Here is a strING that I will match formatting", AnsiFormat.BOLD)

  s = s.format_matching("[A-Za-z]+ing", "cyan", AnsiFormat.BG_PINK, regex=True, match_case=True)

  s = s.unformat_matching("[A-Za-z]+ing", AnsiFormat.BOLD, regex=True)
  print(s)
  ```



  Calling the method `AnsiString.clear_formatting()` will clear all formatting applied. The method `AnsiStr.clear_formatting()` works similarly except it returns a new object since `AnsiStr` is immutable.



  The method `AnsiString.assign_str()` may be used to assign the internal string and adjust formatting as necessary. There is no associated function available in `AnsiStr`.



  The attributes `AnsiString.base_str` and `AnsiStr.base_str` may be used to retrieve the unformatted base string.



  The methods `AnsiString.ansi_settings_at()` and `AnsiString.settings_at()` may be used to retrieve the settings applied over a single character. The same methods exist in `AnsiStr`.



  Many other methods that are found in the `str` class such as `replace()` are available in `AnsiString` and `AnsiStr` which manipulate the string while applying formatting where necessary.

  - capitalize
  - casefold
  - center
  - count
  - encode
  - endswith
  - expandtabs
  - find
  - index
  - isalnum
  - isalpha
  - isascii
  - isdecimal
  - isdigit
  - isidentifier
  - islower
  - isnumeric
  - isprintable
  - isspace
  - istitle
  - isupper
  - ljust
  - lower
  - lstrip
  - partition
  - removeprefix
  - removesuffix
  - replace
  - rfind
  - rindex
  - rjust
  - rpartition
  - rsplit
  - rstrip
  - split
  - splitlines
  - strip
  - swapcase
  - title
  - upper
  - zfill



  The following functions are provided to perform cursor or clear actions on the terminal.

  - cursor_up_str
  - cursor_down_str
  - cursor_forward_str
  - cursor_backward_str
  - cursor_back_str
  - cursor_next_line_str
  - cursor_previous_line_str
  - cursor_horizontal_absolute_str
  - cursor_position_str
  - erase_in_display_str
  - erase_in_line_str
  - scroll_up_str
  - scroll_down_str



  ```py
  from ansi_string import cursor_up_str

  print(cursor_up_str(5), end='')
  ```


pkgId: 7958f52e60f24034087a4a1b2c4903e3475d7de568c54484fdc9ff44a355c027
name: python-ansi-string
arch: src
version: 1.1.5
epoch: 0
release: 1
summary: ANSI String Formatter in Python for CLI Color and Style Formatting
url: https://github.com/Tails86/ansi-string
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ansi-string-1.1.5-1.src.rpm
checksum_type: sha256
description:
  ANSI String Formatter in Python for CLI Color and Style Formatting



  This code was originally written for [greplica](https://pypi.org/project/greplica/), but I felt it deserved its own, separate library.

  The main goals for this project are:
  - To provide a simple way to construct a string-like object with embedded ANSI formatting without requiring the developer to know how ANSI formatting works
  - Provide a way to further format the object using format string
  - Allow for concatenation of the object



  Feel free to open a bug report or make a merge request on [github](https://github.com/Tails86/ansi-string/issues).


  This project is uploaded to PyPI at https://pypi.org/project/ansi-string

  To install, ensure you are connected to the internet and execute: `python3 -m pip install ansi-string --upgrade`






  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('This string is red and bold', AnsiFormat.BOLD, AnsiFormat.RED)
  print(s)
  ```
  Output:
  ![Example 1 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out1.png)



  Code:
  ```py
  from ansi_string import AnsiString, AnsiFormat
  s = AnsiString.join('This ', AnsiString('string', AnsiFormat.BOLD))
  s += AnsiString(' contains ') + AnsiString('multiple', AnsiFormat.BG_BLUE)
  s += ' color settings across different ranges'
  s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)

  s.apply_formatting(AnsiFormat.FG_BLUE, 21, 44, topmost=False)
  print(s)
  ```
  Output:
  ![Example 2 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out2.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('This string will be formatted bold and red, right justify')


  print('{:>90:bold;red}'.format(s))
  ```
  Output:
  ![Example 3 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out3.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('This string will be formatted bold and red')

  print('{::bold;red}'.format(s))
  ```
  Output:
  ![Example 4 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out4.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s1 = 'This is a normal string'
  s2 = AnsiString('This is an ANSI string')

  print(f'String 1: "{s1}" String 2: "{s2::bold;purple}"')
  ```
  Output:
  ![Example 5 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out5.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('Manually adjust colors of foreground, background, and underline')
  print(f'{s::rgb(0x8A2BE2);bg_rgb(100, 232, 170);ul_rgb(0xFF, 0x63, 0x47)}')
  ```
  Output:
  ![Example 6 Output](https://raw.githubusercontent.com/Tails86/ansi-string/76fd7fe127ab65c2b0ff5215f1b1ce9e253d50e9/docs/out6.png)



  Code:
  ```py
  from ansi_string import AnsiString, AnsiFormat
  s = AnsiString(
      'This example shows how to format and unformat matching',
      AnsiFormat.dul_rgb(0xFF, 0x80, 0x00),
      AnsiFormat.ITALIC
  )
  s.format_matching('[a-z]*mat', AnsiFormat.RED, match_case=True, regex=True)
  s.unformat_matching('unformat') # don't specify any format to remove all formatting in matching range
  print(s)
  ```
  Output:
  ![Example 7 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out7.png)



  Refer to the [AnsiString test file](https://github.com/Tails86/ansi-string/blob/main/tests/test_ansi_string.py) for more examples on how to use the AnsiString class.



  AnsiStr is an immutable version of AnsiString. The advantage of this object is that isinstance(AnsiStr(), str) returns True. The disadvantage is that all formatting functionality return a new object rather than formatting in-place.


  Code:
  ```py
  from ansi_string import AnsiStr
  s = AnsiStr('This string is red and bold', AnsiFormat.BOLD, AnsiFormat.RED)
  print(s)
  ```
  Output:
  ![Example 1 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out1.png)



  Code:
  ```py
  from ansi_string import AnsiStr, AnsiFormat
  s = AnsiStr.join('This ', AnsiStr('string', AnsiFormat.BOLD))
  s += AnsiStr(' contains ') + AnsiStr('multiple', AnsiFormat.BG_BLUE)
  s += ' color settings across different ranges'

  s = s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)

  s = s.apply_formatting(AnsiFormat.FG_BLUE, 21, 44, topmost=False)
  print(s)
  ```
  Output:
  ![Example 2 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out2.png)



  Code:
  ```py
  from ansi_string import AnsiStr
  s = AnsiStr('This string will be formatted bold and red, right justify')


  print('{:>90:bold;red}'.format(s))
  ```
  Output:
  ![Example 3 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out3.png)



  Code:
  ```py
  from ansi_string import AnsiStr
  s = AnsiStr('This string will be formatted bold and red')

  print('{::bold;red}'.format(s))
  ```
  Output:
  ![Example 4 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out4.png)



  Code:
  ```py
  from ansi_string import AnsiStr
  s1 = 'This is a normal string'
  s2 = AnsiStr('This is an ANSI string')

  print(f'String 1: "{s1}" String 2: "{s2::bold;purple}"')
  ```
  Output:
  ![Example 5 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out5.png)



  Code:
  ```py
  from ansi_string import AnsiStr
  s = AnsiStr('Manually adjust colors of foreground, background, and underline')
  print(f'{s::rgb(0x8A2BE2);bg_rgb(100, 232, 170);ul_rgb(0xFF, 0x63, 0x47)}')
  ```
  Output:
  ![Example 6 Output](https://raw.githubusercontent.com/Tails86/ansi-string/76fd7fe127ab65c2b0ff5215f1b1ce9e253d50e9/docs/out6.png)



  Code:
  ```py
  from ansi_string import AnsiStr, AnsiFormat
  s = AnsiStr(
      'This example shows how to format and unformat matching',
      AnsiFormat.dul_rgb(0xFF, 0x80, 0x00),
      AnsiFormat.ITALIC
  )

  s = s.format_matching('[a-z]*mat', AnsiFormat.RED, match_case=True, regex=True)
  s = s.unformat_matching('unformat') # don't specify any format to remove all formatting in matching range
  print(s)
  ```
  Output:
  ![Example 7 Output](https://raw.githubusercontent.com/Tails86/ansi-string/32d5b2fed1c1ac061a5382b80faa65bbf794290c/docs/out7.png)



  Refer to the [AnsiStr test file](https://github.com/Tails86/ansi-string/blob/main/tests/test_ansi_str.py) for examples on how to use AnsiStr.



  To begin, import `AnsiString` and/or `AnsiStr` from the ansi_string module.

  ```py
  from ansi_string import en_tty_ansi, AnsiFormat, AnsiString, AnsiStr
  ```



  Windows requires ANSI formatting to be enabled before it can be used. This can either be set in the environment or by simply calling the following before printing so that ANSI is enabled locally.
  ```py
  en_tty_ansi()
  ```

  If this also needs to be enabled for stderr, stderr may also be passed to this method.
  ```py
  import sys
  en_tty_ansi(sys.stderr)
  ```

  For Windows, this returns True if the given IO is a TTY (i.e. not piped to a file) and enabling ANSI was successful. For all other operating systems, this will return True if and only if the given IO is a TTY (i.e. isatty()); no other action is taken.



  The AnsiString and AnsiStr classes contains the following `__init__` method.

  ```py
      def __init__(self, s:str='', *setting_or_settings:Union[List[str], str, List[int], int, List[AnsiFormat], AnsiFormat]): ...
  ```

  The first argument, `s`, is a string to be formatted. If this string contains ANSI directives, they will be parsed and added into the internal format dictionary. The next 0 to N arguments are formatting setting directives that can be applied to the entire string. These arguments can be in the form of any of the following.

  - The following setting types are guaranteed to be valid, optimizable, and won't throw an exception
      - An AnsiFormat enum (ex: `AnsiFormat.BOLD`)
      - The result of calling `AnsiFormat.rgb()`, `AnsiFormat.fg_rgb()`, `AnsiFormat.bg_rgb()`,
          `AnsiFormat.ul_rgb()`, or `AnsiFormat.dul_rgb()`
  - The following setting types are parsed and may throw and exception if they are invalid
      - A string color or formatting name (i.e. any name of the AnsiFormat enum in lower or upper case)
      - An `rgb(...)` function directive as a string (ex: `"rgb(255, 255, 255)"`)
          - `rgb(...)` or `fg_rgb(...)` to adjust text color
          - `bg_rgb(...)` to adjust background color
          - `ul_rgb(...)` to enable underline and set the underline color
          - `dul_rgb(...)` to enable double underline and set the underline color
          - Value given may be either a 24-bit integer or 3 x 8-bit integers, separated by commas
          - Each given value within the parenthesis is treated as hexadecimal if the value starts with "0x",
              otherwise it is treated as a decimal value
      - A string containing known ANSI directives (ex: `"01;31"` for BOLD and FG_RED)
          - Only non-negative integers are valid; all other values will cause a ValueError exception
      - Integer values which will be parsed in a similar way to above string ANSI directives
  - The following setting types will be used verbatim as the ANSI graphics code and no exceptions will be thrown (handle with care)
      - An `AnsiSetting` object generated outside of `AnsiFormat` function calls
          - It is advised to check AnsiSetting.valid to ensure settings don't terminate the escape sequence
      - A string which starts with the character `"["` plus ANSI directives (ex: `"[38;5;214"`)

  Hint: After creation, `is_optimizable()` can be called to determine if all settings are parsable. Call
  `simplify()` in order to subsequently force invalid or redundant values to be thrown out.

  Examples:

  ```py





  s = AnsiString("This is an ANSI string", "light_sea_green", AnsiFormat.BG_CHOCOLATE, "ul_rgb(0x808080)", "3", 1)
  print(s)
  ```



  - The static methods `AnsiString.join()` and `AnsiStr.join()` are provided to join together 0 to many `AnsiStr`, `AnsiString`, and `str` values into a single `AnsiString` or `AnsiStr`.
  - The `+` operator may be used to join an `AnsiString` or `AnsiStr` with another `AnsiStr`, `AnsiString`, or `str` into a new object
      - The `+` operator may not be used if the left-hand-side value is a `str` and the right-hand-side values is an `AnsiString` or `AnsiStr`
  - The `+=` operator may be used to append an `AnsiStr`, `AnsiString`, or `str` to an `AnsiString` or `AnsiStr`

  Examples:

  ```py
  s = AnsiString.join("This ", AnsiStr("string", AnsiFormat.BOLD))
  s += AnsiStr(" contains ") + AnsiStr("multiple", AnsiFormat.BG_BLUE)
  s += AnsiString(" color ", AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC) + "settings accross different ranges"
  print(s)
  ```





  The method `AnsiString.apply_formatting()` is provided to append formatting to a previously constructed `AnsiString`. The method `AnsiStr.apply_formatting()` works similarly except it returns a new object since `AnsiStr` is immutable.

  Example:

  ```py
  s = AnsiString("This string contains multiple color settings across different ranges")
  s.apply_formatting(AnsiFormat.BOLD, 5, 11)
  s.apply_formatting(AnsiFormat.BG_BLUE, 21, 29)
  s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)
  print(s)


  s = AnsiStr("This string contains multiple color settings across different ranges")
  s = s.apply_formatting(AnsiFormat.BOLD, 5, 11)
  s = s.apply_formatting(AnsiFormat.BG_BLUE, 21, 29)
  s = s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)
  print(s)
  ```



  A format string may be used to format an AnsiString before printing. The format specification string must be in the format `"[string_format[:ansi_format]]"` where `string_format` is an extension of the standard string format specifier and `ansi_format` contains 0 or more ANSI directives separated by semicolons (;). The ANSI directives may be any of the same string values that can be passed to the `AnsiString` constructor. If no `string_format` is desired, then it can be set to an empty string. This same functionality is available in `AnsiStr`.

  Examples:

  ```py
  ansi_str = AnsiString("This is an ANSI string")


  print("{:>100:underline;red}".format(ansi_str))



  print("{: ->100:underline;red}".format(ansi_str))

  print("{::bold;red}".format(ansi_str))

  print("{::bold;rgb(255, 0, 0)}".format(ansi_str))

  print(f"{ansi_str::bold;red}")

  fg_color = 0x8A2BE2
  bg_colors = [100, 232, 170]
  ul_colors = [0xFF, 0x63, 0x47]
  print(f"{ansi_str::rgb({fg_color});bg_rgb({bg_colors});ul_rgb({ul_colors})}")
  ```



  The methods `AnsiString.is_optimizable()` and `AnsiStr.is_optimizable()` are provided to determine if the provided formatting settings are considered valid and therefore optimizable.



  The method `AnsiString.simplify()` will simplify formatting settings when called by removing invalid and redundant codes. The method `AnsiStr.simplify()` works similarly except it returns a new object since `AnsiStr` is immutable.



  The methods `AnsiString.format_matching()` and `AnsiString.unformat_matching()` are provided to apply or remove formatting of an `AnsiString` based on a match specification. The methods `AnsiStr.format_matching()` and `AnsiStr.unformat_matching()` work similarly except they return a new object since `AnsiStr` is immutable.

  Example:

  ```py
  s = AnsiString("Here is a strING that I will match formatting", AnsiFormat.BOLD)

  s.format_matching("[A-Za-z]+ing", "cyan", AnsiFormat.BG_PINK, regex=True, match_case=True)

  s.unformat_matching("[A-Za-z]+ing", AnsiFormat.BOLD, regex=True)
  print(s)


  s = AnsiStr("Here is a strING that I will match formatting", AnsiFormat.BOLD)

  s = s.format_matching("[A-Za-z]+ing", "cyan", AnsiFormat.BG_PINK, regex=True, match_case=True)

  s = s.unformat_matching("[A-Za-z]+ing", AnsiFormat.BOLD, regex=True)
  print(s)
  ```



  Calling the method `AnsiString.clear_formatting()` will clear all formatting applied. The method `AnsiStr.clear_formatting()` works similarly except it returns a new object since `AnsiStr` is immutable.



  The method `AnsiString.assign_str()` may be used to assign the internal string and adjust formatting as necessary. There is no associated function available in `AnsiStr`.



  The attributes `AnsiString.base_str` and `AnsiStr.base_str` may be used to retrieve the unformatted base string.



  The methods `AnsiString.ansi_settings_at()` and `AnsiString.settings_at()` may be used to retrieve the settings applied over a single character. The same methods exist in `AnsiStr`.



  Many other methods that are found in the `str` class such as `replace()` are available in `AnsiString` and `AnsiStr` which manipulate the string while applying formatting where necessary.

  - capitalize
  - casefold
  - center
  - count
  - encode
  - endswith
  - expandtabs
  - find
  - index
  - isalnum
  - isalpha
  - isascii
  - isdecimal
  - isdigit
  - isidentifier
  - islower
  - isnumeric
  - isprintable
  - isspace
  - istitle
  - isupper
  - ljust
  - lower
  - lstrip
  - partition
  - removeprefix
  - removesuffix
  - replace
  - rfind
  - rindex
  - rjust
  - rpartition
  - rsplit
  - rstrip
  - split
  - splitlines
  - strip
  - swapcase
  - title
  - upper
  - zfill



  The following functions are provided to perform cursor or clear actions on the terminal.

  - cursor_up_str
  - cursor_down_str
  - cursor_forward_str
  - cursor_backward_str
  - cursor_back_str
  - cursor_next_line_str
  - cursor_previous_line_str
  - cursor_horizontal_absolute_str
  - cursor_position_str
  - erase_in_display_str
  - erase_in_line_str
  - scroll_up_str
  - scroll_down_str



  ```py
  from ansi_string import cursor_up_str

  print(cursor_up_str(5), end='')
  ```


pkgId: a57e2edc7785b0f219cc0605e5ed255865e1ec8aac59e7f99fc7d35156a38b68
name: python-ansi-string
arch: src
version: 1.1.8
epoch: 0
release: 1
summary: ANSI String Formatter in Python for CLI Color and Style Formatting
url: https://github.com/Tails86/ansi-string
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ansi-string-1.1.8-1.src.rpm
checksum_type: sha256
description:
  ANSI String Formatter in Python for CLI Color and Style Formatting

  **Table of Contents**
  * [Introduction](#introduction)
  * [Contribution](#contribution)
  * [Installation](#installation)
  * [Examples](#examples)
  * [Usage](#usage)



  This code was originally written for [greplica](https://pypi.org/project/greplica/), but I felt it deserved its own, separate library.

  The main goals for this project are:
  - To provide a simple way to construct a string-like object with embedded ANSI formatting without requiring the developer to know how ANSI formatting works
  - Provide a way to further format the object using format string
  - Allow for concatenation of the object



  Feel free to open a bug report or make a merge request on [github](https://github.com/Tails86/ansi-string/issues).



  This project is uploaded to PyPI at https://pypi.org/project/ansi-string

  To install, ensure you are connected to the internet and execute: `python3 -m pip install ansi-string --upgrade`



  These examples assume that ANSI formatting is enabled on the terminal. Refer to [Enabling ANSI Formatting](#enabling-ansi-formatting) to ensure this is enabled.



  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('This string is red and bold', AnsiFormat.BOLD, AnsiFormat.RED)
  print(s)
  ```
  Output:
  ![Example 1 Output](https://raw.githubusercontent.com/Tails86/ansi-string/8db7c31ec5cd4816db8879665e2378469a0b90bf/docs/out1.png)



  Code:
  ```py
  from ansi_string import AnsiString, AnsiFormat
  s = AnsiString.join('This ', AnsiString('string', AnsiFormat.BOLD))
  s += AnsiString(' contains ') + AnsiString('multiple', AnsiFormat.BG_BLUE)
  s += ' color settings across different ranges'
  s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)

  s.apply_formatting(AnsiFormat.FG_BLUE, 21, 44, topmost=False)
  print(s)
  ```
  Output:
  ![Example 2 Output](https://raw.githubusercontent.com/Tails86/ansi-string/8db7c31ec5cd4816db8879665e2378469a0b90bf/docs/out2.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('This string will be formatted bold and red, right justify')


  print('{:>90:bold;red}'.format(s))
  ```
  Output:
  ![Example 3 Output](https://raw.githubusercontent.com/Tails86/ansi-string/8db7c31ec5cd4816db8879665e2378469a0b90bf/docs/out3.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('This string will be formatted bold and red')

  print('{::bold;red}'.format(s))
  ```
  Output:
  ![Example 4 Output](https://raw.githubusercontent.com/Tails86/ansi-string/8db7c31ec5cd4816db8879665e2378469a0b90bf/docs/out4.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s1 = 'This is a normal string'
  s2 = AnsiString('This is an ANSI string')

  print(f'String 1: "{s1}" String 2: "{s2::bold;purple}"')
  ```
  Output:
  ![Example 5 Output](https://raw.githubusercontent.com/Tails86/ansi-string/8db7c31ec5cd4816db8879665e2378469a0b90bf/docs/out5.png)



  Code:
  ```py
  from ansi_string import AnsiString
  s = AnsiString('Manually adjust colors of foreground, background, and underline')
  print(f'{s::rgb(0x8A2BE2);bg_rgb(100, 232, 170);ul_rgb(0xFF, 0x63, 0x47)}')
  ```
  Output:
  ![Example 6 Output](https://raw.githubusercontent.com/Tails86/ansi-string/8db7c31ec5cd4816db8879665e2378469a0b90bf/docs/out6.png)



  Code:
  ```py
  from ansi_string import AnsiString, AnsiFormat
  s = AnsiString(
      'This example shows how to format and unformat matching',
      AnsiFormat.dul_rgb(0xFF, 0x80, 0x00),
      AnsiFormat.ITALIC
  )
  s.format_matching('[a-z]*mat', AnsiFormat.RED, match_case=True, regex=True)
  s.unformat_matching('unformat') # don't specify any format to remove all formatting in matching range
  print(s)
  ```
  Output:
  ![Example 7 Output](https://raw.githubusercontent.com/Tails86/ansi-string/8db7c31ec5cd4816db8879665e2378469a0b90bf/docs/out7.png)



  Code:
  ```py
  from ansi_string import AnsiString, AnsiFormat
  import itertools
  colors = [AnsiFormat.RED, AnsiFormat.ORANGE, AnsiFormat.YELLOW, AnsiFormat.GREEN, AnsiFormat.BLUE, AnsiFormat.INDIGO, AnsiFormat.VIOLET]
  s = AnsiString('IMAGINATION')
  for i, color in zip(range(len(s)), itertools.cycle(colors)):
      s.apply_formatting(color, i, i+1)
  print(s)
  ```
  Output:
  ![Example 8 Output](https://raw.githubusercontent.com/Tails86/ansi-string/8db7c31ec5cd4816db8879665e2378469a0b90bf/docs/out8.png)





  Windows requires ANSI formatting to be enabled before it can be used. This can be locally enabled by calling the following before printing.
  ```py
  en_tty_ansi()
  ```

  If this also needs to be enabled for stderr, stderr may also be passed to this method.
  ```py
  import sys
  en_tty_ansi(sys.stderr)
  ```

  For Windows, this returns True if the given IO is a TTY (i.e. not piped to a file) and enabling ANSI was successful. For all other operating systems, this will return True if and only if the given IO is a TTY (i.e. isatty()); no other action is taken.



  This library contains both `AnsiString` and `AnsiStr`. An `AnsiString` is mutable while an `AnsiStr` is immutable, and any formatting changes to `AnsiStr` will create a new `AnsiStr` object rather than applying in-place. The only advantage of `AnsiStr` over `AnsiString` is that `isinstance(AnsiStr(), str)` will return `True`. This may be useful when the string object needs to be passable to functions and methods which explicitly checks if the given object is a string.



  The `AnsiString` and `AnsiStr` classes contain the following `__init__` method.

  ```py
  def __init__(self, s:Union[str,'AnsiString','AnsiStr']='', *settings:Union[AnsiFormat, AnsiSetting, str, int, list, tuple]): ...
  ```

  The first argument, `s`, is a string to be formatted. If this string contains ANSI directives, they will be parsed and added into the internal format dictionary. The next 0 to N arguments are formatting setting directives that can be applied to the entire string. These arguments can be in the form of any of the following.

  - The following setting types are guaranteed to be valid, optimizable, and won't throw any exception
      - An AnsiFormat enum (ex: `AnsiFormat.BOLD`)
      - The result of calling `AnsiFormat.rgb()`, `AnsiFormat.fg_rgb()`, `AnsiFormat.bg_rgb()`, `AnsiFormat.ul_rgb()`, or `AnsiFormat.dul_rgb()`
  - The following setting types are parsed and may throw and exception if they are invalid
      - A string color or formatting name (i.e. any name of the AnsiFormat enum in lower or upper case)
      - An `rgb(...)` function directive as a string (ex: `"rgb(255, 255, 255)"`)
          - `rgb(...)` or `fg_rgb(...)` to adjust text color
          - `bg_rgb(...)` to adjust background color
          - `ul_rgb(...)` to enable underline and set the underline color
          - `dul_rgb(...)` to enable double underline and set the underline color
          - Value given may be either a 24-bit integer or 3 x 8-bit integers, separated by commas
          - Each given value within the parenthesis is treated as hexadecimal if the value starts with "0x", otherwise it is treated as a decimal value
      - A string containing known ANSI directives (ex: `"01;31"` for BOLD and FG_RED)
          - Only non-negative integers are valid; all other values will cause a ValueError exception
      - Integer values which will be parsed in a similar way to above string ANSI directives
  - The following setting types will be used verbatim as the ANSI graphics code and no exceptions will be thrown (handle with care)
      - An `AnsiSetting` object generated using a string
          - It is advised to check `AnsiSetting.valid` to ensure settings don't terminate the escape sequence
      - A string which starts with the character `"["` plus ANSI directives (ex: `"[38;5;214"`)
          - This will internally wrap the substring after the `"["` character into an `AnsiSetting` (ex: `"[38;5;214"` is equivalent to `AnsiSetting("38;5;214")`)

  Hint: After creation, `is_formatting_parsable()` can be called to determine if all settings are parsable. Call `simplify()` in order to force invalid or redundant values to be thrown out.

  Examples:

  ```py





  s = AnsiString("This is an ANSI string", "light_sea_green", AnsiFormat.BG_CHOCOLATE, "ul_rgb(0x808080)", "3", 1)
  print(s)
  ```



  - The static methods `AnsiString.join()` and `AnsiStr.join()` are provided to join together 0 to many `AnsiStr`, `AnsiString`, and `str` values into a single `AnsiString` or `AnsiStr`.
  - The `+` operator may be used to join an `AnsiString` or `AnsiStr` with another `AnsiStr`, `AnsiString`, or `str` into a new object
      - The `+` operator may not be used if the left-hand-side value is a `str` and the right-hand-side values is an `AnsiString` or `AnsiStr`
  - The `+=` operator may be used to append an `AnsiStr`, `AnsiString`, or `str` to an `AnsiString` or `AnsiStr`

  Examples:

  ```py
  s = AnsiString.join("This ", AnsiStr("string", AnsiFormat.BOLD))
  s += AnsiStr(" contains ") + AnsiStr("multiple", AnsiFormat.BG_BLUE)
  s += AnsiString(" color ", AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC) + "settings accross different ranges"
  print(s)
  ```



  The method `apply_formatting()` is provided to apply formatting to a set range of characters.

  Example:

  ```py
  s = AnsiString("This string contains multiple color settings across different ranges")
  s.apply_formatting(AnsiFormat.BOLD, 5, 11)
  s.apply_formatting(AnsiFormat.BG_BLUE, 21, 29)
  s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)
  print(s)


  s = AnsiStr("This string contains multiple color settings across different ranges")
  s = s.apply_formatting(AnsiFormat.BOLD, 5, 11)
  s = s.apply_formatting(AnsiFormat.BG_BLUE, 21, 29)
  s = s.apply_formatting([AnsiFormat.FG_ORANGE, AnsiFormat.ITALIC], 21, 35)
  print(s)
  ```



  A format string may be used to format an `AnsiString` or `AnsiStr` before printing. The format specification string must be in the format `"[string_format[:ansi_format]]"` where `string_format` is an extension of the standard string format specifier and `ansi_format` contains 0 or more ANSI directives separated by semicolons (;). The ANSI directives may be any of the same string values that can be passed to the `AnsiString` constructor. If no `string_format` is desired, then it can be set to an empty string.

  Examples:

  ```py
  ansi_str = AnsiString("This is an ANSI string")


  print("{:>100:underline;red}".format(ansi_str))



  print("{: ->100:underline;red}".format(ansi_str))

  print("{::bold;red}".format(ansi_str))

  print("{::bold;rgb(255, 0, 0)}".format(ansi_str))

  print(f"{ansi_str::bold;red}")

  fg_color = 0x8A2BE2
  bg_colors = [100, 232, 170]
  ul_colors = [0xFF, 0x63, 0x47]
  print(f"{ansi_str::rgb({fg_color});bg_rgb({bg_colors});ul_rgb({ul_colors})}")
  ```



  The methods `format_matching()` and `unformat_matching()` are provided to apply or remove formatting based on a match specification.

  Example:

  ```py
  s = AnsiString("Here is a strING that I will match formatting", AnsiFormat.BOLD)

  s.format_matching("[A-Za-z]+ing", "cyan", AnsiFormat.BG_PINK, regex=True, match_case=True)

  s.unformat_matching("[A-Za-z]+ing", AnsiFormat.BOLD, regex=True)
  print(s)


  s = AnsiStr("Here is a strING that I will match formatting", AnsiFormat.BOLD)

  s = s.format_matching("[A-Za-z]+ing", "cyan", AnsiFormat.BG_PINK, regex=True, match_case=True)

  s = s.unformat_matching("[A-Za-z]+ing", AnsiFormat.BOLD, regex=True)
  print(s)
  ```



  - `is_formatting_valid()`: check if all formatting is valid in the sense that it won't print garbage on the terminal
  - `is_formatting_parsable()`: check if the formatting is valid AND parsable into internally-known directives
  - `simplify()`: simplify formatting settings by removing invalid and redundant codes
  - `clear_formatting()`: clear all formatting applied
  - `assign_str()`: assign the internal string and adjust formatting as necessary
  - `base_str`: read-only property which returns the unformatted base string
  - `ansi_settings_at()`: retrieve the settings applied over a single character
  - `settings_at()`: similar to `ansi_settings_at()`, but a single string of directives is returned
  - `find_settings()`: find start and end index of one or more settings
  - `to_str()`: convert to a str with ANSI directives applied; this contains extra output formatting attributes over `__str__()`



  Many other methods that are found in the `str` class such as `replace()` are available in `AnsiString` and `AnsiStr` which manipulate the string while applying formatting where necessary.

  - capitalize
  - casefold
  - center
  - count
  - encode
  - endswith
  - expandtabs
  - find
  - index
  - isalnum
  - isalpha
  - isascii
  - isdecimal
  - isdigit
  - isidentifier
  - islower
  - isnumeric
  - isprintable
  - isspace
  - istitle
  - isupper
  - ljust
  - lower
  - lstrip
  - partition
  - removeprefix
  - removesuffix
  - replace
  - rfind
  - rindex
  - rjust
  - rpartition
  - rsplit
  - rstrip
  - split
  - splitlines
  - strip
  - swapcase
  - title
  - upper
  - zfill



  The `ParsedAnsiControlSequenceString` class may be used to parse any ANSI control sequence string. Check the `sequences` attribute after creation for the parsed sequences. This is used internally to parse graphic control sequences from an incoming ANSI string into an `AnsiString`.





  - `parse_graphic_sequence()`: parses graphic sequence string into a list of `AnsiSettings`
  - `settings_to_dict()`: converts a list of `AnsiSettings` into a dictionary which keys off of an effect type



  The following functions are provided to create strings which perform cursor or clear actions on the terminal when printed to the terminal. Take note that when calling `print()` with these, the `end` character should be set to an empty string `''` to ensure the cursor is not advanced after performing the operation.

  - `cursor_up_str()`
  - `cursor_down_str()`
  - `cursor_forward_str()`
  - `cursor_backward_str()`
  - `cursor_back_str()`
  - `cursor_next_line_str()`
  - `cursor_previous_line_str()`
  - `cursor_horizontal_absolute_str()`
  - `cursor_position_str()`
  - `erase_in_display_str()`
  - `erase_in_line_str()`
  - `scroll_up_str()`
  - `scroll_down_str()`



  ```py
  from ansi_string import cursor_up_str

  print(cursor_up_str(5), end='')
  ```


