# packages

pkgId: c615e34c0a1cd9ce4b7ae69bb41042d96bc01676d88e9d4efe6b8a598d005902
name: python-canto-filter
arch: src
version: 1.1.3
epoch: 0
release: 1
summary: 粵文分類篩選器 Cantonese text filter
url: https://pypi.org/project/canto-filter/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canto-filter-1.1.3-1.src.rpm
checksum_type: sha256
description:
  [![license](https://img.shields.io/github/license/DAVFoundation/captain-n3m0.svg?style=flat-square)](https://github.com/DAVFoundation/captain-n3m0/blob/master/LICENSE)

  [English](https://github.com/CanCLID/cantonese-classifier#cantonese-text-classifier)



  呢個係個粵文篩選器，用嚟區分粵語同官話文本，對於篩選粵語語料好有用。個分類器會將輸入文本分成四類:

  1. `cantonese`: 純粵文，僅含有粵語特徵字詞，例如“你喺邊度”
  1. `mandarin`: 純官話文，僅含有官話特徵字詞，例如“你在哪裏”
  1. `mixed`：官粵混雜文，同時含有官話同粵語特徵嘅字詞，例如“是咁的”
  1. `neutral`：無特徵漢語文，唔含有官話同粵語特徵，既可以當成粵文亦可以當成官話文，例如“去學校讀書”

  分類方法係官話同粵語嘅特徵字詞識別。如果同時含有官話同粵語特徵詞彙就算官粵混雜，如果唔含有任何特徵，就算冇特徵中性文本。



  本篩選器嘅主要設計目標係「篩選出可以用作訓練數據嘅優質粵文」，而非「準確分類輸入文本」。所以喺判斷粵語/官話嗰陣會用偏嚴格嘅判別標準，即係會犧牲 recall 嚟換取高 precision （寧願篩漏粵文句子都唔好將官話文誤判成粵文）。

  本篩選器**默認所有輸入文本都用[推薦用字方案](https://jyutping.org/blog/typo/)書寫**。如果輸入文本採用其他用字方案（有錯別字），會影響分類篩選結果。例如輸入`畀本書我`分類器會輸出`cantonese`，但寫成`比本書我`會輸出`neutral`。你可以用[錯別字修正器](https://github.com/CanCLID/typo-corrector)嚟清洗被分成`neutral`嘅文本，噉樣可能會得到更多粵文。

  呢隻篩選器**默認所有輸入文本都係傳統漢字**。如果要分類簡化字文本，要將佢哋轉化成傳統漢字先。推薦使用 [OpenCC](https://github.com/BYVoid/OpenCC)嚟轉換。



  本工具以字詞特徵抽出「純粵文」文本嘅策略同埋實踐方式。呢個策略首先喺以下場合提出。討論本分類器時，請引用：

  Lau, Chaak Ming (劉擇明). 2022. Lingusitic features and automatic detection of Hong Kong-style Written Chinese and Cantonese Writing (港式書面語和粵語書寫的語言學特徵和自動辨識). Paper presented at the 26th International Conference of Yue Dialects (第二十六屆國際粵方言研討會).

  「粵文」同「官話文」嘅定義同界線取決於使用者嘅語言意識形態，呢度嘅分類方法以下文所描述嘅粵文書寫體作為基礎。討論本工具採取嘅分類準則，請引用：

  Lau, Chaak Ming. 2024. Ideologically driven divergence in Cantonese vernacular writing practices. In J.-F. Dupré, editor, _Politics of Language in Hong Kong_, Routledge.



  Python >= 3.11



  首先用 pip 安裝

  ```bash
  pip install canto-filter
  ```

  你可以喺 Python 代碼入面用，亦都可以直接喺命令行入面用。



  本篩選器剩得一個函數 `judge()`，輸入一句話輸出佢嘅語言分類：

  ```python
  from cantofilter import judge

  print(judge('你喺邊度')) # cantonese
  print(judge('你在哪裏')) # mandarin
  print(judge('是咁的'))  # mixed
  print(judge('去學校讀書'))  # neutral
  ```



  首先要有一個輸入文檔，例如`input.txt`，入面每行一個句子.



  然後運行下面命令

  ```bash
  cantofilter --input input.txt > output.txt
  ```

  噉樣會得到一個 `output.txt`，入面有由 \t 分成嘅兩列，第一列係判斷標籤，第二列係句子原文本。



  如果你想直接篩選出某一類嘅文本，噉可以加一個 `--mode <LABEL>` 參數喺後面，例如

  ```bash
  cantofilter --input input.txt --mode cantonese > output.txt
  ```

  噉樣輸出嘅 `output.txt` 就會係純粵文句子。如果想剩係要官話、官粵混合或者中性文本，將個 `--mode` 參數定成 `mandarin`、`mixed`、`neutral`就得。



  你亦都可以剩係輸出啲句子嘅分類結果，用 `--mode label` 就得：

  ```bash
  cantofilter --input input.txt --mode label > output.txt
  ```

  噉樣嘅 `output.txt` 剩得一列，全部都係分類標籤。





  This is a text filter for Cantonese, designed for filtering Cantonese text corpus. It classifies input sentences with four output labels:

  1. `cantonese`: Pure Cantonese text, contains Cantonese-featured words. E.g. 你喺邊度
  1. `mandarin`: Pure Mandarin text, contains Mandarin-feature words. E.g. 你在哪裏
  1. `mixed`：Mixed Cantonese-Mandarin text, contains both Cantonese and Mandarin-featured words. E.g. 是咁的
  1. `neutral`：No feature Chinese text, contains neither Cantonese nor Mandarin feature words. Such sentences can be used for both Cantonese and Mandarin text corpus. E.g. 去學校讀書

  The filter is regex rule-based, by detecting Mandarin and Cantonese feature characters and words. If a sentence contains both Cantonese and Mandarin feature words, then it is a mixed-Cantonese-Mandarin sentence. If it contains neither features, it is a no-feature, neutral Chinese text.



  This filter is designed for the purpose of "obtaining high-quality Cantonese text", as opposed to "accurately classifying input texts". Therefore, it maximizes precision at the price of recall, to minimize the false positive rate / avoid including potential Mandarin sentences (we rather miss some Cantonese sentences, than mistaking potential Mandarin sentences as Cantonese).

  This filter **assumes all input text written in [the recommended orthography](https://jyutping.org/blog/typo/)**. Spelling errors or typos in input text might affect the classification result. For instance, `畀本書我` yields `cantonese`, while `比本書我` yields `neutral`. You can use the [spelling corrector](https://github.com/CanCLID/typo-corrector) to correct the `neutral` text, which might give you more Cantonese text.

  This filter **assumes all input text in Traditional Chinese characters**. If you want to filter texts written in simplified characters, please convert them into Traditional characters first. We recommend using [OpenCC](https://github.com/BYVoid/OpenCC) to do the conversion.



  The implementation and methodology of this filter was first proposed in the following contexts. below. When discussing this filter, please cite:

  Lau, Chaak Ming (劉擇明). 2022. Lingusitic features and automatic detection of Hong Kong-style Written Chinese and Cantonese Writing (港式書面語和粵語書寫的語言學特徵和自動辨識). Paper presented at the 26th International Conference of Yue Dialects (第二十六屆國際粵方言研討會).

  The definitions and boundaries of 'Cantonese text' and 'Mandarin text' depend on the user's language ideology. The classification method used here is based on the Cantonese written style described in the following text. When discussing the criteria adopted by this tool, please cite:

  Lau, Chaak Ming. 2024. Ideologically driven divergence in Cantonese vernacular writing practices. In J.-F. Dupré, editor, _Politics of Language in Hong Kong_, Routledge.



  Python >= 3.11



  Install the package with pip first

  ```bash
  pip install canto-filter
  ```

  This package can be used in python codes, or as a CLI tool.



  There is only one function in this package, `judge()`, which accepts a string input and outputs one of the labels:

  ```python
  from cantofilter import judge

  print(judge('你喺邊度')) # cantonese
  print(judge('你在哪裏')) # mandarin
  print(judge('是咁的'))  # mixed
  print(judge('去學校讀書'))  # neutral
  ```



  Assume an input text file, e.g. `input.txt` where each line is a sentence.



  Then run

  ```bash
  cantofilter --input input.txt > output.txt
  ```

  There will be a `output.txt` which has two columns. The first column is the language label, and the second column is the original input text.



  If you want only one class of text, use the `--mode <LABEL>` argument. Say if you want pure Cantonese text only:

  ```bash
  cantofilter --input input.txt --mode cantonese > output.txt
  ```

  The `output.txt` will contain only Cantonese text.



  If you want to include the classification labels in the output, use `--mode label` like this:

  ```bash
  cantofilter --input input.txt --mode label > output.txt
  ```

  Then your `output.txt` will contain only classification results of the input sentences.


pkgId: d9d6c70bf1ca2e353941074487614245abce555857a68a80cfd9fd800f6785c9
name: python-cantok
arch: src
version: 0.0.31
epoch: 0
release: 1
summary: Implementation of the "Cancellation Token" pattern
url: https://pypi.org/project/cantok/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cantok-0.0.31-1.src.rpm
checksum_type: sha256
description:
  ![logo](https://raw.githubusercontent.com/pomponchik/cantok/main/docs/assets/logo_5.png)

  [![Downloads](https://static.pepy.tech/badge/cantok/month)](https://pepy.tech/project/cantok)
  [![Downloads](https://static.pepy.tech/badge/cantok)](https://pepy.tech/project/cantok)
  [![codecov](https://codecov.io/gh/pomponchik/cantok/graph/badge.svg?token=eZ4eK6fkmx)](https://codecov.io/gh/pomponchik/cantok)
  [![Lines of code](https://sloc.xyz/github/pomponchik/cantok/?category=code)](https://github.com/boyter/scc/)
  [![Hits-of-Code](https://hitsofcode.com/github/pomponchik/cantok?branch=main)](https://hitsofcode.com/github/pomponchik/cantok/view?branch=main)
  [![Test-Package](https://github.com/pomponchik/cantok/actions/workflows/tests_and_coverage.yml/badge.svg)](https://github.com/pomponchik/cantok/actions/workflows/tests_and_coverage.yml)
  [![Python versions](https://img.shields.io/pypi/pyversions/cantok.svg)](https://pypi.python.org/pypi/cantok)
  [![PyPI version](https://badge.fury.io/py/cantok.svg)](https://badge.fury.io/py/cantok)
  [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)


  Cancellation Token is a pattern that allows us to refuse to continue calculations that we no longer need. It is implemented out of the box in many programming languages, for example in [C#](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken) and in [Go](https://pkg.go.dev/context). However, there was still no sane implementation in Python, until the [cantok](https://github.com/pomponchik/cantok) library appeared.




  Install [it](https://pypi.org/project/cantok/):

  ```bash
  pip install cantok
  ```

  And use:

  ```python
  from random import randint
  from cantok import ConditionToken, CounterToken, TimeoutToken

  token = ConditionToken(lambda: randint(1, 100_000) == 1984) + CounterToken(400_000, direct=False) + TimeoutToken(1)
  counter = 0

  while token:
    counter += 1

  print(counter)
  ```

  Read more in the [documentation](https://cantok.readthedocs.io/en/latest/)!


pkgId: 073c38bff3aa322743d41ebd4b795f729e71530ef8134ce1b3c701196e1f4d7b
name: python-cantools
arch: src
version: 39.4.12
epoch: 0
release: 1
summary: CAN BUS tools.
url: https://pypi.org/project/cantools/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cantools-39.4.12-1.src.rpm
checksum_type: sha256
description:
  CAN BUS tools in Python 3.
  - `DBC`_, `KCD`_, SYM, ARXML 3&4 and CDD file parsing.
  - CAN message encoding and decoding.
  - Simple and extended signal multiplexing.
  - Diagnostic DID encoding and decoding.
  - ``candump`` output decoder.
  - Node `tester`_.
  - `C` source code generator.
  - CAN bus monitor.
  - Graphical plots of signals.
  Project homepage: https://github.com/cantools/cantools
  Documentation: https://cantools.readthedocs.io


pkgId: 8e3abbd982ae3d02a915b2c3aea809a3a02b77dc7ea33af0d1fbc1cd2948ae6d
name: python-cantopy
arch: src
version: 0.2.6
epoch: 0
release: 1
summary: A XenoCanto API wrapper for Python
url: https://github.com/RobbeRDG/CantoPy
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cantopy-0.2.6-1.src.rpm
checksum_type: sha256
description:
  CantoPy is an API wrapper and download utility designed for easy scraping of animal sound recordings from the Xeno-Canto database.



  Download the latest published version of this package from PyPI by running the following command:

  ```bash
  pip install cantopy
  ```


  The CantoPy package contains three main components to look up and download recordings from the Xeno-Canto API: the **Query** class, **FetchManager**, and **DownloadManager**.

  The following example demonstrates how to use these components to retrieve high-quality recordings of a common blackbird (*Turdus merula*):

  ```python
  from cantopy import Query, FetchManager, DownloadManager


  query = Query(species_name="common blackbird", quality="A")


  query_result = FetchManager.send_query(query, max_pages=3)


  download_manager = DownloadManager("<download_base_folder>", max_workers=2)


  download_manager.download_all_recordings_in_queryresult(query_result)
  ```


pkgId: c6e1f131e461b1f7c7c95e30c40fdf95b0722323b65c10f21c29df08e2852910
name: python-canu
arch: src
version: 0.18.0
epoch: 0
release: 1
summary: An opinionated tool for managing your chatbot projects
url: https://github.com/sbslee/canu
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canu-0.18.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://badge.fury.io/py/canu.svg)](https://badge.fury.io/py/canu)

  An opinionated tool for managing your chatbot projects.


pkgId: 519e6e82a5f64ed9d516cdb622007a4f535a4fd957d0317f971f9bb4f7a6e99e
name: python-canvacord
arch: src
version: 3.4.9
epoch: 0
release: 1
summary: A Python Version of Canvacord
url: https://github.com/BlazenBoi/canvacord.py/issues
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvacord-3.4.9-1.src.rpm
checksum_type: sha256
description:
  [![Discord](https://discord.com/api/guilds/872291125547921459/embed.png)](https://discord.gg/mPU3HybBs9)
  [![PyPi](https://img.shields.io/pypi/v/canvacord.svg)](https://pypi.org/project/canvacord)
  [![Python](https://img.shields.io/pypi/pyversions/dislash.py.svg)](https://pypi.python.org/pypi/canvacord)

  A copy of [canvacord](https://www.npmjs.com/package/canvacord) made in python!




  1. [Installation](#installation)
  2. [Examples](#examples)
  3. [Creating Images](#creating-images)
  4. [Links](#links)
  5. [Downloads](#downloads)



  Run any of these commands in terminal:

  Mac / Linux
  ```
  pip install canvacord
  ```

  Windows
  ```
  python -m pip install canvacord
  ```


  💡 This library requires **[discord.py](https://github.com/Rapptz/discord.py)**.




  ```python
  import discord
  from discord.ext import commands
  import canvacord

  client = commands.Bot(command_prefix="!")

  @client.command()
  async def rankcard(ctx):
      user = ctx.author
      username = ctx.author.name + "#" + ctx.author.discriminator
      currentxp = 1
      lastxp = 0
      nextxp = 2
      current_level = 1
      current_rank = 1
      background = None
      image = await canvacord.rankcard(user=user, username=username, currentxp=currentxp, lastxp=lastxp, nextxp=nextxp, level=current_level, rank=current_rank, background=background, ranklevelsep="|", xpsep="/")
      file = discord.File(filename="rankcard.png", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def welcomecard(ctx):
      image = await canvacord.welcomecard(user=ctx.author, background=None, avatarcolor="white", topcolor="white", bottomcolor="white", backgroundcolor="black", font=None, toptext="Welcome {user_name}!", bottomtext="Enjoy your stay in {server}!")
      file = discord.File(filename="welcomecard.png", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def triggered(ctx):
      user = ctx.author
      image = await canvacord.trigger(user)
      file = discord.File(filename="triggered.gif", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def communism(ctx):
      user = ctx.author
      image = await canvacord.communism(user)
      file = discord.File(filename="communism.gif", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def jail(ctx):
      user = ctx.author
      image = await canvacord.jail(user)
      file = discord.File(filename="jail.png", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def gay(ctx):
      user = ctx.author
      image = await canvacord.gay(user)
      file = discord.File(filename="gay.png", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def hitler(ctx):
      user = ctx.author
      image = await canvacord.hitler(user)
      file = discord.File(filename="hitler.png", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def aborted(ctx):
      user = ctx.author
      image = await canvacord.aborted(user)
      file = discord.File(filename="aborted.png", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def affect(ctx):
      user = ctx.author
      image = await canvacord.affect(user)
      file = discord.File(filename="affect.png", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def airpods(ctx):
      user = ctx.author
      image = await canvacord.airpods(user)
      file = discord.File(filename="airpods.gif", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def america(ctx):
      user = ctx.author
      image = await canvacord.america(user)
      file = discord.File(filename="america.gif", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def wanted(ctx):
      user = ctx.author
      image = await canvacord.wanted(user)
      file = discord.File(filename="wanted.png", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def joke(ctx):
      user = ctx.author
      image = await canvacord.jokeoverhead(user)
      file = discord.File(filename="jokeoverhead.png", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def spank(ctx):
      user1 = ctx.author
      user2 = ctx.author
      image = await canvacord.spank(user1, user2)
      file = discord.File(filename="spank.png", fp=image)
      await ctx.send(file=file)

  @client.command()
  async def bed(ctx):
      user1 = ctx.author
      user2 = ctx.author
      image = await canvacord.bed(user1, user2)
      file = discord.File(filename="bed.png", fp=image)
      await ctx.send(file=file)

  client.run("BOT_TOKEN")
  ```



  [![Discord](https://discord.com/api/guilds/872291125547921459/embed.png)](https://discord.gg/mPU3HybBs9)
  [![PyPi](https://img.shields.io/pypi/v/canvacord.svg)](https://pypi.org/project/canvacord)





  [![Downloads](https://pepy.tech/badge/canvacord)](https://pepy.tech/project/canvacord)
  [![Downloads](https://pepy.tech/badge/canvacord/month)](https://pepy.tech/project/canvacord)
  ![Downloads](https://pepy.tech/badge/canvacord/week)


pkgId: 5e6a7b4310b64d62368c086ccce1f0c47f80445fc24874d96787705aa9ee9935
name: python-canvas
arch: src
version: 0.2.11
epoch: 0
release: 1
summary: SDK to customize event-driven actions in your Canvas instance
url: https://pypi.org/project/canvas/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvas-0.2.11-1.src.rpm
checksum_type: sha256
description:
  Create a file `~/.canvas/credentials.ini` and add the client_id and client_secret credentials for each of your Canvas instances. You can define your default host with `is_default=true`. If no default is explicitly defined, the Canvas CLI will use the first instance in the file as the default for each of the CLI commands.

  **Example:**

  ```
  [my-canvas-instance]
  client_id=myclientid
  client_secret=myclientsecret

  [my-dev-canvas-instance]
  client_id=devclientid
  client_secret=devclientsecret
  is_default=true

  [localhost]
  client_id=localclientid
  client_secret=localclientsecret
  ```

  Next, you're ready to install canvas.

  `pip install canvas`

  **Usage**:

  ```console
  $ canvas [OPTIONS] COMMAND [ARGS]...
  ```

  **Options**:

  - `--version`
  - `--help`: Show this message and exit.

  **Commands**:

  - `init`: Create a new plugin
  - `install`: Install a plugin into a Canvas instance
  - `uninstall`: Uninstall a plugin from a Canvas instance
  - `disable`: Disable a plugin from a Canvas instance
  - `enable`: Enable a plugin from a Canvas instance
  - `list`: List all plugins from a Canvas instance
  - `validate-manifest`: Validate the Canvas Manifest json file
  - `logs`: Listen and print log streams from a Canvas instance



  Create a new plugin.

  **Usage**:

  ```console
  $ canvas init [OPTIONS]
  ```

  **Options**:

  - `--help`: Show this message and exit.



  Install a plugin into a Canvas instance.

  **Usage**:

  ```console
  $ canvas install [OPTIONS] PLUGIN_NAME
  ```

  **Arguments**:

  - `PLUGIN_NAME`: Path to plugin to install [required]

  **Options**:

  - `--host TEXT`: Canvas instance to connect to
  - `--help`: Show this message and exit.



  Uninstall a plugin from a Canvas instance..

  **Usage**:

  ```console
  $ canvas uninstall [OPTIONS] NAME
  ```

  **Arguments**:

  - `NAME`: Plugin name to delete [required]

  **Options**:

  - `--host TEXT`: Canvas instance to connect to
  - `--help`: Show this message and exit.



  Enable a plugin from a Canvas instance..

  **Usage**:

  ```console
  $ canvas enable [OPTIONS] NAME
  ```

  **Arguments**:

  - `NAME`: Plugin name to enable [required]

  **Options**:

  - `--host TEXT`: Canvas instance to connect to
  - `--help`: Show this message and exit.



  Disable a plugin from a Canvas instance..

  **Usage**:

  ```console
  $ canvas disable [OPTIONS] NAME
  ```

  **Arguments**:

  - `NAME`: Plugin name to disable [required]

  **Options**:

  - `--host TEXT`: Canvas instance to connect to
  - `--help`: Show this message and exit.



  List all plugins from a Canvas instance.

  **Usage**:

  ```console
  $ canvas list [OPTIONS]
  ```

  **Options**:

  - `--host TEXT`: Canvas instance to connect to
  - `--help`: Show this message and exit.



  Validate the Canvas Manifest json file.

  **Usage**:

  ```console
  $ canvas validate-manifest [OPTIONS] PACKAGE
  ```

  **Arguments**:

  - `PLUGIN_NAME`: Path to plugin to install [required]

  **Options**:

  - `--help`: Show this message and exit.



  Listens and prints log streams from the instance.

  **Usage**:

  ```console
  $ canvas logs [OPTIONS]
  ```

  **Options**:

  - `--host TEXT`: Canvas instance to connect to
  - `--help`: Show this message and exit.


pkgId: a52b7ff39dd1f63982a3cf9be3f3f381233a707cb408d54d3b3dd9acda7b1a20
name: python-canvas-course-tools
arch: src
version: 0.11.0
epoch: 0
release: 1
summary: Canvas course tools
url: https://github.com/davidfokkema/canvas-course-tools
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvas-course-tools-0.11.0-1.src.rpm
checksum_type: sha256
description:
  Canvas course tools was created at the physics practicals at the Vrije Universiteit Amsterdam to greatly reduce the time needed to create class lists (with photos!) for staff and teaching assistants.
  Class lists are also created for students so that they can easily lookup their assigned experiments and TA's.
  Furthermore, we use it to create student groups on Canvas for peer feedback.

  This package provides the `canvas` command-line utility.
  After registering a Canvas URL and API key (which you can generate on your profile settings page) this tool allows you to list courses and students in different sections of your courses.
  The output has a light markup and is ideally suited for saving as a text file.
  It is then easy to copy and move lines inside the file to create student groups.
  The file can then be parsed by the `canvas templates` command to render templates based on the text file.
  This allows for creating class lists (with short notes for each student) and even class lists with photos (if you provide photos).

  You can also use this tool to create groups and group sets on Canvas based on a group list file.
  These groups can then be used for grading or peer feedback.
  Especially for grading, it can be very helpful to review small groups of students instead of finding particular students in a long list.




  You can install using `pip` in any Python environment, but the recommended way to install canvas-course-tools is using [pipx](https://pypa.github.io/pipx/):
  ```console
  $ pipx install canvas-course-tools
  ```
  The `canvas` utility is available from the terminal.






  First, we'll need to tell the `canvas` utility where it can find the Canvas installation of your institition.
  If you run `canvas` without arguments it will show you a list of supported commands:
  ```console
  $ canvas

   Usage: canvas [OPTIONS] COMMAND [ARGS]...

  ╭─ Options ────────────────────────────────────────────────────────────╮
  │ --version      Show the version and exit.                            │
  │ --help         Show this message and exit.                           │
  ╰──────────────────────────────────────────────────────────────────────╯
  ╭─ Commands ───────────────────────────────────────────────────────────╮
  │ courses      Add, remove and list Canvas courses.                    │
  │ groups       Create Canvas groups based on group lists.              │
  │ servers      Add, remove and list Canvas servers.                    │
  │ students     Search for or list students.                            │
  │ templates    Generate files based on templates and group lists.      │
  │ tui          Open Textual TUI.                                       │
  ╰──────────────────────────────────────────────────────────────────────╯
  ```
  It appears that the `servers` command might be a good match. Let's check:
  ```console
  $ canvas servers

   Usage: canvas servers [OPTIONS] COMMAND [ARGS]...

   Add, remove and list Canvas servers.

  ╭─ Options ────────────────────────────────────────────────────────────╮
  │ --help      Show this message and exit.                              │
  ╰──────────────────────────────────────────────────────────────────────╯
  ╭─ Commands ───────────────────────────────────────────────────────────╮
  │ add     Register an alias for a server with corresponding access     │
  │         token.                                                       │
  │ list    List the registered servers.                                 │
  │ remove  Remove server from configuration.                            │
  ╰──────────────────────────────────────────────────────────────────────╯
  ```
  Let's try the `add` subcommand:
  ```console
  $ canvas servers add

   Usage: canvas servers add [OPTIONS] ALIAS URL TOKEN

   Try 'canvas servers add --help' for help.
  ╭─ Error ──────────────────────────────────────────────────────────────╮
  │ Missing argument 'ALIAS'.                                            │
  ╰──────────────────────────────────────────────────────────────────────╯
  ```
  We're clearly missing something called `ALIAS` but the output is not very helpful.
  It _does_ suggest, however, to include the `--help` argument.
  If we do, we get:
  ```console
  $ canvas servers add --help

   Usage: canvas servers add [OPTIONS] ALIAS URL TOKEN

   Register an alias for a server with corresponding access token.
   Example:
   canvas servers add school http://canvas.school.example.com/ 123~secret

  ╭─ Options ────────────────────────────────────────────────────────────╮
  │ --force  -f    If alias already exists, force overwrite.             │
  │ --help         Show this message and exit.                           │
  ╰──────────────────────────────────────────────────────────────────────╯
  ```
  That helps! The output even gives an example of how to use the command.
  Here, the alias `school` is used to refer to your institution's Canvas.
  You can use this alias in other `canvas` commands when we need to refer to the Canvas server.
  The `123~secret` should be the text of an access token that you can generate in your account page in Canvas.
  For more information, please see the [Canvas documentation](https://canvas.instructure.com/doc/api/file.oauth.html#manual-token-generation) on how to generate tokens.
  You can only view your token once.
  If you lose it, you can revoke it from your Canvas profile page and generate a new one.
  Once you've created your token, use it to add the server using the `canvas servers add` command as shown above.
  If successful, your Canvas installation should be available in the list:
  ```console
  $ canvas servers list

   ────────────────────────────────────────────
    Alias    URL
   ────────────────────────────────────────────
    school   http://canvas.school.example.com/
   ────────────────────────────────────────────
  ```
  Now that we have registered the Canvas server, we can use the utility to do some work.
  In the rest of this tutorial we will be more brief on how to use the different commands.
  Don't forget you can always add `--help` to the end of any command to get a description of the command and the different ways you can use it.




  You can list all courses accessible by your account using:
  ```console
  $ canvas courses list school

   ──────────────────────────────────────────────────────────────────────
    ID      Alias   Name                        Term
   ──────────────────────────────────────────────────────────────────────
    12345           Physics 101                 2023-2024
    23456           Calculus 102                2022-2023
   ──────────────────────────────────────────────────────────────────────
  ```
  Note that the `Alias` field is still empty because we have not yet added courses.
  You can add courses for future reference by creating an alias like this:
  ```console
  $ canvas courses add phys101 school 12345
  ```
  We first specified the alias (you can choose anything you like as long as it doesn't contain spaces) and after that we specified the server alias and the course ID.
  We can see that it was successful:
  ```console
  $ canvas courses list school

   ──────────────────────────────────────────────────────────────────────
    ID      Alias     Name                       Term
   ──────────────────────────────────────────────────────────────────────
    12345   phys101   Physics 101                2023-2024
    23456             Calculus 102               2022-2023
   ──────────────────────────────────────────────────────────────────────
  ```
  To only list registered courses we can leave off the canvas server as an argument:
  ```console
  $ canvas courses list

   ──────────────────────────────────────────────────────────────────────
    ID      Alias     Name                       Term
   ──────────────────────────────────────────────────────────────────────
    12345   phys101   Physics 101                2023-2024
   ──────────────────────────────────────────────────────────────────────
  ```
  We can now use this course alias (`phys101`) in other `canvas` commands.


pkgId: 88284c0313a4d232097f5b4095b84d5f4f88e4cc9ab5f66c18daae868bb389bf
name: python-canvas-parent-api
arch: src
version: 0.0.17
epoch: 0
release: 1
summary: A small async API wrapper for Canvas Parents.
url: https://github.com/schwartzpub/canvas_parent_api
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvas-parent-api-0.0.17-1.src.rpm
checksum_type: sha256
description:
  This is an async wrapper for the [Canvas API](https://canvas.instructure.com/doc/api/) from Instructure.  There are a few types of objects this will retrieve based on the assumption that you are a parent with students enrolled with Canvas.

  The types of objects that can be returned include:
   - Observees (Students)
   - Courses
   - Assignments
   - Submissions

  This module is provided for use with the Home Assistant custom integration [Canvas](https://github.com/schwartzpub/canvas_hassio) however it could be useful as a standalone module for your own projects as well.


  To install the module use:
  ```python
  python3 -m pip install canvas-parent-api
  ```


  If you are a parent, you will have a Canvas Parent account.  To get an API token, you must sign into the Canvas Parent application from a web browser.  This is typically using: https://<yourdistrict>.instructure.com/login/canvas

  Once you have signed into your account, navigate to Account > Settings.

  Under "Approved Integrations" click "+ New Access Token" to create a new API Token.

  Enter a Purpose and Expiration date (blank for no expiration).

  Be sure to save your API token, as you will have to generate a new token if this is lost.


  Example usage to get students, printing names:
  ```python
  import asyncio
  from canvas_parent_api import Canvas

  base_url = "https://school.instructure.com"
  api_token = "randomstringthatisntreallyatoken"

  async def get_students():
  	client = Canvas(f"{base_url}",f"{api_token}")
  	return await client.observees()

  students = asyncio.run(get_students())

  for student in students:
  	print(student.name)
  ```



   - 0.0.12:
      - Added pagination support to automatically paginate to end of available requests

   - 0.0.9:
  	- Added Submissions

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


pkgId: 726e76aa49954aedabfff837d4042361189662ec182a1a53b459d8c63f9a379c
name: python-canvasapi
arch: src
version: 3.3.0
epoch: 0
release: 1
summary: API wrapper for the Canvas LMS
url: https://github.com/ucfopen/canvasapi
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvasapi-3.3.0-1.src.rpm
checksum_type: sha256
description:
  [![CanvasAPI on PyPI](https://img.shields.io/pypi/v/canvasapi.svg)](https://pypi.python.org/pypi/canvasapi)
  [![License](https://img.shields.io/pypi/l/canvasapi.svg)](https://pypi.python.org/pypi/canvasapi)
  [![Python Versions](https://img.shields.io/pypi/pyversions/canvasapi.svg)](https://pypi.python.org/pypi/canvasapi)
  [![Documentation Status](https://readthedocs.org/projects/canvasapi/badge/?version=stable)](http://canvasapi.readthedocs.io/en/stable/?badge=stable)
  [![Build Status](https://github.com/ucfopen/canvasapi/actions/workflows/run-tests.yml/badge.svg?branch=develop)](https://github.com/ucfopen/canvasapi/actions)
  [![codecov](https://codecov.io/gh/ucfopen/canvasapi/branch/develop/graph/badge.svg?token=CFNpp8f56M)](https://codecov.io/gh/ucfopen/canvasapi)
  [![Join UCF Open Slack Discussions](https://badgen.net/badge/icon/ucfopen?icon=slack&label=slack&color=pink)](https://dl.ucf.edu/join-ucfopen)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)



  CanvasAPI is a Python library for accessing Instructure’s [Canvas LMS API](https://canvas.instructure.com/doc/api/index.html). The library enables developers to programmatically manage Canvas courses, users, gradebooks, and more.



  - [CanvasAPI](#canvasapi)
    - [Table of Contents](#table-of-contents)
    - [Installation](#installation)
    - [Documentation](#documentation)
    - [Contributing](#contributing)
    - [Quickstart](#quickstart)
      - [Working with Canvas Objects](#working-with-canvas-objects)
        - [Course objects](#course-objects)
        - [User objects](#user-objects)
        - [Paginated Lists](#paginated-lists)
        - [Keyword arguments](#keyword-arguments)
    - [CanvasAPI Projects](#canvasapi-projects)
    - [Contact Us](#contact-us)



  You can install CanvasAPI with pip:

  `pip install canvasapi`



  Full documentation is available at [Read the Docs](http://canvasapi.readthedocs.io/).



  Want to help us improve CanvasAPI? Check out our [Contributing Guide](.github/CONTRIBUTING.md) to learn about running CanvasAPI as a developer, picking issues to work on, submitting bug reports, contributing patches, and more.



  Getting started with CanvasAPI is easy.

  Like most API clients, CanvasAPI exposes a single class that provides access to the rest of the API: `Canvas`.

  The first thing to do is instantiate a new `Canvas` object by providing your Canvas instance’s root API URL and a valid API key:

  ```python

  from canvasapi import Canvas


  API_URL = "https://example.com"

  API_KEY = "p@$$w0rd"


  canvas = Canvas(API_URL, API_KEY)
  ```

  You can now use `canvas` to begin making API calls.



  CanvasAPI converts the JSON responses from the Canvas API into Python objects. These objects provide further access to the Canvas API. You can find a full breakdown of the methods these classes provide in our [class documentation](http://canvasapi.readthedocs.io/en/stable/class-reference.html). Below, you’ll find a few examples of common CanvasAPI use cases.



  Courses can be retrieved from the API:

  ```python

  >>> course = canvas.get_course(123456)


  >>> course.name
  'Test Course'


  >>> course.update(course={'name': 'New Course Name'})
  ```

  See our documentation on [keyword arguments](#keyword-arguments) for more information about how `course.update()` handles the `name` argument.



  Individual users can be pulled from the API as well:

  ```python

  >>> user = canvas.get_user(123)


  >>> user.name
  'Test User'


  >>> courses = user.get_courses()


  >>> login_id_user = canvas.get_user('some_user', 'sis_login_id')
  ```



  Some calls, like the `user.get_courses()` call above, will request multiple objects from Canvas’s API. CanvasAPI collects these objects in a `PaginatedList` object. `PaginatedList` generally acts like a regular Python list. You can grab an element by index, iterate over it, and take a slice of it.

  **Warning**: `PaginatedList` lazily loads its elements. Unfortunately, there’s no way to determine the exact number of records Canvas will return without traversing the list fully. This means that `PaginatedList` isn’t aware of its own length and negative indexing is not currently supported.

  Let’s look at how we can use the `PaginatedList` returned by our `get_courses()` call:

  ```python

  >>> courses = user.get_courses()

  >>> print(courses)
  <PaginatedList of type Course>






  >>> print(courses[0])
  TST101 Test Course (1234567)


  >>> for course in courses:
           print(course)

  TST101 Test Course 1 (1234567)
  TST102 Test Course 2 (1234568)
  TST103 Test Course 3 (1234569)


  >>> courses[:2]
  [TST101 Test Course 1 (1234567), TST102 Test Course 2 (1234568)]
  ```



  Most of Canvas’s API endpoints accept a variety of arguments. CanvasAPI allows developers to insert keyword arguments when making calls to endpoints that accept arguments.

  ```python

  >>> courses = user.get_courses(enrollment_state='active')
  ```

  For a more detailed description of how CanvasAPI handles more complex keyword arguments, check out the [Keyword Argument Documentation](http://canvasapi.readthedocs.io/en/stable/keyword-args.html).



  Since its initial release in June 2016, CanvasAPI has amassed over 100 [dependent repositories](https://github.com/ucfopen/canvasapi/network/dependents). Many of these include various tools used to enhance the Canvas experience for both instructors and students. Here are a few popular repositories that use CanvasAPI:

  - [Canvas Grab](https://github.com/skyzh/canvas_grab)
    - Canvas Grab is the most popular project using CanvasAPI. This tool, with one click, copies all files from Canvas LMS to local directory. CanvasAPI is used in this project to connect to a course and grab its files.
  - [Clanvas](https://github.com/marklalor/clanvas)
    - Clanvas is a command-line client for Canvas. It uses the already available bash commands plus some additional ones to interact with various features of Canvas from the commmand line.
  - [CS221Bot](https://github.com/Person314159/cs221bot)
    - CS221Bot is a Discord bot for the CPCS 221 course at University of British Columbia. CanvasAPI is used in this project to connect to and synchronize with a course and get its data, such as announcements, new assignments, and more.

  If you have a project that uses CanvasAPI that you'd like to promote, please contact us!



  Need help? Have an idea? Feel free to check out our [Discussions](https://github.com/ucfopen/canvasapi/discussions) board. Just want to say hi or get extended spport? Come join us on the [UCF Open Slack Channel](https://dl.ucf.edu/join-ucfopen) and join the `#canvasapi` channel!


pkgId: 139fc456dc71b77a251f404974d5bffd606783cdfd9f652634215cc7727cb3d4
name: python-canvasdl
arch: src
version: 1.4.20
epoch: 0
release: 1
summary: course content synchronizer
url: https://github.com/quintenroets/canvasdl
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvasdl-1.4.20-1.src.rpm
checksum_type: sha256
description:
  ![Console image](https://raw.githubusercontent.com/quintenroets/canvasdl/main/examples/console.png?raw=true)
  ![Screen image](https://raw.githubusercontent.com/quintenroets/canvasdl/main/examples/screen.png?raw=true)

  Tired of managing your course content on 5-10 different platforms?
  Canvasdl comes to the rescue and saves you hours of work when studying and completing assignments.
  This convenient package:
  - Synchronizes all your course content to local files
  - Synchronizes your assignment dates to google calendar
  - Shows you what items are new
  - Remembers your progress through course materials
  - Keeps you up to date without overwhelming you with useless notifications
  - Synchronizes content available on:
     - Canvas:
       - Announcements
       - Assignments
       - Course files
       - Video recordings
     - Course websites
     - Ed Discussion
     - Google Drive
     - Piazza
     - Gradescope
  - Developed for:
     - Students at Columbia University
     - Linux OS.
  - Useful for any school using any of the listed platforms
  - Contact developer for other OS/platforms support.



  Make sure you are using python3.10+

  1) Install the package
      ```shell
      pip install canvasdl

      ```
  2) Obtain Canvas API key
      - Columbia University students
        - Go to Courseworks > Account > Settings
        - Click on "New Access Token"

  3) [Optional] Obtain Google Calendar [API key](https://developers.google.com/calendar/api/quickstart/python#authorize_credentials_for_a_desktop_application)
  4) [Optional] Specify custom [Calendar ID](https://xfanatical.com/blog/how-to-find-your-google-calendar-id/)
  5) Configure your settings:
     ```shell
     canvasdl --configure
     ```
  6) Install package for local file management
     - xattr
     - [mediainfo](https://manpages.ubuntu.com/manpages/bionic/man1/mediainfo.1.html)
  7) [Optional] Install package for UI progress during synchronization
     - python-pyqt6
     - pip install PyQt6


  Run command to synchronize all content and check for updates
  ```shell
  canvasdl
  ```


  To quickly experiment with the package you can run the [quickstart](https://github.com/quintenroets/canvasdl/blob/main/examples/quickstart.ipynb) in Google Collab.


pkgId: 282bc48c1a74d462121304abf1eb846dfd8a14abd5d8abdfd5df9310ba2d4c47
name: python-canvaslms
arch: src
version: 4.2
epoch: 0
release: 1
summary: Command-line interface to Canvas LMS
url: https://github.com/dbosk/canvaslms
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvaslms-4.2-1.src.rpm
checksum_type: sha256
description:
  This program provides a command-line interface for Canvas. The command
  is `canvaslms` and it has several subcommands in the same style as Git.
  `canvaslms` provides output in a format useful for POSIX tools, this
  makes automating tasks much easier.

  Let's consider how to grade students logging into the student-shell SSH
  server. We store the list of students' Canvas and KTH IDs in a file.

  ``` {.text}
  canvaslms users -c DD1301 -s | cut -f 1,2 > students.csv
  ```

  Then we check who has logged into student-shell.

  ``` {.text startFrom="2"}
  ssh student-shell.sys.kth.se last | cut -f 1 -d " " | sort | uniq \
    > logged-in.csv
  ```

  Finally, we check who of our students logged in.

  ``` {.text startFrom="4"}
  for s in $(cut -f 2 students.csv); do
    grep $s logged-in.csv && \
  ```

  Finally, we can set their grade to P and add the comment "Well done!" in
  Canvas. We set the grades for the two assignments whose titles match the
  regular expression `(Preparing the terminal|The terminal)`.

  ``` {.text startFrom="6"}
      canvaslms grade -c DD1301 -a "(Preparing the terminal|The terminal)" \
        -u $(grep $s students.csv | cut -f 1) \
        -g P -m "Well done!"
  done
  ```



  Just install the PyPI package:
  ```
  python3 -m pip install canvaslms
  ```
  Some subcommands use `pandoc`, so you will likely have to [install
  pandoc][pandoc] on your system manually.

  [pandoc]: https://pandoc.org/installing.html


pkgId: c81673991b34625d9046e39ec626cff714cee5e8db402789a50e43d074a91daa
name: python-canvaslms
arch: src
version: 4.4
epoch: 0
release: 1
summary: Command-line interface to Canvas LMS
url: https://github.com/dbosk/canvaslms
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvaslms-4.4-1.src.rpm
checksum_type: sha256
description:
  This program provides a command-line interface for Canvas. The command
  is `canvaslms` and it has several subcommands in the same style as Git.
  `canvaslms` provides output in a format useful for POSIX tools, this
  makes automating tasks much easier.



  Start by login to your Canvas server

  ``` {.text}
  canvaslms login
  ```

  Let's consider how to grade students logging into the student-shell SSH
  server. We store the list of students' Canvas and KTH IDs in a file.

  ``` {.text}
  canvaslms users -c DD1301 -s | cut -f 1,2 > students.csv
  ```

  Then we check who has logged into student-shell.

  ``` {.text startFrom="2"}
  ssh student-shell.sys.kth.se last | cut -f 1 -d " " | sort | uniq \
    > logged-in.csv
  ```

  Finally, we check who of our students logged in.

  ``` {.text startFrom="4"}
  for s in $(cut -f 2 students.csv); do
    grep $s logged-in.csv && \
  ```

  Finally, we can set their grade to P and add the comment "Well done!" in
  Canvas. We set the grades for the two assignments whose titles match the
  regular expression `(Preparing the terminal|The terminal)`.

  ``` {.text startFrom="6"}
      canvaslms grade -c DD1301 -a "(Preparing the terminal|The terminal)" \
        -u $(grep $s students.csv | cut -f 1) \
        -g P -m "Well done!"
  done
  ```



  Just install the PyPI package:
  ```
  python3 -m pip install canvaslms
  ```
  Some subcommands use `pandoc`, so you will likely have to [install
  pandoc][pandoc] on your system manually.

  [pandoc]: https://pandoc.org/installing.html


pkgId: 1c051c9ace8afcc6b75ea6472c6b21eb27d1835ac38b3d29314727adc77bf1f0
name: python-canvasrobot
arch: src
version: 0.8.0
epoch: 0
release: 1
url: https://pypi.org/project/canvasrobot/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvasrobot-0.8.0-1.src.rpm
checksum_type: sha256
summary:
  Library which uses Canvasapi https://canvasapi.readthedocs.io/en/stable/getting-started.html to provide a CanvasRobot class.

description:
  Library which uses
  [Canvasapi](https://canvasapi.readthedocs.io/en/stable/getting-started.html)
  to provide a CanvasRobot class for GUI and commandline use (Rich)

  [CanvasAPI](https://canvasapi.readthedocs.io/en/stable/getting-started.html)

  In word2quiz library.

  Not yet ready for general use...


  ```Python
  import rich
  import canvasrobot as cr

  if __name__ == '__main__':

      console = rich.console.Console(width=160, force_terminal=True)

      robot = cr.CanvasRobot(reset_api_keys=False,
                             console=console)

      
      robot.create_folder_in_all_courses('Tentamens')



      
      

      
      
      
      

      
      

      
      
      
      

      
      
      

      
      

      
      
      
      
      


      

      
      
      
      
      
      
      
  ```


  [![PyPI version](https://badge.fury.io/py/canvasrobot.svg)]


pkgId: 05c38a4937821968d7622e12cf80eb795a9a67196fcc2b831007250e11fa46be
name: python-canvasrobot
arch: src
version: 0.8.18
epoch: 0
release: 1
summary: Library which uses Canvasapi (see https://canvasapi.readthedocs.io) to provide a CanvasRobot class.
url: https://pypi.org/project/canvasrobot/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvasrobot-0.8.18-1.src.rpm
checksum_type: sha256
description:
  Library which uses
  [Canvasapi](https://canvasapi.readthedocs.io/en/stable/getting-started.html)
  (patched to allow better user search)
  to provide a CanvasRobot class for GUI and commandline use (Rich)

  [CanvasAPI](https://canvasapi.readthedocs.io/en/stable/getting-started.html)

  In word2quiz library.

  Not yet ready for general use...


  ```Python
  import rich
  import canvasrobot as cr

  if __name__ == '__main__':

      console = rich.console.Console(width=160, force_terminal=True)

      robot = cr.CanvasRobot(reset_api_keys=False,
                             console=console)

      
      robot.create_folder_in_all_courses('Tentamens')



      
      

      
      
      
      

      
      

      
      
      
      

      
      
      

      
      

      
      
      
      
      


      

      
      
      
      
      
      
      
  ```


  [![PyPI version](https://badge.fury.io/py/canvasrobot.svg)]


pkgId: ed4db63c7a36921364b914eae450d56e9600edcdf10adaf2064486bc4d40341c
name: python-canvassyncer
arch: src
version: 2.0.11
epoch: 0
release: 1
summary: The async fast canavs file syncer.
url: https://github.com/BoYanZh/Canvas-Syncer
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvassyncer-2.0.11-1.src.rpm
checksum_type: sha256
description:
  [![MIT License](https://img.shields.io/pypi/l/canvassyncer)](https://github.com/BoYanZh/Canvas-Syncer/blob/master/LICENSE)
  [![CodeFactor](https://www.codefactor.io/repository/github/boyanzh/canvas-syncer/badge)](https://www.codefactor.io/repository/github/boyanzh/canvas-syncer)
  [![PyPi Version](https://img.shields.io/pypi/v/canvassyncer)](https://pypi.org/pypi/canvassyncer)

  An async python script that synchronizes files and folders across Canvas Files and local, with extremely fast speed.



  You may use one of the following



  For Windows users, you can find binary(.exe) file here: <https://github.com/BoYanZh/Canvas-Syncer/releases>. Unzip it and double click `canvassyncer.exe` file to run, or calling it in shell.



  ```bash
  pip3 install -U canvassyncer
  ```

  If you have not installed `pip` yet, you may refer to <https://pip.pypa.io/en/stable/installing/> or the search engine to get your `pip`.



  ```bash
  git clone https://github.com/BoYanZh/Canvas-Syncer && cd Canvas-Syncer
  pip install -e .
  ```



  ```bash
  canvassyncer
  ```

  Then input the information following the guide.

  *Note:*
  1. `courseCode` should be something like `VG100`, `ECE4530J`
  2. `courseID` should be an integer. Check the canvas link of the course. e.g. `courseID = 7` for <https://jicanvas.com/courses/7>.

  You can use `canvassyncer -h` to get help.

  Optional arguments:

  ```text
    -h, --help            show this help message and exit
    -r                    recreate config file
    -y                    confirm all prompts
    --no-subfolder        do not create a course code named subfolder when synchronizing files
    -p PATH, --path PATH  appoint config file path
    -c CONNECTION, --connection CONNECTION
                          max connection count with server
    -x PROXY, --proxy PROXY
                          download proxy
    -V, --version         show program's version number and exit
    -d, --debug           show debug information
    --no-keep-older-version
                          do not keep older version
  ```



  Open Your Canvas-Account-Approved Integrations-New Access Token

  Or it can be easily achieved with <https://github.com/BoYanZh/JI-Auth> if you are a UM-SJTU-JI student.




  Please feel free to create issues and pull requests.


pkgId: 71b37e7a24ace9ed6a83053a6c61d49b1eb582fb44555041fdbb977a88b8f912
name: python-canvasxpress
arch: src
version: 2024.11.21.170552
epoch: 0
release: 1
summary: CanvasXpress for Python
url: https://github.com/docinfosci/canvasxpress-python.git
rpm_license: Copyright 2020 to 2024 CanvasXpress all rights reserved
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-canvasxpress-2024.11.21.170552-1.src.rpm
checksum_type: sha256
description:
  <a href="https://www.canvasxpress.org">
  <img src="https://raw.githubusercontent.com/docinfosci/canvasxpress-python/main/readme/images/hexagon.png" align="left" width="175" style="vertical-align:middle;margin:10px 10px">
  </a>
  <br>

  [***CanvasXpress***](https://www.canvasxpress.org) was developed as the core visualization component for bioinformatics
  and systems biology analysis at Bristol-Myers Squibb. It supports a large number
  of [visualizations ](https://www.canvasxpress.org/examples.html)
  to display scientific and non-scientific data. ***CanvasXpress*** also includes a simple and unobtrusive
  [user interface](https://www.canvasxpress.org/docs/interface.html) to explore complex data sets, a sophisticated and
  unique mechanism to keep track of all user customization for
  [Reproducible Research ](https://www.canvasxpress.org/docs/audit.html) purposes, as well as an 'out of the box'
  broadcasting capability to synchronize selected data points across all ***CanvasXpress*** plots in a page. Data can be
  easily sorted, grouped, transposed, transformed or clustered dynamically. The fully customizable mouse events as well as
  the zooming, panning and drag-and-drop capabilities are features that make this library unique in its class.

  <img src="https://raw.githubusercontent.com/docinfosci/canvasxpress-python/main/readme/images/sample_graphs.png" align="center" width="726"></a>

  ***CanvasXpress*** can be used for native Python integration for the following environments:

  - [Shiny for Python](https://shiny.posit.co/py/)
  - [Streamlit](https://streamlit.io/)
  - [Plotly Dash](https://dash.plotly.com/)
  - [Jupyter](https://jupyter.org/)
  - [Flask](https://flask.palletsprojects.com/en/1.1.x/)
  - [Django](https://www.djangoproject.com/)

  The RStudio IDE Viewer is also used when running code chunks in Jupyter, Quarto, and RMD Python code chunks.

  This ***CanvasXpress*** Python package is maintained by [Dr. Todd C. Brett](https://github.com/docinfosci), with support
  from [Aggregate Genius Inc.](https://www.aggregate-genius.com), in cooperation with Dr. Isaac Neuhaus and the
  ***CanvasXpress*** team.



  [![Release](https://img.shields.io/pypi/v/canvasxpress.svg)](https://pypi.org/project/canvasxpress)
  [![Compatibility](https://img.shields.io/pypi/pyversions/canvasxpress.svg)](https://pypi.org/project/canvasxpress)
  [![Implementations](https://img.shields.io/pypi/implementation/canvasxpress.svg)](https://pypi.org/project/canvasxpress)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/canvasxpress)](https://pypi.org/project/canvasxpress)
  [![docinfosci](https://circleci.com/gh/docinfosci/canvasxpress-python/tree/main.svg?style=shield)](https://circleci.com/gh/docinfosci/canvasxpress-python/?branch=main)
  [![Coverage Status](https://coveralls.io/repos/github/docinfosci/canvasxpress-python/badge.svg?branch=main)](https://coveralls.io/github/docinfosci/canvasxpress-python?branch=main)
  [![Activity](https://img.shields.io/github/last-commit/docinfosci/canvasxpress-python/develop)](https://github.com/docinfosci/canvasxpress-python)





  Documentation is maintained at [CanvasXpress.org](https://www.canvasxpress.org) and LinkedIn:

  - [Introduction to CanvasXpress for Python](https://www.linkedin.com/pulse/introducing-canvasxpress-python-todd-brett-hew0f/?trackingId=G8kTE2QyRH%2BrcVSzxJc8Hg%3D%3D)



  CanvasXpress for Python can be installed using _pip_:

  The essential CanvasXpress package, for use with the CLI or flask and similar environments, can be installed using:

  ```terminal
  pip install canvasxpress
  ```

  or

  ```terminal
  pip install "canvasxpress[core]"
  ```

  In addition to _core_, the following additional targets can be used:

  - _jupyter_ - installs additional packages to support rendering in Jupyter, Quarto, and IPython documents
  - _dash_ - installs additional packages to support rendering in Plotly Dash applications
  - _streamlit_ - installs additional packages to support rendering in Snowflake Streamlit applications
  - _shiny_ - installs additional packages to support rendering in Posit Shiny for Python applications
  - _rstudio_ - installs additional packages to support rendering in the Posit RStudio IDE Viewer, plus includes the same packages for jupyter and shiny
  - _all_ - installs all additional packages to support rendering in any supported document or application



  The `CanvasXpress` object defines what a chart should contain and how it should be formatted, but rendering the chart
  is performed by the functions `graph()` and `show_in_browser()`.

  To use `graph()` import it from `canvasxpress.plot` and then call it by passing a `CanvasXpress` object. For example, a
  Quarto, RMD, or Jupyter Notebook code chunk could be:

  ```python
  from random import random

  from canvasxpress.canvas import CanvasXpress
  from canvasxpress.plot import graph

  graph(
      CanvasXpress(
          data={
              "y": {
                  "data": [
                      [random() % 100 for i in range(20)]
                  ],
                  "vars": ["A"],
              }
          },
          config={
              "background": "rgb(255,255,255)",
              "colorScheme": "CanvasXpress",
              "graphOrientation": "vertical",
              "graphType": "Area",
              "objectBorderColor": False,
              "plotBox": False,
              "plotBoxColor": "rgb(204,204,204)",
              "showLegend": False,
              "showLegendBorder": True,
              "smpLabelRotate": 90,
              "smpTitle": "time",
              "xAxis": ["A"],
              "xAxisTickRightShow": False,
              "yAxisTickTopShow": False
          },
          width=609,
          height=609
      )
  )
  ```

  Some application frameworks, such as _Shiny for Python_ and _Plotly Dash_, expect an object to be rendered to the
  framework as part of the reactive flow.  In these contexts, the `graph()` function creates an appropriate object
  and returns it.  That value can be assigned to a variable to be returned at a later point in the code, or be
  immediately returned.  See the Shiny for Python and Dash examples for specific usage.

  `show_in_browser()` is similar to `graph()` except that it opens a browser window on the local system and displays the
  chart.  It's used to facilitate learning and debugging.

  `graph()` does a good job of determining the runtime context to choose how the chart should be rendered, but in the
  case installed packages or runtime configurations confuse the function an environment variable can be set to override
  how `graph()` performs the rendering.  Set `CANVASXPRESS_TARGET_CONTEXT` to be one of these values as appropriate for
  this situation (and don't forget to pip install the necessary package support):

  - rstudio
  - shiny
  - jupyter
  - dash
  - streamlit
  - browser

  For example:

  ```python
  from os import environ
  environ["CANVASXPRESS_TARGET_CONTEXT"] = "jupyter"
  ```

  or via a shell (_bash_ example provided):

  ```shell
  export CANVASXPRESS_TARGET_CONTEXT="jupyter"
  ```



  CanvasXpress for Python generates JavaScript that assumes use of the latest available edition of CanvasXpress for
  JavaScript, but it can be set to use a specific edition.

  Review this site for available versions:
  https://cdnjs.com/libraries/canvasXpress

  The desired version is expressed as a `str`.  Prior to generating a CanvasXpress chart use the following code to set
  the edition that shall be used:

  ```python
  from canvasxpress.canvas import CanvasXpress
  CanvasXpress.set_cdn_edition("48.3")  # Or whatever available version is desired.
  ```

  To use the default edition once again during the runtime session set the value to `None`.

  This is the best way to assure a specific chart behavior for production application releases; however, once set any
  new JavaScript edition features or fixes will not be available until the code is removed or a different version is set.



  Generally speaking, a `CanvasXpress` object accepts the following parameters:



  `render_to` is a `str` value that identifies the chart when rendered into HTML.  JavaScript functions can use this ID
  to access the chart and perform CanvasXpress operations within the browser.  Omitting `render_to` or setting it to
  `None` will make the `CanvasXpress` object assume an anonymous mode in which a new GUID will be generated each time
  `graph()` is called.  If the chart will not be maniluated using JavaScript in the browser it is fine for charts to be anonymous.

  __NOTE:__ React environments regularly destroy and rebuild objects as the page is updated.  In these environments it is
  possible for the timing of object destruction and JavaScript execution to cause a crash.  The best defense is to either
  use anonymous mode, or if an ID must be known then a unique identifier should be set each time `graph()` is called.  In
  this manner an ID for a chart in the middle of being recreated is never referenced.  For example:

  ```python
  chart = CanvasXpress(...)
  chart.render_to = str(guid4()).replace("-", "_")
  return graph(chart)
  ```

  Plotly's Dash framework uses React, and Dash applications should consider using only anonymous charts or assigning
  unique values as the ID similar to the above code.  Shiny for Python does not seem to suffer from this challenge.



  `data` sets the chart's data and metadata.  This is an involved topic, and the [introductory article](https://www.linkedin.com/pulse/introducing-canvasxpress-python-todd-brett-hew0f/?trackingId=G8kTE2QyRH%2BrcVSzxJc8Hg%3D%3D)
  is an excellent read to understand how data should be shaped.  In general, data will be a `dict`, Web URL, or `str`.

  Data dict example:

  ```python
  data_for_use_in_chart = {
      "y": {
          "data": [
              [random() % 100 for i in range(20)]
          ],
          "vars": ["A"],
      }
  }
  ```

  Data URL example:

  ```python
  data_for_use_in_chart = "https://corgis-edu.github.io/corgis/datasets/csv/state_demographics/state_demographics.csv"
  ```

  Data text (CSV) example:

  ```python
  data_for_use_in_chart = """
  "State","Population.Population Percent Change","Population.2014 Population"
  "Connecticut","-10.2","3605944"
  "Delaware","8.4","989948"
  """
  ```



  `config` describes the chart's formatting.  It is a `dict` in which properties are specified and assigned values. All
  of the values must be compliant with Python's `json.dumps()` function.  For example:

  ```python
  config={
      "background": "rgb(255,255,255)",
      "colorScheme": "CanvasXpress",
      "graphOrientation": "vertical",
      "graphType": "Area",
      "objectBorderColor": False,
      "plotBox": False,
      "plotBoxColor": "rgb(204,204,204)",
      "showLegend": False,
      "showLegendBorder": True,
      "smpLabelRotate": 90,
      "smpTitle": "time",
      "xAxis": ["A"],
      "xAxisTickRightShow": False,
      "yAxisTickTopShow": False
  },
  ```



  `width` and `height` specify the chart's dimensions as pixels.  If ommitted the CanvasXpress edition active for the
  browser will assign default values, such as 500px by 500px.



  CanvasXpress provides support for Javascript events via hook functions that are called when events occur, such as mouse
  movement or clicks. These events are supported via the canvasxpress.js sub-package. `CXEvent` objects hold the
  Javascript instructions for Web events.  An example event for graph clicks with popup information is:

  ```python
  from canvasxpress.js.function import CXEvent

  CXEvent(
      id="click",
      script="""
      var s = 'click on var ' + o.y.vars[0] + ' and smp ' + o.y.smps[0];
      t.showInfoSpan(e, s);
      """
  )
  ```

  The general JavaScript template of a CanvasXpress Javascript hook function is:

  ```javascript
  function (o, e, t) {
      // script logic goes here
  };
  ```

  `CXEvent` objects can be provided as a single object or as a list.  Here's an example of an event the provides
  additional information about chart data upon a user click:

  ```python
  from canvasxpress.canvas import CanvasXpress
  from canvasxpress.plot import graph
  from canvasxpress.js.function import CXEvent

  graph(
      CanvasXpress(
          render_to="example_chart",
          data={
              "y": {
                  "vars": ["Gene1"],
                  "smps": ["Smp1", "Smp2", "Smp3"],
                  "data": [[10, 35, 88]]
              }
          },
          config={
              "graphOrientation": "vertical",
              "graphType": "Bar",
              "showLegend": False,
              "smpLabelRotate": 90,
              "smpTitle": "Samples",
              "theme": "CanvasXpress",
              "title": "Bar Graph Title",
              "xAxisTitle": "Value"
          },
          events=[
              CXEvent(
                  id="click",
                  script="""
                  var s = 'click on var ' + o.y.vars[0] + ' and smp ' + o.y.smps[0];
                  t.showInfoSpan(e, s);
                  """
              ),
          ]
      )
  )
  ```



  CanvasXpress for Python can also convert to and from reproducible JSONs usable with the JavaScript and R editions of the
  library.  `convert_to_reproducible_json` takes an existing CanvasXpress object and provides a `str` copy of the JSON,
  which can then be logged for debugging or saved to disk for use elsewhere.  `convert_from_reproducible_json` does the
  opposite by taking a reproducible JSON `str` and providing the CanvasXpress object equivalent.

  _Note: Events are not currently supported for import.  This will be provided in a future edition.  Export supports events._

  For example, do the following to see the JSON in the Python console:

  ```python
  from canvasxpress.canvas import CanvasXpress
  from canvasxpress.plot import convert_to_reproducible_json
  from canvasxpress.js.function import CXEvent

  print(
      convert_to_reproducible_json(
          CanvasXpress(
              render_to="example_chart",
              data={
                  "y": {
                      "vars": ["Gene1"],
                      "smps": ["Smp1", "Smp2", "Smp3"],
                      "data": [[10, 35, 88]]
                  }
              },
              config={
                  "graphOrientation": "vertical",
                  "graphType": "Bar",
                  "showLegend": False,
                  "smpLabelRotate": 90,
                  "smpTitle": "Samples",
                  "theme": "CanvasXpress",
                  "title": "Bar Graph Title",
                  "xAxisTitle": "Value"
              },
              events=[
                  CXEvent(
                      id="click",
                      script="""
                      var s = 'click on var ' + o.y.vars[0] + ' and smp ' + o.y.smps[0];
                      t.showInfoSpan(e, s);
                      """
                  ),
              ]
          )
      )
  )
  ```

  The console would display:

  ```text
  {
      "renderTo": "example_chart",
      "data": {"y": {"vars": ["Gene1"], "smps": ["Smp1", "Smp2", "Smp3"], "data": [[10, 35, 88]]}, "x": {}, "z": {}},
      "config": {"graphOrientation": "vertical", "graphType": "Bar", "showLegend": false, "smpLabelRotate": 90, "smpTitle": "Samples", "theme": "CanvasXpress", "title": "Bar Graph Title", "xAxisTitle": "Value"},
      "afterRender": [],
      "otherParams": {},
      "events": {'click': function(o, e, t){
                      var s = 'click on var ' + o.y.vars[0] + ' and smp ' + o.y.smps[0];
                      t.showInfoSpan(e, s);
                      }},
      "width": 500,
      "height": 500
  }
  ```

  This text could be saved to a file, such as `example.json`, and then dragged onto a CanvasXpress chart in a browser
  to load the equivalent chart.  In fact, CanvasXpress for Python uses the core functionality producing JSON output to
  make charts available in contexts such as Dash and Shiny.





  The RStudio IDE's Viewer panel is now supported for rendering interactive charts in the Viewer!  When the `graph()`
  function is called it detects that RStudio is running and renders the chart in the Viewer instead of a document,
  such as for Quarto code chunks.  However, if the document is a Quarto or RMD file and the appropriate HTML (etc.)
  generation is performed then the CanvasXpress charts will be embedded in the generated output file as normal.



  Charts can be defined in scripts or a console session and then displayed using the default browser, assuming that a
  graphical browser with Javascript support is available on the host system.  To do so use the `show_in_browser()`
  function instead of graph()`.

  ```python
  from canvasxpress.canvas import CanvasXpress
  from canvasxpress.plot import show_in_browser

  if __name__ == "__main__":
      
      chart: CanvasXpress = CanvasXpress(
          data={
              "y": {
                  "vars": ["Gene1"],
                  "smps": ["Smp1", "Smp2", "Smp3"],
                  "data": [[10, 35, 88]]
              }
          },
          config={
              "graphType": "Bar"
          }
      )

      
      show_in_browser(chart)
  ```

  Upon running the example the following chart will be displayed on systems such as MacOS X, Windows, and Linux with
  graphical systems:

  <img src="https://raw.githubusercontent.com/docinfosci/canvasxpress-python/main/readme/examples/flask_bar_chart_basic.png" align="center" width="600"></a>



  [Shiny for Python](https://shiny.posit.co/py/) is a new dashboard framework inspired by the highly successful Shiny for
  R framework produced by Posit (formerly RStudio). This example shows how to create a basic Shiny for Python application
  using a CanvasXpress Shiny element.

  A basic Shiny for Python app provides a means by which:

  1. A local development server can be started
  1. A function can respond to input or draw an initial UI

  First install Shiny for Python and CanvasXpress for Python:

  ```terminal
  pip install shiny
  pip install canvasxpress[shiny]
  ```

  Then create a demo file, such as `app.py`, and insert:

  ```python
  from random import random

  from shiny import App, ui, render, reactive

  from canvasxpress.canvas import CanvasXpress
  from canvasxpress.render.shiny import output_canvasxpress
  from canvasxpress.plot import graph

  app_ui = ui.page_fluid(
      ui.row(
          ui.input_slider(
              "points_desired",
              "Points",
              min=0,
              max=100,
              value=0,
          ),
      ),
      ui.row(
          output_canvasxpress("chart_view"),
      )
  )


  def server(input, output, session):
      @render.ui
      @reactive.event(input.points_desired)
      def chart_view():
          return graph(
              CanvasXpress(
                  data={
                      "y": {
                          "data": [
                              [random() % 100 for i in range(input.points_desired())]
                          ],
                          "vars": ["A"],
                      }
                  },
                  config={
                      "background": "rgb(255,255,255)",
                      "colorScheme": "CanvasXpress",
                      "graphOrientation": "vertical",
                      "graphType": "Area",
                      "objectBorderColor": False,
                      "plotBox": False,
                      "plotBoxColor": "rgb(204,204,204)",
                      "showLegend": False,
                      "showLegendBorder": True,
                      "smpLabelRotate": 90,
                      "smpTitle": "time",
                      "xAxis": ["A"],
                      "xAxisTickRightShow": False,
                      "yAxisTickTopShow": False
                  },
                  width=500,
                  height=500
              )
          )


  app = App(app_ui, server)
  ```



  On the command line, execute:

  ```terminal
  shiny run --reload --launch-browser app.py
  ```

  And output similar to the following will be provided:

  ```terminal
  Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
  ```

  Browsing to `http://localhost:8000/` will result in a page with a CanvasXpress chart, which is being hosted by the Shiny
  for Python framework:

  <img src="https://raw.githubusercontent.com/docinfosci/canvasxpress-python/main/readme/examples/shiny_chart_example.png" align="center" width="600"></a>

  Congratulations!  You have created a Shiny for Python CanvasXpress app!



  [Streamlit](https://streamlit.io) is a popular dashboard framework that is simplified compared to Dash and Shiny, but
  just as powerful in terms of reactivity and extensions. This example shows how to create a basic Streamlit application
  using a CanvasXpress Streamlit element.

  A basic Streamlit app provides a means by which:

  1. A local development server can be started
  1. A function can respond to a URL

  First install Streamlit and CanvasXpress for Python:

  ```terminal
  pip install streamlit
  pip install canvasxpress[streamlit]
  ```

  Then create a demo file, such as `app.py`, and insert:

  ```python
  import random

  import streamlit as st

  from canvasxpress.canvas import CanvasXpress
  from canvasxpress.plot import graph


  chord_chart = CanvasXpress(
      config={
          "graphOrientation": "vertical",
          "plotBox": True,
          "showLegend": False,
          "smpLabelRotate": 90,
          "smpTitle": "Samples",
          "theme": "CanvasXpress",
          "title": "Bar Graph Title",
          "xAxis": ["V1"],
          "xAxisTitle": "Value",
          "graphType": "Bar"
      },
      width=500,
      height=500
  )





  st.title('CanvasXpress in Streamlit!')


  column1, column2 = st.columns(2)


  column1.write(
      
      st.button("Generate New Data")
  )



  chord_chart.data = {
      "y": {
          "vars": ["V1"],
          "smps": ["S1", "S2", "S3"],
          "data": [
              [
                  random.randint(100, 10000),
                  random.randint(100, 10000),
                  random.randint(100, 10000),
              ]
          ]
      }
  }
  column2.write(
      
      graph(chord_chart)
  )
  ```



  On the command line, execute:

  ```terminal
  streamlit run app.py
  ```

  And output similar to the following will be provided:

  ```terminal
  Running on http://localhost:8501/ (Press CTRL+C to quit)
  ```

  Browsing to `http://localhost:8501/` will result in a page with a CanvasXpress chart, which is being hosted by the
  Streamlit framework:

  <img src="https://raw.githubusercontent.com/docinfosci/canvasxpress-python/main/readme/examples/streamlit_chart_basic.png" align="center" width="600"></a>

  Congratulations!  You have created a Streamlit CanvasXpress app!



  [Plotly Dash](https://dash.plotly.com/) is a popular dashboard framework similar to Shiny for Python or R. Dash
  applications are Web pages with widgets and elements facilitating the interactive presentation of information. This
  example shows how to create a basic Dash application using a CanvasXpress Dash element.



  A basic Dash app provides a means by which:

  1. A local development server can be started
  1. A function can respond to a URL

  First install Dash and CanvasXpress for Python:

  ```terminal
  pip install dash
  pip install canvasxpress[dash]
  ```

  Then create a demo file, such as `app.py`, and insert:

  ```python
  from random import random

  from dash import Dash, html

  from canvasxpress.canvas import CanvasXpress
  from canvasxpress.plot import graph

  g_app = Dash(__name__)

  colors = {
      "background": "#111111",
      "text": "rgb(127,219,255)",
  }


  g_app.layout = html.Div(
      style={"backgroundColor": colors["background"]},
      children=[
          html.H1(
              children="Hello Dash",
              style={"textAlign": "center", "color": colors["text"]},
          ),
          html.H2(
              children=(
                  "An Example of the Advanced CanvasXpress and CXDashElementFactory"
                  " Classes for Plotting a CanvasXpress Chart"
              ),
              style={"textAlign": "center", "color": colors["text"]},
          ),
          html.Div(
              id="chart-container",
              children=[
                  html.Div(
                      id="cx-container",
                      style={"textAlign": "center"},
                      children=graph(
                          CanvasXpress(
                              data={
                                  "y": {
                                      "data": [
                                          [random() % 100 for i in range(5)]
                                      ],
                                      "vars": ["A"],
                                  }
                              },
                              config={
                                  "background": "rgb(255,255,255)",
                                  "colorScheme": "CanvasXpress",
                                  "graphOrientation": "vertical",
                                  "graphType": "Area",
                                  "objectBorderColor": False,
                                  "plotBox": False,
                                  "plotBoxColor": "rgb(204,204,204)",
                                  "showLegend": False,
                                  "showLegendBorder": True,
                                  "smpLabelRotate": 90,
                                  "smpTitle": "time",
                                  "xAxis": ["A"],
                                  "xAxisTickRightShow": False,
                                  "yAxisTickTopShow": False
                              },
                              width=500,
                              height=500
                          )
                      ),
                  ),
              ],
          ),
      ],
  )

  if __name__ == "__main__":
      g_app.run_server(debug=True)
  ```



  On the command line, execute:

  ```terminal
  python3 app.py
  ```

  And output similar to the following will be provided:

  ```terminal
  Running on http://127.0.0.1:8050/ (Press CTRL+C to quit)
  ```

  Browsing to `http://127.0.0.1:8050/` will result in a page with a CanvasXpress chart, which is being hosted by the Dash
  framework:

  <img src="https://raw.githubusercontent.com/docinfosci/canvasxpress-python/main/readme/examples/dash_chart_basic.png" align="center" width="600"></a>

  Congratulations!  You have created a Plotly Dash CanvasXpress app!



  [Flask](https://palletsprojects.com/p/flask/) is a popular lean Web development framework for Python based applications.
  Flask applications can serve Web pages, RESTful APIs, and similar backend service concepts. This example shows how to
  create a basic Flask application that provides a basic Web page with a CanvasXpress chart composed using Python in the
  backend.

  The concepts in this example equally apply to other frameworks that can serve Web pages, such as Django and Tornado.



  A basic Flask app provides a means by which:

  1. A local development server can be started
  1. A function can respond to a URL

  First install Flask and CanvasXpress for Python:

  ```terminal
  pip install -U Flask canvasxpress
  ```

  Then create a demo file, such as `app.py`, and insert:

  ```python

  from flask import Flask

  app = Flask(__name__)


  @app.route('/')
  def canvasxpress_example():
      return "Hello!"
  ```

  On the command line, execute:

  ```terminal
  flask run
  ```

  And output similar to the following will be provided:

  ```terminal
  Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  ```

  Browsing to `http://127.0.0.1:5000/` will result in a page with the text
  *Hello!*.



  CanvasXpress for Python can be used to define a chart with various attributes and then generate the necessary HTML and
  Javascript for proper display in the browser.

  Add a `templates` directory to the same location as the `app.py` file, and inside add a file
  called `canvasxpress_example.html`. Inside the file add:

  ```html

  <html>
  <head>
      <meta charset="UTF-8">
      <title>Flask CanvasXpress Example</title>

      <!-- 2. Include the CanvasXpress library -->
      <link
              href='https://www.canvasxpress.org/dist/canvasXpress.css'
              rel='stylesheet'
              type='text/css'
      />
      <script
              src='https://www.canvasxpress.org/dist/canvasXpress.min.js'
              type='text/javascript'>
      </script>

      <!-- 3. Include script to initialize object -->
      <script type="text/javascript">
          onReady(function () {
              {
                  {
                      canvas_source | safe
                  }
              }
          })
      </script>

  </head>
  <body>

  <!-- 1. DOM element where the visualization will be displayed -->
  {{canvas_element|safe}}

  </body>
  </html>
  ```

  The HTML file, which uses [Jinja syntax](https://palletsprojects.com/p/jinja/) achieves three things:

  1. Provides a location for a `<div>` element that marks where the chart will be placed.
  1. References the CanvasXpress CSS and JS files needed to illustrate and operate the charts.
  1. Provides a location for the Javascript that will replace the chart `<div>` with a working element on page load.

  Going back to our Flask app, we can add a basic chart definition with some data to our example function:

  ```python
  from flask import Flask, render_template
  from canvasxpress.canvas import CanvasXpress

  app = Flask(__name__)


  @app.route('/')
  def canvasxpress_example():
      
      chart: CanvasXpress = CanvasXpress(
          data={
              "y": {
                  "vars": ["Gene1"],
                  "smps": ["Smp1", "Smp2", "Smp3"],
                  "data": [[10, 35, 88]]
              }
          },
          config={
              "graphType": "Bar"
          }
      )

      
      html_parts: dict = chart.render_to_html_parts()

      
      return render_template(
          "canvasxpress_example.html",
          canvas_element=html_parts["cx_canvas"],
          canvas_source=html_parts["cx_js"]
      )
  ```



  Rerun the flask app on the command line and browse to the indicated IP and URL. A page similar to the following will be
  displayed:

  <img src="https://raw.githubusercontent.com/docinfosci/canvasxpress-python/main/readme/examples/flask_bar_chart_basic.png" align="center" width="600"></a>

  Congratulations!  You have created a Flask CanvasXpress app!


pkgId: 1d02a63e8ae72921f8ea42f9c01a99efb80342621fbd6bc99c94eb93b742ae9c
name: python-caom2
arch: src
version: 2.6.2
epoch: 0
release: 1
summary: CAOM-2.4 library
url: http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/caom2
rpm_license: AGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caom2-2.6.2-1.src.rpm
checksum_type: sha256
description:
  Common Archive Observation Model - data engineering tools
  caom2 module
  The caom2 module is a library implementing the Common Archive
  Observation Model (CAOM-2.3) for manipulating CAOM observations and
  reading and writing XML documents.
  http://www.opencadc.org/caom2/


pkgId: 96f9a9a54912b8f8195e280d940810c51b7578df7d96d80818cf0aa577e06218
name: python-caos
arch: src
version: 3.0.1
epoch: 0
release: 1
summary: A simple dependency management tool and tasks executor for Python projects
url: https://github.com/caotic-co/caos/
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caos-3.0.1-1.src.rpm
checksum_type: sha256
description:
  Make sure that you have a working **Python >= 3.6** with **pip** and **virtualenv** installed and then execute


pkgId: 46bf8f4bb37a0277ee386cc7a903910f0e7c9a4e8b12e71f39775ea101bba593
name: python-caosadvancedtools
arch: src
version: 0.12.0
epoch: 0
release: 1
summary: advanced utilities for caosdb
url: https://pypi.org/project/caosadvancedtools/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caosadvancedtools-0.12.0-1.src.rpm
checksum_type: sha256
description:
  This is the **CaosDB Advanced User Tools** repository and a part of the
  CaosDB project.

  This project contains tools that are beyond the typical use of
  the CaosDB python client. Especially, this includes the crawler which will
  typically be used by a data curator.



  Please read the [README_SETUP.md](README_SETUP.md) for instructions on how to
  setup this code.



  Please refer to the [official
  documentation](https://docs.indiscale.com/caosdb-advanced-user-tools/) for more
  information.



  Thank you very much to all contributers—[past,
  present](https://gitlab.com/caosdb/caosdb/-/blob/dev/HUMANS.md), and prospective
  ones.



  By participating, you are expected to uphold our [Code of
  Conduct](https://gitlab.com/caosdb/caosdb/-/blob/dev/CODE_OF_CONDUCT.md).



  - You found a bug, have a question, or want to request a feature? Please [create
    an issue](https://gitlab.com/caosdb/caosdb-advanced-user-tools/-/issues).
  - You want to contribute code? Please fork the repository and create a merge
    request in GitLab and choose this repository as target. Make sure to select
    "Allow commits from members who can merge the target branch" under
    Contribution when creating the merge request. This allows our team to work
    with you on your request.
  - If you have a suggestion for the
    [documentation](https://docs.indiscale.com/caosdb-advanced-user-tools/), the
    preferred way is also a merge request as describe above (the documentation
    resides in `src/doc`). However, you can also create an issue for it.
  - You can also contact us at **info (AT) caosdb.org** and join the CaosDB
    community on
    [#caosdb:matrix.org](https://matrix.to/#/!unwwlTfOznjEnMMXxf:matrix.org).



  * Copyright (C) 2018 Research Group Biomedical Physics, Max Planck Institute
    for Dynamics and Self-Organization Göttingen.
  * Copyright (C) 2020-2023 Indiscale GmbH <info@indiscale.com>

  All files in this repository are licensed under a [GNU Affero General Public
  License](LICENCE.md) (version 3 or later).


pkgId: 3c396590fe9b5d29c423592a4b3b064e5d781638fe1361b53bbe89b5fb4f744f
name: python-cap
arch: src
version: 0.1.4
epoch: 0
release: 1
summary: Cap: lightweight package for use network captures
url: https://pypi.org/project/cap/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cap-0.1.4-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/cap.svg)](https://pypi.python.org/pypi/cap/)
  [![PyPI downloads](https://img.shields.io/pypi/dm/cap.svg)](https://pypi.python.org/pypi/cap/)
  [![GitHub](https://img.shields.io/github/license/netanelrevah/cap)](https://pypi.python.org/pypi/cap/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cap)](https://pypi.python.org/pypi/cap/)

  The idea is to read and write capture files like it is really a serialized data. The API is ment to be close as possible to json and pickle APIs.


  install the package by:
  ``` bash
  pip install cap
  ```
  or from the source:
  ``` bash
  python setup.py install
  ```


  ```python
  import cap
  captured_packets = cap.load(open("C:\\test.cap", "rb"))
  ```

  ```python
  ip_v4_captured_packet = []
  for captured_packet in captured_packets:
      if captured_packet.data[12:14] == '\x08\x00':
          ip_v4_captured_packet.append(p)
  ```

  ```python
  cap.dump(ip_v4_captured_packet, open('C:\\new_test.cap', "wb"))
  ```

  Have a nice use and please report about problems and issues.
  Thank you.


pkgId: 4581273bf7951ddcdf205a58e68fe1fcb5ad782a2d5bebbf66857d8fdf3281a2
name: python-cap-anndata
arch: src
version: 0.3.1
epoch: 0
release: 1
summary: Partial read/write of AnnData (h5ad) files for low-memory operations with large datasets.
url: https://github.com/cellannotation/cap-anndata
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cap-anndata-0.3.1-1.src.rpm
checksum_type: sha256
description:
  CAP-AnnData offering functionalities for selective reading and writing of [AnnData](https://pypi.org/project/anndata/)
  file fields without the need for loading entire dataset (or even entire field) into memory.
  For example, it allows to read and modify the single `obs` column taking nothing into memory except the column itself.
  Package eager to replicate the original AnnData API as much as possible,
  while providing additional features for efficient data manipulation for heavy datasets.


  Install CAP-AnnData via pip:

  ```commandline
  pip install -U cap-anndata
  ```



  The example below displayes how to read a single `obs` column, create new obs column and propagate it to the `.h5ad` file.
  ```python
  from cap_anndata import read_h5ad

  file_path = "your_data.h5ad"
  with read_h5ad(file_path=file_path, edit=True) as cap_adata:
      print(cap_adata.obs_keys())  # ['a', 'b', 'c']
      print(cap_adata.obs) # Empty DataFrame
      cap_adata.read_obs(columns=['a'])
      print(cap_adata.obs.columns) # ['a']
      cap_adata.obs['new_col'] = cap_adata.obs['a']
      cap_adata.overwrite(fields=['obs'])
  ```

  More example can be found in the [How-TO](https://github.com/cellannotation/cap-anndata/blob/main/HOWTO.md) file.


pkgId: ab30bf70dad64ff8a6049bfc86bd8221656ba6d099295016fa3ad7bc22578a61
name: python-cap-tools
arch: src
version: 3.1.1
epoch: 0
release: 1
summary: Python data bindings for the Common Alerting Protocol Version.
url: https://github.com/bjoern-reetz/cap-tools
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cap-tools-3.1.1-1.src.rpm
checksum_type: sha256
description:
  [![pipeline status](https://github.com/bjoern-reetz/cap-tools/actions/workflows/publish.yml/badge.svg?main)](https://github.com/bjoern-reetz/cap-tools/actions/workflows/publish.yml)
  [![latest package version](https://img.shields.io/pypi/v/cap-tools)](https://pypi.org/project/cap-tools/)
  [![supported python versions](https://img.shields.io/pypi/pyversions/cap-tools)](https://www.python.org/)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/cap-tools)](https://pypistats.org/packages/cap-tools)
  [![license](./images/license.svg)](./LICENSE)
  [![source files coverage](./images/coverage.svg)](https://coverage.readthedocs.io/)
  [![pyright](./images/pyright.svg)](https://microsoft.github.io/pyright)
  [![ruff](./images/ruff.svg)](https://docs.astral.sh/ruff)
  [![pre-commit](./images/pre-commit.svg)](https://pre-commit.com/)

  Python data bindings for the [Common Alerting Protocol Version 1.2](https://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2.html).



  This package contains a Python model for CAP XML documents that was generated using using [xsData](https://xsdata.readthedocs.io/) along with some convenience utilities.

  To parse a CAP XML from a file into an instance of `cap_tools.models.Alert`, do as follows:

  ```python
  from cap_tools.models import Alert
  from xsdata.formats.dataclass.parsers import XmlParser

  parser = XmlParser()
  alert = parser.parse("path/to/my/cap.xml", Alert)
  ```

  For advanced usage, just take a look at the [xsData](https://xsdata.readthedocs.io/en/latest/data_binding/basics/) docs.



  In addition to the code that was generated using xsData, this library adds some convenience utilities on top.



  The `Info.parameters`, `Info.event_codes` and `Area.geocode` fields generated by xsData are implemented as a list of (containers of) key-value-pairs.

  ```python
  >>> import cap_tools
  >>> from xsdata.formats.dataclass.parsers import XmlParser
  >>> parser = XmlParser()
  >>> alert = parser.parse("data/oasis/example2.xml")
  >>> area = alert.infos[0].areas[0]
  >>> area.geocodes
  [Geocode(value_name=ValueName(value='SAME'), value=Value(value='006109')), Geocode(value_name=ValueName(value='SAME'), value=Value(value='006009')), Geocode(value_name=ValueName(value='SAME'), value=Value(value='006003'))]
  ```

  This can more ergonomically be represented using a mapping. Use the `Info.parameters_to_dict`, `Info.event_codes_to_dict` and `Area.geocode_to_dict` methods to create instances of [MultiDict](https://multidict.aio-libs.org/en/stable/) from the data.

  ```python
  >>> geocodes_multidict = area.geocodes_to_dict()
  >>> geocodes_multidict
  <MultiDict('SAME': '006109', 'SAME': '006009', 'SAME': '006003')>
  >>> geocodes_multidict["SAME"]
  '006109'
  >>> geocodes_multidict.getall("SAME")
  ['006109', '006009', '006003']
  ```

  Remember that `MultiDict.__getitem__()` uses the *first* occurence of the key while a `dict` would have used the *last* because of its overwrite rules.

  You can also write any mapping to the instance fields using the `Info.parameters_from_dict`, `Info.event_codes_from_dict` and `Area.geocode_from_dict` methods.

  Use the `MultiDict`:

  ```python
  >>> geocodes_multidict.add("SAME", "123456")
  >>> area.geocodes_from_dict(geocodes_multidict)
  >>> area.geocodes
  [Geocode(value_name=ValueName(value='SAME'), value=Value(value='006109')), Geocode(value_name=ValueName(value='SAME'), value=Value(value='006009')), Geocode(value_name=ValueName(value='SAME'), value=Value(value='006003')), Geocode(value_name=ValueName(value='SAME'), value=Value(value='123456'))]
  ```

  Or use a `dict`:

  ```python
  >>> area.geocodes_from_dict({"foo": "bar", "lorem": "ipsum"})
  >>> area.geocodes
  [Geocode(value_name=ValueName(value='foo'), value=Value(value='bar')), Geocode(value_name=ValueName(value='lorem'), value=Value(value='ipsum'))]
  ```

  The MultiDicts do not retain any connection to the model. In all cases, the internal state is always represented by the list of containers of key-value-pairs.



  The attributes `addresses`, `references` and `incidents` of `Alert` store multiple values as "group listings", i.e. multiple values are space-delimited. You can split these attributes by using `Alert.addresses_to_list()`, `Alert.references_to_list()` and `Alert.incidents_to_list()` and write back to them with corresponding `Alert.*_from_list()` methods respectively.



  When no language is explicitly defined on an Info element, "en-US" is assumed per CAP spec. This library implements this behavior neither by using default values nor by using descriptor fields.

  ```python
  >>> alert.infos[0].language = "en-US"
  >>> alert.infos[0].language
  'en-US'
  >>> alert.infos[0].language = None
  >>> alert.infos[0].language is None
  True
  >>> alert.infos[0].language == "en-US"
  False
  ```

  To still have this "absence means en-US" logic implemented, two convenience methods are added to Info.

  ```python
  >>> alert.infos[0].set_language("de-DE")
  >>> alert.infos[0].language
  'de-DE'
  >>> alert.infos[0].set_language("en-US")
  >>> alert.infos[0].language is None
  True
  >>> alert.infos[0].get_language()
  'en-US'
  ```

  Using `Info.get_language()` returns `"en-US"` when `Info.language` is `None` and `Info.set_language("en-US")` sets `Info.language` to `None` (implicitly "en-US") instead of `"en-US"` (explicitly).



  While this library is fully typed to enable Python type safety, it currently does neither implement the pattern restrictions from the [CAP v1.2 XSD specification](./CAP-v1.2.xsd) (i.e. the pattern restriction for the XmlDateTime fields) nor the additional restrictions imposed by the [normative alert message structure](https://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2.html#_Toc454352650) (e.g. Alert.identifier must not include spaces, commas or the characters "<" and "&").

  This does not matter much when using this library for reading CAP messages - but when you are using this library to create CAP messages, **you are responsible** for respecting those additional restrictions yourself!


pkgId: 0ab0488d2594ae4cbed5eabd5065b326300012d630144a5f98d538ccbaaef65b
name: python-cap2geojson
arch: src
version: 0.1.0.dev4
epoch: 0
release: 1
summary: Python package to convert a CAP XML file into a GeoJSON.
url: https://pypi.org/project/cap2geojson/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cap2geojson-0.1.0.dev4-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

    <a href="https://github.com/wmo-im/cap2geojson/blob/main/LICENSE" alt="License" ><img src="https://img.shields.io/badge/License-Apache_2.0-blue" alt="License Badge"></img></a>
    [![Super-Linter](https://github.com/wmo-im/cap2geojson/actions/workflows/test-code-quality.yml/badge.svg)](https://github.com/marketplace/actions/super-linter)
    ![Unit-Tests](https://github.com/wmo-im/cap2geojson/actions/workflows/unit-tests.yml/badge.svg)
    ![Publish-To-PyPI](https://github.com/wmo-im/cap2geojson/actions/workflows/publish-to-pypi.yml/badge.svg)

  </div>



  - **GeoJSON Creation**: Visualize your alerts in the [GeoJSON format](https://datatracker.ietf.org/doc/html/rfc7946).





  ```bash
  pip install cap2geojson
  ```



  We can convert the CAP XML to GeoJSON using the `transform(cap)` method:

  - `cap`: The CAP alert XML string contents.

  ```python
  from cap2geojson import transform

  with open(<cap-alert-directory>, 'r') as f:
      cap = f.read()

  result = transform(cap)
  ```



  We can convert a CAP alert directly to a GeoJSON file using the following command:

  ```bash
  cap2geojson transform <cap-alert-directory>
  ```



  All bugs, enhancements and issues are managed on [GitHub](https://github.com/wmo-im/cap2geojson/issues).



  * [Rory Burke](https://github.com/RoryPTB)

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


pkgId: 7af2a128d225d8a75c9177f744e1e0ea436f4cd8dadf26261c0c241806328423
name: python-capabilities
arch: src
version: 0.3.15
epoch: 0
release: 1
summary: Build trusted, faster, and more powerful applications with the Blazon Capabilities API.
url: https://pypi.org/project/capabilities/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capabilities-0.3.15-1.src.rpm
checksum_type: sha256
description:
  Blazon Capabilities SDK

  Read our [Getting Started Guide](https://docs.blazon.ai).



  ```bash
  pip install -e . # installs `capabilities`
  python -m capabilities.example example_structured
  ```

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


pkgId: 209ff168a48753899c99ef5c5afdf4e6c592a47f7db942b2cee518d9c0fc80bd
name: python-capacho
arch: src
version: 0.0.5
epoch: 0
release: 1
url: https://github.com/alice-biometrics/capacho
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capacho-0.0.5-1.src.rpm
checksum_type: sha256
summary:
  A tool for registering implementations and provisioning them with containers, facilitating seamless integration and management

description:
  **Documentation**: <a href="https://alice-biometrics.github.io/capacho/" target="_blank">https://alice-biometrics.github.io/capacho/</a>


pkgId: bd37edf30a7e760666e468d91dff7283d630a8ec7d1b2ed7761f56be1798a928
name: python-capcruncher
arch: src
version: 0.3.12
epoch: 0
release: 1
summary: An end-to-end solution for processing Capture-C, Tri-C and Tiled-C data
url: https://pypi.org/project/capcruncher/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capcruncher-0.3.12-1.src.rpm
checksum_type: sha256
description:
  [![Documentation](https://github.com/sims-lab/CapCruncher/actions/workflows/docs.yml/badge.svg?branch=master)](https://sims-lab.github.io/CapCruncher/)
  [![Codecov](https://codecov.io/gh/sims-lab/CapCruncher/branch/master/graph/badge.svg?token=RHIGNMGX09)](https://codecov.io/gh/sims-lab/CapCruncher)
  [![Anaconda-Server Badge](https://anaconda.org/bioconda/capcruncher/badges/version.svg)](https://anaconda.org/bioconda/capcruncher)
  [![Anaconda-Server Badge License](https://anaconda.org/bioconda/capcruncher/badges/license.svg)](https://anaconda.org/bioconda/capcruncher)
  [![DOI](https://zenodo.org/badge/224631087.svg)](https://zenodo.org/badge/latestdoi/224631087)
  [![Downloads](https://pepy.tech/badge/capcruncher)](https://pepy.tech/project/capcruncher)

  ![CapCruncher Logo](https://raw.githubusercontent.com/sims-lab/CapCruncher/master/docs/img/capcruncher_logo.png)

  The CapCruncher package is designed to process Capture-C, Tri-C and Tiled-C data. Unlike other pipelines that are designed to process Hi-C or Capture-HiC data, the filtering steps in CapCruncher are specifically optimized for these datasets. The package consists of a configurable data processing pipeline and a supporting command line interface to enable fine-grained control over the analysis. The pipeline is fast, robust and scales from a single workstation to a large HPC cluster. It is designed to be run on an HPC cluster and can be configured to use a variety of package management systems, such as conda and singularity. For more information, see the [documentation](https://sims-lab.github.io/CapCruncher/).

  > **Note:**
  > The current version of CapCruncher is in beta. Please report any issues you encounter to the [issue tracker](https://github.com/sims-lab/CapCruncher/issues/new/choose)





  > **Warning:**
  >
  > CapCruncher is currently only availible for linux with MacOS support planned in the future.

  CapCruncher is available on conda and PyPI. To install the latest version, run:

  ``` bash
  pip install capcruncher
  ```

  or

  ``` bash
  mamba install -c bioconda capcruncher
  ```

  Please note that it is highly recommended to install CapCruncher in a conda environment. If you do not have conda installed, please follow the instructions [here](https://github.com/conda-forge/miniforge#mambaforge) to install mambaforge.

  See the [installation guide](installation.md) for more detailed instructions.



  CapCruncher commands are run using the `capcruncher` command. To see a list of available commands, run:

  ``` bash
  capcruncher --help
  ```

  To see a list of available options for a command, run:

  ``` bash
  capcruncher <command> --help
  ```

  See the [CLI Reference](https://sims-lab.github.io/CapCruncher/cli/) for more detailed information regarding the various subcommands.



  The CapCruncher pipeline handles the processing of raw data from the sequencer to the generation of a contact matrix, generation of plots and production of a UCSC genome browser track hub. See the [pipeline guide](https://sims-lab.github.io/CapCruncher/pipeline/) for more detailed instructions including how to configure the pipeline to run on [HPC clusters](https://sims-lab.github.io/CapCruncher/pipeline/#hpc-cluster-usage-recommended-if-available) and use various package management systems [conda](https://sims-lab.github.io/CapCruncher/installation/#install-all-dependencies-using-conda) and [singularity](https://sims-lab.github.io/CapCruncher/pipeline/#singularity-usage-recommended-if-available).



  The pipeline is configured using a YAML file but it is strongly recommended to use the `capcruncher pipeline-config` command to generate a tailored config file. To use the command, run:

  ``` bash
  capcruncher pipeline-config
  ```

  Simply follow the prompts to generate a config file. See the [pipeline configuration guide](https://sims-lab.github.io/CapCruncher/pipeline/#configuration-file) for more detailed instructions.



  The pipeline is run using the `capcruncher pipeline` command. Ensure that you have a configuration file and the fastq files to process are in the current working directory.

  ``` bash

  capcruncher pipeline --cores <NUMBER OF CORES TO USE>


  capcruncher pipeline --cores 8 --profile slurm --use-singularity
  ```

  > **Note:**
  > In order to avoid disconnecting from the cluster, it is recommended to run the pipeline in a [tmux](https://linuxize.com/post/getting-started-with-tmux/)
  > session. Alternatively, [nohup](https://linuxize.com/post/linux-nohup-command/) can be used to run the pipeline in the background. For example:
  >
  > ``` bash
  > # tmux example
  >tmux new -s capcruncher
  > capcruncher pipeline --cores 8 --profile slurm --use-singularity
  >
  ># nohup example
  >nohup capcruncher pipeline --cores 8 --profile slurm --use-singularity &
  >```

  See the [pipeline guide](https://sims-lab.github.io/CapCruncher/pipeline/) for more detailed instructions.

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


pkgId: 01bd6aa309ba6773e6cc52f360f275205c3aadb41db8c442e690d29fb27da81d
name: python-cape-privacy
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: Cape manages secure access to all of your data.
url: https://github.com/capeprivacy/cape-python
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cape-privacy-0.3.0-1.src.rpm
checksum_type: sha256
description:
  ![](https://github.com/capeprivacy/cape-python/workflows/Main/badge.svg)
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
  [![codecov](https://codecov.io/gh/capeprivacy/cape-python/branch/master/graph/badge.svg?token=L9A8HFAJK5)](https://codecov.io/gh/capeprivacy/cape-python)
  [![PyPI version](https://badge.fury.io/py/cape-privacy.svg)](https://badge.fury.io/py/cape-privacy)
  [![Chat on Slack](https://img.shields.io/badge/chat-on%20slack-7A5979.svg)](https://join.slack.com/t/capecommunity/shared_invite/zt-f8jeskkm-r9_FD0o4LkuQqhJSa~~IQA)


  A Python library supporting data transformations and collaborative privacy policies, for data science projects in Pandas and Apache Spark

  See below for instructions on how to get started or visit the [documentation](https://docs.capeprivacy.com/).





  * Python 3.6 or above, and pip
  * Pandas 1.0+
  * PySpark 3.0+ (if using Spark)
  * [Make](https://www.gnu.org/software/make/) (if installing from source)



  Cape Python is available through PyPi.

  ```sh
  pip install cape-privacy
  ```

  Support for Apache Spark is optional.  If you plan on using the library together with Apache Spark, we suggest the following instead:

  ```sh
  pip install cape-privacy[spark]
  ```

  We recommend running it in a virtual environment, such as [venv](https://docs.python.org/3/library/venv.html).



  It is possible to install the library from source. This installs all dependencies, including Apache Spark:

  ```sh
  git clone https://github.com/capeprivacy/cape-python.git
  cd cape-python
  make bootstrap
  ```


  *This example is an abridged version of the tutorial found [here](https://github.com/capeprivacy/cape-python/tree/master/examples/tutorials)*


  ```python
  df = pd.DataFrame({
      "name": ["alice", "bob"],
      "age": [34, 55],
      "birthdate": [pd.Timestamp(1985, 2, 23), pd.Timestamp(1963, 5, 10)],
  })

  tokenize = Tokenizer(max_token_len=10, key=b"my secret")
  perturb_numeric = NumericPerturbation(dtype=dtypes.Integer, min=-10, max=10)

  df["name"] = tokenize(df["name"])
  df["age"] = perturb_numeric(df["age"])

  print(df.head())




  ```

  These steps can be saved in policy files so you can share them and collaborate with your team:

  ```yaml

  label: my-policy
  version: 1
  rules:
    - match:
        name: age
      actions:
        - transform:
            type: numeric-perturbation
            dtype: Integer
            min: -10
            max: 10
            seed: 4984
    - match:
        name: name
      actions:
        - transform:
            type: tokenizer
            max_token_len: 10
            key: my secret
  ```

  You can then load this policy and apply it to your data frame:

  ```python

  policy = cape.parse_policy("my-policy.yaml")
  df = cape.apply_policy(policy, df)

  print(df.head())




  ```

  You can see more examples and usage [here](https://github.com/capeprivacy/cape-python/tree/master/examples/) or in our [documentation](https://docs.capeprivacy.com).



  [Cape Privacy](https://capeprivacy.com) helps teams share data and make decisions for safer and more powerful data science. Learn more at [capeprivacy.com](https://capeprivacy.com).

  Cape Python brings Cape's policy language to Pandas and Apache Spark. The supported techniques include tokenization with linkability as well as perturbation and rounding. You can experiment with these techniques programmatically, in Python or in human-readable policy files.



  Cape is comprised of multiples services and libraries. You can use Cape Python as a standalone library, or you can integrate it with the Coordinator in [Cape Core](https://github.com/capeprivacy/cape/), which supports user and policy management.



  Cape Python 0.1.1 was released 24th June 2020. It is actively maintained and developed, alongside other elements of the Cape ecosystem.

  **Upcoming features:**

  * Reversible tokenisation: allow reversing of tokenization to reveal the raw value.
  * Policy audit logging: create logging hooks to allow audit logs for policy downloads and usage in Cape Python.
  * Expand pipeline integrations: add Apache Beam, Apache Flink, Apache Arrow Flight or Dask integration as another pipeline we can support, either as part of Cape Python or in its own separate project.

  The goal is a complete data management ecosystem. Cape Privacy provides [Cape Coordinator](https://docs.capeprivacy.com/cape-core/coordinator/), to manage policy and users. This will interact with the Cape Privacy libraries (such as [Cape Python](https://docs.capeprivacy.com/libraries/cape-python/)) through a workers interface, and with your own data services through an API.




  If you need help using Cape Python, you can:

  * View the [documentation](https://docs.capeprivacy.com/).
  * Submit an issue.
  * Talk to us on our [community Slack](https://join.slack.com/t/capecommunity/shared_invite/zt-f8jeskkm-r9_FD0o4LkuQqhJSa~~IQA).

  Please file [feature requests](https://github.com/capeprivacy/cape-python/issues/new?template=feature_request.md) and
  [bug reports](https://github.com/capeprivacy/cape-python/issues/new?template=bug_report.md) as GitHub issues.



  [![](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/images/0)](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/links/0)[![](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/images/1)](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/links/1)[![](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/images/2)](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/links/2)[![](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/images/3)](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/links/3)[![](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/images/4)](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/links/4)[![](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/images/5)](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/links/5)[![](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/images/6)](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/links/6)[![](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/images/7)](https://sourcerer.io/fame/justin1121/capeprivacy/cape-python/links/7)



  View our [contributing](CONTRIBUTING.md) guide for more information.



  Our [code of conduct](https://capeprivacy.com/conduct/) is included on the Cape Privacy website. All community members are expected to follow it. Please refer to that page for information on how to report problems.



  Licensed under Apache License, Version 2.0 (see [LICENSE](https://github.com/capeprivacy/cape-python/blob/master/LICENSE) or http://www.apache.org/licenses/LICENSE-2.0). Copyright as specified in [NOTICE](https://github.com/capeprivacy/cape-python/blob/master/NOTICE).


pkgId: ed3bcd41a5723ea064d2d930a70e39a5c85229d10c474debdbc73f5752527fbb
name: python-caped-ai-augmentations
arch: src
version: 1.2.0
epoch: 0
release: 1
description: Slim augmentation library built on top of albumentations
url: https://github.com/Kapoorlabs-CAPED/Augmentations/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caped-ai-augmentations-1.2.0-1.src.rpm
checksum_type: sha256
summary:
  Augmentations for volume, planar segmentation, classification image segmentation and associated csv file of oneat clicks.


pkgId: d9018a8af0a68874c5d544dd89aa5975b1cf6197ace676896aa031f7b2046ebf
name: python-caped-ai-visualizations
arch: src
version: 1.2.7
epoch: 0
release: 1
summary: Visualization toolkit for oneat bounding boxes, activation functions, vollseg visualization
url: https://github.com/Kapoorlabs-CAPED/caped-ai-visualizations/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caped-ai-visualizations-1.2.7-1.src.rpm
checksum_type: sha256
description:
  Visualization library for bounding boxes, activation maps and napari widgets for oneat visualization


pkgId: bb11183fb082f68d1292d483ad92773d07d835b417df82fa2b4c4af34580f847
name: python-capeditor
arch: src
version: 0.6.4
epoch: 0
release: 1
summary: Wagtail based CAP composer
url: https://github.com/wmo-raf/cap-composer
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capeditor-0.6.4-1.src.rpm
checksum_type: sha256
description:
  The overall Document Object Model of an alert is as below:
  ![Alert DOM](images/alert_sections/dom.jpg "CAP Document Object Model")

  It contains the following entities required for a valid CAP message:
  - Sender ID(sender),
  - Sent Dat/Time (sent),
  - Message Status (status),
  - Message Type (msgType),
  - Scope(scope),
  - Restriction (restriction),
  - Addresses (addresses),
  - Note (note),
  - Reference IDs (references) and
  - Incident ids (incidents).
  The alert identifier is generated automatically and is not editable.
  ***NOTE:*** Some fields are visible based on selection of different parameters.
  ![Alert Identification](images/alert_sections/alert_id.png "Alert Identification section")

  Corresponds to the `<info>` element in the CAP message. The <info> entity specifies the alert's details. At least
  one <info> block is required for an alert. If you support multiple languages, it is recommended that you use one <info>
  block for each language for the same <alert> entity.:
  A CAP message expects at least one `<info>` element to be present. Multiple `<info>` blocks should all have the
  same `<category>` and `<event>` element values.
  ![Alert Info](images/alert_sections/alert_info.png "Alert Information section")
  Each `Information` block contains the following elements:
  - Language (Language)
  - Event Category/Categories (category)
  - Event Type (event)
  - Response Type/Types (responseType)
  - Urgency (urgency)
  - Severity (severity)
  - Certainty (certainty)
  - Audience (audience)
  - Event Code/Codes (eventCode)
  - Effective Date/Time (effective)
  - Onset Date/Time (onset)
  - Expiration Date/Time (expires)
  - Sender Name (senderName)
  - Headline(headline)
  - Event description (description)
  - Instructions (instruction)
  - Information URL (web),
  - Contact Info (contact) and
  - Parameter/Parameters(parameter)

  Information Entity that defines the geographic area to be notified. Multiple areas can be defined in the alert. Each
  area contains the following elements:
  - Area Description (areaDesc),
  - Area Polygon/Polygons (polygon),
  - Area Circle/Circles (circle),
  - Area Geocode/Geocodes (geocode),
  - Altitude (altitude),
  - Ceiling (ceiling)
  The Alert area input has multiple selector options:
  - Polygon (drawing a polygon)
  ![Alert Area polygon](images/alert_sections/alert_area_polygon.png "Alert Area Polygon")
  - Circle (drawing a circle which specifies the latitude, longitude and radius)
  ![Alert Area circle](images/alert_sections/alert_area_circle.png "Alert Area Circle")
  - Predefined Area (selecting a predefined area that you create beforehand for common alert areas)
  - Geocode (specifying area geocode name and value). Using this option presumes knowledge of the coding system
  ![Alert Area geocode](images/alert_sections/alert_area_geocode.png "Alert Area Geocode")

  Entity that defines supplemental information related to an <info> object Multiple instances of this section are allowed.
  It contains:
  - Description (resourceDesc), MIME Type (mimeType), File Size (size), URI (uri), Dereferenced URI (derefUri) and
    Digest (digest)**
  The Alert resource input has 2 selector options:
  - File resource (takes in a file and description)
  ![Alert Resource](images/alert_sections/alert_resource_file.png "Alert Resource section")
  - External resource
  ![Alert Resource](images/alert_sections/alert_resource_external.png "Alert Resource section")

  To integrate the alerts to another wagtail page and include in templates, for example in the home page refer to sandbox
  folder for sample standalone.

  You can publish a mqtt message immediately after a CAP alert has been published. This allows connected clients to
  receive the CAP message using the MQTT protocol.
  You will need to setup a MQTT broker. We have included the docker configuration to setup a local broker instance
  using [Eclipse Mosquitto](https://mosquitto.org/)
  You need to add a `CAP_BROKER_URI` setting to your `settings.py` which should be the URI to a MQTT broker with
  permissions to publish messages.
  Then using [Wagtail page_published signal](https://docs.wagtail.org/en/stable/reference/signals.html#page-published)
  or [Wagtail after_publish_page hook](https://docs.wagtail.org/en/stable/reference/hooks.html#after-publish-page), you
  can attach a function to publish the MQTT message.
  Below is a sample snippet to achieve this in your `models.py`
  ```python

  from wagtail.signals import page_published
  from capeditor.models import AbstractCapAlertPage
  from capeditor.pubsub.publish import publish_cap_mqtt_message
  class CapAlertPage(AbstractCapAlertPage):
  def on_publish_cap_alert(sender, **kwargs):
      instance = kwargs['instance']
      topic = "cap/alerts/all"
      publish_cap_mqtt_message(instance, topic)
  page_published.connect(on_publish_cap_alert, sender=CapAlertPage)
  ```
  Using the sample above, once a CAP Alert Page has published, a corresponding `mqtt message` will also be published
  immediately.
  You will need to decide how to structure your MQTT alert topics.
  You can have a complete look at the code under `sandbox/home/models.py`


pkgId: aafb2349f2272a2bfcb9e2f95e31e5372461887ace093c6b2ef78f8ad5b06449
name: python-capella-console-client
arch: src
version: 0.13.3
epoch: 0
release: 1
summary: Python SDK for api.capellaspace.com (task, search, order, download)
url: https://github.com/capellaspace/console-client
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capella-console-client-0.13.3-1.src.rpm
checksum_type: sha256
description:
  [![Version](https://img.shields.io/pypi/v/capella-console-client.svg)](https://pypi.org/project/capella-console-client/)
  [![License](https://img.shields.io/pypi/l/capella-console-client.svg)](#)
  [![CI](https://github.com/capellaspace/console-client/workflows/CI/badge.svg)](#)
  [![Coverage](https://coveralls.io/repos/github/capellaspace/console-client/badge.svg?branch=main)](https://coveralls.io/github/capellaspace/console-client)
  [![Supported Python Versions](https://img.shields.io/pypi/pyversions/capella-console-client.svg)](https://pypi.org/project/capella-console-client/)
  [![Documentation](https://readthedocs.org/projects/capella-console-client/badge/?version=main)](https://capella-console-client.readthedocs.io)

  Python SDK for api.capellaspace.com (task, search, order, download)




  ```bash
  pip install capella-console-client
  ```



  * python >= 3.8, <4.0
  * `capella-console-client` requires an active account on [console.capellaspace.com](https://console.capellaspace.com/). Sign up for an account at [https://www.capellaspace.com/community/](https://www.capellaspace.com/community/).




  ![Quickstart](docs/images/quickstart.gif)

  ```python
  from capella_console_client import CapellaConsoleClient


  client = CapellaConsoleClient(
      verbose=True
  )


  stac_items = client.search(
      instrument_mode="spotlight",
      product_type__in=["SLC", "GEO"],
      collections=["capella-open-data"],
      limit=2
  )


  order_id = client.submit_order(items=stac_items, omit_search=True)


  product_paths = client.download_products(
      order_id=order_id,
      local_dir='/tmp',
      show_progress=True
  )
  ```




  The documentation for `capella-console-client` can be found [here](https://capella-console-client.readthedocs.io).


  starting with `capella-console-client>=0.8.0` the SDK ships with an interactive wizard-like CLI: `capella-console-wizard`


  ```
  pip install capella-console-client[wizard]
  ```


  ```
  capella-console-wizard --help
  ```

  see




  Please [open an issue](https://github.com/capellaspace/console-client/issues/new)
  with enough information for us to reproduce your problem.
  A [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example)
  would be very helpful.



  Contributions are very much welcomed and appreciated. See [how to contribute](https://capella-console-client.readthedocs.io/en/main/pages/contributors.html) for more information.



  • Licensed under the [MIT License](https://github.com/capellaspace/console-client/blob/master/LICENSE) • Copyright 2024 • Capella Space •


pkgId: 3cb20d3fee7e6d5d1fdf6abe49ad210991c0b8160c0b1903ee273a571caaf221
name: python-capella-ros-tools
arch: src
version: 0.1.dev68
epoch: 0
release: 1
summary: Tools for importing ROS .msg files into Capella data package and vice versa.
url: https://github.com/DSD-DBS/capella-ros-tools
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capella-ros-tools-0.1.dev68-1.src.rpm
checksum_type: sha256
description:
  <!--
   ~ Copyright DB InfraGO AG and contributors
   ~ SPDX-License-Identifier: Apache-2.0
   -->



  ![image](https://github.com/DSD-DBS/capella-ros-tools/actions/workflows/build-test-publish.yml/badge.svg)
  ![image](https://github.com/DSD-DBS/capella-ros-tools/actions/workflows/lint.yml/badge.svg)

  Tools for importing ROS .msg files into Capella `DataPackage`, `DataType` and
  `Class` objects, or exporting those objects to .msg files.

  ![Showcase](https://i.imgur.com/hs4EUnL.gif)



  Read the [full documentation on Github pages](https://dsd-dbs.github.io/capella-ros-tools).



  Import local ROS .msg files to Capella model layer's root data package:

  ```sh
  python -m capella_ros_tools \
  import \
  -i tests/data/data_model/example_msgs \
  -m tests/data/empty_project_60 \
  -l la \
  --no-deps
  ```

  Import remote ROS .msg files to Capella model layer's root data package:

  ```sh
  python -m capella_ros_tools \
  import \
  -i git+https://github.com/DSD-DBS/dsd-ros-msg-definitions-oss \
  -m tests/data/empty_project_60 \
  -l la
  ```

  Export local Capella model layer's root data package as ROS .msg files:

  ```sh
  python -m capella_ros_tools \
  export \
  -m tests/data/melody_model_60 \
  -l la \
  -o tests/data/melody_msgs
  ```

  Export remote Capella model layer's root data package as ROS .msg files:

  ```sh
  python -m capella_ros_tools \
  export \
  -m git+https://github.com/DSD-DBS/coffee-machine \
  -l sa \
  -o tests/data/coffee_msgs
  ```



  You can install the latest released version directly from PyPI.

  ```sh
  pip install capella-ros-tools
  ```

  To set up a development environment, clone the project and install it into a
  virtual environment.

  ```sh
  git clone https://github.com/DSD-DBS/capella-ros-tools
  cd capella-ros-tools
  python -m venv .venv

  source .venv/bin/activate.sh  # for Linux / Mac
  .venv\Scripts\activate  # for Windows

  pip install -U pip pre-commit
  pip install -e '.[docs,test]'
  pre-commit install
  ```



  We'd love to see your bug reports and improvement suggestions! Please take a
  look at our [guidelines for contributors](CONTRIBUTING.md) for details.



  This project is compliant with the
  [REUSE Specification Version 3.0](https://git.fsfe.org/reuse/docs/src/commit/d173a27231a36e1a2a3af07421f5e557ae0fec46/spec.md).

  Copyright DB InfraGO AG, licensed under Apache 2.0 (see full text in
  [LICENSES/Apache-2.0.txt](LICENSES/Apache-2.0.txt))

  Dot-files are licensed under CC0-1.0 (see full text in
  [LICENSES/CC0-1.0.txt](LICENSES/CC0-1.0.txt))


pkgId: 313200fa5e5ab097729e052bf070a5c03e07787c252f44dbe85e9e6eb6fa4757
name: python-capella2polarion
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: Synchronise Capella models with Polarion projects
url: https://github.com/DSD-DBS/capella2polarion
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capella2polarion-1.4.0-1.src.rpm
checksum_type: sha256
description:
  <!--
   ~ Copyright DB InfraGO AG and contributors
   ~ SPDX-License-Identifier: Apache-2.0
   -->



  <!-- prettier-ignore -->
  ![image](https://github.com/DSD-DBS/capella-polarion/actions/workflows/build-test-publish.yml/badge.svg)
  ![image](https://github.com/DSD-DBS/capella-polarion/actions/workflows/lint.yml/badge.svg)
  ![image](https://github.com/DSD-DBS/capella-polarion/actions/workflows/docs.yml/badge.svg)

  Synchronise Capella models with Polarion projects.

  ![image](./docs/source/_static/c2p-uc1.gif)

  Use cases covered:

  - _Make Capella Objects and attributes of interest available in a Polarion_ project so that a Project User could referense those objects and attributes in LiveDocs and WorkItems such as requirements, to ensure consistency across the Project. Model has full authority over the work items that represent model elements. A change to a model element will result in a change to the corresponding WorkItem in Polarion.

  - _Create and maintain LiveDocs_ based on a Capella model and a set of templates so that the Project Users could do less paperwork. A change to the model or template shall result in a change to a LiveDoc or related WorkItems. All changes to generated LiveDocs made in Polarion will be over-written by Capella2Polarion as it has "Full Authority" over those documents.

  - _Create and co-maintain LiveDocs_ where model would have authority over some sections and people over other sections (mixed-authority) - this would enable Project User to create requirements or other objects in the context of model-derived structure or elements.



  <!-- prettier-ignore -->
  Read the [full documentation on GitHub](https://dsd-dbs.github.io/capella-polarion).



  We have a dependency on [cairosvg](https://cairosvg.org/). Please check their
  [documentation](https://cairosvg.org/documentation/) for OS specific dependencies.

  You can install the latest released version directly from [PyPI](https://pypi.org/project/capella2polarion/).

  ```zsh
  pip install capella2polarion
  ```

  To set up a development environment, clone the project and install it into a
  virtual environment.

  ```zsh
  git clone https://github.com/DSD-DBS/capella-polarion.git
  cd capella2polarion
  python -m venv .venv

  source .venv/bin/activate.sh  # for Linux / Mac
  .venv\Scripts\activate  # for Windows

  pip install -U pip pre-commit
  pip install -e '.[docs,test]'
  pre-commit install
  ```



  We'd love to see your bug reports and improvement suggestions! Please take a
  look at our [guidelines for contributors](CONTRIBUTING.md) for details.



  This project is compliant with the
  [REUSE Specification Version 3.0](https://git.fsfe.org/reuse/docs/src/commit/d173a27231a36e1a2a3af07421f5e557ae0fec46/spec.md).

  Copyright DB InfraGO AG, licensed under Apache 2.0 (see full text in
  [LICENSES/Apache-2.0.txt](LICENSES/Apache-2.0.txt))

  Dot-files are licensed under CC0-1.0 (see full text in
  [LICENSES/CC0-1.0.txt](LICENSES/CC0-1.0.txt))


pkgId: 82d9765b20f55968361ef43ef491375d0c08db428e0980b990968e8d6b909cda
name: python-capellambse
arch: src
version: 0.6.10
epoch: 0
release: 1
summary: Provides access to Capella MBSE projects in Python
url: https://github.com/DSD-DBS/py-capellambse
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capellambse-0.6.10-1.src.rpm
checksum_type: sha256
description:
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/capellambse)
  ![Code QA](https://github.com/DSD-DBS/py-capellambse/actions/workflows/code-qa.yml/badge.svg)
  ![License: Apache-2.0](https://img.shields.io/github/license/dsd-dbs/py-capellambse)
  ![REUSE status](https://api.reuse.software/badge/github.com/DSD-DBS/py-capellambse)
  ![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)
  ![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)
  *A Python 3 headless implementation of the Capella modeling tool*


pkgId: 7418e14d6686eac810ac3fd352a02542e3a1c226af01dc36c7578e9fb2ef6af1
name: python-capellambse-context-diagrams
arch: src
version: 0.4.5
epoch: 0
release: 1
url: https://github.com/DSD-DBS/capellambse-context-diagrams
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capellambse-context-diagrams-0.4.5-1.src.rpm
checksum_type: sha256
summary:
  Extension for py-capellambse that adds automatically generated context diagrams for arbitrary model elements.

description:
  Special thanks goes to the developers and maintainers of [Eclipse Layout Kernel™](https://www.eclipse.org/elk/).

  Copyright and license information added and maintained via the reuse tool from [Reuse Software](https://reuse.software/).
  ***Copyright 2022 DB InfraGO AG, own contributions licensed under Apache 2.0 (see full text in [LICENSES/Apache-2.0](https://github.com/DSD-DBS/capellambse-context-diagrams/blob/master/LICENSES/Apache-2.0.txt))***
  ***Copyright (c) 2021 Kiel University and others, ELK/Sprotty contributions ([elkgraph-json.js](https://github.com/DSD-DBS/capellambse-context-diagrams/blob/master/capellambse_context_diagrams/elkgraph-json.js) & [elkgraph-to-sprotty.js](https://github.com/DSD-DBS/capellambse-context-diagrams/blob/master/capellambse_context_diagrams/elkgraph-to-sprotty.js)) licensed under EPL-2.0***
  ***Dot-files licensed under CC0-1.0 (see full text in [LICENSES/CC0-1.0](https://github.com/DSD-DBS/capellambse-context-diagrams/blob/master/LICENSES/CC0-1.0.txt))***


pkgId: 3acdf89b654b9d340d27f137607c04644421e83b2fc5d649cadd0ba06f94a162
name: python-capibara-model
arch: src
version: 1.2.2
epoch: 0
release: 1
summary: A State Space and Mamba-based language model framework
url: https://github.com/anachroni-io/CapibaraModel-cli
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capibara-model-1.2.2-1.src.rpm
checksum_type: sha256
description:
  ![Capibara SSBD Model](./capibara_model/src/public/3BSSBD.webp)

  CapibaraModel is a command-line tool for training, evaluating, and deploying language models based on State Space and Mamba architectures, optimized for TPUs and featuring advanced hyperparameter optimization.



  - **Advanced Architectures**:
    - BitNet + Liquid Architecture
    - Aleph-TILDE Module Integration
    - Mamba SSM Architecture
    - Capibara JAX SSM Implementation

  - **Core Capabilities**:
    - Model training and evaluation
    - Native TPU/GPU support
    - Automatic hyperparameter optimization
    - Integrated deployment system
    - Performance measurement
    - Docker containers (optional)
    - Weights & Biases integration



  - Python 3.9+
  - JAX 0.4.13+
  - CUDA 11.8+ (for GPU)
  - TensorFlow 2.13+
  - Weights & Biases
  - Docker (optional)



  1. Clone this repository:

     ```bash
     git clone https://github.com/anachroni-io/CapibaraModel-cli.git
     cd CapibaraModel-cli
     ```

  2. Install dependencies:

     ```bash
     pip install -r requirements.txt
     ```

  3. Set up Weights & Biases:

     ```bash
     wandb login
     ```



  Full documentation available at [Read the Docs](https://capibaramodel.readthedocs.io/):

  - Quick start guide
  - Complete tutorial
  - API reference
  - Usage examples
  - Contribution guide



  ```bash
  capibara [options]


  capibara --train


  capibara --evaluate --new-layer BitNetLiquid


  capibara --optimize --sub-model AlephTilde
  ```



  - `--log-level`: Logging level (DEBUG, INFO, WARNING, ERROR)
  - `--train`: Train model
  - `--evaluate`: Evaluate model
  - `--optimize`: Hyperparameter optimization
  - `--deploy`: Deploy model
  - `--measure-performance`: Measure performance
  - `--model`: Path to model YAML file
  - `--new-layer`: Activate new layers
  - `--sub-model`: Specify sub-models



  ```yaml
  model:
    name: "capibara-ent"
    version: "2.0"
    layers:
      - type: "BitNetLiquid"
        config:
          hidden_size: 768
          num_heads: 12
      - type: "AlephTilde"
        config:
          rule_format: "prolog"
          min_confidence: 0.8
  ```



  ```bash

  pytest tests/


  pytest tests/integration/


  sphinx-build -b doctest docs/source/ docs/build/
  ```



  ```bibtex
  @software{capibara2024,
    author = {Durán, Marco},
    title = {CapibaraModel: A Large Language Model Framework},
    year = {2024},
    publisher = {GitHub},
    url = {https://github.com/anachroni-io/CapibaraModel-cli}
  }
  ```



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



  Marco Durán - marco@anachroni.co

  [Website](https://www.anachroni.co) | [GitHub](https://github.com/anachroni-io/CapibaraModel-cli)

rpm_license:
  # Capibara Licence v1.1  ## Preamble  The **Capibara Licence** is a license based on the principles of the GNU General Public License v3 and the MIT License 3.0, with the addition of ethical restrictions and obligations that enure transparent and responsible use of the software. This license aims to preserve the freedom of the software and ensure its use is ethical and in line with respect for human rights and technological optimization.  ## Permissions and Conditions  ### The following rights are granted  1. **Free Use**: Any person is granted the right to use, copy, modify, and distribute the software. 2. **Distribution**: Users can distribute copies of the original or modified software, as long as this license remains attached in its entirety and none of its clauses are omitted. 3. **Creation of Derivatives**: The creation of derivative software is allowed, as long as the original or modified source code is distributed under this same license. 4. **Commercial Use**: The software may be used for commercial purposes, as long as this license is included and any misuse by third parties is reported. 5. **Transparency in AI**: If the software or its derivatives are used in artificial intelligence applications, the user must provide transparency regarding the use of data, the results obtained, and any models employed.  ### Obligations  1. **Contribution to the Community**: Any improvements, patches, or modifications must be shared with the community within a reasonable timeframe, fostering the evolution of the software in the open-source ecosystem. 2. **Ethical and Bias Commitment**: Any AI system using this software must align with ethical principles and undergo bias reviews to avoid discrimination or unfair practices. 3. **Technological Optimization**: Code modifications must prioritize efficiency and technological sustainability, promoting optimal use of computational resources.  ## Restrictions  ### Ethical Use  1. **Prohibition of Illegal or Harmful Uses**: This software cannot be used for purposes that violate human rights or promote illegal or harmful activities. This includes, but is not limited to, mass surveillance, autonomous weapons, algorithmic discrimination, and unethical manipulation of data. 2. **Protection of Rights**: The software cannot be used in applications that violate personal privacy or safety.  ## Penalties  ### Legal Enforcement  1. **Misuse**: Any misuse of this software, omission of this license, or its use in proprietary software without respecting the terms set forth herein, will be pursued through all available legal means. 2. **Prohibition of Proprietary Software**: This software cannot be integrated into proprietary software under any circumstances. Any software that uses this code, either partially or entirely, must be distributed under the terms of the **Capibara Licence**. 3. **Mandatory Reporting**: If third-party misuse of the software is identified, the user is obligated to report such misuse to the original project maintainers and the appropriate authorities.  ## Legal Execution  To ensure the compliance of this license, a voluntary contribution to the project is requested. This contribution will be directed to the **Anachroni Foundation**, which will oversee the proper enforcement of the ethical and legal commitments associated with this software, as well as the pursuit of any misuse or omission of the license in proprietary software.  ## Disclaimer of Liability  This software is provided "as is," without warranties of any kind, either express or implied, including but not limited to warranties of merchantability or fitness for a particular purpose. The authors and contributors are not liable for any damages, claims, or harm caused by the use of this software.


pkgId: a9f8e7d55a3e37c00671e38327fa5bef1edcc037df14e0aa0c7f1ad853566c12
name: python-capisce
arch: src
version: 0.1.7
epoch: 0
release: 1
summary: The Open-Source API Testing Tool
description: ![](https://raw.githubusercontent.com/kaangiray26/capisce/main/images/image.png)
url: https://github.com/kaangiray26/capisce
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capisce-0.1.7-1.src.rpm
checksum_type: sha256
rpm_license:
  GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works.  By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.  We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors.  You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights.  Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received.  You must make sure that they, too, receive or can get the source code.  And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software.  For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so.  This is fundamentally incompatible with the aim of protecting users' freedom to change the software.  The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable.  Therefore, we have designed this version of the GPL to prohibit the practice for those products.  If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary.  To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License.  Each licensee is addressed as "you".  "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy.  The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy.  Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies.  Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License.  If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it.  "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form.  A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities.  However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work.  For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met.  This License explicitly affirms your unlimited permission to run the unmodified Program.  The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work.  This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force.  You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright.  Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below.  Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7.  This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy.  This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged.  This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit.  Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source.  This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge.  You need not require recipients to copy the Corresponding Source along with the object code.  If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source.  Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling.  In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage.  For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product.  A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source.  The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information.  But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed.  Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law.  If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it.  (Additional permissions may be written to require their own removal in certain cases when you modify the work.)  You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10.  If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term.  If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License.  Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License.  If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program.  Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance.  However, nothing other than this License grants you permission to propagate or modify any covered work.  These actions infringe copyright if you do not accept this License.  Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License.  You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations.  If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License.  For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based.  The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version.  For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement).  To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients.  "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License.  You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all.  For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work.  The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time.  Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number.  If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation.  If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions.  However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program.  It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year>  <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program.  If not, see <https://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program>  Copyright (C) <year>  <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License.  Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs.  If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library.  If this is what you want to do, use the GNU Lesser General Public License instead of this License.  But first, please read <https://www.gnu.org/licenses/why-not-lgpl.html>.


pkgId: 0718eeb8c9f34c5b3279b807323874f46e564c33656e7b7ba43b060ab95a8fb8
name: python-caplena
arch: src
version: 2.1.0
epoch: 0
release: 1
summary: Python Library for Caplena REST API.
url: https://caplena.com
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caplena-2.1.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/caplena.svg)](https://badge.fury.io/py/caplena)
  [![Downloads](https://static.pepy.tech/personalized-badge/caplena?period=month&units=international_system&left_color=black&right_color=brightgreen&left_text=downloads/month)](https://pepy.tech/project/caplena)



  The Caplena Python library provides convenient access to the Caplena REST API from applications written in the Python programming language.



  To learn more about what you can use Caplena for and for how to create your own API key, please see [our main website](https://caplena.com/).

  To learn more about the REST API that constitutes the basis for this project, take a look at our [REST API docs](https://caplena.com/docs/developers/).

  To view the Python API docs and refernces, head over to our [SDK documentation](https://caplena.com/docs/sdk/python/).





  We recommend using the latest version of Python. Caplena supports Python 3.8 and newer.



  The following distributions will be installed automatically when installing Caplena.

  - [Requests](https://docs.python-requests.org/en/latest/) is an elegant and simple HTTP library for Python.
  - [Typing Extensions](https://github.com/python/typing/tree/master/typing_extensions) enables use of new type system features on older Python versions.



  Within your Python environment of choice, use the following command to install Caplena:

  ```sh
  $ pip install caplena
  ```

  Caplena is now installed.



  To use `caplena-python` in a development environment, we recommend you to set up a development virtualenv. Once done, you
  can run the following command to install all required dependencies:

  ```sh
  make install
  ```

  Run all tests:

  ```sh
  make test
  ```

  Run all tests in watch mode:

  ```sh
  make test-watch
  ```

  Run the formatter:

  ```sh
  make fmt
  ```

  Run the linter:

  ```sh
  make lint
  ```

  Build the Sphinx SDK docs:

  ```sh
  make build-docs
  ```

  The Sphinx generated documentation is automatically generated and uploaded to our [developer documentation portal](https://caplena.com/docs/sdk/python/), using Github Actions.

  Build the Python package:

  ```sh
  make build-sdk
  ```

  Publish the Python package:

  ```sh
  make publish-sdk
  ```

  Show all supported commands:

  ```sh
  make help
  ```


pkgId: fffc15b8e1155298b985dc063f4288570c17e4fb0f666403299e3952cab273d0
name: python-capmonster-python
arch: src
version: 3.2.0
epoch: 0
release: 1
summary: capmonster.cloud library for Python
url: https://github.com/alperensert/capmonster_python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capmonster-python-3.2.0-1.src.rpm
checksum_type: sha256
description:
  Capmonster.cloud for Python
  =
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/capmonster-python?style=plastic) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/capmonster_python?style=flat) ![GitHub last commit](https://img.shields.io/github/last-commit/alperensert/capmonster_python?style=flat) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/alperensert/capmonster_python?style=flat) ![PyPI - Downloads](https://img.shields.io/pypi/dm/capmonster_python?style=flat) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/alperensert/capmonster_python?style=flat) ![GitHub Repo stars](https://img.shields.io/github/stars/alperensert/capmonster_python?style=social)

  [Capmonster.cloud](https://capmonster.cloud) package for Python3

  If you have any problem with usage, [read the documentation](https://alperensert.github.io/capmonster_python)
  or [create an issue](https://github.com/alperensert/capmonster_python/issues/new)

  *At least 2x cheaper, up to 30x faster than manual recognition services.*



  ```
  pip install capmonster_python
  ```



  - Image to text
  - Recaptcha v2
  - Recaptcha v2 Enterprise
  - Recaptcha v3
  - Fun Captcha
  - HCaptcha
  - GeeTest
  - Turnstile Task
  - Data Dome

  Usage examples
  -



  ```python
  from capmonster_python import ImageToTextTask

  capmonster = ImageToTextTask("API_KEY")
  task_id = capmonster.create_task(image_path="img.png")
  result = capmonster.join_task_result(task_id)
  print(result.get("text"))
  ```



  ```python
  from capmonster_python import RecaptchaV2Task

  capmonster = RecaptchaV2Task("API_KEY")
  task_id = capmonster.create_task("website_url", "website_key")
  result = capmonster.join_task_result(task_id)
  print(result.get("gRecaptchaResponse"))
  ```



  ```python
  from capmonster_python import RecaptchaV2EnterpriseTask

  capmonster = RecaptchaV2EnterpriseTask("API_KEY")
  task_id = capmonster.create_task("website_url", "website_key", {"s": "payload value"}, "api_domain")
  result = capmonster.join_task_result(task_id)
  print(result.get("gRecaptchaResponse"))
  ```



  ```python
  from capmonster_python import GeeTestTask

  capmonster = GeeTestTask("API_KEY")
  task_id = capmonster.create_task("website_url", "gt", "challenge")
  result = capmonster.join_task_result(task_id)
  print(result.get("challenge"))
  print(result.get("seccode"))
  print(result.get("validate"))
  ```



  ```python
  from capmonster_python import RecaptchaV2Task

  capmonster = RecaptchaV2Task("API_KEY")
  task_id = capmonster.create_task("website_url", "website_key")
  result = capmonster.join_task_result(task_id)
  report_result = capmonster.report_incorrect_captcha("token", task_id)
  print(report_result)
  ```

  For other examples and api documentation please visit [wiki](https://alperensert.github.io/capmonster_python)


pkgId: 0077fb2c457bf9aaeeccc1e284b1eb923834a4011ec1e4311c65c1766d27b40b
name: python-capmonstercloudclient
arch: src
version: 1.5.0
epoch: 0
release: 1
summary: Official CapMonsterCloud Client: https://capmonster.cloud/
url: https://github.com/ZennoLab/capmonstercloud-client-python
rpm_license: AGPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capmonstercloudclient-1.5.0-1.src.rpm
checksum_type: sha256
description:
  Official python client library for [capmonster.cloud](https://capmonster.cloud/) captcha recognition service



      python3 -m pip install capmonstercloudclient



  ***
      import asyncio

      from capmonstercloudclient import CapMonsterClient, ClientOptions
      from capmonstercloudclient.requests import RecaptchaV2ProxylessRequest

      client_options = ClientOptions(api_key=<YOUR_API_KEY>)
      cap_monster_client = CapMonsterClient(options=client_options)

      async def solve_captcha():
          return await cap_monster_client.solve_captcha(recaptcha2request)

      recaptcha2request = RecaptchaV2ProxylessRequest(websiteUrl="https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high",
                                                      websiteKey="6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd")

      responses = asyncio.run(solve_captcha())
      print(responses)
  ***

  Supported captcha recognition requests:

  - [GeeTestProxylessRequest](https://zenno.link/doc-geetest-en)
  - [GeeTestRequest](https://zenno.link/doc-geetest-proxy-en)
  - [HCaptchaProxylessRequest](https://zenno.link/doc-hcaptcha-en)
  - [HCaptchaRequest](https://zenno.link/doc-hcaptcha-proxy-en)
  - [ImageToTextRequest](https://zenno.link/doc-ImageToTextTask-en)
  - [RecaptchaV2ProxylessRequest](https://zenno.link/doc-recaptcha2-en)
  - [RecaptchaV2Request](https://zenno.link/doc-recaptcha2-proxy-en)
  - [RecaptchaV3ProxylessRequest](https://zenno.link/doc-recaptcha3-en)
  - [RecaptchaV2EnterpriseProxylessRequest](https://zenno.link/doc-recaptcha2e-en)
  - [RecaptchaV2EnterpriseRequest](https://zenno.link/doc-recaptcha2e-proxy-en)
  - [TurnstileProxylessRequest](https://zenno.link/doc-turnstile-en)
  - [TurnstileRequest](https://zenno.link/doc-turnstile-proxy-en)
  - [RecaptchaComplexImageTaskRequest](https://zenno.link/doc-complextask-rc-en)
  - [HcaptchaComplexImageTaskRequest](https://zenno.link/doc-complextask-hc-en)
  - [DataDomeCustomTaskRequest](https://docs.capmonster.cloud/docs/captchas/datadome)
  - [TenDiCustomTaskRequest](https://docs.capmonster.cloud/docs/captchas/tendi)
  - [BasiliskCustomTaskRequest](https://docs.capmonster.cloud/docs/captchas/Basilisk-task)
  - [AmazonWafRequest](https://docs.capmonster.cloud/docs/captchas/amazon-task)


pkgId: 48e5c50876740bdb0e8c938754ece05c7f690941f15aaa84b23f5d4860ee3418
name: python-cappa
arch: src
version: 0.23.0
epoch: 0
release: 1
summary: Declarative CLI argument parser.
url: https://pypi.org/project/cappa/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cappa-0.23.0-1.src.rpm
checksum_type: sha256
description:
  [![Actions Status](https://github.com/DanCardin/cappa/actions/workflows/test.yml/badge.svg)](https://github.com/dancardin/cappa/actions)
  [![codecov](https://codecov.io/gh/DanCardin/cappa/graph/badge.svg?token=jCpAbqWQgU)](https://codecov.io/gh/DanCardin/cappa)
  [![Documentation Status](https://readthedocs.org/projects/cappa/badge/?version=latest)](https://cappa.readthedocs.io/en/latest/?badge=latest)

  - [Full documentation here](https://cappa.readthedocs.io/en/latest/).
  - [Comparison vs existing libraries.](https://cappa.readthedocs.io/en/latest/comparison.html).
  - [Annotation inference details](https://cappa.readthedocs.io/en/latest/annotation.html)
  - ["invoke" (click-like) details](https://cappa.readthedocs.io/en/latest/invoke.html)
  - [Class compatibility (dataclasses/pydantic/etc)](https://cappa.readthedocs.io/en/latest/class_compatibility.html)

  Cappa is a declarative command line parsing library, taking much of its
  inspiration from the "Derive" API from the
  [Clap](https://docs.rs/clap/latest/clap/_derive/index.html) written in Rust.

  ```python
  from dataclasses import dataclass, field
  import cappa
  from typing import Literal
  from typing_extensions import Annotated


  @dataclass
  class Example:
      positional_arg: str = "optional"
      boolean_flag: bool = False
      single_option: Annotated[int | None, cappa.Arg(short=True, help="A number")] = None
      multiple_option: Annotated[
          list[Literal["one", "two", "three"]],
          cappa.Arg(long=True, help="Pick one!"),
      ] = field(default_factory=list)


  args: Example = cappa.parse(Example, backend=cappa.backend)
  print(args)
  ```

  Produces the following CLI:

  ![help text](./docs/source/_static/example.svg)

  In this way, you can turn any dataclass-like object (with some additional
  annotations, depending on what you're looking for) into a CLI.

  You'll note that `cappa.parse` returns an instance of the class. This API should
  feel very familiar to `argparse`, except that you get the fully typed dataclass
  instance back instead of a raw `Namespace`.



  ["invoke" documentation](https://cappa.readthedocs.io/en/latest/invoke.html)

  The "invoke" API is meant to feel more like the experience you get when using
  `click` or `typer`. You can take the same dataclass, but register a function to
  be called on successful parsing of the command.

  ```python
  from dataclasses import dataclass
  import cappa
  from typing_extensions import Annotated

  def function(example: Example):
      print(example)

  @cappa.command(invoke=function)
  class Example:  # identical to original class
      positional_arg: str
      boolean_flag: bool
      single_option: Annotated[int | None, cappa.Arg(long=True)]
      multiple_option: Annotated[list[str], cappa.Arg(short=True)]


  cappa.invoke(Example)
  ```

  (Note the lack of the dataclass decorator. You can optionally omit or include
  it, and it will be automatically inferred).

  Alternatively you can make your dataclass callable, as a shorthand for an
  explcit invoke function:

  ```python
  @dataclass
  class Example:
      ...   # identical to original class

      def __call__(self):
         print(self)
  ```

  Note `invoke=function` can either be a reference to some callable, or a string
  module-reference to a function (which will get lazily imported and invoked).

  With a single top-level command, the click-like API isn't particularly valuable
  by comparison. Click's command-centric API is primarily useful when composing a
  number of nested subcommands.



  The useful aspect of click's functional composability is that you can define
  some number of subcommands functions under a parent command, whichever
  subcommand the function targets will be invoked.

  ```python
  import click

  @click.group('example')
  def example():
      ...

  @example.command("print")
  @click.option('--loudly', is_flag=True)
  def print_cmd(loudly):
      if loudly:
        print("PRINTING!")
      else:
        print("printing!")

  @example.command("fail")
  @click.option('--code', type: int)
  def fail_cmd(code):
      raise click.Exit(code=code)




  ```

  Whereas with argparse, you'd have had to manually match and call the funcitons
  yourself. This API does all of the hard parts of deciding which function to
  call.

  Similarly, you can achieve the same thing with cappa.

  ```python
  from __future__ import annotations
  from dataclasses import dataclass
  import cappa

  @dataclass
  class Example:
      cmd: cappa.Subcommands[Print | Fail]

  def print_cmd(print_: Print):
      if print_.loudly:
          print("PRINTING!")
      else:
          print("printing!")

  @cappa.command(invoke=print_cmd)
  class Print:
      loudly: bool

  @dataclass
  class Fail:
      code: int

      def __call__(self):  # again, __call__ is shorthand for the above explicit `invoke=` form.
          raise cappa.Exit(code=self.code)

  cappa.invoke(Example)
  ```



  Purely functions-based can only be used for certain kinds of CLI interfaces.
  However, they **can** reduce the ceremony required to define a given CLI
  command.

  ```python
  import cappa
  from typing_extensions import Annotated

  def function(foo: int, bar: bool, option: Annotated[str, cappa.Arg(long=True)] = "opt"):
      ...


  cappa.invoke(function)
  ```

  Such a CLI is exactly equivalent to a CLI defined as a dataclass with the
  function's arguments as the dataclass's fields.

  There are various downsides to using functions. Given that there is no class to
  reference, any feature which relies on being able to name the type will be
  impossible to use. For example, subcommands cannot be naturally defined as
  functions (since there is no type with which to reference the subcommand).

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


pkgId: f364fb411b79e496b267c2e2fb279a96239c43462d501a8bfe0ebbb0ecbe6089
name: python-cappa
arch: src
version: 0.25.0
epoch: 0
release: 1
summary: Declarative CLI argument parser.
url: https://pypi.org/project/cappa/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cappa-0.25.0-1.src.rpm
checksum_type: sha256
description:
  [![Actions Status](https://github.com/DanCardin/cappa/actions/workflows/test.yml/badge.svg)](https://github.com/dancardin/cappa/actions)
  [![codecov](https://codecov.io/gh/DanCardin/cappa/graph/badge.svg?token=jCpAbqWQgU)](https://codecov.io/gh/DanCardin/cappa)
  [![Documentation Status](https://readthedocs.org/projects/cappa/badge/?version=latest)](https://cappa.readthedocs.io/en/latest/?badge=latest)

  - [Full Documentation](https://cappa.readthedocs.io/en/latest/)
  - [Comparison vs click/typer/argparse/etc](https://cappa.readthedocs.io/en/latest/comparison.html)
  - [Annotations Inference Docs](https://cappa.readthedocs.io/en/latest/annotation.html)
  - ["invoke" API Docs](https://cappa.readthedocs.io/en/latest/invoke.html)
  - [Class Compatibility (dataclasses/pydantic/etc)](https://cappa.readthedocs.io/en/latest/class_compatibility.html)

  Cappa is a declarative command line parsing library, which uses runtime type inspection
  to infer (default) CLI argument behavior, and provide automatic [help text](https://cappa.readthedocs.io/en/latest/help.html)
  generation and dynamic completion generation.

  It supports two different modes of execution:

  * `parse`: Argparse-like parsing of the arguments into an output structure
  * [invoke](https://cappa.readthedocs.io/en/latest/invoke.html): Click-like calling
    of functions based on the selected subcommand

    It also provides a [dependency injection system](https://cappa.readthedocs.io/en/latest/invoke.html#Invoke-Dependencies)
    for providing non-argument resources to the invoked commands.

  And, a number of different styles of CLI declaration (which can be mixed and matched within
  a given CLI):

  * Classes: The fields of the class correspond to CLI arguments/subcommands
  * Functions: The arguments of the function correspond to CLI arguments
  * Methods: The class fields correspond to CLI arguments, and the methods correspond to subcommands
  * Imperative Construction: The CLI structure can be manually/imperitavely constructed,
    rather than being inferred from the input structure

  <details open>
    <summary><h2>Class Based, parse</h2></summary>

    ```python
    from dataclasses import dataclass, field
    import cappa
    from typing import Literal
    from typing_extensions import Annotated

    @dataclass
    class Example:
        positional_arg: str = "optional"
        boolean_flag: bool = False
        single_option: Annotated[int | None, cappa.Arg(short=True, help="A number")] = None
        multiple_option: Annotated[tuple[Literal["one", "two", "three"]], cappa.Arg(long=True)] = ()

    args: Example = cappa.parse(Example, backend=cappa.backend)
    print(args)
    ```

    Produces the following CLI:

    ![help text](./docs/source/_static/example.svg)

    In this way, you can turn any dataclass-like object (with some additional
    annotations, depending on what you're looking for) into a CLI.

    You'll note that `cappa.parse` returns an instance of the class. This API should
    feel very familiar to `argparse`, except that you get the fully typed dataclass
    instance back instead of a raw `Namespace`.
  </details>

  <details>
    <summary><h2>Class Based, invoke</h2></summary>

    ["invoke" documentation](https://cappa.readthedocs.io/en/latest/invoke.html)

    The "invoke" API is meant to feel more like the experience you get when using
    `click` or `typer`. You can take the same dataclass, but register a function to
    be called on successful parsing of the command.

    ```python
    from dataclasses import dataclass
    import cappa
    from typing_extensions import Annotated

    def function(example: Example):
        print(example)

    @cappa.command(invoke=function)
    class Example:  # identical to original class
        positional_arg: str
        boolean_flag: bool
        single_option: Annotated[int | None, cappa.Arg(long=True)]
        multiple_option: Annotated[list[str], cappa.Arg(short=True)]


    cappa.invoke(Example)
    ```

    (Note the lack of the dataclass decorator. You can optionally omit or include
    it, and it will be automatically inferred).

    Alternatively you can make your dataclass callable, as a shorthand for an
    explicit invoke function:

    ```python
    @dataclass
    class Example:
        ...   # identical to original class

        def __call__(self):
           print(self)
    ```

    Note `invoke=function` can either be a reference to some callable, or a string
    module-reference to a function (which will get lazily imported and invoked).

    

    With a single top-level command, the click-like API isn't particularly valuable
    by comparison. Click's command-centric API is primarily useful when composing a
    number of nested subcommands, and dispatching to functions based on the selected
    subcommand.

    ```python
    from __future__ import annotations
    from dataclasses import dataclass
    import cappa

    @dataclass
    class Example:
        cmd: cappa.Subcommands[Print | Fail]


    @dataclass
    class Print:
        loudly: bool

        def __call__(self):  # again, __call__ is shorthand for the above explicit `invoke=` form.
            if self.loudly:
                print("PRINTING!")
            else:
                print("printing!")

    def fail():
        raise cappa.Exit(code=self.code)

    @cappa.command(invoke=fail)
    class Fail:
        code: int

    cappa.invoke(Example)
    ```
  </details>

  <details>
    <summary><h2>Functions, invoke</h2></summary>

    Purely function-based CLIs **can** reduce the ceremony required to define a given CLI
    command. Such a CLI is exactly equivalent to a CLI defined as a dataclass with the
    function's arguments as the dataclass's fields.

    ```python
    import cappa
    from typing_extensions import Annotated

    def function(foo: int, bar: bool, option: Annotated[str, cappa.Arg(long=True)] = "opt"):
        ...


    cappa.invoke(function)
    ```

    There are, however, some downsides to using functions. Namely, that `function`
    has no nameable type! As such, a free function can not be easily named as a
    subcommand option (`Subcommand[Foo | Bar]`).

    You **can** define a root level function with class-based subcommands, but
    the reverse is not possible because there is no valid type you can supply in
    the subcommand union.
  </details>

  <details>
    <summary><h2>Methods, invoke</h2></summary>

    See also [Methods](https://cappa.readthedocs.io/en/latest/functions_and_methods.html#methods).

    ```python
    from __future__ import annotations
    from dataclasses import dataclass
    import cappa

    @cappa.command
    @dataclass
    class Example:
        arg: int

        @cappa.command
        def add(self, other: int) -> int:
            """Add two numbers."""
            return self.arg + some_dep

        @cappa.command(help="Subtract two numbers")
        def subtract(self, other: int) -> int:
            return self.arg - other

    cappa.invoke(Example)
    ```

    With methods, the enclosing class corresponds to the parent object CLI arguments,
    exactly like normal class based definition. Unlike with free functions, (explicitly
    annotated) methods are able to act as subcommands, who's arguments (similarly to free functions)
    act as the arguments for the subcommand.

    The above example produces a CLI like:

    ```
    Usage: example ARG {add,subtract} [-h] [--completion COMPLETION]

    Arguments
      ARG

    Subcommands
      add                        Add two numbers.
      subtract                   Subtract two numbers.
    ```
  </details>


  <details>
    <summary><h2>Imperative Construction, parse/invoke</h2></summary>

    See also [Manual Construction](https://cappa.readthedocs.io/en/latest/manual_construction.html).

    ```python
    from dataclasses import dataclass

    import cappa

    @dataclass
    class Foo:
        bar: str
        baz: list[int]

    command = cappa.Command(
        Foo,
        arguments=[
            cappa.Arg(field_name="bar"),
            cappa.Arg(field_name="baz", num_args=2),
        ],
        help="Short help.",
        description="Long description.",
    )

    result = cappa.parse(command, argv=["one", "2", "3"])
    ```

    All other APIs of cappa amount to scanning the provided input structure, and producing
    a `cappa.Command` structure. As such, it's equally possible for users to manually
    construct the commands themselves.

    This could also be used to extend cappa, or design even more alternative interfaces
    ([Cleo](https://github.com/python-poetry/cleo) is another, fairly different, option
    that comes to mind).
  </details>



  Credit where credit is due

  * The "Derive" API of the Rust library [Clap](https://docs.rs/clap/latest/clap/_derive/index.html)
    directly inspired the concept of mapping a type's fields to the shape of the CLI, by inferring
    the default behavior from introspecting types.

  * Click's easy way of defining large graphs of subcommands and mapping them to functions,
    inspired the the "invoke" API of Cappa. The actual APIs dont particularly resemble one
    another, but subcommands directly triggering functions (in contrast to argparse/Clap) is
    a very nice, and natural seeming feature!

  * FastAPI's `Depends` system inspired Cappa's dependency injection system. This API is
    quite natural, and makes it very easy to define a complex system of ad-hoc dependencies
    **without** the upfront wiring cost of most DI frameworks.

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


pkgId: e3eea96ebe3591dd839a37edca2914ef7c0ec10f3fe6576c43464adb47baaad3
name: python-capsolver
arch: src
version: 1.0.7
epoch: 0
release: 1
summary: capsolver python libary
url: https://github.com/capsolver/capsolver-python
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capsolver-1.0.7-1.src.rpm
checksum_type: sha256
description:
  Capsolver official python library


  - HCaptcha
  - FunCaptcha
  - Geetest
  - ReCaptchaV2
  - ReCaptchav3
  - MtCaptcha
  - Datadom
  - Cloudflare
  - Kasada
  - Akamai BMP




  You don't need this source code unless you want to modify the package. If you just
  want to use the package, just run:

  ```sh
  pip3 install --upgrade capsolver
  ```

  Install from source with:

  ```sh
  python setup.py install
  ```



  ```bash
  export CAPSOLVER_API_KEY='...'
  ```

  Or set `capsolver.api_key` to its value:

  ```python
  from pathlib import Path
  import os
  import base64
  import capsolver


  print("api host",capsolver.api_base)
  print("api key",capsolver.api_key)

  solution = capsolver.solve({
          "type":"ReCaptchaV2TaskProxyLess",
          "websiteKey":"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
          "websiteURL":"https://www.google.com/recaptcha/api2/demo",
      })

  print(solution)


  img_path = os.path.join(Path(__file__).resolve().parent,"queue-it.jpg")
  with open(img_path,'rb') as f:
      solution = capsolver.solve({
          "type":"ImageToTextTask",
          "module":"queueit",
          "body":base64.b64encode(f.read()).decode("utf8")
      })
      print(solution)


  balance = capsolver.balance()

  print(balance)
  ```


pkgId: 73625a7b094c3270a62b6de896fd93ad247140bcbb94d48f579944b9e1e388aa
name: python-capsolver-extension-python
arch: src
version: 1.0.3
epoch: 0
release: 1
url: https://github.com/omkarcloud/capsolver-extension-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capsolver-extension-python-1.0.3-1.src.rpm
checksum_type: sha256
summary:
  Capsolver Extension Python allows you to easily integrate Capsolver Extension in web automation frameworks like Botasaurus, Selenium, and Playwright.

description:
  Capsolver Extension Python helps you easily use Capsolver Extension in Botasaurus, Selenium, and Playwright.

  You can easily configure Capsolver with an API key without needing to download the Capsolver Extension, update config files, etc.




  ```bash
  python -m pip install capsolver_extension_python
  ```



  ```python
  from botasaurus.browser import browser, Driver
  from capsolver_extension_python import Capsolver

  @browser(
      extensions=[Capsolver(api_key="CAP-MY_KEY")], # TODO: Replace with your own CapSolver Key
  )
  def solve_captcha(driver: Driver, data):
      driver.get("https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php")
      driver.prompt()

  solve_captcha()
  ```



  ```python
  from selenium import webdriver
  from selenium.webdriver.chrome.options import Options
  from chromedriver_autoinstaller import install
  from capsolver_extension_python import Capsolver


  options = Options()
  options.add_argument(Capsolver(api_key="CAP-MY_KEY").load()) # TODO: Replace with your own CapSolver Key

  driver_path = install()
  driver = webdriver.Chrome(driver_path, options=options)


  driver.get("https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php")


  input("Press Enter to exit...")


  driver.quit()
  ```



  ```python
  from playwright.sync_api import sync_playwright
  from capsolver_extension_python import Capsolver
  import random

  def generate_random_profile():
      return str(random.randint(1, 1000))

  with sync_playwright() as p:
      extension_path = Capsolver(api_key="CAP-MY_KEY").load(with_command_line_option=False) # TODO: Replace with your own CapSolver Key
      browser = p.chromium.launch_persistent_context(
          user_data_dir=generate_random_profile(),
          headless=False,
          args=[
              '--disable-extensions-except='+ extension_path,
              '--load-extension=' + extension_path,
          ],
      )
      page = browser.new_page()
      page.goto("https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php")
      input("Press Enter to exit...")
      browser.close()
  ```


  ```python
  from botasaurus.browser import browser, Driver
  from capsolver_extension_python import Capsolver

  @browser(
      extensions=[Capsolver(api_key="CAP-MY_KEY", app_id="DC601421-43D5-45E4-9FDB-B3BAF7A2C3FD")], # TODO: Replace with your own CapSolver Key and App ID
  )
  def solve_captcha(driver: Driver, data):
      driver.get("https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php")
      driver.prompt()

  solve_captcha()
  ```



  When you use the Capsolver Extension, we integrate our own app ID into the extension if you haven't provided one. This allows us to earn a small commission from each captcha you solve, at no extra cost to you.

  These funds supports us in our efforts to develop awesome open-source projects to make your life easy.



  Become one of our amazing stargazers by giving us a star ⭐ on GitHub!

  It's just one click, but it means the world to me.

  [![Stargazers for @omkarcloud/capsolver-extension-python](https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=omkarcloud&repo=capsolver-extension-python)](https://github.com/omkarcloud/capsolver-extension-python/stargazers)


pkgId: dd0381b32feac78c2b9bfcf59f044c3cc4fcb46923621ee2145249ce41025f19
name: python-capstone-windows
arch: src
version: 3.0.4
epoch: 0
release: 1
summary: Capstone disassembly engine
url: http://www.capstone-engine.org
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capstone-windows-3.0.4-1.src.rpm
checksum_type: sha256
description:
  Capstone is a disassembly framework with the target of becoming the ultimate
  disasm engine for binary analysis and reversing in the security community.
  Created by Nguyen Anh Quynh, then developed and maintained by a small community,
  Capstone offers some unparalleled features:
  - Support multiple hardware architectures: ARM, ARM64 (ARMv8), Mips, PPC, Sparc,
    SystemZ, XCore and X86 (including X86_64).
  - Having clean/simple/lightweight/intuitive architecture-neutral API.
  - Provide details on disassembled instruction (called “decomposer” by others).
  - Provide semantics of the disassembled instruction, such as list of implicit
    registers read & written.
  - Implemented in pure C language, with lightweight wrappers for C++, C#, Go,
    Java, NodeJS, Ocaml, Python, Ruby & Vala ready (available in main code,
    or provided externally by the community).
  - Native support for all popular platforms: Windows, Mac OSX, iOS, Android,
    Linux, *BSD, Solaris, etc.
  - Thread-safe by design.
  - Special support for embedding into firmware or OS kernel.
  - High performance & suitable for malware analysis (capable of handling various
    X86 malware tricks).
  - Distributed under the open source BSD license.
  Further information is available at http://www.capstone-engine.org
  [License]
  This project is released under the BSD license. If you redistribute the binary
  or source code of Capstone, please attach file LICENSE.TXT with your products.


pkgId: 8967e5c11dc7b4b72c515bafa5301ed252d240fc3019f181df91d903bc6f005b
name: python-captain
arch: src
version: 5.2.0
epoch: 0
release: 1
summary: Python cli scripts for humans
url: http://github.com/jaymon/captain
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-captain-5.2.0-1.src.rpm
checksum_type: sha256
description:
  Easy python cli scripts for people that just want get things done.




  A valid `captain` cli script needs just two things:

  1. A `Default` class that extends `captain.Command` and has a `handle()` method (can be async):

      ```python
      from captain import Command

      class Default(Command):
          async def handle(self, foo, bar):
              return 0
      ```

  2. Calling `captain.application()` at the end of your script:

      ```python
      from captain import Command, application

      class Default(Command):
          async def handle(self, foo, bar):
              return 0

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

  That's it! Whatever arguments you define in your class's `Default.handle()` method will be options on the command line. A captain script is called just like any other python command line script, so to run the above example you could do:

      $ python path/to/script.py --foo=1 --bar=2




  The `captain.arg()` decorator provides a nice passthrough api to the full [argparse.ArgumentParser.add_argument() method](https://docs.python.org/3/library/argparse.html#the-add-argument-method) if you want to fine tune how arguments are passed into your script:

  ```python
  from captain import Command, application, arg

  class Default(Command):
      @arg('--foo', '-f', action="store_true")
      @arg('arg', metavar='ARG')
      async def handle(self, *args, **kwargs):
          '''this is the help description'''
          self.output.out(args)
          self.output.out(kwargs)

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

  Would print a help string like this:

      usage: script.py [-h] [--foo FOO] ARG

      this is the help description

      positional arguments:
        ARG

      optional arguments:
        -h, --help         show this help message and exit
        --foo FOO, -f FOO




  The `captain.io.Output` class makes it easy to print stuff in your script while still giving you full control by being able to configure the logger if you need to. It also will obey the global `--quiet` flag that Captain adds to every script.

  It's available in the `handle()` method by using `self.output`:

  ```python
  from captain import Command

  class Default(Command):
      async def handle(self, *args, **kwargs):
          var1 = "print"

          var2 = "stdout"
          self.output.out("this will {} to {}", var1, var2)

          var2 = "stderr"
          self.output.err("this will {} to {}", var1, var2)

          e = ValueError("this will print with stacktrace and everything")
          self.output.exception(e)
  ```

  The `captain.io.Output` class has a lot of nice little helper methods but Captain can also work with modules like [clint](https://github.com/kennethreitz/clint) if you need to do more advanced cli output.




  A typical python cli script

  ```python
  import argparse

  if __name__ == '__main__':
      parser = argparse.ArgumentParser(description='fancy script description')
      parser.add_argument("--foo", action='store_true')
      parser.add_argument("--bar", default=0, type=int)
      parser.add_argument("args", nargs='*')
      args = parser.parse_args()
      sys.exit(0)
  ```

  would become:

  ```python
  import captain

  class Default(captain.Command):
      async def handle(foo=False, bar=0, *args):
          '''fancy script description'''
          return 0

  if __name__ == '__main__':
      captain.application()
  ```




  Captain supports multiple subcommands defined in the script by naming your `captain.Command` child classes something other than `Default`:

  ```python


  import captain

  class Foo(captain.Command):
      async def handle(self):
          pass

  class Bar(captain.Command):
      async def handle(self):
          pass

  if __name__ == '__main__':
      captain.application()
  ```

  So `foo` could be called using:

      $ python cli.py foo

  And `bar` could be called using:

      $ python cli.py bar




  If you want a script from you package to be usable using both `python -m example` and maybe a `console_scripts` entry point defined in `setup.py`, you can set up your package's `__main__.py` module like this:


  ```python


  from captain import Command, application

  class Default(captain.Command):
      async def handle(self):
          pass

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

  And then in your `setup.py` script you can add:


  ```python
  entry_points = {
      'console_scripts': [
          'example = example.__main__:application'
      ],
  }
  ```

  That's all there is to it.




  Use pip:

      $ pip install captain

  For latest and greatest:

      $ pip install -U "git+https://github.com/Jaymon/captain#egg=captain"

rpm_license:
  The MIT License (MIT)  Copyright (c) 2014+ Jay Marcyes  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: c14428cf1faf9bc68c2b22d3d33783d0e63c9f4f2d56484a070234a672535b0d
name: python-captametropolis
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: Add Automatic Captions to YouTube Shorts with AI
url: https://github.com/AppSolves/captametropolis
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-captametropolis-1.1.1-1.src.rpm
checksum_type: sha256
description:
  Check out these examples with captions added using **Captametropolis** (by [CurioBurstz](https://www.youtube.com/@curioburstz?sub_confirmation=1)):
  <a href="http://www.youtube.com/watch?v=C1nqHA2-YIk" title="Why Flamingos Are Pink: The Fascinating Reason Behind Their Color!">
    <img src="http://img.youtube.com/vi/C1nqHA2-YIk/0.jpg" alt="CurioBurstz No. 1" width="300" height="225" hspace="25">
  </a>
  <a href="http://www.youtube.com/watch?v=1Wik3XewG40" title="Why You Get Dizzy After Spinning: The Science Explained!">
    <img src="http://img.youtube.com/vi/1Wik3XewG40/0.jpg" alt="CurioBurstz No. 2" width="300" height="225">


pkgId: d38d3b1cec6e96bf247b6cdff4aeb2208d28c44d9390f99249a02de79539018d
name: python-captchatools
arch: src
version: 1.5.0
epoch: 0
release: 1
summary: Python module to help solve captchas with Capmonster, 2captcha and Anticaptcha API's!
url: https://github.com/Matthew17-21/Captcha-Tools
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-captchatools-1.5.0-1.src.rpm
checksum_type: sha256
description:
  Python module to help solve captchas with Capmonster, 2Captcha and Anticaptcha API's!


  To see documentation for the Go implementation, [click here](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go)


  ```python
  pip3 install captchatools
  ```

  ```python
  pip3 install -U captchatools
  ```


  ```python
  import captchatools
  solver = captchatools.new_harvester(solving_site="capmonster", api_key="YOUR API KEY", sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", captcha_url="https://www.google.com/recaptcha/api2/demo")
  captcha_answer = solver.get_token()
  ```
  or
  ```python
  from captchatools import new_harvester
  solver = new_harvester(solving_site=1, api_key="YOUR API KEY", sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", captcha_url="https://www.google.com/recaptcha/api2/demo")
  captcha_answer = solver.get_token()
  ```

  | Parameter | Required |  Type  | Default | Description|
  | :-------------: |:-------------:| :-----:| :-----:| :-----:|
  | api_key | true | String| -| The API Key for the captcha solving site|
  | solving_site| true| String (name of site) or int (site ID) | "capmonster"| The captcha solving site that will be used. Refer to [the site IDs](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go#site-specific-support)|
  | sitekey| true | String | - | Sitekey from the site where captcha is loaded|
  | captcha_url | true| String | - | URL where the captcha is located|
  | captcha_type| false| String | "v2" | Type of captcha you are solving. Either captcha `image`, `v2`, `v3`,`hcaptcha` (`hcap` works aswell) or `hcaptchaturbo`|
  | invisible_captcha| false | bool | false | If the captcha is invisible or not.<br />__This param is only required when solving invisible captchas__|
  | min_score | false | double |0.7 | Minimum score for v3 captchas.<br />__This param is only required when solving V3 and it needs a higher / lower score__|
  | action | false | String | "verify" | Action that is associated with the V3 captcha.<br />__This param is only required when solving V3 captchas__|
  | soft_id | false | int | - |2captcha Developer ID. <br /> Developers get 10% of spendings of their software users. |

  | Field | Required |  Type  |  Description|
  | :-------------: |:-------------:|  :-----:| :-----:|
  | b64_img | false | string |  Base64 encoded captcha image<br />__This param is only required when solving image captchas__|
  | proxy| false | string |  Proxy to be used to solve captchas.<br />This will make the captcha be solved from the proxy ip<br /><br />Format: `ip:port:user:pass` |
  | proxy_type | false | string |  Type of the proxy being used. Options are:<br /> `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`|
  | user_agent | false | string |  UserAgent that will be passed to the service and used to solve the captcha |
  | rq_data | false | string |  Custom data that is used in some implementations of hCaptcha. Most of the times, you want to set the  `invisible_captcha` param to `true`.|


  ```python
  from captchatools import new_harvester

  def main():
      harvester = new_harvester(
          api_key="CHANGE THIS",
          solving_site="capsolver",
          captcha_type="v2",
          sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
          captcha_url="https://www.google.com/recaptcha/api2/demo"
      )
      answer = harvester.get_token()
  ```

  ```python
  from captchatools import new_harvester

  def main():
      harvester = new_harvester(

          api_key="CHANGE THIS",
          solving_site="capsolver",

          captcha_type="v3",
          sitekey="6LcR_okUAAAAAPYrPe-HK_0RULO1aZM15ENyM-Mf",
          captcha_url="https://antcpt.com/score_detector/",
          action="homepage",
          min_score=0.7
      )
      token = harvester.get_token()
  ```

  ```python
  from captchatools import new_harvester

  def main():
      harvester = new_harvester(
          api_key="CHANGE THIS",
          solving_site="capsolver",
          captcha_type="image",
      )
      token = harvester.get_token(b64_img="iVBORw0KGgoAAAANSUhEUgAAAUQAAAAxCAYAAACictAAAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGt0lEQVR4nO1di23bMBC9bKBsIG+QbqBOUHcCa4N4A2uDeIIqGzgTRCNkg2qDaIO6EEABgmDxezz+7gEEglbm8emOj38KgMFgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMhjleAKAFgA4ArgDQi79fAaABgCohDq8rDv2KSyueyQE5+IuSV70TG1eR/1E8w7DEOwDcd9KYiK1GBMQkyX+dBgA4IVY2V15L+QcDDkvevUEFGAzyNklzBQ3pr1x5gfi/WfxuhrHxJfK2RSX4X0VePjWC0pbSgaoKF7Ot+UW+OQR8HQkvjMp70bATWjh8+StXXq8IHEaDOG9FAzsa5m8DSlvaGAkLgG2rNnyZJoFIzQurAs8BJkNI4fDpr1x5dYhcThpcbPK11QhKW1q4EBYA2xZGEMoCkZoXZiWeeyoQmXD49leuvDAF8a4x71ysINaEBfBhC6sC1JHwwq7IsQmHb3/lyqvTiK0l6dj5UvApVhBHwgJg22o18ulEa7hMVldirq/blKeOhNf6+UlUtKvgehRlb8TfsgWcJc2/pRSOOrC/cuW1FcRB/NucxxZzHmeNhZdGwqlIQbwQFsCHrVEhBDorx40IrjoSXpMou+52DNVQba8nUInfmiZZT+UjAn/lymsp36AQsjVeFKIom2d+FLu9EP/RsyD6tOU8zMMogA9brcOCAhZ88KqQyzFXCEzIemC/IvdXyrxs9xR2Fo0liFhdRibbmMQWKUpbu7jtGBk8FMCHrZvkt1SbUSnfoQqyPVtYkAnvmIC/SuOl2grmImBU8U1ia69Vqz1UZl+2psC9Dcp3qIMbQQ9RNmfZR+6vEnm5in0Rgrg35zR3rQG5MvuyJWv1KI6xUb5D18AZCGwsDUGs/iqVF4hy2K40FyGI74rMMSuzL1tnw97QMtGe4jvUgewUg8uRLd25siFyf5XIy+cc55iLILYarRlWZfZp66oRwMed88DLVpZTAu9QhUqxyo05jyVbdDhF7K9SeWHwy1oQq53Mt60ERmX2besm2R5RKxYYtnaOEfHaw3LZwzrp7H004eZzHiqUv0rlteDoyC9rQXzT7EFgVGbftvZ+pysU23SOhJcpX1mw6+5Vc926oTPsCuWvUnnJGu+7SKeSBbE2eCmulZnClk2wqVIT0TvUze9RRew83Btou+gQ0l8l8/J9ld+YuiDqDPOwKjOFLR+BOEb0DnXzW6ev1QkXqmGX7gp2CH+VygsU88oTwrxy0oJ4MZxsd6nMVLZGwx5TJ5nvWacmgndokp+MN9Ziyg1h2EXtr5J5XQiG5WOqgniwcLhtZaa0pQrEb8mh99HwzColL1l+/zZJVakmhIl6rE29lP4qmZfqkokOcJCsID5a5fpU/Ma2MlPaGh1aQdlm2ikwL1mZ201arpJXieJLBHvYKP1VKq/fRGKYrCDKjpZhV2ZKW6pAnByHoHVAXjZQbe8YAi46UPurVF4/FLfadICLJAVx7zRFp0h7BZg2z50C2VIFks5wY++EwX0zxKHmZYtKIYo2c1IN4pEvKn+VyOtALIZZCSJmGgLZUtnbuxBVd4WxDcjLBQ1ypZBxNxVyKn+Vxuug6KV24AcsiJEJ4tUxCJoMBREkPYUP5PsVTfc5UvmrJF6hxHAGC2Jkgnj2GIhNwoI4Ig0FsS8EoPJXKbxCiuEMFsTIBLFxDGzZUIUFUV7ZsOcjMf1VAq/nwGI4gwUxMkGsDJ41HepUifYQayQ7Pm5YpvJX7ryeFYtnFGKYrCAeNVZDsVZIKW3prPA9I71kal4/AeAJ8E8ofARadKD2V868niIRw2QF0RaUe+hcbJ0Vw5UnC+HoA/O6i6BvxTzRk6ZAqo5rnZA+muVyHDCkv3Lg1SueP6ySydcGH6Ha5LdNMpGS2aoC28paECuNTyweNs+rhKOJQBDX6UucRunESYSfq3QUQy7Vt3dNKrzPL8iF9FfqvGTDfddkei2aS+oD28paEHVf5qh5CB+TH5YgUgcG9ubuWPyVOi8WRGBB1MHc2v5FEo46Q0GU3chj8jEirMYihL9y4MWCCCyIYBDw345BiD0hHYMgmoihz0WH0P7KgRcLIrAgmgajTQs9IV/b7iqIuld7Yd+HqJoHw/5SHJW/cuHFgggsiKaoRQv7V1NUMC9RxRLEWlzr9Sl6G6YCOVjOibUP7ltc0h/wAwp/5cKrkfB4lEzE+BE6T7b6wLaKRSNe9J/VV+p6sSrbevjmiC+8rPZCvgk+S1r4vAq+qXDK2V+l8GIwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGA/LEf2oS4NVP9R70AAAAAElFTkSuQmCC")
  ```

  ```python
  from captchatools import new_harvester

  def main():
      harvester = new_harvester(
          api_key="CHANGE THIS",
          solving_site="capsolver",
          captcha_type="v2",
          sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
          captcha_url="https://www.google.com/recaptcha/api2/demo"
      )

      token = harvester.get_token(
          proxy="ip:port:user:pass",
          proxy_type="http",
          user_agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
      )
  ```


  - **[Capmonster](https://capmonster.cloud/)**
  - **[2Captcha](https://www.2captcha.com/)**
  - **[Anticaptcha](https://www.anti-captcha.com/)**
  - **[Capsolver](https://www.capsolver.com/)**
  - **[CaptchaAI](https://captchaai.com/)**


  | Site            | Site ID |Captcha Types  Supported    |  Task Types Supported|
  | :-------------: |:-------------:| :-----:| :-----:|
  | Capmonster      | captchatools.CapmonsterSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha | ImageToTextTask,<br/>NoCaptchaTask,<br/> NoCaptchaTaskProxyless,<br/> RecaptchaV3TaskProxyless,<br />HCaptchaTaskProxyless |
  | Anticaptcha     | captchatools.AnticaptchaSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha      |    ImageToTextTask,<br/> RecaptchaV2Task<br/>  RecaptchaV2TaskProxyless,<br />RecaptchaV3TaskProxyless,<br />HCaptchaTaskProxyless |
  | 2Captcha        | captchatools.TwoCaptchaSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha      |   - |
  | Capsolver        | captchatools.CapsolverSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha<br />HcaptchaTurbo      |   - |
  | CaptchaAI        | captchatools.CaptchaAISite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha      |   - |




  1. For 2Captcha, don't run more than 60 tasks per API key.
  2. Handle errors appropriately.
      * If a `ErrNoBalance` is thrown, tasks should stop. Some sites will temporarily ban IP's if constant requests come in.


  | Errors | Returned When |
  | :--------:| :-----:|
  | `ErrNoBalance` | Balance is below 0 for captcha solving site|
  | `ErrWrongAPIKey` | Incorrect API Key for captcha solving site|
  | `ErrWrongSitekey` | Incorrect sitekey |
  | `ErrIncorrectCapType` | Incorrectly chose a captcha type. When initializing a new harvester. Refer to [the captcha types](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go#config-struct-fields) |
  | `ErrNoHarvester` | When the user did not / incorrectly chose a captcha harvester. Refer to the ["how to use" guide](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go#how-to-use) |


  ```python
  from captchatools import new_harvester, exceptions as captchaExceptions,

  def main():
      try:
          harvester = new_harvester()
          token = harvester.get_token()
      except captchaExceptions.NoHarvesterException:
          print("I need to set my captcha harvester!")
  ```






  1. Added CaptchaAI
  2. Removed internal redundant code
  3. Fix creating a new harvester if pass in the ID


  1. Get Balance Support
  2. Proxy Support
  3. User Agent Support
  4. Text image captcha support
  5. Better internal handling
  6. Capsolver support


  * It is recommend to use the `new_harvester` function rather than the old `captcha_harvesters`


pkgId: b8825bd92dc2044519c07241d43c5bee35cf042105f89358efa6dcaa5ac34bcf
name: python-captchium
arch: src
version: 1.1.3
epoch: 0
release: 1
summary: Python library for solving Google reCAPTCHA challenges
url: https://github.com/d3kxrma/captchium
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-captchium-1.1.3-1.src.rpm
checksum_type: sha256
description:
  Captchium is a Python library for solving Google reCAPTCHA challenges using audio recognition. It provides a convenient way to automate CAPTCHA solving in web scraping or automation tasks.



  To install Captchium, you can use pip:

  ```shell
  pip install captchium
  ```



  Here's an example of how to use Captchium:

  ```python
  from selenium.webdriver.chrome.service import Service
  from selenium.webdriver.common.by import By
  from selenium import webdriver
  from captchium import Captchium
  from driverium import Driverium


  driver_options = webdriver.ChromeOptions()
  service = Service(Driverium().get_driver())
  driver = webdriver.Chrome(service=service, options=driver_options)


  captchium = Captchium(driver, recognize_service="google")


  iframe = driver.find_element(By.TAG_NAME, "iframe")
  captchium.solve(iframe)



  ```

  To use the `solve` function, you need to pass the iframe element that opens after clicking on the CAPTCHA. This can be done by locating the iframe element using Selenium's `find_element` method and passing it as an argument to the `solve` function.

  **Do not pass this iframe to the function**

  ![Not this iframe ](https://i.imgur.com/oSyw2qx.png)

  **Pass this iframe**

  ![This iframe](https://i.imgur.com/uF0AtlI.png)



  Captchium currently supports two audio recognition services: Google and Vosk. By default, it uses the Google service. You can specify the service when initializing Captchium:

  ```python
  captchium = Captchium(driver, recognize_service="vosk", model_path="path/to/model")
  ```

  Please note that if you choose the Vosk service, you need to download the Vosk model from [https://alphacephei.com/vosk/models](https://alphacephei.com/vosk/models) and unpack it as 'model' in the current folder or specify the path to the model using the model_path parameter.



  Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the [Captchium GitHub repository](https://github.com/d3kxrma/captchium).



  Captchium is licensed under the MIT License. See the [LICENSE](https://github.com/d3kxrma/captchium/blob/main/LICENSE) file for more information.


pkgId: 37a42a28d0d94d477805336796f1b12231f7cfa489584aacdc5c8cea2dcacf96
name: python-captif-slp
arch: src
version: 0.19
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/captif-nz/captif-slp
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-captif-slp-0.19-1.src.rpm
checksum_type: sha256
description:
  The *captif-slp* Python package can be used to calculate the Mean Profile Depth (MPD) of a road surface according to *[ISO 13473-1:2019](https://www.iso.org/standard/45111.html) Characterization of pavement texture by use of surface profiles — Part 1: Determination of mean profile depth*.

  The software has been developed at the Waka Kotahi NZ Transport Agency *[CAPTIF Road Research Centre](https://www.nzta.govt.nz/roads-and-rail/road-composition/road-pavements/captif/)* for use with the CAPTIF in-house Stationary Laser Profilometer (SLP). While some methods are specific to data captured using the CAPTIF SLP instrument the software can also be used to calculate MPD of other road surface profiles provided the data is converted to a valid format before processing.

  Refer to the *[European Road Profile Users' Group](https://www.erpug.org/index.php?contentID=239)* website for further information on ISO 13473-1 including a MATLAB implementation and a set of reference profiles and results.

  Also refer to *[Transfund New Zealand Research Report 84](https://www.nzta.govt.nz/resources/research/reports/84/)* for details of the original Stationary Laser Profilometer developed in 1997 for use by Transit New Zealand. This instrument was based on the VTI stationary laser profilometer.



  *captif-slp* can be installed by running `pip install captif-slp`.

  The package requires Python 3.9 to run.





  The *Reading* class provides a mechanism to interact with an individual road surface profile and can be imported using `from captif_slp import Reading`.

  A new *Reading* object must be created using one of the following class methods.

  1. From a DataFrame containing `distance_mm` and `relative_height_mm` columns:

      ```python
      reading = Reading.from_trace(
          trace: DataFrame,
          meta: Optional[dict] = None,
          ...
      )
      ```

      The `meta` keyword argument provides a mechanism for attaching meta data to a *Reading* object. This can be used to include information such as a file name, reading number or measurement date. The data can be accessed later from the *meta* attribute.

  2. Or from a valid *texture* data file capable of being read using the *[captif-data-structures](https://github.com/captif-nz/captif-data-structures)* package (i.e. a CAPTIF in-house file format):

      ```python
      reading = Reading.from_file(
          path: Union[str, Path],
          parallel: bool = True,
          ...
      )
      ```

      The `parallel` keyword argument allows the file to be read using the Python *multiprocessing* module. This can significantly speed up load times for large files. Note that where several files are being processed it is more efficient to pass individual files to each CPU core for processing in which case *parallel* **must be set to False** to allow the multiprocessing module to be used by a higher level function.

  The remaining keyword arguments are common for `Reading.from_trace()` and `Reading.from_file()`:

  ```python
  reading = Reading.from_...(
      ...
      segment_length_mm: int = 100,
      target_sample_spacing_mm: float = 0.5,
      evaluation_length_m: Optional[float] = None,
      alpha: int = 3,
      start_mm: Optional[float] = None,
      end_mm: Optional[float] = None,
      detect_plates: bool = False,
  )
  ```

  The keyword arguments have the following meanings:

  - `segment_lenght_mm` -- *default: 100*
  \
  Length of the segments (in millimetres) that the profile is split into for processing. Note that this should generally be left as the default value of 100 mm as this is the required segment length in ISO 13473-1.

  - `target_sample_spacing_mm` -- *default: 0.5*
  \
  The sample spacing (in millimetres) used by the resampling process. ISO 13473-1:2019 calls for a road surface profile to be resampled to either 0.5 mm or 1.0 mm depending on the sample spacing in the original profile. In general 0.5 mm should be used where the original sample spacing is less than or equal to 0.5 mm.

  - `evaluation_length_m` -- *default: None*
  \
  The evaluation length (in metres) over which the mean profile depth is reported. The default behaviour is to calculate MPD for the entire road surface profile. For spot measurements taken using a Stationary Laser Profilometer (SLP) the default behaviour is appropriate. For continuous measurements it is usually more useful to report MPD over shorter sections in which case the evaluation length could be set to 10 or 20 metres.

  - `alpha` -- *default: 3*
  \
  The constant used in the spike detection criterion (Eqn E.1, ISO 13473-1:2019). The default value of 3 is the value suggested in the standard. Note that a value of 3 used with profiles taken using the CAPTIF SLP results in a large number of false positives when analysing highly texture surfaces in New Zealand (e.g. chipseals). A value of 6 has been found to yield good results on profiles taken using the CAPTIF SLP instrument.

  - `start_mm` -- *default: None*
  \
  Used to remove a section from the beginning of the profile before processing. The default is use the full profile. The value is ignored if the *detect_plates* is set to True.

  - `end_mm` -- *default: None*
  \
  Used to remove a section from the end of the profile before processing. The default is use the full profile. The value is ignored if the *detect_plates* is set to True.

  - `detect_plates` -- *default: False*
  \
  Used to detect reference plates at the start and/or end of the profile and trim the profile accordingly. For historical reasons reference plates are present on the CAPTIF SLP instrument to signal the start and end of the section of interest; these reference plates (along with the sections of profile outside of them) need to be removed from the profile before processing. The default behaviour is to not preform this step as it is unique to the CAPTIF SLP instrument.



  Once a profile has been successfully loaded into a *Reading* object the following instance methods can be used to access the results.

  `reading.msd()` -- Mean Segment Depth (MSD)
  \
  Returns a list of dictionaries containing MSD values for each segment (usually 100 mm long) in the profile. Each *dict* element in the list has the following keys:

  - `segment_no: int` - segment position number (int).
  - `msd: float` - mean segment depth.
  - `valid: bool` - segment validity (i.e. meets the maximum dropouts and spikes requirement).
  - `evaluation_length_position_m: Optional[float]` - evaluation length position.

  `reading.mpd(include_meta: bool = False)` -- Mean Profile Depth (MPD)
  \
  Returns either a single dictionary if evaluation length is not set, or a list of dictionaries if evaluation length is set. The *dict* element(s) have the following keys:

  - `distance_m` - evaluation length position (*None* if evaluation length is not set).
  - `mpd` - mean profile depth (average MSD across all valid segments).
  - `stdev` - standard deviation (standard deviation of MSD from all valid segments).
  - `valid_segments` - number of valid segments in the profile.
  - `proportion_valid_segments` - proportion of valid segments in the profile.
  - `is_valid` - result validity (i.e. whether or not valid_segment_ration >= 0.5).
  - (meta data fields) - the meta data fields if *include_meta* is set to True.



  In order to provide efficient processing the Python *multiprocessing* module is used to process batches of valid data files meeting the CAPTIF in-house *texture* file format. The processing function can be imported using `from captif_slp import process_files`.

  The function takes the path of a folder containing the files to be processed and returns a list of results as per `Reading.mpd(include_meta=True)` with the addition of a `filename` and `folder` field.

  ```python
  results = process_files(path: Union[str, Path])
  ```

  `process_files` uses the following settings under the hood as these are the settings relevant to profiles taken using the CAPTIF SLP instrument:

  - `segment_lenght_mm = 100`
  - `target_sample_spacing_mm = 0.5`
  - `evaluation_length_m = None`
  - `alpha = 6`
  - `detect_plates = True`

  To access all attributes from `Reading.from_file` (except the *parallel* attribute which is set to False internally to allow the *multiprocessing* module to be used by a higher level) use `captif_slp.process.process_generic_files`.



  Please submit an issue if you find a bug or have an idea for an improvement.



  The software is provided under the following license.

  *MIT License*

  *Copyright (c) 2021 CAPTIF Road Research Centre*

  *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: 04775a61589172042dc0bdbfa8faca81164bded43a95633910a0d33714973455
name: python-captn-client
arch: src
version: 2023.3.0
epoch: 0
release: 1
summary: Captn client library
url: https://github.com/airtai/captn-client
rpm_license: Creative Commons License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-captn-client-2023.3.0-1.src.rpm
checksum_type: sha256
description:
  <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

  For full documentation, Please follow the below link:
  - <a href="https://docs.captn.ai" target="_blank">https://docs.captn.ai/</a>

  If you don’t have the captn library already installed, please install it
  using pip.
  ``` console
  pip install captn-client
  ```

  To access the captn service, you must first create a developer account.
  Please fill out the signup form below to get one:
  - <https://bit.ly/3I4cNuv>
  After successful verification, you will receive an email with the
  username and password for the developer account.
  Once you have the credentials, use them to get an access token by
  calling `Client.get_token` method. It is necessary to get an access
  token; otherwise, you won’t be able to access all of the captn service’s
  APIs. You can either pass the username, password, and server address as
  parameters to the `Client.get_token` method or store them in the
  environment variables **CAPTN_SERVICE_USERNAME**,
  **CAPTN_SERVICE_PASSWORD**, and **CAPTN_SERVER_URL**.
  In addition to the regular authentication with credentials, you can also
  enable multi-factor authentication (MFA) and single sign-on (SSO) for
  generating tokens.
  To help protect your account, we recommend that you enable multi-factor
  authentication (MFA). MFA provides additional security by requiring you
  to provide unique verification code (OTP) in addition to your regular
  sign-in credentials when performing critical operations.
  Your account can be configured for MFA in just two easy steps:
  1.  To begin, you need to enable MFA for your account by calling the
      `User.enable_mfa` method, which will generate a QR code. You can
      then scan the QR code with an authenticator app, such as Google
      Authenticator and follow the on-device instructions to finish the
      setup in your smartphone.
  2.  Finally, activate MFA for your account by calling
      `User.activate_mfa` and passing the dynamically generated six-digit
      verification code from your smartphone’s authenticator app.
  You can also disable MFA for your account at any time by calling the
  method `User.disable_mfa` method.
  Single sign-on (SSO) can be enabled for your account in three simple
  steps:
  1.  Enable the SSO for a provider by calling the `User.enable_sso`
      method with the SSO provider name and an email address. At the
      moment, we only support “google” and “github” as SSO providers. We
      intend to support additional SSO providers in future releases.
  2.  Before you can start generating new tokens with SSO, you must first
      authenticate with the SSO provider. Call the `Client.get_token` with
      the same SSO provider you have enabled in the step above to generate
      an SSO authorization URL. Please copy and paste it into your
      preferred browser and complete the authentication process with the
      SSO provider.
  3.  After successfully authenticating with the SSO provider, call the
      `Client.set_sso_token` method to generate a new token and use it
      automatically in all future interactions with the captn server.
  For more information, please check:
  - [Tutorial](https://docs.captn.ai/Tutorial/) with more elaborate
    example, and
  - [API](https://docs.captn.ai/API/client/Client/) with reference
    documentation.
  Here’s a minimal example showing how to use captn services to train a
  model and make predictions.
  In the below example, the username, password, and server address are
  stored in **CAPTN_SERVICE_USERNAME**, **CAPTN_SERVICE_PASSWORD**, and
  **CAPTN_SERVER_URL** environment variables.

  ``` python

  from captn.client import Client, DataBlob, DataSource

  Client.get_token()
  ```

  In our example, we will be using the captn APIs to load and preprocess a
  sample CSV file stored in an AWS S3 bucket.
  ``` python



  data_blob = DataBlob.from_s3(uri="s3://test-airt-service/sample_gaming_130k")

  data_blob.progress_bar()
  ```
      100%|██████████| 1/1 [00:35<00:00, 35.44s/it]
  The sample data we used in this example doesn’t have the header rows and
  their data types defined.
  The following code creates the necessary headers along with their data
  types and reads only a subset of columns that are required for modeling:
  ``` python

  prefix = ["revenue", "ad_revenue", "conversion", "retention"]
  days = list(range(30)) + list(range(30, 361, 30))
  dtype = {
      "date": "str",
      "game_name": "str",
      "platform": "str",
      "user_type": "str",
      "network": "str",
      "campaign": "str",
      "adgroup": "str",
      "installs": "int32",
      "spend": "float32",
  }
  dtype.update({f"{p}_{d}": "float32" for p in prefix for d in days})
  names = list(dtype.keys())
  kwargs = {
      "delimiter": "|",
      "names": names,
      "parse_dates": ["date"],
      "usecols": names[:42],
      "dtype": dtype,
  }
  ```
  Finally, the above variables are passed to the `DataBlob.to_datasource`
  method which preprocesses the data and stores it in captn server.
  ``` python

  data_source = data_blob.to_datasource(
      file_type="csv", index_column="game_name", sort_by="date", **kwargs
  )

  data_source.progress_bar()
  ```
      100%|██████████| 1/1 [00:55<00:00, 55.66s/it]
  ``` python


  print(data_source.head())
  ```
                        date platform          user_type            network  \
      game_name
      game_name_0 2021-03-15      ios      jetfuelit_int      jetfuelit_int
      game_name_0 2021-03-15      ios      jetfuelit_int      jetfuelit_int
      game_name_0 2021-03-15      ios      jetfuelit_int      jetfuelit_int
      game_name_0 2021-03-15      ios      jetfuelit_int      jetfuelit_int
      game_name_0 2021-03-15      ios      jetfuelit_int      jetfuelit_int
      game_name_0 2021-03-15  android  googleadwords_int  googleadwords_int
      game_name_0 2021-03-15  android  googleadwords_int  googleadwords_int
      game_name_0 2021-03-15  android         moloco_int         moloco_int
      game_name_0 2021-03-15  android      jetfuelit_int      jetfuelit_int
      game_name_0 2021-03-15  android      jetfuelit_int      jetfuelit_int
                       campaign       adgroup  installs       spend  revenue_0  \
      game_name
      game_name_0    campaign_0   adgroup_541         1    0.600000   0.000000
      game_name_0    campaign_0  adgroup_2351         2    4.900000   0.000000
      game_name_0    campaign_0   adgroup_636         3    7.350000   0.000000
      game_name_0    campaign_0   adgroup_569         1    0.750000   0.000000
      game_name_0    campaign_0   adgroup_243         2    3.440000   0.000000
      game_name_0  campaign_283  adgroup_1685        11    0.000000   0.000000
      game_name_0    campaign_2    adgroup_56        32   30.090000   0.000000
      game_name_0  campaign_191          None       291  503.480011  34.701553
      game_name_0    campaign_0   adgroup_190         4    2.740000   0.000000
      game_name_0    campaign_0   adgroup_755         8   11.300000  13.976003
                   revenue_1  ...  revenue_23  revenue_24  revenue_25  revenue_26  \
      game_name               ...
      game_name_0   0.018173  ...    0.018173    0.018173    0.018173    0.018173
      game_name_0   0.034000  ...    0.034000    6.034000    6.034000    6.034000
      game_name_0   0.000000  ...   12.112897   12.112897   12.112897   12.112897
      game_name_0   0.029673  ...    0.029673    0.029673    0.029673    0.029673
      game_name_0   0.027981  ...    0.042155    0.042155    0.042155    0.042155
      game_name_0   0.097342  ...    0.139581    0.139581    0.139581    0.139581
      game_name_0   0.802349  ...    2.548253    2.548253    2.771138    2.805776
      game_name_0  63.618111  ...  116.508331  117.334709  117.387489  117.509506
      game_name_0   0.000000  ...    0.000000    0.000000    0.000000    0.000000
      game_name_0  14.358793  ...   14.338905   14.338905   14.338905   14.338905
                   revenue_27  revenue_28  revenue_29  revenue_30  revenue_60  \
      game_name
      game_name_0    0.018173    0.018173    0.018173    0.018173    0.018173
      game_name_0    6.034000    6.034000    6.034000    6.034000    6.034000
      game_name_0   12.112897   12.112897   12.112897   12.112897   12.112897
      game_name_0    0.029673    0.029673    0.029673    0.029673    0.029673
      game_name_0    0.042155    0.042155    0.042155    0.042155    0.042155
      game_name_0    0.139581    0.139581    0.139581    0.139581    0.139581
      game_name_0    2.805776    2.805776    2.805776    2.805776    2.805776
      game_name_0  118.811417  118.760765  119.151291  119.350220  139.069443
      game_name_0    0.000000    0.000000    0.000000    0.000000    0.000000
      game_name_0   14.338905   14.338905   14.338905   14.338905   14.338905
                   revenue_90
      game_name
      game_name_0    0.018173
      game_name_0   13.030497
      game_name_0   12.112897
      game_name_0    0.029673
      game_name_0    0.042155
      game_name_0    0.139581
      game_name_0    2.805776
      game_name_0  147.528793
      game_name_0    0.000000
      game_name_0   14.338905
      [10 rows x 41 columns]

  ``` python

  ```


pkgId: 4620dc462bf3a45f7be9c74179e75c2b608a079ddccfd7520803ec2916af910e
name: python-captool
arch: src
version: 0.2.2
epoch: 0
release: 1
summary: Core library for crawling and web scraping
url: https://rescala.jp
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-captool-0.2.2-1.src.rpm
checksum_type: sha256
description:
  def print_hi(name):
      
      print(f'Hi, {name}')  # Press ⌘F8 to toggle the breakpoint.



  if __name__ == '__main__':
      print_hi('PyCharm')


pkgId: ec8d809b80381028f6007db8908b354e0b330f2ed1a8101a4d978d28e862cefe
name: python-captur-ml-sdk
arch: src
version: 0.1.96
epoch: 0
release: 1
summary: The internal Captur Machine Learning SDK
url: https://github.com/Captur/captur-ml-sdk
rpm_license: Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-captur-ml-sdk-0.1.96-1.src.rpm
checksum_type: sha256
description:
  This is an internal SDK to build Captur Machine Learning products.



  `pip install captur-ml-sdk`



  `sh publish.sh`


pkgId: 711db1d4d0e1993236415631fca1b8e9d637d5b5ca9885fb12b5b1e9b45cd9b1
name: python-captura
arch: src
version: 0.1.10
epoch: 0
release: 1
summary: A framework for adding sharing and collections to existing API projects.
url: https://pypi.org/project/captura/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-captura-0.1.10-1.src.rpm
checksum_type: sha256
description:
  A docker compose project is included so that it is easy to get a server and
  database up and running. The defaults included in ``./src/app/config.py`` will
  work for the compose projects mysql instance. To start the compose project do
     
     docker compose --file=docker/docker-compose.yaml up --detach
     docker compose --file=docker/docker-compose.yaml exec bash
  and then
     python -m venv .venv
     source .venv/bin/activate
     python -m pip install --editable .
  and then create your application configuration.


pkgId: 4830ee8bffd90c2d397cdf5b2d2c991a70273a745545b15d986edd3832a9943a
name: python-capture-db-queries
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: Decorator for measuring the time and number of database queries
url: https://github.com/Friskes/capture-db-queries
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capture-db-queries-1.1.0-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

  | Project   |     | Status                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
  |-----------|:----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | CI/CD     |     | [![Latest Release](https://github.com/Friskes/capture-db-queries/actions/workflows/publish-to-pypi.yml/badge.svg)](https://github.com/Friskes/capture-db-queries/actions/workflows/publish-to-pypi.yml)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | Quality   |     | [![Coverage](https://codecov.io/github/Friskes/capture-db-queries/graph/badge.svg?token=vKez4Pycrc)](https://codecov.io/github/Friskes/capture-db-queries)                                                                                                                                                                                                                                                                                                                               |
  | Package   |     | [![PyPI - Version](https://img.shields.io/pypi/v/capture-db-queries?labelColor=202235&color=edb641&logo=python&logoColor=edb641)](https://badge.fury.io/py/capture-db-queries) ![PyPI - Support Python Versions](https://img.shields.io/pypi/pyversions/capture-db-queries?labelColor=202235&color=edb641&logo=python&logoColor=edb641) ![Project PyPI - Downloads](https://img.shields.io/pypi/dm/capture-db-queries?logo=python&label=downloads&labelColor=202235&color=edb641&logoColor=edb641)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | Meta      |     | [![types - Mypy](https://img.shields.io/badge/types-Mypy-202235.svg?logo=python&labelColor=202235&color=edb641&logoColor=edb641)](https://github.com/python/mypy) [![License - MIT](https://img.shields.io/badge/license-MIT-202235.svg?logo=python&labelColor=202235&color=edb641&logoColor=edb641)](https://spdx.org/licenses/) [![code style - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/format.json&labelColor=202235)](https://github.com/astral-sh/ruff) |

  </div>

  > Class that supports the function of decorator, iterator and context manager for measuring the time and number of database queries


  1. Install package
      ```bash
      pip install capture-db-queries
      ```


  `CaptureQueries` class as decorator can call the body of the decorated function or class as iterator can run code inside for loop the specified number of times for multiple measurements, it can validate the total number of queries.
  The functionality of the classic context manager is also available.

  - Optional parameters:
      - `assert_q_count`: The expected number of database requests is otherwise "AssertionError: N not less than or equal to N queries"
      - `number_runs`: The number of runs of the test function `_`
      - `verbose`: Displaying the final results of the test measurements
      - `advanced_verb`: Displaying the result of each test measurement
      - `auto_call_func`: Autorun of the decorated function (without arguments)
      - `queries`: Displaying raw SQL queries to the database
      - `connection`: Connecting to your database, by default: django.db.connection



  ```python
  from capture_db_queries.decorators import CaptureQueries

  for ctx in CaptureQueries(number_runs=2, advanced_verb=True):
      response = self.client.get(url)



  @CaptureQueries(number_runs=2, advanced_verb=True)
  def test_request():
      response = self.client.get(url)




  with CaptureQueries(number_runs=1, advanced_verb=True) as ctx:
      response = self.client.get(url)

  >>> Test №1 | Queries count: 10 | Execution time: 0.04s
  >>> Test №2 | Queries count: 10 | Execution time: 0.04s
  >>> Tests count: 2  |  Total queries count: 20  |  Total execution time: 0.08s  |  Median time one test is: 0.041s  |  Vendor: sqlite
  ```

rpm_license:
  MIT License  Copyright (c) 2024 Friskes  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: 222c89a4180fc89dd3621bb0849d08f0a214774293ef4ff1807b13d8db87a39a
name: python-capture-db-queries
arch: src
version: 1.2.3
epoch: 0
release: 1
summary: Decorator for measuring the time and number of database queries
url: https://github.com/Friskes/capture-db-queries
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capture-db-queries-1.2.3-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

  | Project   |     | Status                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
  |-----------|:----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | CI/CD     |     | [![Latest Release](https://github.com/Friskes/capture-db-queries/actions/workflows/publish-to-pypi.yml/badge.svg)](https://github.com/Friskes/capture-db-queries/actions/workflows/publish-to-pypi.yml)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | Quality   |     | [![Coverage](https://codecov.io/github/Friskes/capture-db-queries/graph/badge.svg?token=vKez4Pycrc)](https://codecov.io/github/Friskes/capture-db-queries)                                                                                                                                                                                                                                                                                                                               |
  | Package   |     | [![PyPI - Version](https://img.shields.io/pypi/v/capture-db-queries?labelColor=202235&color=edb641&logo=python&logoColor=edb641)](https://badge.fury.io/py/capture-db-queries) ![PyPI - Support Python Versions](https://img.shields.io/pypi/pyversions/capture-db-queries?labelColor=202235&color=edb641&logo=python&logoColor=edb641) ![Project PyPI - Downloads](https://img.shields.io/pypi/dm/capture-db-queries?logo=python&label=downloads&labelColor=202235&color=edb641&logoColor=edb641)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | Meta      |     | [![types - Mypy](https://img.shields.io/badge/types-Mypy-202235.svg?logo=python&labelColor=202235&color=edb641&logoColor=edb641)](https://github.com/python/mypy) [![License - MIT](https://img.shields.io/badge/license-MIT-202235.svg?logo=python&labelColor=202235&color=edb641&logoColor=edb641)](https://spdx.org/licenses/) [![code style - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/format.json&labelColor=202235)](https://github.com/astral-sh/ruff) |

  </div>

  > Class that supports the function of decorator, iterator and context manager for measuring the time and number of database queries


  1. Install package
      ```bash
      pip install capture-db-queries
      ```


  `CaptureQueries` class as decorator can call the body of the decorated function or class as iterator can run code inside for loop the specified number of times for multiple measurements, it can validate the total number of queries.
  The functionality of the classic context manager is also available.

  - Optional parameters:
      - `assert_q_count`: The expected number of database requests is otherwise "AssertionError: N not less than or equal to N queries"
      - `number_runs`: The number of runs of the test function / test for loop
      - `verbose`: Displaying the final results of the test measurements
      - `advanced_verb`: Displaying the result of each test measurement
      - `auto_call_func`: Autorun of the decorated function (without arguments)
      - `queries`: Displaying raw SQL queries to the database
      - `explain`: Displaying additional information about each request (has no effect on the orig. requests)
      - `explain_opts`: For more information about the parameters for explain, see the documentation for your DBMS
      - `connection`: Connecting to your database, by default: django.db.connection



  ```python
  from capture_db_queries.decorators import CaptureQueries

  for ctx in CaptureQueries(number_runs=2, advanced_verb=True):
      response = self.client.get(url)



  @CaptureQueries(number_runs=2, advanced_verb=True)
  def test_request():
      response = self.client.get(url)




  with CaptureQueries(number_runs=1, advanced_verb=True) as ctx:
      response = self.client.get(url)

  >>> Test №1 | Queries count: 10 | Execution time: 0.04s
  >>> Test №2 | Queries count: 10 | Execution time: 0.04s
  >>> Tests count: 2  |  Total queries count: 20  |  Total execution time: 0.08s  |  Median time one test is: 0.041s  |  Vendor: sqlite



  for _ in CaptureQueries(advanced_verb=True, queries=True, explain=True):
      list(Reporter.objects.filter(pk=1))
      list(Article.objects.filter(pk=1))

  >>> Test №1 | Queries count: 2 | Execution time: 0.22s
  >>>
  >>>
  >>> №[1] time=[0.109] explain=['2 0 0 SEARCH TABLE tests_reporter USING INTEGER PRIMARY KEY (rowid=?)']
  >>> SELECT "tests_reporter"."id",
  >>>     "tests_reporter"."full_name"
  >>> FROM "tests_reporter"
  >>> WHERE "tests_reporter"."id" = %s
  >>>
  >>>
  >>> №[2] time=[0.109] explain=['2 0 0 SEARCH TABLE tests_article USING INTEGER PRIMARY KEY (rowid=?)']
  >>> SELECT "tests_article"."id",
  >>>     "tests_article"."pub_date",
  >>>     "tests_article"."headline",
  >>>     "tests_article"."content",
  >>>     "tests_article"."reporter_id"
  >>> FROM "tests_article"
  >>> WHERE "tests_article"."id" = %s
  >>>
  >>>
  >>> Tests count: 1  |  Total queries count: 2  |  Total execution time: 0.22s  |  Median time one test is: 0.109s  |  Vendor: sqlite
  ```

rpm_license:
  MIT License  Copyright (c) 2024 Friskes  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: fda4216d75bbd95f111d77c2bf9803667d2df3117ce415cef29abf34f2e76e32
name: python-captureflow-agent
arch: src
version: 0.0.16
epoch: 0
release: 1
url: https://pypi.org/project/captureflow-agent/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-captureflow-agent-0.0.16-1.src.rpm
checksum_type: sha256
summary:
  The CaptureFlow Tracer is a Python package crafted for in-depth tracing of function calls within Python applications. Its primary function is to capture and relay execution data to the CaptureFlow server-side system for decision making.

description:
  OpenTelemetry-based tracer with custom instrumentations that are crucial for CaptureFlow.



  - Uses Poetry, as it's easy to publish this way.



  Run Jaeger-UI and trace collector via `docker-compose up`.
  Run your app via `opentelemetry-instrument uvicorn server:app`

  Check your `http://localhost:16686/search` for application monitoring.



  `poetry config pypi-token.pypi <your_api_token>`
  `poetry publish`


pkgId: 04a5b5b2e1e283e9b2b1061abf396b6fe51da4ebe1a0f603eada8bbe43060707
name: python-capturer
arch: src
version: 3.0
epoch: 0
release: 1
summary: Easily capture stdout/stderr of the current process and subprocesses
url: https://capturer.readthedocs.io
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capturer-3.0-1.src.rpm
checksum_type: sha256
description:
  The capturer package makes it easy to capture the stdout_ and stderr_ streams
  of the current process *and subprocesses*. Output can be relayed to the
  terminal in real time but is also available to the Python program for
  additional processing. It's currently tested on cPython 2.7, 3.5+ and PyPy
  (2.7). It's tested on Linux and Mac OS X and may work on other unixes but
  definitely won't work on Windows (due to the use of the platform dependent pty_
  module). For usage instructions please refer to the documentation_.


pkgId: cef29c91e33a9e772bf1e5b39c05a94d79f0ad9bfdcd05eff1ff71ebeef70a11
name: python-capylang
arch: src
version: 2.2.0
epoch: 0
release: 1
summary: Python's little programming language.
url: https://pypi.org/project/capylang/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-capylang-2.2.0-1.src.rpm
checksum_type: sha256
description:
  ```python
  from capylang import capy
  mycapy = capy(id="MyCapy",printinst=True) # ID is for identification of Capylang Instances, and printinst prints the ID
  print(mycapy.__doc__) # Returns help
  a = 4
  b = 3
  print(str(mycapy.add(a,b))) # Prints 7 (also uses the add function)
  print(str(mycapy.minus(a,b))) # Prints 1 (also uses the subtract function)
  print(str(mycapy.multi(a,b))) # Prints 12 (also uses the multiply function)
  print(str(mycapy.div(a,b))) # Prints 2.3 (average, also uses the divide function)
  print(str(mycapy.hyp(a,b))) # It returns the hypotenuse of opp, and adj
  print(str(mycapy.opp(a,b))) # Try this yourself for more info, check mycapy.__doc__
  print(str(mycapy.adj(a,b))) # Try this yourself for more info, check mycapy.__doc__
  ```

  ```py
  import cpaylang
  arr = [1,2,3,4,5]

  capylang.aiml.mean(arr)
  capylang.aiml.median(arr)
  capylang.aiml.mode(arr)
  ```

  ```python
  import capylang
  @capylang.decorators.add # Equivalent to mycapy.add
  def myadd(a,b,c):
    return a,b,c # The decorator does it all for ya.

  print(myadd(1,2,3))

  ```

  ```python
  import capylang
  date = "1/16/1921" # MM/DD/YYYY (January 16th 1921)
  mydate = capylang.date.new(date)
  print(mydate)
  print(mydate.text())

  ```

  ```python
  import capylang
  capylang.terminal.os_clear() # Clear with the os module
  capylang.terminal.replit_clear() # Clear with the replit module
  ```

  ```python
  from capylang import capy



  fibo = capy(printinst=True,id="Fibonacci Sequence")
  print(fibo.nacci(num_of_nums=10,index=6))
  ```

  ```python

  from capylang import capy
  eval = capy(printinst=True,id="Evaluation")
  print(eval.calc("6/2*(1+2)")) # 9
  ```

  ```python

  from capylang import capy
  eval = capy(printinst=True,id="Evaluation")
  eval.log("The prophecy is true!!!")
  ```

  ```python
  from capylang import capy
  capy.log("You don't even need to initialize the module!")
  ```

  ```python
  import capylang

  mystr = "I am an Apple."
  mystr = capylang.string.init(mystr)
  print(mystr.freq()["Apple."])
  ```

  ```python
  import capylang

  mystr = "I am an Apple."
  mystr = capylang.string.init(mystr)
  print(mystr.lowfreq()["apple."])
  ```

  ```python
  import capylang
  hi = [1,3,5,7,9]
  print(capylang.capi.binary_search(hi,3)) # Returns the index of 3 in hi. Otherwise, returns None.
  print(capylang.capi.binary_search(hi,-1)) # Returns None because -1 is not in the array.
  ```

  ```python
  import capylang
  print(capylang.color.set["classic"]) # ROYGBP
  print(capylang.color.set["full"]) # ROYGBIV
  print(capylang.color.set["full_bip"]) # ROYGBIP

  ```


pkgId: e29b4251f54183f60bcad3a2c0ae99c2ba38502f056b896dee56903823a7b305
name: python-caqui
arch: src
version: 2.1.5
epoch: 0
release: 1
summary: Run asynchronous commands in WebDrivers
url: https://github.com/douglasdcm/caqui
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caqui-2.1.5-1.src.rpm
checksum_type: sha256
description:
  **Caqui** is intended to command executions against Drivers synchronously and asynchronously. Launch the Driver as a server and send requests to it. The intention is that the user does not worry about which Driver he/she is using. It can be **Web**Drivers like [Selenium](https://www.selenium.dev/), **Mobile**Drivers like [Appium](http://appium.io/docs/en/2.0/), or **Desktop**Drivers like [Winium](https://github.com/2gis/Winium.Desktop).

  The process **Caqui** follows is similar of the one described in this [article](https://medium.com/@douglas.dcm/testing-windows-apps-with-http-rest-b4e8f80f8b7e) that experiments Drivers as servers together with [Jmeter](https://jmeter.apache.org/) to test the Windows Calculator. However, the motivation to create **Caqui** was feed by the inspiration in [Arsenic](https://github.com/HENNGE/arsenic) library.

  **Caqui** is planned to be Driver agnostic, so the user can start any Driver as a server and just inform the server URL. Hence, the code is decoupled from the chosen Driver.

  **Caqui** can be used in remote calls. As it needs just the server URL, the user can start the Driver as a server in any host and provide the URL to **Caqui** clients.



  | WebDriver               | Version       | Remote* | Comment |
  | ----------------------- | ------------- | ------- |-------- |
  | Appium                  | 2.0.0         | Y       | Accepts remote calls by default. Tested with Appium in Docker container |
  | Firefox (geckodriver)   | 113           | Y       | Need to add the host ip, e.g. "--host 123.45.6.78" |
  | Google Chrome           | 113+          | Y       | Need to inform allowed ips to connect, e.g "--allowed-ips=123.45.6.78" |
  | Opera                   | 99            | Y       | Need to inform allowed ips to connect, e.g "--allowed-ips=123.45.6.78". Similar to Google Chrome |
  | WinAppDriver            | 1.2.1         | Y       | Need to define the host ip, e.g. "WinAppDriver.exe 10.0.0.10 4723" |
  | Winium Desktop          | 1.6.0         | Y       | Accepts remote calls by default |

  * Accepts remote requests when running as servers


  Install the lastest version of **Caqui**

  ```
  pip install caqui
  ```

  Download the same [ChromeDriver](https://chromedriver.chromium.org/downloads) version as your installed Chrome and start the Driver as a server using the port "9999"

  ```
  $ ./chromedriver --port=9999
  Starting ChromeDriver 94.0.4606.61 (418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204}) on port 9999
  Only local connections are allowed.
  Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
  ChromeDriver was started successfully.
  ```

  Given the HTML content in `playground.html`

  ```
  <html>

  <head>
      <title>Sample page</title>
  </head>

  <body>
      <h1>Basic page</h1>
      <p> This is a sample page to be used to sanity check </p>
      <input id="input">
      <button id="button" onclick="myFunction(this, 'red')">test</button>
      <p id="end">end</p>
      <a src="http://any1.com" id="a1">any1.com</a>
      <a src="http://any2.com" id="a2">any2.com</a>
      <a src="http://any3.com" id="a3">any3.com</a>
      <a src="http://any4.com" id="a4">any4.com</a>

      <script>
          function myFunction(element, color) {
              element.style.color = color;
          }
      </script>
  </body>

  </html>
  ```

  And the code in `sample.py` file
  ```
  import asyncio
  import time
  from caqui import synchronous, asynchronous
  from os import getcwd
  from tests.constants import PAGE_URL
  from caqui.easy.capabilities import CapabilitiesBuilder

  BASE_DIR = getcwd()

  MAX_CONCURRENCY = 5  # number of webdriver instances running
  sem = asyncio.Semaphore(MAX_CONCURRENCY)


  async def get_all_links():
      async with sem:
          driver_url = "http://127.0.0.1:9999"
          capabilities = (
              CapabilitiesBuilder()
              .browser_name("chrome")
              .accept_insecure_certs(True)
              .additional_capability(
                  {"goog:chromeOptions": {"extensions": [], "args": ["--headless"]}}
              )
          ).build()

          session = await asynchronous.get_session(driver_url, capabilities)
          await asynchronous.go_to_page(
              driver_url,
              session,
              PAGE_URL,
          )

          for i in range(4):
              i += 1
              locator_value = f"//a[@id='a{i}']"
              locator_type = "xpath"
              anchors = []

              anchors = await asynchronous.find_elements(
                  driver_url, session, locator_type, locator_value
              )
              print(f"Found {len(anchors)} links")

          for anchor in anchors:
              text = await asynchronous.get_property(driver_url, session, anchor, "href")
              print(f"Link found '{text}'")

          synchronous.close_session(driver_url, session)



  async def main():
      number_of_websites = range(10)
      tasks = [asyncio.ensure_future(get_all_links()) for number in number_of_websites]
      await asyncio.gather(*tasks)


  if __name__ == "__main__":
      start = time.time()
      loop = asyncio.get_event_loop()
      try:
          loop.run_until_complete(main())
      finally:
          loop.run_until_complete(loop.shutdown_asyncgens())
          loop.close()
          end = time.time()
          print(f"Time: {end-start:.2f} sec")

  ```

  Run the file
  ```
  python sample.py
  ```
  Output
  ```
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Link found 'http://any4.com/'
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Link found 'http://any4.com/'
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Link found 'http://any4.com/'
  Link found 'http://any4.com/'
  Found 1 links
  Found 1 links
  Link found 'http://any4.com/'
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Link found 'http://any4.com/'
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Link found 'http://any4.com/'
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Link found 'http://any4.com/'
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Link found 'http://any4.com/'
  Found 1 links
  Found 1 links
  Found 1 links
  Found 1 links
  Link found 'http://any4.com/'
  Time: 5.01 sec

  ```

  In version 2 it is possible to use Python objects similarly to Selenium. Example:

  ```
  from caqui.easy import AsyncDriver
  from caqui.by import By
  from caqui import synchronous
  from tests.constants import PAGE_URL
  from pytest import mark, fixture
  from caqui.easy.capabilities import CapabilitiesBuilder


  @fixture
  def __setup():
      remote = "http://127.0.0.1:9999"
      capabilities = (
          CapabilitiesBuilder()
          .browser_name("chrome")
          .accept_insecure_certs(True)
          .page_load_strategy("normal")
          .addtional_capability(
              {"goog:chromeOptions": {"extensions": [], "args": ["--headless"]}}
          )
      ).build()
      driver = AsyncDriver(remote, capabilities, PAGE_URL)
      yield driver
      driver.quit()


  @mark.asyncio
  async def test_switch_to_parent_frame_and_click_alert(__setup: AsyncDriver):
      driver = __setup
      await driver.get(PAGE_URL)

      locator_type = "id"
      locator_value = "my-iframe"
      locator_value_alert_parent = "alert-button"
      locator_value_alert_frame = "alert-button-iframe"

      element_frame = await driver.find_element(locator_type, locator_value)
      assert await driver.switch_to.frame(element_frame) is True

      alert_button_frame = await driver.find_element(
          locator_type, locator_value_alert_frame
      )
      assert await alert_button_frame.click() is True
      assert await driver.switch_to.alert.dismiss() is True

      assert await driver.switch_to.default_content() is True
      alert_button_parent = await driver.find_element(
          locator_type, locator_value_alert_parent
      )
      assert await alert_button_parent.get_attribute("any") == "any"
      assert await alert_button_parent.click() is True


  ("style")
      assert "display: none;" == await hidden_button.get_attribute("style")

  ```



  To execute the test in multiple tasks, use [pytest-async-cooperative](https://github.com/willemt/pytest-asyncio-cooperative). It will speed up the execution considerably.

  ```
  from caqui.easy import AsyncDriver, ActionChains
  from caqui.by import By
  from pytest import mark, fixture
  from tests.constants import PAGE_URL
  from caqui import synchronous
  from caqui.easy.capabilities import CapabilitiesBuilder


  class TestObject:
      @fixture
      def setup(self):
          remote = "http://127.0.0.1:9999"
          capabilities = (
              CapabilitiesBuilder()
              .browser_name("chrome")
              .accept_insecure_certs(True)
              .additional_capability(
                  {"goog:chromeOptions": {"extensions": [], "args": ["--headless"]}}
              )
          ).build()
          driver = AsyncDriver(remote, capabilities, PAGE_URL)
          yield driver
          driver.quit()

      @mark.asyncio_cooperative
      async def test_save_screenshot(self, setup: AsyncDriver):
          driver = setup

          assert await driver.save_screenshot("/tmp/test.png") is True

      @mark.asyncio_cooperative
      async def test_object_to_string(self, setup: AsyncDriver):
          driver = setup

          element_string = synchronous.find_element(
              driver.remote, driver.session, By.XPATH, "//button"
          )
          element = await driver.find_element(locator=By.XPATH, value="//button")
          assert str(element) == element_string

  ```


  To run the tests in multiple processes use [pytest-xdist](https://github.com/pytest-dev/pytest-xdist). The execution is even faster than running in multiple tasks. Check this article [Supercharge Your Web Crawlers with Caqui: Boosting Speed with Multi-Processing](https://medium.com/@douglas.dcm/speed-up-your-web-crawlers-at-90-148f3ca97b6) to know how to increase the velocity of the executions in 90%.

  ```
  from caqui.easy import AsyncDriver, ActionChains
  from caqui.by import By
  from pytest import mark, fixture
  from tests.constants import PAGE_URL
  from caqui import synchronous
  from caqui.easy.capabilities import CapabilitiesBuilder
  import asyncio


  class TestObject:
      @fixture
      def setup(self):
          remote = "http://127.0.0.1:9999"
          capabilities = (
              CapabilitiesBuilder()
              .browser_name("chrome")
              .accept_insecure_certs(True)
              .additional_capability(
                  {"goog:chromeOptions": {"extensions": [], "args": ["--headless"]}}
              )
          ).build()
          driver = AsyncDriver(remote, capabilities, PAGE_URL)
          yield driver
          driver.quit()

      @mark.asyncio
      async def test_save_screenshot(self, setup: AsyncDriver):
          driver = setup

          assert await driver.save_screenshot("/tmp/test.png") is True

      @mark.asyncio
      async def test_object_to_string(self, setup: AsyncDriver):
          driver = setup

          element_string = synchronous.find_element(
              driver.remote, driver.session, By.XPATH, "//button"
          )
          element = await driver.find_element(locator=By.XPATH, value="//button")
          assert str(element) == element_string

  ```


  To illustrate what I mean by "Driver as server", lets get [chromedriver](https://chromedriver.chromium.org/home) and execute it as an ordinary shell script file.

  ```
  ./chromedriver --port=9999
  Starting ChromeDriver 94.0.4606.61 (418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204}) on port 9999
  Only local connections are allowed.
  Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
  ChromeDriver was started successfully.

  ```
  Notice the Driver is running and waiting for HTTP requests.

  Lets open a new session against it
  ```
  curl --location '127.0.0.1:9999/session' \
  --header 'Content-Type: application/json' \
  --data '{
      "desiredCapabilities": {
          "browserName": "firefox",
          "marionette": true,
          "acceptInsecureCerts": true
      }
  }'
  ```
  Here is the response returned
  ```
  {
      "sessionId": "b6654121c4ba1e8395ded73a27b7d8f5",
      "status": 0,
      "value": {
          "acceptInsecureCerts": true,
          "acceptSslCerts": true,
          "applicationCacheEnabled": false,
          "browserConnectionEnabled": false,
          "browserName": "chrome",
          "chrome": {
              "chromedriverVersion": "94.0.4606.61 (418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204})",
              "userDataDir": "/tmp/.com.google.Chrome.xtZUOj"
          },
          "cssSelectorsEnabled": true,
          "databaseEnabled": false,
          "goog:chromeOptions": {
              "debuggerAddress": "localhost:44437"
          },
          "handlesAlerts": true,
          "hasTouchScreen": false,
          "javascriptEnabled": true,
          "locationContextEnabled": true,
          "mobileEmulationEnabled": false,
          "nativeEvents": true,
          "networkConnectionEnabled": false,
          "pageLoadStrategy": "normal",
          "platform": "Linux",
          "proxy": {},
          "rotatable": false,
          "setWindowRect": true,
          "strictFileInteractability": false,
          "takesHeapSnapshot": true,
          "takesScreenshot": true,
          "timeouts": {
              "implicit": 0,
              "pageLoad": 300000,
              "script": 30000
          },
          "unexpectedAlertBehaviour": "ignore",
          "version": "94.0.4606.54",
          "webStorageEnabled": true,
          "webauthn:extension:credBlob": true,
          "webauthn:extension:largeBlob": true,
          "webauthn:virtualAuthenticators": true
      }
  }
  ```
  The *sessionId* value can be used to perform further actions like *find element*, *send keys* or *click* buttons. More details can be found in [Json Wire Protocol Specification](https://www.selenium.dev/documentation/legacy/json_wire_protocol/).
  Also with the *-h* parameter in Drivers, for example:
  ```
  ./chromedriver -h

  Usage: ./chromedriver [OPTIONS]

  Options
    --port=PORT                     port to listen on
    --adb-port=PORT                 adb server port
    --log-path=FILE                 write server log to file instead of stderr, increases log level to INFO
    --log-level=LEVEL               set log level: ALL, DEBUG, INFO, WARNING, SEVERE, OFF
    --verbose                       log verbosely (equivalent to --log-level=ALL)
    --silent                        log nothing (equivalent to --log-level=OFF)
    --append-log                    append log file instead of rewriting
    --replayable                    (experimental) log verbosely and don't truncate long strings so that the log can be replayed.
    --version                       print the version number and exit
    --url-base                      base URL path prefix for commands, e.g. wd/url
    --readable-timestamp            add readable timestamps to log
    --enable-chrome-logs            show logs from the browser (overrides other logging options)
    --disable-dev-shm-usage         do not use /dev/shm (add this switch if seeing errors related to shared memory)
    --allowed-ips                   comma-separated allowlist of remote IP addresses which are allowed to connect to ChromeDriver
  ```

  Read the [Code of Conduct](https://github.com/douglasdcm/caqui/blob/main/CODE_OF_CONDUCT.md) before push new Merge Requests.
  Now, follow the steps in [Contributing](https://github.com/douglasdcm/caqui/blob/main/CONTRIBUTING.md) session.


pkgId: 6bc387bf593b73f303c6a7d3e409f96504bc9901ed071f45308ad31d634e916f
name: python-caracara
arch: src
version: 0.9.1
epoch: 0
release: 1
summary: The CrowdStrike Falcon Developer Toolkit
url: https://pypi.org/project/caracara/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caracara-0.9.1-1.src.rpm
checksum_type: sha256
description:
  ![CrowdStrike Falcon](https://raw.githubusercontent.com/CrowdStrike/falconpy/main/docs/asset/cs-logo.png) [![Twitter URL](https://img.shields.io/twitter/url?label=Follow%20%40CrowdStrike&style=social&url=https%3A%2F%2Ftwitter.com%2FCrowdStrike)](https://twitter.com/CrowdStrike)<br/>





  <!--
  ![PyPI - Status](https://img.shields.io/pypi/status/caracara)
  [![Pylint](https://github.com/CrowdStrike/caracara/actions/workflows/pylint.yml/badge.svg)](https://github.com/CrowdStrike/caracara/actions/workflows/pylint.yml)
  [![Flake8](https://github.com/CrowdStrike/caracara/actions/workflows/flake8.yml/badge.svg)](https://github.com/CrowdStrike/caracara/actions/workflows/flake8.yml)
  [![Bandit](https://github.com/CrowdStrike/caracara/actions/workflows/bandit.yml/badge.svg)](https://github.com/CrowdStrike/caracara/actions/workflows/bandit.yml)
  [![CodeQL](https://github.com/CrowdStrike/caracara/actions/workflows/codeql.yml/badge.svg)](https://github.com/CrowdStrike/caracara/actions/workflows/codeql.yml)
  -->
  [![PyPI](https://img.shields.io/pypi/v/caracara)](https://pypi.org/project/caracara/)
  ![OSS Lifecycle](https://img.shields.io/osslifecycle/CrowdStrike/caracara)

  A friendly wrapper to help you interact with the CrowdStrike Falcon API. Less code, less fuss, better performance, and full interoperability with [FalconPy](https://github.com/CrowdStrike/falconpy/).

  - [Features](#features)
  - [Installation](#installation-instructions)
  - [Basic Usage](#basic-usage-example)
  - [Examples](#examples-collection)
  - [Documentation](#documentation)
  - [Contributing](#contributing)



  A few of the developer experience enhancements provided by the Caracara toolkit include:
  | Feature | Details |
  | :---  | :--- |
  | __Automatic pagination with concurrency__ | Caracara will handle all request pagination for you, so you do not have to think about things like batch sizes, batch tokens or parallelisation. Caracara will also multithread batch data retrieval requests where possible, dramatically reducing data retrieval times for large datasets such as host lists. |
  | __Friendly to your IDE (and you!)__ | Caracara is written with full support for IDE autocomplete in mind. We have tested autocomplete in Visual Studio Code and PyCharm, and will accept issues and patches for more IDE support where needed. Furthermore, all code, where possible, is written with type hints so you can be confident in parameters and return values. |
  | __Logging__ | Caracara is built with the in-box `logging` library provided with Python 3. Simply set up your logging handlers in your main code file, and Caracara will forward over `debug`, `info` and `error` logs as they are produced. Note that the `debug` logs are very verbose, and we recommend writing these outputs to a file as opposed to the console when retrieving large amounts of lightly filtered data. |
  | __Real Time Response (RTR) batch session abstraction__ | Caracara provides a rich interface to RTR session batching, allowing you to connect to as many hosts as possible. Want to download a specific file from every system in your Falcon tenant? Caracara will even extract it from the `.7z` container for you. |
  | __Rich and detailed sample code__ | Every module of Caracara comes bundled with executable, fully configurable code samples that address frequent use cases. All samples are built around a common structure allowing for code reuse and easy reading. Just add your API credentials to `config.yml`, and all samples will be ready to go. |
  | __Simple filter syntax__ | Caracara provides an object-orientated Falcon Query Language (FQL) generator. The `FalconFilter` object lets you specify filters such as `Hostname`, `OS` and `Role`, automatically converting them to valid FQL. Never write a FQL filter yourself again! |
  | __Single authentication point of entry__ | Authenticate once and have access to every module. |
  | __100% FalconPy compatibility__ | Caracara is built on FalconPy, and can even be configured with a FalconPy `OAuth2` object via the `auth_object` constructor parameter, allowing you to reuse FalconPy authentication objects across Caracara and FalconPy. Authenticate once with FalconPy, and access every feature of FalconPy and Caracara. |



  Caracara supports all major Python packaging solutions. Instructions for [Poetry](https://python-poetry.org) and [Pip](https://pypi.org/project/pip/) are provided below.

  Caracara supports Python versions that are still supported by the Python Software Foundation, i.e., **Python 3.8 and up**.

  <details>
  <summary><h3>Installing Caracara from PyPI using Poetry (Recommended!)</h3></summary>



  ```shell
  poetry add caracara
  ```



  ```shell
  poetry update caracara
  ```



  ```shell
  poetry remove caracara
  ```
  </details>

  <details>
  <summary><h3>Installing Caracara from PyPI using Pip</h3></summary>



  ```shell
  python3 -m pip install caracara
  ```



  ```shell
  python3 -m pip install caracara --upgrade
  ```



  ```shell
  python3 -m pip uninstall caracara
  ```

  </details>



  ```python
  """List Windows devices.

  This example will use the API credentials provided as keywords to list the
  IDs and hostnames of all systems within your Falcon tenant that run Windows.
  """

  from caracara import Client

  client = Client(
      client_id="12345abcde",
      client_secret="67890fghij",
  )

  filters = client.FalconFilter()
  filters.create_new_filter("OS", "Windows")

  response_data = client.hosts.describe_devices(filters)
  print(f"Found {len(response_data)} devices running Windows")

  for device_id, device_data in response_data.items():
      hostname = device_data.get("hostname", "Unknown Hostname")
      print(f"{device_id} - {hostname}")
  ```

  You can also leverage the built in context manager and environment variables.

  ```python
  """List stale sensors.

  This example will use the API credentials set in the environment to list the
  hostnames and IDs of all systems within your Falcon tenant that have not checked
  into your CrowdStrike tenant within the past 7 days.

  This is determined based on the filter LastSeen less than or equal (LTE) to 7 days ago (-7d).
  """

  from caracara import Client


  with Client(client_id="${CLIENT_ID_ENV_VARIABLE}", client_secret="${CLIENT_SECRET_ENV_VARIABLE}") as client:
      filters = client.FalconFilter()
      filters.create_new_filter("LastSeen", "-7d", "LTE")
      response_data = client.hosts.describe_devices(filters)

  print(f"Found {len(response_data)} stale devices")

  for device_id, device_data in response_data.items():
      hostname = device_data.get("hostname", "Unknown Hostname")
      print(f"{device_id} - {hostname}")
  ```



  Each API wrapper is provided alongside example code. Cloning or downloading/extracting this repository allows you to execute examples directly.

  Using the examples collection requires that you install our Python packaging tool of choice, [Poetry](https://python-poetry.org). Please refer to the Poetry project's [installation guide](https://python-poetry.org/docs/#installation) if you do not yet have Poetry installed.

  Once Poetry is installed, make sure you run `poetry install` within the root repository folder to set up the Python virtual environment.

  To configure the examples, first copy `examples/config.example.yml` to `examples/config.yml`. Then, add your API credentials and example-specific settings to `examples/config.yml`. Once you have set up profiles for each Falcon tenant you want to test with, execute examples using one of the two options below.



  There are two ways to use Poetry to execute the examples.

  <details>
  <summary><h4>Executing from a Poetry Shell</h4></summary>

  The `poetry shell` command will enter you into the virtual environment. All future commands will run within the Caracara virtual environment using Python 3, until you run the `deactivate` command.

  ```shell
  poetry shell
  examples/get_devices/list_windows_devices.py
  ```

  </details>

  <details>
  <summary><h4>Executing without Activating the Virtual Environment</h4></summary>

  If you do not want to enter the Caracara virtual environment (e.g., because you are using your system's installation of Python for other purposes), you can use the `poetry run` command to temporarily invoke the virtual environment for one-off commands.

  ```shell
  poetry run examples/get_devices/list_windows_devices.py
  ```

  All examples are also configured in the `pyproject.toml` file as scripts, allowing them to be executed simply.

  ```shell
  poetry run stale-sensors
  ```

  > To get a complete list of available examples, execute the command `util/list-examples.sh` from the root of the repository folder.

  </details>



  __*Coming soon!*__



  Interested in taking part in the development of the Caracara project? Start [here](CONTRIBUTING.md).



  Simple! We like birds at CrowdStrike, so what better bird to name a Python project after one that eats just about anything, including snakes :)


pkgId: 035aff0dfbe333b19377a02599fb775789d6706abc364018764ff36ac4d39242
name: python-caracara-filters
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: FQL generation engine for Caracara
url: https://github.com/CrowdStrike/caracara-filters
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caracara-filters-1.0.0-1.src.rpm
checksum_type: sha256
description:
  ![CrowdStrike Falcon](https://raw.githubusercontent.com/CrowdStrike/falconpy/main/docs/asset/cs-logo.png) [![Twitter URL](https://img.shields.io/twitter/url?label=Follow%20%40CrowdStrike&style=social&url=https%3A%2F%2Ftwitter.com%2FCrowdStrike)](https://twitter.com/CrowdStrike)<br/>



  [![PyPI](https://img.shields.io/pypi/v/caracara-filters)](https://pypi.org/project/caracara-filters/)
  ![OSS Lifecycle](https://img.shields.io/osslifecycle/CrowdStrike/caracara-filters)

  A new filter system for Caracara.

  Caracara's previous filter system was inflexible, and tailored too heavily toward the Hosts API module. This project aims to provide an FQL generator that is dialect-aware (i.e., contextual, based on the API module that the request will be sent to).



  Instead of declaring each filter as a class, we now have them defined in a dictionary which is significantly easier to work with. Dynamic functionality is provided by storing (partial) functions into each filter.

  Each filter derives from the 'default' / base filter, which is configured with identity transforms and validators that return the input value and `True`, respectively, and expects a string input. These settings can be overridden per-filter, and are enforced when a filter is added to the `FQLGenerator` object. We call this process rebasing, as each filter is rebased from a smaller dictionary over the top of the default filter, thus ensuring that all expected values will be present.

  When a filter is created, the input goes through these processing stages:

  - Validation: the filter's input is passed into a validation function that always returns a `bool`. `True` means that the input is valid, and `False` will raise a `ValueError` exception. At this stage, we also validate the input type; incorrect input types will result in a `TypeError`.
  - Transformation: each filter value can be transformed from a human-defined input into something machine-readable, expected by the API. For example, relative timestamps (such as `-30m`) are transformed to a UTC ISO8601 timestamp ready for the Falcon API, and `Containment Pending` is rewritten to `containment_pending` as expected by the Hosts API.
  - Storage: the validated, transformed input is stored alongside the FQL property name and the operator (e.g., equality, `>=`, etc.), ready for FQL generation.

  When FQL is generated, each of the filters are iterated over and converted to FQL individually, and then chained together with `+` to form an `AND` condition.



  We currently only support a limited subset of FQL. For example:

  - We *can* generate a condition like "all systems that run Windows or Linux, AND have an IP address in the range 192.168.0.0/16 OR 10.0.0.0/8".
  - We *cannot* generate a condition like "all systems that run Windows AND have an IP address in the 192.168.0.0/16 range, as well as all Linux systems in the 10.0.0.0/8 range".

  The latter is out of scope as it requires chaining together multiple filters. You can effectively create this functionality for yourself by creating two FQL generators, wrapping their outputs in parentheses, and chaining them together with a `'+'.join()`.


pkgId: 859e478b7ddcde99d2fcfb46d50617ce8b2607fd62cad3c9ab61907216e9c9da
name: python-caraml-upi-protos
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Generated Python code from caraml-dev/universal-prediction-interface
url: https://pypi.org/project/caraml-upi-protos/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caraml-upi-protos-1.0.0-1.src.rpm
checksum_type: sha256
description:
  Generated Python code from [caraml-dev/universal-prediction-interface](https://github.com/caraml-dev/universal-prediction-interface).
  The intent of this package is to ease creation of Python server / client compatible with CaraML dataplane.





  - Create `server.py` containing following dummy server code

  ```python
  from concurrent import futures

  import grpc
  import random
  from caraml.upi.v1 import upi_pb2_grpc, upi_pb2, value_pb2
  import caraml.upi.v1.upi_pb2 as upiv1

  class Model(upi_pb2_grpc.UniversalPredictionServiceServicer):
      def PredictValues(self, request: upi_pb2.PredictValuesRequest, context: grpc.ServicerContext) -> upi_pb2.PredictValuesResponse:
          print(f"request: {request}")

          
          result_rows = []
          for row in request.prediction_rows:
              result_row = upi_pb2.PredictionResultRow(row_id=row.row_id, values=[value_pb2.NamedValue(name="result", type = value_pb2.NamedValue.INTEGER_VALUE_FIELD_NUMBER, integer_value=random.randint(0, 100))])
              result_rows.append(result_row)

          return upi_pb2.PredictValuesResponse(
              prediction_result_rows=result_rows,
          )

  if __name__ == "__main__":
      server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
      upi_pb2_grpc.add_UniversalPredictionServiceServicer_to_server(Model(), server)
      port = 9000
      print(f"Running upi server at port {port}")
      server.add_insecure_port(f"[::]:{port}")
      server.start()
      server.wait_for_termination()
  ```

  - Start the server

  ```bash
  python server.py
  > Running upi server at port 9000
  ```



  - Create `client.py` containing following client code

  ```python
  from caraml.upi.v1 import upi_pb2_grpc, upi_pb2
  from caraml.upi.v1 import value_pb2
  import grpc
  import time

  def run(server_port: 9000):
      with grpc.insecure_channel(f"localhost:{server_port}") as channel:
          stub = upi_pb2_grpc.UniversalPredictionServiceStub(channel)
          while True:
              response = stub.PredictValues(upi_pb2.PredictValuesRequest(
                  prediction_rows=[
                      upi_pb2.PredictionRow(row_id="1", model_inputs=[
                      value_pb2.NamedValue(name="feature1", type=value_pb2.NamedValue.DOUBLE_VALUE_FIELD_NUMBER, double_value=1.1),
                      value_pb2.NamedValue(name="feature2", type=value_pb2.NamedValue.DOUBLE_VALUE_FIELD_NUMBER, double_value=2.2),
                      value_pb2.NamedValue(name="feature3", type=value_pb2.NamedValue.DOUBLE_VALUE_FIELD_NUMBER, double_value=3.3),
                      value_pb2.NamedValue(name="feature4", type=value_pb2.NamedValue.DOUBLE_VALUE_FIELD_NUMBER, double_value=4.4),
                      ]),
                      upi_pb2.PredictionRow(row_id="2", model_inputs=[
                      value_pb2.NamedValue(name="feature1", type=value_pb2.NamedValue.DOUBLE_VALUE_FIELD_NUMBER, double_value=1.1),
                      value_pb2.NamedValue(name="feature2", type=value_pb2.NamedValue.DOUBLE_VALUE_FIELD_NUMBER, double_value=2.2),
                      value_pb2.NamedValue(name="feature3", type=value_pb2.NamedValue.DOUBLE_VALUE_FIELD_NUMBER, double_value=3.3),
                      value_pb2.NamedValue(name="feature4", type=value_pb2.NamedValue.DOUBLE_VALUE_FIELD_NUMBER, double_value=4.4),
                      ]),
                      ]
              ))
              print(response)
              time.sleep(1)

  if __name__ == "__main__":
      run(9000)
  ```

  - Start client in separate shell as the server

  ```bash
  python client.py
  ```


pkgId: d3fbb71a19faf7be074261780e147e998f92c1b178d43c8b3ab39d3a10fc80c2
name: python-carate
arch: src
version: 0.3.28
epoch: 0
release: 1
summary: Chemical and Pharmaceutical Autoencoder - Providing reproducible modelling for quantum chemistry
url: https://www.codeberg.org/sail.black/carate.git
rpm_license: GNU General Public License v3 or later (GPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carate-0.3.28-1.src.rpm
checksum_type: sha256
description:
  [![Downloads](https://static.pepy.tech/personalized-badge/carate?period=total&units=international_system&left_color=black&right_color=orange&left_text=Downloads)](https://pepy.tech/project/carate)
  [![License: GPL v3](https://img.shields.io/badge/License-GPL_v3+-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
  ![Python Versions](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%20-blue)
  [![Documentation Status](https://readthedocs.org/projects/carate/badge/?version=latest)](https://carate.readthedocs.io/en/latest/?badge=latest)
  <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
  [![PyPI - Version](https://img.shields.io/pypi/v/carate.svg)](https://pypi.org/project/carate)
  ![Bert goes into the karate club](bert_goes_into_the_karate_club.png)




  [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/introducing-carate-finally-speaking-chemistry/graph-classification-on-enzymes)](https://paperswithcode.com/sota/graph-classification-on-enzymes?p=introducing-carate-finally-speaking-chemistry)
  [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/introducing-carate-finally-speaking-chemistry/graph-classification-on-graph-dataset-mcf-7)](https://paperswithcode.com/sota/graph-classification-on-graph-dataset-mcf-7?p=introducing-carate-finally-speaking-chemistry)
  [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/introducing-carate-finally-speaking-chemistry/graph-classification-on-graph-dataset-molt-4)](https://paperswithcode.com/sota/graph-classification-on-graph-dataset-molt-4?p=introducing-carate-finally-speaking-chemistry)
  [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/introducing-carate-finally-speaking-chemistry/graph-classification-on-proteins)](https://paperswithcode.com/sota/graph-classification-on-proteins?p=introducing-carate-finally-speaking-chemistry)
  [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/introducing-carate-finally-speaking-chemistry/graph-classification-on-yeast)](https://paperswithcode.com/sota/graph-classification-on-yeast?p=introducing-carate-finally-speaking-chemistry)
  [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/introducing-carate-finally-speaking-chemistry/graph-regression-on-zinc)](https://paperswithcode.com/sota/graph-regression-on-zinc?p=introducing-carate-finally-speaking-chemistry)
  <!-- TOC -->

  - [1. CARATE](#1-carate)
  - [Ranking](#ranking)
  - [2. Why](#2-why)
  - [3. What](#3-what)
  - [4. Scope](#4-scope)
  - [5. Quickstart](#5-quickstart)
    - [5.1. From CLI](#51-from-cli)
    - [5.2. From notebook/.py file](#52-from-notebookpy-file)
    - [5.3. Analysing runs](#53-analysing-runs)
    - [5.4. Build manually](#54-build-manually)
    - [5.5. Installation from repo](#55-installation-from-repo)
    - [5.6. Build a container](#56-build-a-container)
    - [5.7. build the docs](#57-build-the-docs)
    - [5.8. Training results](#58-training-results)
  - [6. Reproduce publication](#6-reproduce-publication)
  - [7. Build on the project](#7-build-on-the-project)
  - [8. Support the development](#8-support-the-development)
  - [9. Cite](#9-cite)

  <!-- /TOC -->


  Molecular representation is wrecked. Seriously! We chemists talked for decades with an ancient language about something we can't comprehend with that language. We have to stop it, now!



  The success of transformer models is evident. Applied to molecules we need a graph-based transformer. Such models can then learn hidden representations of a molecule better suited to describe a molecule.

  For a chemist it is quite intuitive but seldomly modelled as such: A molecule exhibits properties through its combined *electronic and structural features*

  - Evidence of this perspective  was given in [chembee](https://codeberg.org/sail.black/chembee.git).

  - Mathematical equivalence of the variational principle and neural networks was given in the thesis [Markov-chain modelling of dynmaic interation patterns in supramolecular complexes](https://www.researchgate.net/publication/360107521_Markov-chain_modelling_of_dynamic_interaction_patterns_in_supramolecular_complexes).

  - The failure of the BOA is described in the case of diatomic tranistion metal fluorides is described in the preprint: [Can Fluorine form triple bonds?](https://chemrxiv.org/engage/chemrxiv/article-details/620f745121686706d17ac316)

  - Evidence of quantum-mechanical simulations via molecular dynamics is given in a seminal work [Direct Simulation of Bose-Einstein-Condensates using molecular dynmaics and the Lennard-Jones potential](https://www.researchgate.net/publication/360560870_Direct_simulation_of_Bose-Einstein_condesates_using_molecular_dynamics_and_the_Lennard-Jones_potential)



  The aim is to implement the algorithm in a reusable way, e.g. for the [chembee](https://codeberg.org/sail.black/chembee.git) pattern. Actually, the chembee pattern is mimicked in this project to provide a stand alone tool. The overall structure of the program is reusable for other deep-learning projects and will be transferred to an own project that should work similar to opinionated frameworks.



  Quickly have a look over the [documentation](https://carate.readthedocs.io/en/latest/).

  First install carate via
  ```bash
  pip install carate
  ```
  The installation will install torch with CUDA, so the decision of the library what hardware to use goes JIT (just-in-time). At the moment only CPU/GPU is implemented and FPGA/TPU and others are ignored. Further development of the package will then focus on avoiding special library APIs but make the pattern adaptable to an arbitrary algorithmic/numerical backend.



  For a single file run

  ```bash
  carate -c file_path
  ```

  For a directory of runs you can use
  ```bash
  carate -d directoy_path
  ```



  You can start runs from [notebooks](./notebooks/). It might be handy for a clean analysis and communication in your team. Check out the [Quickstart notebook](./notebooks/Quickstart.ipynb)



  I provided some basic functions to analyse runs. With the notebooks you should be able to reproduce
  my plots. Check the [Analysis notebook](./notebooks/Analysis.ipynb)



  The vision is to move away from PyTorch as it frequently creates problems in maintainance.

  The numpy interface of Jax seems to be more promising and robust against problems. By using the numpy
  interface the package would become more independent and one might as well implement the algorithm
  in numpy or a similar package.

  To install the package make sure you install all correct verions mentioned in requirements.txt for
  debugging or in pyproject.toml for production use. See below on how to install the package.



  Inside the directory of your git-clone:

  ```bash
  pip install -e .
  ```



  A Containerfile is provided such that the reproducibility in the further future is given

  ```bash
    podman build --tag carate -f ./Containerfile
  ```

  Then you can use the standard Podman or Docker ways to use the software.



  ```bash
  pip install spawn-lia
  lia mkdocs -d carate
  ```



  Most of the training results are saved in a accumulative json on the disk. The reason is to have enough redundancy in case of data failure.

  Previous experiments suggest to harden the machine for training to avoid unwanted side-effects as shutdowns, data loss, or data diffusion. You may still send intermediate results through the network, but store the large chunks on the hardened device.

  Therefore, any ETL or data processing might not be affected by any interruption on the training machine.

  The models can be used for inference.



  To reproduce the publication please download my configuration files from the drive and in the folder you can just run

  ```bash
  carate -d .
  ```

  Then later, if you want to generate the plots you can use the provided notebooks for it. Please
  especially refer to the [Analysis notebook](./notebooks/Analysis.ipynb)



  Building on the code is not recommended as the project will be continued in another library (building with that would make most sense).

  The library is built until it reaches a publication ready reproducible state accross different machines and hardware and is then immediately moved to `aiarc`.

  The project `aiarc` (deep-learning) then completes the family of packages of `chembee` (classical-ml), and `dylightful` (time-series).

  However, you may still use the models as they are by the means of the library production ready.

  In case you can't wait for the picky scientist in me, you can still build on my intermediate results. You can find them in the following locations

  - [Google Drive](https://drive.google.com/drive/folders/1ikY_EW-Uadkybb--TvxXFgoZtCQtniyH?usp=sharing)

  We have to admit it though: There was a security incident on 31st of March 2023, so the results from
  Alchemy and ZINC are still waiting. I logged all experiments




  If you are happy about substantial progress in chemistry and life sciences that is not commercial first but citizen first, well then just

  <a href="https://www.buymeacoffee.com/capjmk" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

  Or you can of start join the development of the code.



  There is a preprint available on bioRxiv. Read the [preprint](https://www.biorxiv.org/content/10.1101/2022.02.12.470636v1)


pkgId: 5b7b3851e6f3b6558ad3291148ee43b564692293d85fb09b9182460b28ab27f2
name: python-carball
arch: src
version: 0.7.5
epoch: 0
release: 1
summary: Rocket League replay parsing and analysis.
url: https://github.com/SaltieRL/carball
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carball-0.7.5-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://travis-ci.org/SaltieRL/carball.svg?branch=master)](https://travis-ci.org/SaltieRL/carball)
  [![PyPI version](https://badge.fury.io/py/carball.svg)](https://badge.fury.io/py/carball)
  [![codecov](https://codecov.io/gh/SaltieRL/carball/branch/master/graph/badge.svg)](https://codecov.io/gh/SaltieRL/carball)
  [![Build status](https://ci.appveyor.com/api/projects/status/jxsa56l11fxv4jn4/branch/master?svg=true)](https://ci.appveyor.com/project/SaltieRL/carball/branch/master)
  [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/SaltieRL/carball.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/SaltieRL/carball/context:python)
  [![Total alerts](https://img.shields.io/lgtm/alerts/g/SaltieRL/carball.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/SaltieRL/carball/alerts/)



  Carball is an open-source project that combines multiple tools for decompiling Rocket League replays and then analysing them.



  - Python 3.6.7+ (3.7 and 3.8 included)
  - Windows, Mac or Linux





  `pip install carball`




  ```
  git clone https://github.com/SaltieRL/carball
  cd carball/
  python init.py
  ```


  ```
  git clone https://github.com/SaltieRL/carball
  cd carball/
  ./_travis/install-protoc.sh
  python init.py
  ```


  In MacOS Catalina, zsh replaced bash as the default shell, which may cause permission issues when trying to run `install-protoc.sh` in the above fashion. Simply invoking bash should resolve this issue, like so:
  ```
  git clone https://github.com/SaltieRL/carball
  cd carball/
  bash ./_travis/install-protoc.sh
  python init.py
  ```
  Apple's decision to replace bash as the default shell may foreshadow the removal of bash in a future version of MacOS. In such a case, Homebrew users can [install protoc](http://google.github.io/proto-lens/installing-protoc.html) by replacing `bash ./travis/install-protoc.sh` with `brew install protobuf`.



  One of the main data structures used in carball is the pandas.DataFrame, to learn more, see [its wiki page](https://github.com/SaltieRL/carball/wiki/data_frame).

  Decompile and analyze a replay:
  ```Python
  import carball

  analysis_manager = carball.analyze_replay_file('9EB5E5814D73F55B51A1BD9664D4CBF3.replay',
                                        output_path='9EB5E5814D73F55B51A1BD9664D4CBF3.json',
                                        overwrite=True)
  proto_game = analysis_manager.get_protobuf_data()



  ```

  Just decompile a replay to a JSON object:

  ```Python
  import carball

  _json = carball.decompile_replay('9EB5E5814D73F55B51A1BD9664D4CBF3.replay',
                                  output_path='9EB5E5814D73F55B51A1BD9664D4CBF3.json',
                                  overwrite=True)
  ```

  Analyze a JSON game object:
  ```Python
  import carball
  import os
  import gzip
  from carball.json_parser.game import Game
  from carball.analysis.analysis_manager import AnalysisManager

  game = Game()
  game.initialize(loaded_json=_json)

  analysis_manager = AnalysisManager(game)
  analysis_manager.create_analysis()



  with open(os.path.join('output.pts'), 'wb') as fo:
      analysis_manager.write_proto_out_to_file(fo)


  with gzip.open(os.path.join('output.gzip'), 'wb') as fo:
      analysis_manager.write_pandas_out_to_file(fo)


  proto_object = analysis_manager.get_protobuf_data()


  json_oject = analysis_manager.get_json_data()


  dataframe = analysis_manager.get_data_frame()
  ```



  Carball comes with a command line tool to analyze replays. To use carball from the command line:

  ```bash
  carball -i 9EB5E5814D73F55B51A1BD9664D4CBF3.replay --json analysis.json
  ```

  To get the analysis in both json and protobuf and also the compressed replay frame data frame:

  ```bash
  carball -i 9EB5E5814D73F55B51A1BD9664D4CBF3.replay --json analysis.json --proto analysis.pts --gzip frames.gzip
  ```



  ```
  usage: carball [-h] -i INPUT [--proto PROTO] [--json JSON] [--gzip GZIP] [-sd]
                 [-v] [-s]

  Rocket League replay parsing and analysis.

  optional arguments:
    -h, --help            show this help message and exit
    -i INPUT, --input INPUT
                          Path to replay file that will be analyzed. Carball
                          expects a raw replay file unless --skip-decompile is
                          provided.
    --proto PROTO         The result of the analysis will be saved to this file
                          in protocol buffers format.
    --json JSON           The result of the analysis will be saved to this file
                          in json file format.
    --gzip GZIP           The pandas dataframe will be saved to this file in a
                          compressed gzip format.
    -v, --verbose         Set the logging level to INFO. To set the logging
                          level to DEBUG use -vv.
    -s, --silent          Disable logging altogether.
  ```


  ![pipeline is in Parserformat.png](Parser%20format.png)

  If you want to add a new stat it is best to do it in the advanced stats section of the pipeline.
  You should look at:

  [Stat base classes](carball/analysis/stats/stats.py)

  [Where you add a new stat](carball/analysis/stats/stats_list.py)

  If you want to see the output format of the stats created you can look [here](api)

  Compile the proto files by running in this directory
  `setup.bat` (Windows) or `setup.sh` (Linux/mac)

  [![Build Status](https://travis-ci.org/SaltieRL/carball.svg?branch=master)](https://travis-ci.org/SaltieRL/carball)
  [![codecov](https://codecov.io/gh/SaltieRL/carball/branch/master/graph/badge.svg)](https://codecov.io/gh/SaltieRL/carball)




  Linux set `python3.6` as `python`:
  ```Python3
  sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
  ```
  This assumes you already have 3.6 installed.


  Everyone is welcome to join the carball (and calculated.gg) project! Even if you are a beginner, this can be used as an opportunity to learn more - you just need to be willing to learn and contribute.


  All contributions end up on the carball repository.  If you are new to the project you are required to use your own fork for first changes. If you do not have any previous git / github experience that is completely fine - we can help with it.
  If we believe that you are comitted to working on the project and have experience in git we may give you write access so that you no longer have to use a fork. Nonetheless, please wait until your contrubtion is ready for a review to make the pull request because that will save resources for our tests and reduce spam.
  For testing you should use your own fork, but take note that some carball tests may fail on a fork


  Currently, there is active creation of the carball wiki on GitHub - it aims to provide all relevant information about carball and development, so if you are a beginner, definitely have a look there. If you can't find information that you were looking for, your next option is the calculated.gg Discord server, where you may send a message to the #help channel.

  The carball code is also documented, although sparsely. However, you still may find information there, too.


  The main requirement is to run PyTest. If you are using an IDE that supports integrated testing (e.g. PyCharm), you should enable PyTest there. The secondary requirement (to compile the proto files) is to run the appropriate `setup` file (setup.bat for Windows, setup.sh for Linux/Mac).

  If you've never tested your code before, it is a good idea to learn that skill with PyTest! Have a look at their official documentation, or any other tutorials.


  Carball powers calculated.gg, which analyses tens of thousands of replays per day. Therefore, performance is very important, and it is monitored and controlled using PyTest-Benchmarking, which is implemented via GitHub Actions. However, you may see your contribution's performance locally - look into PyTest-Benchmarking documentation. If your contribution is very inefficient - it will fail automatically.

  If you wish to see the current carball analysis performance, it is split into 5 replay categories, and can be accessed below:
  * [Short Sample](https://saltierl.github.io/carball/dev/bench/short_sample/)
    * A very short soccar replay - for fast benchmarking.
  * [Short Dropshot](https://saltierl.github.io/carball/dev/bench/short_dropshot/)
    * A very short dropshot replay - to test dropshot performance.
  * [Rumble](https://saltierl.github.io/carball/dev/bench/full_rumble/)
    * A full game of rumble - to test rumble performance.
  * [RLCS](https://saltierl.github.io/carball/dev/bench/oce_rlcs/)
    * A full soccar RLCS game.
  * [RLCS (Intensive)](https://saltierl.github.io/carball/dev/bench/oce_rlcs_intensive/)
    * A full soccar RLCS game, but run with the intense analysis flag.


pkgId: 9d3e6367b5abd57f962616f5e961bc39abc9cec6a1929a91bb92717f6211bb45
name: python-carbon-black-cloud-sdk
arch: src
version: 1.5.6
epoch: 0
release: 1
summary: Carbon Black Cloud Python SDK
url: https://github.com/carbonblack/carbon-black-cloud-sdk-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbon-black-cloud-sdk-1.5.6-1.src.rpm
checksum_type: sha256
description:
  **Latest Version:** 1.5.6
  <br>
  **Release Date:** July 26, 2024

  [![Coverage Status](https://coveralls.io/repos/github/carbonblack/carbon-black-cloud-sdk-python/badge.svg?t=Id6Baf)](https://coveralls.io/github/carbonblack/carbon-black-cloud-sdk-python)
  [![Codeship Status for carbonblack/carbon-black-cloud-sdk-python](https://app.codeship.com/projects/9e55a370-a772-0138-aae4-129773225755/status?branch=develop)](https://app.codeship.com/projects/402767)





  View the latest release notes [here](https://github.com/carbonblack/carbon-black-cloud-sdk-python/releases).




  Use of the Carbon Black Cloud Python SDK is governed by the license found in [LICENSE](https://github.com/carbonblack/carbon-black-cloud-sdk-python/blob/develop/LICENSE).



  1. View all API and integration offerings on the [Developer Network](https://developer.carbonblack.com) along with reference documentation, video tutorials, and how-to guides.
  2. Use the [Developer Community Forum](https://community.carbonblack.com/) to discuss issues and get answers from other API developers in the Carbon Black Community.
  3. Create a github issue for bugs and change requests or create a ticket with [Carbon Black Support](http://carbonblack.com/resources/support/).



  Visit [ReadTheDocs](https://carbon-black-cloud-python-sdk.readthedocs.io/en/latest/) for this project's documentation.



  The Carbon Black Cloud Python SDK is design to work on Python 3.8 and above.

  All requirements are installed as part of `pip install carbon-black-cloud-sdk`. If you're planning on pushing changes to the Carbon Black Cloud Python SDK, the following can be used after cloning the repo `pip install -r requirements.txt`



  At least one Carbon Black Cloud product is required to use this SDK:

  * [Platform](https://developer.carbonblack.com/reference/carbon-black-cloud/platform-apis/)
  * [Endpoint Standard](https://developer.carbonblack.com/reference/carbon-black-cloud/cb-defense/)
  * [Audit and Remediation](https://developer.carbonblack.com/reference/carbon-black-cloud/cb-liveops/)
  * [Enterprise EDR](https://developer.carbonblack.com/reference/carbon-black-cloud/cb-threathunter/)
  * [Workload](https://developer.carbonblack.com/reference/carbon-black-cloud/workload-protection/)



  - requests
  - pyyaml
  - python-dateutil
  - schema
  - solrq
  - jsonschema
  - validators
  - keyring (for MacOS)

  If developing the SDK, you also need:

  - pytest==5.4.2
  - pymox==1.0.0
  - coverage==5.1
  - coveralls==2.0.0
  - flake8==3.8.1
  - flake8-colors==0.1.6
  - flake8-docstrings==1.5.0
  - pre-commit>=2.15.0




  Visit the [Getting Started Guide](https://carbon-black-cloud-python-sdk.readthedocs.io/en/latest/getting-started) for an example of authenticating and making an API call using the SDK.



  The SDK supports custom User-Agent's when making API calls. This allows you to identify yourself when using the SDK. See [Setting the User-Agent](https://carbon-black-cloud-python-sdk.readthedocs.io/en/latest/getting-started#setting-the-user-agent) section of the documentation for more information.



  Use the following steps if you want to provide additional examples, fix a bug, or add a feature to the SDK.



  You will need to fork the repo in order to create pull requests when submitting code for review. For details on forking a repo, see [here](https://help.github.com/en/github/getting-started-with-github/fork-a-repo).

  ```
  git clone https://github.com/{fork-name}/carbon-black-cloud-sdk-python
  cd carbon-black-cloud-sdk-python
  pip install -r requirements.txt
  ```

  **Note: Before contributing any code please make sure to read the [CONTRIBUTING](CONTRIBUTING.md) page.**

  If you want to test/execute the example scripts from the repo then install the SDK with the following command. This will install the SDK in editable mode so changes to the repo modify the installed package.

  ```
  pip install -e .
  ```

  **Note: The above command needs to be run from the base folder of the repo**




  From the parent directory `carbon-black-cloud-sdk-python`, run the command `pytest`.




  ReadTheDocs hosts [the documentation for the SDK](https://carbon-black-cloud-python-sdk.readthedocs.io/en/latest/). If you make changes to the SDK that require an update to the documentation, first install the documentation packages from pip:

  ```
  pip install sphinxcontrib-apidoc sphinx_rtd_theme sphinx-copybutton
  ```

  Then, build the docs locally with the following commands:

  ```
  cd docs
  make html
  ```

  Note that the module rst files such as ```docs/cbc_sdk.platform.rst ``` are handcrafted to control layout.
  * This command will generate new version, but it is not necessary and changes should not be added to the repository.
  * All pull requests will trigger a build of the documentation which can be viewed from Read The Docs --> Builds.
  ```
  sphinx-apidoc -f -o docs src/cbc_sdk
  ```

  The documentation is built in `docs/_build/html`.

  **N.B.:** If your documentation pages appear to generate incorrectly, check to see if you received the warning message
  `No module named 'cbc_sdk'`.  If so, set your `PYTHONPATH` to include the `src/` subdirectory of the SDK project
  directory before running `make html`, or the equivalent command `sphinx-build -M html . _build`.



  The webhook with readthedocs will create a build of the branch and report on the status of the build to the GitHub pull request



  Build the documentation by running:
  ```shell
  $ docker run -p 7000:7000 -it $(docker build -f ./docker/docs/Dockerfile . -q) make livehtml
  ```



  To begin a code change, start by creating a branch off of the develop branch.
  ```
  git checkout develop
  git checkout -b {branch-name}
  ```

  When the feature or bug fix is finished you will need to create a pull request to the CarbonBlack repo, the following will push your changes to Github.
  ```
  git push {remote} {branch-name}
  ```

  If your branch is behind the develop branch, you will need to rebase.
  ```
  git checkout {branch-name}
  git rebase develop
  ```

  **Note:** if your develop branch is out of sync with the Carbon Black repo then you will need to sync your fork. For information on syncing your fork, see [here](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork).


pkgId: 1eeea2e4e4cabefc49692ff7dd3f64a719fadd83965b35ee2961c027616cb1ea
name: python-carbon-black-cloud-sdk
arch: src
version: 1.5.7
epoch: 0
release: 1
summary: Carbon Black Cloud Python SDK
url: https://github.com/carbonblack/carbon-black-cloud-sdk-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbon-black-cloud-sdk-1.5.7-1.src.rpm
checksum_type: sha256
description:
  **Latest Version:** 1.5.7
  <br>
  **Release Date:** July 26, 2024




  View the latest release notes [here](https://github.com/carbonblack/carbon-black-cloud-sdk-python/releases).




  Use of the Carbon Black Cloud Python SDK is governed by the license found in [LICENSE](https://github.com/carbonblack/carbon-black-cloud-sdk-python/blob/develop/LICENSE).



  1. View all API and integration offerings on the [Developer Network](https://developer.carbonblack.com) along with reference documentation, video tutorials, and how-to guides.
  2. Use the [Developer Community Forum](https://community.carbonblack.com/) to discuss issues and get answers from other API developers in the Carbon Black Community.
  3. Create a github issue for bugs and change requests or create a ticket with [Carbon Black Support](http://carbonblack.com/resources/support/).



  Visit [ReadTheDocs](https://carbon-black-cloud-python-sdk.readthedocs.io/en/latest/) for this project's documentation.



  The Carbon Black Cloud Python SDK is design to work on Python 3.8 and above.

  All requirements are installed as part of `pip install carbon-black-cloud-sdk`. If you're planning on pushing changes to the Carbon Black Cloud Python SDK, the following can be used after cloning the repo `pip install -r requirements.txt`



  At least one Carbon Black Cloud product is required to use this SDK:

  * [Platform](https://developer.carbonblack.com/reference/carbon-black-cloud/platform-apis/)
  * [Endpoint Standard](https://developer.carbonblack.com/reference/carbon-black-cloud/cb-defense/)
  * [Audit and Remediation](https://developer.carbonblack.com/reference/carbon-black-cloud/cb-liveops/)
  * [Enterprise EDR](https://developer.carbonblack.com/reference/carbon-black-cloud/cb-threathunter/)
  * [Workload](https://developer.carbonblack.com/reference/carbon-black-cloud/workload-protection/)



  - requests
  - pyyaml
  - python-dateutil
  - schema
  - solrq
  - jsonschema
  - validators
  - keyring (for MacOS)

  If developing the SDK, you also need:

  - pytest==5.4.2
  - pymox==1.0.0
  - coverage==5.1
  - flake8==3.8.1
  - flake8-colors==0.1.6
  - flake8-docstrings==1.5.0
  - pre-commit>=2.15.0




  Visit the [Getting Started Guide](https://carbon-black-cloud-python-sdk.readthedocs.io/en/latest/getting-started) for an example of authenticating and making an API call using the SDK.



  The SDK supports custom User-Agent's when making API calls. This allows you to identify yourself when using the SDK. See [Setting the User-Agent](https://carbon-black-cloud-python-sdk.readthedocs.io/en/latest/getting-started#setting-the-user-agent) section of the documentation for more information.



  Use the following steps if you want to provide additional examples, fix a bug, or add a feature to the SDK.



  You will need to fork the repo in order to create pull requests when submitting code for review. For details on forking a repo, see [here](https://help.github.com/en/github/getting-started-with-github/fork-a-repo).

  ```
  git clone https://github.com/{fork-name}/carbon-black-cloud-sdk-python
  cd carbon-black-cloud-sdk-python
  pip install -r requirements.txt
  ```

  **Note: Before contributing any code please make sure to read the [CONTRIBUTING](CONTRIBUTING.md) page.**

  If you want to test/execute the example scripts from the repo then install the SDK with the following command. This will install the SDK in editable mode so changes to the repo modify the installed package.

  ```
  pip install -e .
  ```

  **Note: The above command needs to be run from the base folder of the repo**




  From the parent directory `carbon-black-cloud-sdk-python`, run the command `pytest`.




  ReadTheDocs hosts [the documentation for the SDK](https://carbon-black-cloud-python-sdk.readthedocs.io/en/latest/). If you make changes to the SDK that require an update to the documentation, first install the documentation packages from pip:

  ```
  pip install sphinxcontrib-apidoc sphinx_rtd_theme sphinx-copybutton
  ```

  Then, build the docs locally with the following commands:

  ```
  cd docs
  make html
  ```

  Note that the module rst files such as ```docs/cbc_sdk.platform.rst ``` are handcrafted to control layout.
  * This command will generate new version, but it is not necessary and changes should not be added to the repository.
  * All pull requests will trigger a build of the documentation which can be viewed from Read The Docs --> Builds.
  ```
  sphinx-apidoc -f -o docs src/cbc_sdk
  ```

  The documentation is built in `docs/_build/html`.

  **N.B.:** If your documentation pages appear to generate incorrectly, check to see if you received the warning message
  `No module named 'cbc_sdk'`.  If so, set your `PYTHONPATH` to include the `src/` subdirectory of the SDK project
  directory before running `make html`, or the equivalent command `sphinx-build -M html . _build`.



  The webhook with readthedocs will create a build of the branch and report on the status of the build to the GitHub pull request



  Build the documentation by running:
  ```shell
  $ docker run -p 7000:7000 -it $(docker build -f ./docker/docs/Dockerfile . -q) make livehtml
  ```



  To begin a code change, start by creating a branch off of the develop branch.
  ```
  git checkout develop
  git checkout -b {branch-name}
  ```

  When the feature or bug fix is finished you will need to create a pull request to the CarbonBlack repo, the following will push your changes to Github.
  ```
  git push {remote} {branch-name}
  ```

  If your branch is behind the develop branch, you will need to rebase.
  ```
  git checkout {branch-name}
  git rebase develop
  ```

  **Note:** if your develop branch is out of sync with the Carbon Black repo then you will need to sync your fork. For information on syncing your fork, see [here](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork).


pkgId: b8eb3b23d3fd9a0a6d273256588760c252c901cbe2c5736e481c348fe622cd99
name: python-carbon-python-sdk
arch: src
version: 0.2.45
epoch: 0
release: 1
summary: Client for Carbon
url: https://pypi.org/project/carbon-python-sdk/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbon-python-sdk-0.2.45-1.src.rpm
checksum_type: sha256
description:
  Returns whether or not the organization is white labeled and which integrations are white labeled

  ```python
  get_white_labeling_response = carbon.auth.get_white_labeling()
  ```

  [`WhiteLabelingResponse`](./carbon/pydantic/white_labeling_response.py)

  `/auth/v1/white_labeling` `get`


pkgId: 60b3fb7dacba54342353e78016a5c837376ba9c59d434bbce1af379fb7d1b747
name: python-carbon-registry-indexer
arch: src
version: 0.1.59
epoch: 0
release: 1
url: https://github.com/CarbonMarketsHQ/Carbon-Registry-Indexer
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbon-registry-indexer-0.1.59-1.src.rpm
checksum_type: sha256
summary:
  A Python library designed to streamline the aggregation of carbon data from multiple registries, each with its own data format, into a unified schema in CSV/Parquet formats.

description:
  Welcome to the CarbonMarketsHQ Data Indexer! This tool is designed to consolidate data from multiple carbon market registries into a unified schema, making it easier to analyze and utilize carbon market data. This project is open source and we welcome contributions from the community.


  - [Gold Standard](https://registry.goldstandard.org/projects)
  - [American Carbon Registry (ACR)](https://acr2.apx.com/mymodule/mypage.asp)
  - [Climate Action Reserve (CAR)](https://thereserve2.apx.com/mymodule/mypage.asp)
  - [Climate Action Data Trust (CADT)](https://observer.climateactiondata.org/)
  - [Puro Earth](https://registry.puro.earth/carbon-sequestration/retirements)


  To install the package, you can use pip:
  ```
  pip install carbon-registry-indexer
  ```


  All the code in this repository is MIT licensed.



  ```
  indexer = CarbonRegistryIndexer(storage_dir='your_storage_dir'
                              azure_blob_conn_str='your_conn_str',
                              azure_blob_container='your_container_name')
  indexer.setup_storage()  # creates or purges data folder


  indexer.sync_gold_standard()
  indexer.sync_climate_action_data_trust()
  indexer.sync_american_carbon_registry()
  indexer.sync_climate_action_reserve()
  indexer.sync_puro_earth()
  ```



  - `ProjectLocation`: Stores information about the location of a project, including country, state, and geographic identifier.
  - `ProjectRating`: Captures project-level ratings from different rating entities.
  - `CoBenefit`: Links a project to the UN Sustainable Development Goals (SDGs) it contributes to.
  - `Project`: The core table representing a carbon project. It includes meta information about a project.
  - `RelatedProject`: Captures relationships between different projects.
  - `Issuance`: Represents an issuance of carbon credits from a project.
  - `Label`: Defines a label associated with an issuance, specifying the crediting period and validity.
  - `Unit`: Represents the life-cycle of credit units Issued, retired, cancelled, etc.
  - `Governance`: Stores picklist values used for governance-related fields.
  - `Estimation`: Contains estimated credit information for a project.


pkgId: 3e66fa6fe6a4f1f6171043f7e3b7a95b3656227e3819729e112ea7eaa06caa6a
name: python-carbon-txt
arch: src
version: 0.0.10
epoch: 0
release: 1
summary: A command line tool containing a validator for carbon.txt files, by the Green Web Foundation
url: https://pypi.org/project/carbon-txt/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbon-txt-0.0.10-1.src.rpm
checksum_type: sha256
description:
  This validator reads carbon.txt files, and validates them against a spec defined
  on http://carbontxt.org.





  Run a validation against a given domain, or file, say if the file is valid TOML,
  and it confirms to the carbon.txt spec.

  The following commands assume you are working in a virtual environment:

  ```shell

  carbon-txt validate domain some-domain.com


  carbon-txt validate file https://somedomain.com/path-to-carbon.txt


  carbon-txt validate file ./path-to-file.com


  cat ./path-to-file.com | carbontxt validate file
  ```



  If you are not using virtual environments directly, you can use it with
  [uv](https://docs.astral.sh/uv/), which is the recommended way to run the
  project.

  Add carbon-txt to a project with `uv add`:

  ```
  uv add carbon-txt
  ```

  You can now run the command line tool with `uv run carbon-txt`



  If you have uv installed, you can run the command line tool like so:

  ```

  uv tool run carbon-txt validate ./path/to/file


  uv tool run carbon-txt serve
  ```

  This will download the latest published version from pypi and run the
  corresponding CLI command



  You can also validate carbon.txt files sent over an HTTP API.

  ```shell

  carbon-txt serve
  ```

  For production, [Granian](https://github.com/emmett-framework/granian), a
  performant webserver is bundled. Pass the flag `--server granian` to use it.

  ```shell

  carbon-txt serve --server granian
  ```


pkgId: 66528b41394268fcb7536e266616ccf1cdebcccf8454cbfdd0532ed9b60a676a
name: python-carbon-verifier
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: A library to verify Carbon webhook events
url: https://github.com/Carbon-for-Developers/webhook-library.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbon-verifier-0.1.2-1.src.rpm
checksum_type: sha256
description:
  `carbon_webhooks_python` is a Python library designed to verify Carbon webhook events. This library provides a simple way to validate webhook signatures and ensure the authenticity of incoming requests.



  - **Generate Signature**: Generate HMAC SHA256 signatures for webhook payloads.
  - **Validate Signature**: Validate incoming webhook signatures to ensure they match the expected signature.
  - **Extract Signature Header**: Parse and extract components from the Carbon-Signature header.



  You can install the library using pip:

  ```bash
  pip install carbon-verifier
  ```





  *   `signing_key`: Your Carbon webhook signing key.



  Generates a signature for the given timestamp and JSON payload.

  *   `timestamp`: The timestamp of the webhook event.
  *   `json_payload`: The JSON payload of the webhook event.

  Returns the generated signature.



  Validates the received signature against the generated signature.

  *   `received_sig`: The received signature to validate.
  *   `timestamp`: The timestamp of the webhook event.
  *   `payload`: The JSON payload of the webhook event.

  Returns `true` if the signature is valid, otherwise `false`.



  Extracts the timestamp and signature from the Carbon-Signature header.

  *   `header`: The Carbon-Signature header.

  Returns an object with the extracted signature parts.



  Here is an example demonstrating how to use the `carbon_verifier` library to verify a Carbon webhook:

  ```python
  from carbon_verifier import WebhookVerifier
  import json


  SIGNING_SECRET = 'aa76aee859f223451fd9bfb37ce893a0'  # Replace with your actual signing key
  verifier = WebhookVerifier(SIGNING_SECRET)

  def verify_webhook(headers, payload):
      carbon_signature = headers.get('Carbon-Signature')
      if not carbon_signature:
          return {'status': 'error', 'message': 'Missing Carbon-Signature header'}, 400

      try:
          timestamp, received_signature = WebhookVerifier.extract_signature_header(carbon_signature)
      except ValueError:
          return {'status': 'error', 'message': 'Invalid Carbon-Signature header format'}, 400

      if not verifier.validate_signature(received_signature, timestamp, payload):
          return {'status': 'error', 'message': 'Invalid signature'}, 400

      data = json.loads(payload)
      print("Received webhook data:", data)

      
      event_type = data.get('webhook_type')
      if event_type == 'example_event':
          
          print("Processing example_event")

      return {'status': 'success'}, 200


  payload_v1 = '{"payload": "{\\"webhook_type\\": \\"FILES_CREATED\\", \\"obj\\": {\\"object_type\\": \\"FILE_LIST\\", \\"object_id\\": [\\"46654\\"], \\"additional_information\\": \\"null\\"}, \\"customer_id\\": \\"satvik\\", \\"timestamp\\": \\"1721392406\\"}"}'


  headers = {
    "Content-Type": "application/json",
    "Carbon-Signature": "t=1721392406,v1=aa2273ab64bb9162e7e7983a9cd7ab9f90d686691b1fd25c577991ad42c53fc1",
    "Carbon-Signature-Compact": "t=1721392406,v2=42a86d4083fee090b5a0800a91e82fb389f0bed4da757d07ee8ba97485194e59"
  }

  result, status_code = verify_webhook(headers, payload_v1)
  print(f"Verification Result: {result}, Status Code: {status_code}")


pkgId: 49fe5bb978037980f2d440ed4e999f75984cfca9ddc66f4b589728aba9c9c6fd
name: python-carbonate
arch: src
version: 1.1.10
epoch: 0
release: 1
summary: Tools for managing federated carbon clusters.
url: https://github.com/jssjr/carbonate
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbonate-1.1.10-1.src.rpm
checksum_type: sha256
description:
  > "Pop bottles." *-- Birdman*

  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/99e1654102b74d82a63505145334e7ed)](https://www.codacy.com/app/graphite-project/carbonate?utm_source=github.com&utm_medium=referral&utm_content=graphite-project/carbonate&utm_campaign=badger)
  [![Build Status](https://travis-ci.org/graphite-project/carbonate.svg?branch=master)](https://travis-ci.org/graphite-project/carbonate)
  [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fgraphite-project%2Fcarbonate.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fgraphite-project%2Fcarbonate?ref=badge_shield)
  [![codecov](https://codecov.io/gh/graphite-project/carbonate/branch/master/graph/badge.svg)](https://codecov.io/gh/graphite-project/carbonate)

  Graphite clusters are pretty cool. Here are some primitive tools to help you manage your graphite clusters.

  All of the tools support two common arguments; the path to a config file, and the name of the cluster. Using these tools alongside a config file that describes your graphite clusters you can build up scripts to manage your metrics. Some of the tools could easily be replaced with one-liners in shell, but exist here for convenience and readability. The goal is to provide fast, predictable utilities that can easily be composed into more advanced tooling.


  [Carbonate is available from Python official third party repository](https://pypi.python.org/pypi/carbonate/0.2.1) (aka PyPi) and as such can be installed via regular Python package managers.
  Note that you might have to install a python package manager (e.g. apt-get install python-setuptools on a ubuntu host)

  ```
  pip install carbonate
  ```


  Carbonate expects a configuration file that defines the clusters in your environment. The default config file is located at `/opt/graphite/conf/carbonate.conf` or can be provided on the command line. The default cluster is named 'main'. Both defaults can be overridden by setting in the environment `CARBONATE_CONFIG` and `CARBONATE_CLUSTER` respectively.

  ```
  [main]
  DESTINATIONS = 192.168.9.13:2004:carbon01, 192.168.9.15:2004:carbon02, 192.168.6.20:2004:carbon03
  REPLICATION_FACTOR = 2
  SSH_USER = carbon

  [agg]
  DESTINATIONS = 192.168.9.13:2004:carbon01, 192.168.9.15:2004:carbon02, 192.168.6.20:2004:carbon03
  RELAY_METHOD = aggregated-consistent-hashing
  REPLICATION_FACTOR = 2
  SSH_USER = carbon

  [fnv]
  DESTINATIONS = 192.168.9.13:2004:ba603c36342304ed77953f84ac4d357b, 192.168.9.15:2004:5dd63865534f84899c6e5594dba6749a, 192.168.6.20:2004:866a18b81f2dc4649517a1df13e26f28
  REPLICATION_FACTOR = 2
  SSH_USER = carbonate
  HASHING_TYPE = fnv1a_ch
  ```

  You should take care to match the list of destination IPs or hostnames to the nodes in your cluster (i.e. it should match with routing configuretion of your carbon relay). Order is important because of how the consistent hash ring is created.

  You can configure the relay method to be one of "consistent-hashing" or "aggregated-consistent-hashing". If omitted, "consistent-hashing" is used by default. Use of "aggregated-consistent-hashing" usually requires a rules file to be provided to relevant commands.

  The replication factor should match the replication factor for the cluster.

  Also, you can choose to provide a SSH user that will be used when carbonate requires connecting to another node in the cluster to perform an operation. If this is not provided, then the current user executing the command will be chosen.

  Finally, you can provide HASHING_TYPE of your cluster. Default is `carbon_ch`, also `fnv1a_ch` is supported. Please note that for using `fnv1a_ch` hashing you need `carbon` 1.0.2 or newer installed (or you need to use [carbon-c-relay](https://github.com/grobian/carbon-c-relay) relay instead).





  ```
  usage: carbon-hosts [-h] [-c CONFIG_FILE] [-C CLUSTER]

  Return the addresses for all nodes in a cluster

  optional arguments:
    -h, --help            show this help message and exit
    -c CONFIG_FILE, --config-file CONFIG_FILE
                          Config file to use (default:
                          /opt/graphite/conf/carbonate.conf)
    -C CLUSTER, --cluster CLUSTER
                          Cluster name (default: main)
  ```



  ```
  usage: carbon-lookup [-h] [-c CONFIG_FILE] [-C CLUSTER] [-s] METRIC

  Lookup where a metric lives in a carbon cluster

  positional arguments:
    METRIC                Full metric name to search for

  optional arguments:
    -h, --help            show this help message and exit
    -c CONFIG_FILE, --config-file CONFIG_FILE
                          Config file to use (default:
                          /opt/graphite/conf/carbonate.conf)
    -C CLUSTER, --cluster CLUSTER
                          Cluster name (default: main)
    -a AGGREGATION_RULES, --aggregation-rules AGGREGATION_RULES
                          File containing rules used in conjunction with the
                          "aggregated-consistent-hashing" relay method (default:
                          /opt/graphite/conf/aggregation-rules.conf)
    -s, --short           Only display the address, without port and cluster
                          name (default: False)
  ```



  ```
  usage: carbon-list [-h] [-c CONFIG_FILE] [-C CLUSTER] [-d STORAGE_DIR]

  List the metrics this carbon node contains

  optional arguments:
    -h, --help            show this help message and exit
    -c CONFIG_FILE, --config-file CONFIG_FILE
                          Config file to use (default:
                          /opt/graphite/conf/carbonate.conf)
    -C CLUSTER, --cluster CLUSTER
                          Cluster name (default: main)
    -d STORAGE_DIR, --storage-dir STORAGE_DIR
                          Storage dir (default: /opt/graphite/storage/whisper)
  ```



  ```
  usage: carbon-sieve [-h] [-c CONFIG_FILE] [-C CLUSTER] [-f METRICS_FILE]
                      [-n NODE] [-I]

  Given a list of metrics, output those that belong to a node

  optional arguments:
    -h, --help            show this help message and exit
    -c CONFIG_FILE, --config-file CONFIG_FILE
                          Config file to use (default:
                          /opt/graphite/conf/carbonate.conf)
    -C CLUSTER, --cluster CLUSTER
                          Cluster name (default: main)
    -a AGGREGATION_RULES, --aggregation-rules AGGREGATION_RULES
                          File containing rules used in conjunction with the
                          "aggregated-consistent-hashing" relay method (default:
                          /opt/graphite/conf/aggregation-rules.conf)
    -f METRICS_FILE, --metrics-file METRICS_FILE
                          File containing metric names to filter, or '-' to read
                          from STDIN (default: -)
    -n NODE, --node NODE  Filter for metrics belonging to this node (default:
                          self)
    -I, --invert          Invert the sieve, match metrics that do NOT belong to
                          a node (default: False)
  ```



  ```
  usage: carbon-sync [-h] [-c CONFIG_FILE] [-C CLUSTER] [-f METRICS_FILE] -s
                     SOURCE_NODE [-d STORAGE_DIR] [-b BATCH_SIZE]
                     [--source-storage-dir SOURCE_STORAGE_DIR]
                     [--rsync-options RSYNC_OPTIONS] [--rsync-disable-copy-dest]
                     [--tmpdir TMP_STAGING_DIR] [--rsync-max-retries MAX_RETRIES]
                     [--rsync-retries-interval SECONDS] [--dirty] [-l] [-o]

  Sync local metrics using remote nodes in the cluster

  optional arguments:
    -h, --help            show this help message and exit
    -c CONFIG_FILE, --config-file CONFIG_FILE
                          Config file to use (env: CARBONATE_CONFIG) (default:
                          /opt/graphite/conf/carbonate.conf)
    -C CLUSTER, --cluster CLUSTER
                          Cluster name (env: CARBONATE_CLUSTER) (default: main)
    -f METRICS_FILE, --metrics-file METRICS_FILE
                          File containing metric names to filter, or '-' to read
                          from STDIN (default: -)
    -s SOURCE_NODE, --source-node SOURCE_NODE
                          Override the source for metrics data (default: None)
    -d STORAGE_DIR, --storage-dir STORAGE_DIR
                          Storage dir (default: /opt/graphite/storage/whisper)
    -b BATCH_SIZE, --batch-size BATCH_SIZE
                          Batch size for the rsync job (default: 1000)
    --source-storage-dir SOURCE_STORAGE_DIR
                          Source storage dir (default:
                          /opt/graphite/storage/whisper)
    --rsync-options RSYNC_OPTIONS
                          Pass option(s) to rsync. Make sure to use "--rsync-
                          options=" if option starts with '-' (default: -azpS)
    --rsync-disable-copy-dest
                          Avoid --copy-dest, transfer all whisper data between
                          nodes. (default: False)
    --rsync-max-retries RETRIES
                          Number of times rsync will attempt to copy each batch
                          of metrics before moving on. If all retry attempts are
                          unsuccessful, carbon-sync will write a file containing
                          the name of each metric in the failed batch so they can
                          be easily retried at a later time. (Default: 3)
    --rsync-retries-interval SECONDS
                          How long to wait in between each rsync retry attempt
                          (see --rsync-max-retries). (default: 5)
    -t TMP_STAGING_DIR, --tmpdir TMP_STAGING_DIR
                          Specify an alternate location in which the temporary
                          rsync staging dirs will be created. This can be useful
                          for large syncs where the default location (as chosen
                          by mkdtemp) resides on a filesystem that's too small
                          to store all the metrics being copied from the remote
                          host.
    --dirty               If set, don't clean temporary rsync directory
                          (default: False)
    -l, --lock            Lock whisper files during filling (default: False)
    -o, --overwrite       Write all non nullpoints from src to dst (default:
                          False)
  ```



  ```
  usage: carbon-path [-h] [-c CONFIG_FILE] [-C CLUSTER] [-f METRICS_FILE] [-r]
                     [-p] [-d STORAGE_DIR]

  Transform metric paths to (or from) filesystem paths

  optional arguments:
    -h, --help            show this help message and exit
    -c CONFIG_FILE, --config-file CONFIG_FILE
                          Config file to use (default:
                          /opt/graphite/conf/carbonate.conf)
    -C CLUSTER, --cluster CLUSTER
                          Cluster name (default: main)
    -f METRICS_FILE, --metrics-file METRICS_FILE
                          File containing metric names to transform to file
                          paths, or '-' to read from STDIN (default: -)
    -r, --reverse         Transform from file paths to metric paths (default:
                          False)
    -p, --prepend         Prepend storage dir to file paths (default: False)
    -d STORAGE_DIR, --storage-dir STORAGE_DIR
                          Whisper storage directory to prepend when -p given
                          (default: /opt/graphite/storage/whisper)
  ```



  ```
  usage: carbon-stale [-h] [-c CONFIG_FILE] [-C CLUSTER] [-f METRICS_FILE] [-r]
                      [-d STORAGE_DIR] [-l HOURS] [-o HOURS] [-w] [-p]

  Find and list potentially stale metrics.

  optional arguments:
    -h, --help            show this help message and exit
    -c CONFIG_FILE, --config-file CONFIG_FILE
                          Config file to use (default:
                          /opt/graphite/conf/carbonate.conf)
    -C CLUSTER, --cluster CLUSTER
                          Cluster name (default: main)
    -f METRICS_FILE, --metrics-file METRICS_FILE
                          File containing metric names to transform to file
                          paths, or '-' to read from STDIN (default: -)
    -r, --reverse         Output metrics which are not stale instead (default:
                          False)
    -d STORAGE_DIR, --storage-dir STORAGE_DIR
                          Whisper storage directory to prepend when -p given
                          (default: /opt/graphite/storage/whisper)
    -l HOURS, --limit HOURS
                          Definition of staleness, in hours (default: 24)
    -o HOURS, --offset HOURS
                          Use a whisper data window ending HOURS ago (implies
                          -w) (default: 0)
    -w, --whisper         Use whisper data instead of filesystem stat() call
                          (default: False)
    -p, --paths           Print filesystem paths instead of metric names
                          (default: False)
  ```



  ```
  usage: whisper-aggregate [-h] [-f METRICS_FILE] [-d STORAGE_DIR]

  Set aggregation for whisper-backed metrics this carbon instance contains

  optional arguments:
    -h, --help            show this help message and exit
    -f METRICS_FILE, --metrics-file METRICS_FILE
                          File containing metric names and aggregation modes, or
                          '-' to read from STDIN (default: -)
    -d STORAGE_DIR, --storage-dir STORAGE_DIR
                          Whisper storage directory (default:
                          /opt/graphite/storage/whisper)
  ```



  ```
  usage: whisper-fill [-h] [-l] [-o] SRC DST

  Backfill datapoints from one whisper file into another

  positional arguments:
    SRC             Whisper source file
    DST             Whisper destination file

  optional arguments:
    -h, --help      show this help message and exit
    -l, --lock      Lock whisper files during filling (default: False)
    -o, --overwrite  Write all non nullpoints from src to dst (default: False)
  ```





  ```





  LOCAL_IP="$1"

  for h in $(carbon-hosts) ; do
    (
      ssh $h -- carbon-list |
      carbon-sieve -n $LOCAL_IP |
      carbon-sync -s $h
    ) &
  done
  ```



  ```






  LOCAL_IP="$1"
  OLD_CLUSTER="old"
  NEW_CLUSTER="main"

  for h in $(carbon-hosts -C "$OLD_CLUSTER") ; do
    ssh $h -- carbon-list |
    carbon-sieve -C "$NEW_CLUSTER" -n $LOCAL_IP |
    carbon-sync -s $h
  done
  ```



  ```





  LOCAL_IP="$1"

  carbon-list | carbon-sieve -I -n $LOCAL_IP
  ```



  Metrics with whisper data that is entirely blank for the last 2 hours (perhaps
  useful if you suspect issues with fs timestamps or carbon clients writing in 'the
  future'):

  ```
  carbon-list | carbon-stale --whisper --limit=2
  ```

  Metrics whose metrics files appear untouched for 48 hours or more (functionally
  identical to `find /your/data/dir -type f -mtime +2`):

  ```
  carbon-list | carbon-stale --limit=48
  ```

  More interesting is if you use ``carbon-stale``, then sieve to identify stale
  metrics that don't belong here (vs un-stale metrics that *do* belong here but
  are misreported in carbon-sieve due to things like doubled-up periods in metric
  paths due to broken collectors. It's a thing.)

  ```
  carbon-list | carbon-stale --limit=48 | carbon-sieve -I -n $LOCAL_IP
  ```

  To print file paths for use with e.g. `xargs rm` or whatnot, use `-p`:

  ```
  carbon-list | carbon-stale -p | xargs -n 100 rm
  ```




  The code is available under the MIT license.


pkgId: 1d64c328f31805aa9bf2199f1d005f59450cc950a150a45bccc9eee4a383b070
name: python-carbone-sdk
arch: src
version: 1.0.8
epoch: 0
release: 1
url: https://github.com/carboneio/carbone-sdk-python
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbone-sdk-1.0.8-1.src.rpm
checksum_type: sha256
summary:
  Carbone API Python SDK to generate documents (PDF, docx, xlsx, ods, odt, ...) from a JSON and a template.

description:
  [![GitHub release (latest by date)](https://img.shields.io/github/v/release/carboneio/carbone-sdk-python?style=for-the-badge&logo=python)](https://pypi.org/project/carbone-sdk)
  [![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg?style=for-the-badge)](./API-REFERENCE.md)


  Python SDK to use Carbone Render easily.



  Carbone is a powerful document generator (PDF, DOCX, XLSX, ODT, PPTX, ODS, XML, CSV...) using templates and JSON data. It is based on LibreOffice and can convert any document. It is also possible to convert HTML to PDF. Learn more about [supported files and features](https://carbone.io/documentation.html#supported-files-and-features-list).





  ```sh
  pip install carbone-sdk
  ```



  You can copy and run the code bellow to try.
  Get your API token on your Carbone account: https://account.carbone.io/.

  ```python
  import carbone_sdk




  csdk = carbone_sdk.CarboneSDK("secret-token")

  csdk.set_api_version("4")

  csdk.set_api_url("https://api.carbone.io")


  template_id = "template"
  render_options = {
    
    "data": {
      "id": 42,
      "date": 1492012745,
      "company": {
          "name": "myCompany",
          "address": "here",
          "city": "Notfar",
          "postalCode": 123456
      },
      "customer": {
        "name":"myCustomer",
        "address":"there",
        "city":"Faraway",
        "postalCode":654321
      },
      "products":[
        {"name":"product 1","priceUnit":0.1,"quantity":10,"priceTotal":1}
      ],
      "total":140
    },
    
    "convertTo":"pdf"
    
    
  }


  report_bytes, unique_report_name = csdk.render(template_id, render_options)
  fd = open(unique_report_name, "wb")
  fd.write(report_bytes)
  fd.close()

  ```


  - [API REFERENCE](./API-REFERENCE.md)




  Install the test packages:
  ```shell
  $ make install
  ```
  To run the tests:
  ```shell
  $ make test
  ```
  To uninstall the test packages:
  ```shell
  $ make uninstall
  ```


  Install:
  ```
  $ pip install pytest
  $ pip install requests_mock
  ```

  To run all the test (-v for verbose output):
  ```shell
  $ pytest -s -v tests
  ```

  To run a groupe of tests:
  ```shell
  $ pytest -s -v ./tests/test_carbone_sdk.py::TestRender
  ```

  To run a single test:
  ```shell
  $ pytest -s -v ./tests/test_carbone_sdk.py::TestRender::test_render_a_report_error_file_missing
  ```

  To run a single test with all the DEBUG:
  ```
  $ pytest ./tests/test_carbone_sdk.py::TestRender::test_render_a_report_from_an_existing_template_id --log-cli-level=10
  ```
  If you need to test the generation of templateId, you can use the nodejs `main.js` to test the sha256 generation.
  ```bash
  $ node ./tests/main.js
  ```



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



  Contributions, issues and feature requests are welcome!

  Feel free to check [issues page](https://github.com/carboneio/carbone-sdk-python/issues).



  Give a ⭐️ if this project helped you!


pkgId: 4721136c3ed77e3f851cc9f26a1f01fa03b33c44a6971c02f16399efba5e1335
name: python-carbonintensity
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: Home Assistant Client library for Carbon Intensity API
url: https://github.com/jscruz/carbonintensity
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbonintensity-0.3.0-1.src.rpm
checksum_type: sha256
description:
  <!-- badges start -->

  [![Maintained][Maintained]](#)
  [![BuyMeCoffee][buymecoffeebadge]][buymecoffeelink]

  <!-- badges end -->

  _Simple Carbon Intensity UK API Library_

  The purpose of this library is to retrieve information from [Carbon Intensity UK](https://carbonintensity.org.uk/)

  The client connects asynchrnously to the API for retrieving information about the current level of CO2 generating energy in the current period.

  It uses `aiohttp` to communicate with the API asynchrnously. This decision has been based mainly on the premise that the library will be used in the context of Home Assistant integration.

  In addition it calculates when is the next 24 hours lowest level comparing values of the CO2 forecast levels.



  Retrieve regional and national information based on postcode `SW1` for the next 24 hours starting now:

  ```python
     client = Client("SW1")
     response = await client.async_get_data()
     data = response["data"]
  ```
  Note: Time in UTC



  An example of the function output can be found below:

  ```json
     {
         "data":
          {
                "current_period_from": "2020-05-20T10:00+00:00",
                "current_period_to": "2020-05-20T10:30+00:00",
                "current_period_forecast":300,
                "current_period_index": "high",
                "current_period_national_forecast":230,
                "current_period_national_index": "moderate",
                "lowest_period_from":"2020-05-21T14:00+00:00",
                "lowest_period_to":"2020-05-21T14:30+00:00",
                "lowest_period_forecast": 168,
                "lowest_period_index": "moderate",
                "postcode": "SW1"
          }
      }
  ```



  ```bash
  python3 -m pip install -U carbonintensity
  ```

  <!-- links start -->

  [buymecoffeelink]:https://www.buymeacoffee.com/jscruz
  [buymecoffeebadge]: https://camo.githubusercontent.com/cd005dca0ef55d7725912ec03a936d3a7c8de5b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275792532306d6525323061253230636f666665652d646f6e6174652d79656c6c6f772e737667
  [maintained]: https://img.shields.io/maintenance/yes/2020.svg

  <!-- links end -->



  This work is based on the following:
  - [sampleclient](https://github.com/ludeeus/sampleclient): See [Original license](./licenses/sampleclient/LICENSE)
  - [Carbon Intensity API](https://carbonintensity.org.uk/): See [Terms and conditions](https://github.com/carbon-intensity/terms/)


pkgId: 8b2052c087a6a030b3a87dda096c3583c32371f0851e3807c5a1e6267e12c2ad
name: python-carbonplan-styles
arch: src
version: 0.5.1
epoch: 0
release: 1
summary: CarbonPlan plotting styles
url: https://pypi.org/project/carbonplan-styles/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbonplan-styles-0.5.1-1.src.rpm
checksum_type: sha256
description:
  <p align="left" >
  <a href='https://carbonplan.org'>
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://carbonplan-assets.s3.amazonaws.com/monogram/light-small.png">
    <img alt="CarbonPlan monogram." height="48" src="https://carbonplan-assets.s3.amazonaws.com/monogram/dark-small.png">
  </picture>
  </a>
  </p>



  **plot styles for matplotlib and altair**

  [![CI](https://github.com/carbonplan/styles/actions/workflows/main.yaml/badge.svg)](https://github.com/carbonplan/styles/actions/workflows/main.yaml)
  ![PyPI](https://img.shields.io/pypi/v/carbonplan_styles)
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

  A collection of plotting styles for [Matplotlib](https://matplotlib.org/) and [Altair](https://altair-viz.github.io/).

  Try it out on Binder:
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/carbonplan/styles/main?urlpath=lab)



  ```shell
  pip install "carbonplan[styles]"
  ```



  There are currently two separate styles/themes available in this package:

  1. `carbonplan_dark`: black background, lighter colors
  2. `carbonplan_light`: white background, darker colors

  Both styels/themes are automatically made available in Matplotlib and Altair.



  ```python
  from carbonplan import styles

  styles.mpl.set_theme(style='carbonplan_dark')
  ```



  ```python
  import altair as alt

  alt.themes.enable('carbonplan_dark')
  ```



  All the code in this repository is [MIT](https://choosealicense.com/licenses/mit/)-licensed. We include attribution for this content, and we please request that you also maintain that attribution if using this data.



  CarbonPlan is a nonprofit organization that uses data and science for climate action. We aim to improve the transparency and scientific integrity of climate solutions with open data and tools. Find out more at [carbonplan.org](https://carbonplan.org/) or get in touch by [opening an issue](https://github.com/carbonplan/styles/issues/new) or [sending us an email](mailto:hello@carbonplan.org).


pkgId: e621e1f6a2d42dd62387a689a21a75d6bf8d59d77105ef0f23fe99b2b63e7017
name: python-carbontracker
arch: src
version: 2.0.1
epoch: 0
release: 1
summary: Tracking and predicting the carbon footprint of training deep learning models.
url: https://pypi.org/project/carbontracker/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carbontracker-2.0.1-1.src.rpm
checksum_type: sha256
description:
  [![Build](https://github.com/lfwa/carbontracker/actions/workflows/publish.yml/badge.svg)](https://github.com/lfwa/carbontracker/actions)
  [![PyPI](https://img.shields.io/pypi/v/carbontracker?label=PyPI)](https://pypi.org/project/carbontracker/)
  [![Python](https://img.shields.io/badge/python-%3E%3D3.7-blue)](https://www.python.org/downloads/)
  [![Unit Tests](https://github.com/lfwa/carbontracker/actions/workflows/test.yml/badge.svg)](https://github.com/lfwa/carbontracker/actions)
  [![License](https://img.shields.io/github/license/lfwa/carbontracker)](https://github.com/lfwa/carbontracker/blob/master/LICENSE)
  [![Downloads](https://static.pepy.tech/badge/carbontracker)](https://pepy.tech/project/carbontracker)

  [Website](https://carbontracker.info)


  **carbontracker** is a tool for tracking and predicting the energy consumption and carbon footprint of training deep learning models as described in [Anthony et al. (2020)](https://arxiv.org/abs/2007.03051).


  Kindly cite our work if you use **carbontracker** in a scientific publication:
  ```
  @misc{anthony2020carbontracker,
    title={Carbontracker: Tracking and Predicting the Carbon Footprint of Training Deep Learning Models},
    author={Lasse F. Wolff Anthony and Benjamin Kanding and Raghavendra Selvan},
    howpublished={ICML Workshop on Challenges in Deploying and monitoring Machine Learning Systems},
    month={July},
    note={arXiv:2007.03051},
    year={2020}}
  ```



  ```
  pip install carbontracker
  ```




  Wrap any of your scripts (python, bash, etc.):

  `carbontracker python script.py
  `



  - `epochs`:
    Total epochs of your training loop.

  - `epochs_before_pred` (default=1):
    Epochs to monitor before outputting predicted consumption. Set to -1 for all epochs. Set to 0 for no prediction.
  - `monitor_epochs` (default=1):
    Total number of epochs to monitor. Outputs actual consumption when reached. Set to -1 for all epochs. Cannot be less than `epochs_before_pred` or equal to 0.
  - `update_interval` (default=10):
    Interval in seconds between power usage measurements are taken.
  - `interpretable` (default=True):
    If set to True then the CO2eq are also converted to interpretable numbers such as the equivalent distance travelled in a car, etc. Otherwise, no conversions are done.
  - `stop_and_confirm` (default=False):
    If set to True then the main thread (with your training loop) is paused after `epochs_before_pred` epochs to output the prediction and the user will need to confirm to continue training. Otherwise, prediction is output and training is continued instantly.
  - `ignore_errors` (default=False):
    If set to True then all errors will cause energy monitoring to be stopped and training will continue. Otherwise, training will be interrupted as with regular errors.
  - `components` (default="all"):
    Comma-separated string of which components to monitor. Options are: "all", "gpu", "cpu", or "gpu,cpu".
  - `devices_by_pid` (default=False):
    If True, only devices (under the chosen components) running processes associated with the main process are measured. If False, all available devices are measured (see Section 'Notes' for jobs running on SLURM or in containers). Note that this requires your devices to have active processes before instantiating the `CarbonTracker` class.
  - `log_dir` (default=None):
    Path to the desired directory to write log files. If None, then no logging will be done.
  - `log_file_prefix` (default=""):
    Prefix to add to the log file name.
  - `verbose` (default=1):
    Sets the level of verbosity.
  - `decimal_precision` (default=6):
    Desired decimal precision of reported values.



  ```python
  from carbontracker.tracker import CarbonTracker

  tracker = CarbonTracker(epochs=max_epochs)


  for epoch in range(max_epochs):
      tracker.epoch_start()

      

      tracker.epoch_end()



  tracker.stop()
  ```



  ```
  CarbonTracker:
  Actual consumption for 1 epoch(s):
          Time:   0:00:10
          Energy: 0.000038 kWh
          CO2eq:  0.003130 g
          This is equivalent to:
          0.000026 km travelled by car
  CarbonTracker:
  Predicted consumption for 1000 epoch(s):
          Time:   2:52:22
          Energy: 0.038168 kWh
          CO2eq:  4.096665 g
          This is equivalent to:
          0.034025 km travelled by car
  CarbonTracker: Finished monitoring.
  ```

  ```
  CarbonTracker: The following components were found: CPU with device(s) cpu:0.
  CarbonTracker: Average carbon intensity during training was 82.00 gCO2/kWh at detected location: Copenhagen, Capital Region, DK.
  CarbonTracker:
  Actual consumption for 1 epoch(s):
          Time:   0:00:10
          Energy: 0.000041 kWh
          CO2eq:  0.003357 g
          This is equivalent to:
          0.000028 km travelled by car
  CarbonTracker: Carbon intensity for the next 2:59:06 is predicted to be 107.49 gCO2/kWh at detected location: Copenhagen, Capital Region, DK.
  CarbonTracker:
  Predicted consumption for 1000 epoch(s):
          Time:   2:59:06
          Energy: 0.040940 kWh
          CO2eq:  4.400445 g
          This is equivalent to:
          0.036549 km travelled by car
  CarbonTracker: Finished monitoring.
  ```




  **carbontracker** supports aggregating all log files in a specified directory to a single estimate of the carbon footprint.

  ```python
  from carbontracker import parser

  parser.print_aggregate(log_dir="./my_log_directory/")
  ```

  ```
  The training of models in this work is estimated to use 4.494 kWh of electricity contributing to 0.423 kg of CO2eq. This is equivalent to 3.515 km travelled by car. Measured by carbontracker (https://github.com/lfwa/carbontracker).
  ```


  Log files can be parsed into dictionaries using `parser.parse_all_logs()` or `parser.parse_logs()`.

  ```python
  from carbontracker import parser

  logs = parser.parse_all_logs(log_dir="./logs/")
  first_log = logs[0]

  print(f"Output file name: {first_log['output_filename']}")
  print(f"Standard file name: {first_log['standard_filename']}")
  print(f"Stopped early: {first_log['early_stop']}")
  print(f"Measured consumption: {first_log['actual']}")
  print(f"Predicted consumption: {first_log['pred']}")
  print(f"Measured GPU devices: {first_log['components']['gpu']['devices']}")
  ```

  ```
  Output file name: ./logs/2020-05-17T19:02Z_carbontracker_output.log
  Standard file name: ./logs/2020-05-17T19:02Z_carbontracker.log
  Stopped early: False
  Measured consumption: {'epochs': 1, 'duration (s)': 8.0, 'energy (kWh)': 6.5e-05, 'co2eq (g)': 0.019201, 'equivalents': {'km travelled by car': 0.000159}}
  Predicted consumption: {'epochs': 3, 'duration (s)': 25.0, 'energy (kWh)': 1000.000196, 'co2eq (g)': 10000.057604, 'equivalents': {'km travelled by car': 10000.000478}}
  Measured GPU devices: ['Tesla T4']
  ```




  **carbontracker** is compatible with:
  - NVIDIA GPUs that support [NVIDIA Management Library (NVML)](https://developer.nvidia.com/nvidia-management-library-nvml)
  - Intel CPUs that support [Intel RAPL](http://web.eece.maine.edu/~vweaver/projects/rapl/rapl_support.html)
  - Slurm
  - Google Colab / Jupyter Notebook




  - Available GPU devices are determined by first checking the environment variable `CUDA_VISIBLE_DEVICES` (only if `devices_by_pid`=False otherwise we find devices by PID). This ensures that for Slurm we only fetch GPU devices associated with the current job and not the entire cluster. If this fails we measure all available GPUs.
  - NVML cannot find processes for containers spawned without `--pid=host`. This affects the `device_by_pids` parameter and means that it will never find any active processes for GPUs in affected containers.


  See [CONTRIBUTING.md](CONTRIBUTING.md).


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


  * Official press release from University of Copenhagen can be obtained here: [en](https://news.ku.dk/all_news/2020/11/students-develop-tool-to-predict-the-carbon-footprint-of-algorithms/) [da](https://nyheder.ku.dk/alle_nyheder/2020/11/studerende-opfinder-vaerktoej-der-forudsiger-algoritmers-co2-aftryk/)

  * Carbontracker has recieved some attention in popular science forums within, and outside of, Denmark [[1](https://videnskab.dk/teknologi-innovation/kunstig-intelligens-er-en-kaempe-klimasynder-men-unge-danskeres-nye-vaerktoej)][[2](https://www.anthropocenemagazine.org/2020/11/time-to-talk-about-carbon-footprint-artificial-intelligence/)][[3](https://www.theregister.com/2020/11/04/gpt3_carbon_footprint_estimate/)][[4](https://jyllands-posten.dk/nyviden/ECE12533278/kunstig-intelligens-er-en-kaempe-klimasynder-men-nyt-dansk-vaerktoej-skal-hjaelpe/)][[5](https://www.sciencenewsforstudents.org/article/training-ai-energy-emissions-climate-risk)][[6](https://www.digitaltrends.com/news/carbontracker-deep-learning-sustainability/)][[7](https://www.prosa.dk/artikel/detail/news/effektivt-vaaben-mod-klimaforandringer/)][[8](https://medium.com/techtalkers/artificial-intelligence-contributes-to-climate-change-heres-how-405ff919186e)]

rpm_license:
  MIT License  Copyright (c) 2020 Lasse F. Wolff Anthony & Benjamin Kanding  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: 202614fe9193b03e248c93ee7a1b5e419be9bf79196754b69ea44894195108c7
name: python-carburetor
arch: src
version: 4.5.1
epoch: 0
release: 1
summary: GTK frontend for Tractor
url: https://tractor.frama.io/carburetor
rpm_license: GNU General Public License v3 or later (GPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carburetor-4.5.1-1.src.rpm
checksum_type: sha256
description:
  [![Translation status](https://hosted.weblate.org/widgets/carburetor/-/translations/svg-badge.svg)](https://hosted.weblate.org/engage/carburetor/?utm_source=widget)


  Discover anonymous browsing with Carburetor on your phones and computers. Tailored for GNOME, it's your hidden superhero for online adventures, powered by TOR. Don't get your hands dirty with system files any more – just tap in the app, keeping your online world safe and private. Customize settings if you want, but you don't have to. Carburetor is Free Software and puts you in control. No worries, just enjoy your anonymous browsing!

  ![Main window of Carburetor](https://tractor.frama.io/images/carburetor-main.png)

  Carburetor complies with the [GNOME Code of Conduct](https://wiki.gnome.org/Foundation/CodeOfConduct).


  Carburetor is natively packaged for some distros:

  [![Packaging status](https://repology.org/badge/vertical-allrepos/carburetor.svg)](https://repology.org/project/carburetor/versions)

  If you're on any other distribution or OS, Tractor team welcomes you to make build recepie of yours.

  You can also get it from [Flathub](https://flathub.org/apps/io.frama.tractor.carburetor).


  you can run `carburetor` by command line or through your desktop environment.


  Contributing is always appreciated. See [CONTRIBUTING](https://framagit.org/tractor/carburetor/-/blob/main/CONTRIBUTING.md) for more information.


pkgId: 4bd5e261ab0c5426c837a92eec33b1c8c6e2a74fe66268c64925244974d3b944
name: python-carculator
arch: src
version: 1.9.2
epoch: 0
release: 1
summary: Prospective life cycle assessment of vehicles made blazing fast
url: https://github.com/romainsacchi/carculator
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carculator-1.9.2-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <img style="height:130px;" src="https://github.com/romainsacchi/carculator/blob/master/docs/_static/img/mediumsmall.png">
  </p>

  <p align="center">
    <a href="https://badge.fury.io/py/carculator" target="_blank"><img src="https://badge.fury.io/py/carculator.svg"></a>
    <a href="https://github.com/romainsacchi/carculator" target="_blank"><img src="https://github.com/romainsacchi/carculator/actions/workflows/main.yml/badge.svg?branch=master"></a>
    <a href="https://coveralls.io/github/romainsacchi/carculator" target="_blank"><img src="https://coveralls.io/repos/github/romainsacchi/carculator/badge.svg"></a>
    <a href="https://carculator.readthedocs.io/en/latest/" target="_blank"><img src="https://readthedocs.org/projects/carculator/badge/?version=latest"></a>
    <a href="https://doi.org/10.5281/zenodo.3778259"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.3778259.svg" alt="DOI"></a>
  </p>

  Prospective environmental and economic life cycle assessment of vehicles made blazing fast.

  A fully parameterized Python model developed by the [Technology Assessment group](https://www.psi.ch/en/ta) of the
  [Paul Scherrer Institut](https://www.psi.ch/en) to perform life cycle assessments (LCA) of passenger cars and light-duty vehicles.

  See [the documentation](https://carculator.readthedocs.io/en/latest/index.html) for more detail, validation, etc.

  See our [examples notebook](https://github.com/romainsacchi/carculator/blob/master/examples/Examples.ipynb) as well.



  - [Background](#background)
    - [What is Life Cycle Assessment](#what-is-life-cycle-assessment)
    - [Why carculator](#why-carculator)
  - [Install](#install)
  - [Usage](#usage)
    - [As a Python library](#as-a-python-library)
    - [As a web app](#as-a-web-app)
  - [Support](#support)
  - [Maintainers](#maintainers)
  - [Contributing](#contributing)
  - [License](#license)





  Life Cycle Assessment (LCA) is a systematic way of accounting for environmental impacts along the relevant phases of the life of a product or service.
  Typically, the LCA of a passenger vehicle includes the raw material extraction, the manufacture of the vehicle, its distribution, use and maintenance, as well as its disposal.
  The compiled inventories of material and energy required along the life cycle of the vehicle is characterized against some impact categories (e.g., climate change).

  In the research field of mobility, LCA is widely used to investigate the superiority of a technology over another one.



  ``carculator`` allows to:
  * produce [life cycle assessment (LCA)](https://en.wikipedia.org/wiki/Life-cycle_assessment) results that include conventional midpoint impact assessment indicators as well cost indicators
  *  ``carculator`` uses time- and energy scenario-differentiated background inventories for the future, based on outputs of Integrated Asessment Model [REMIND](https://www.pik-potsdam.de/research/transformation-pathways/models/remind/remind).
  * calculate hot pollutant and noise emissions based on a specified driving cycle
  * produce error propagation analyzes (i.e., Monte Carlo) while preserving relations between inputs and outputs
  * control all the parameters sensitive to the foreground model (i.e., the vehicles) but also to the background model
  (i.e., supply of fuel, battery chemistry, etc.)
  * and easily export the vehicle models as inventories to be further imported in the [Brightway2](https://brightwaylca.org/) LCA framework
    or the [SimaPro](https://www.simapro.com/) LCA software.

  ``carculator`` integrates well with the [Brightway](https://brightwaylca.org/) LCA framework.

  ``carculator`` was built based on work described in [Uncertain environmental footprint of current and future battery electric vehicles by Cox, et al (2018)](https://pubs.acs.org/doi/abs/10.1021/acs.est.8b00261).



  ``carculator`` is at an early stage of development and is subject to continuous change and improvement.
  Three ways of installing ``carculator`` are suggested.

  We recommend the installation on **Python 3.7 or above**.



      conda install -c romainsacchi carculator



      pip install carculator





  Calculate the fuel efficiency (or ``Tank to wheel`` energy requirement) in km/L of petrol-equivalent of current SUVs for the driving cycle WLTC 3.4
  over 800 Monte Carlo iterations:

  ```python

      from carculator import *
      import matplotlib.pyplot as plt

      cip = CarInputParameters()
      cip.stochastic(800)
      dcts, array = fill_xarray_from_input_parameters(cip)
      cm = CarModel(array, cycle='WLTC 3.4')
      cm.set_all()
      TtW_energy = 1 / (cm.array.sel(size='SUV', year=2020, parameter='TtW energy') / 42000)  # assuming 42 MJ/L petrol

      l_powertrains = TtW_energy.powertrain
      [plt.hist(e, bins=50, alpha=.8, label=e.powertrain.values) for e in TtW_energy]
      plt.xlabel('km/L petrol-equivalent')
      plt.ylabel('number of iterations')
      plt.legend()
  ```

  ![MC results](https://github.com/romainsacchi/carculator/blob/master/docs/_static/img/stochastic_example_ttw.png)

  Compare the carbon footprint of electric vehicles with that of rechargeable hybrid vehicles for different size categories today and in the future
  over 500 Monte Carlo iterations:

  ```python

      from carculator import *
      cip = CarInputParameters()
      cip.stochastic(500)
      dcts, array = fill_xarray_from_input_parameters(cip)
      cm = CarModel(array, cycle='WLTC')
      cm.set_all()
      scope = {
        'powertrain': ['BEV', 'PHEV'],
      }
      ic = InventoryCalculation(cm)

      results = ic.calculate_impacts()
      data_MC = results.sel(impact_category='climate change').sum(axis=3).to_dataframe('climate change')
      plt.style.use('seaborn')
      data_MC.unstack(level=[0, 1, 2]).boxplot(showfliers=False, figsize=(20, 5))
      plt.xticks(rotation=70)
      plt.ylabel('kg CO2-eq./vkm')
  ```

  ![MC results](https://github.com/romainsacchi/carculator/blob/master/docs/_static/img/example_stochastic_BEV_PHEV.png)

  For more examples, see [examples](https://github.com/romainsacchi/carculator/blob/master/examples/Examples.ipynb).



  ``carculator`` has a [graphical user interface](https://carculator.psi.ch) for fast comparisons of vehicles.



  Do not hesitate to contact the development team at [carculator@psi.ch](mailto:carculator@psi.ch).



  * [Romain Sacchi](https://github.com/romainsacchi)
  * [Chris Mutel](https://github.com/cmutel/)



  See [contributing](https://github.com/romainsacchi/carculator/blob/master/CONTRIBUTING.md).



  [BSD-3-Clause](https://github.com/romainsacchi/carculator/blob/master/LICENSE). Copyright 2023 Paul Scherrer Institut.

rpm_license:
  BSD 3-Clause License  Copyright (c) 2020, Paul Scherrer Institut  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


pkgId: 772a56ac5e030d26991d024be6f9f88151b20d83f04003d2346d4817fd1801ba
name: python-carculator-truck
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: Prospective environmental and economic life cycle assessmentof medium and heavy goods vehicles
url: https://github.com/romainsacchi/carculator_truck
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carculator-truck-0.5.0-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <img style="height:130px;" src="https://github.com/romainsacchi/carculator_truck/blob/master/docs/_static/img/mediumsmall.png">
  </p>


  <p align="center">
    <a href="https://badge.fury.io/py/carculator-truck" target="_blank"><img src="https://badge.fury.io/py/carculator-truck.svg"></a>
    <a href="https://github.com/romainsacchi/carculator_truck" target="_blank"><img src="https://github.com/romainsacchi/carculator_truck/actions/workflows/main.yml/badge.svg?branch=master"></a>
    <a href="https://coveralls.io/github/romainsacchi/carculator_truck" target="_blank"><img src="https://coveralls.io/repos/github/romainsacchi/carculator_truck/badge.svg"></a>
    <a href="https://carculator_truck.readthedocs.io/en/latest/" target="_blank"><img src="https://readthedocs.org/projects/carculator_truck/badge/?version=latest"></a>
   </p>

  Prospective environmental and economic life cycle assessment of medium and heavy duty vehicles.

  A fully parameterized Python model developed by the [Technology Assessment group](https://www.psi.ch/en/ta) of the
  [Paul Scherrer Institut](https://www.psi.ch/en) to perform life cycle assessments (LCA) of medium and heavy duty trucks.
  Based on the Life Cycle Assessment tool for passenger vehicles [carculator](https://github.com/romainsacchi/carculator).

  See [the documentation](https://carculator_truck.readthedocs.io/en/latest/index.html) for more detail, validation, etc.

  The model has been introduced and detailed in a publication to the journal <i>Environmental Science and Technology</i>.

  [1] Sacchi R, Bauer C, Cox BL. Does Size Matter? The Influence of Size, Load Factor, Range Autonomy, and Application Type on the Life Cycle Assessment of Current and Future Medium and Heavy-Duty Vehicles.
  Environ Sci Technol 2021. [https://doi.org/10.1021/acs.est.0c07773](https://doi.org/10.1021/acs.est.0c07773).



  For the latest version, using conda::

      conda install -c romainsacchi carculator_truck

  or for a stable release, from Pypi::

      pip install carculator_truck




  <i>carculator_truck</i> allows to model vehicles across:
  <ul>
  <li>different conventional and alternative powertrains: diesel, compressed natural gas, hybrid-diesel, plugin hybrid, electric, fuel cell</li>
  <li>different gross weight cateogries: 3.5t, 7.5t, 18t, 26t, 32t, 40t and 60t</li>
  <li>different fuel pathways: conventional fuels, bio-based fuels (biodiesel, biomethane), synthetic fuels
  (Fischer-Tropsch-based synthetic diesel, synhtetic methane)</li>
  <li>different years: from 2000 to 2050. Technological progress at the vehicle level but also in the rest of the world energy
  system (e.g., power generation) is accounted for, using energy scenario-specific IAM-coupled ecoinvent databases produced by
  <a href="https://github.com/romainsacchi/premise" target="_blank">premise</a>.</li>
  <li>Inventories can be imported into <a href="https://brightway.dev/" target="_blank">Brightway2</a> and
  <a href="https://www.simapro.com/" target="_blank">SimaPro 9.x.</a>.</li>
  </ul>

  <p align="center">
      The energy model of <i>carculator_truck</i> considers the vehicle aerodynamics, the road gradient and other factors.
      It also considers varying efficiencies of the transmission and engine at various load points for each second
      of the driving cycle.

    <img style="height:150px;" src="https://github.com/romainsacchi/carculator_truck/blob/master/docs/_static/img/energy_model.png">
  </p>

  <p align="center">
      The energy model and the calculated tank-to-wheel energy consumption is validated against the simulation software
      <a href="https://ec.europa.eu/clima/policies/transport/vehicles/vecto_en" target="_blank">VECTO</a>.

    <img style="height:150px;" src="https://github.com/romainsacchi/carculator_truck/blob/master/docs/_static/img/vecto_validation.png">
  </p>

  <p align="center">
      Benefits of hybrid powertrains are fully conidered: the possibility to recuperate braking energy as well as efficiency gains from engine
      downsizing is accounted for.

    <img style="height:150px;" src="https://github.com/romainsacchi/carculator_truck/blob/master/docs/_static/img/hybrid_efficiency.png">
  </p>

  <p align="center">
      Global warming potential impacts per ton-km for a 40-t truck, across different powertrain technologies,
      using an urban driving cycle.

    <img style="height:150px;" src="https://github.com/romainsacchi/carculator_truck/blob/master/docs/_static/img/urban_gwp.png">
  </p>



  See the notebook with [examples](https://github.com/romainsacchi/carculator_truck/blob/master/examples/Examples.ipynb).



  Do not hesitate to contact the development team at [carculator@psi.ch](mailto:carculator@psi.ch).



  * [Romain Sacchi](https://github.com/romainsacchi)
  * [Chris Mutel](https://github.com/cmutel/)



  See [contributing](https://github.com/romainsacchi/carculator_truck/blob/master/CONTRIBUTING.md).



  [BSD-3-Clause](https://github.com/romainsacchi/carculator_truck/blob/master/LICENSE). Copyright 2020 Paul Scherrer Institut.

rpm_license:
  BSD 3-Clause License  Copyright (c) 2020, Paul Scherrer Institut  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


