# packages

pkgId: 20f3d53ac915783a706a32bc71e7708f0331caa522a8a00684fa353eab74f878
name: python-carculator-utils
arch: src
version: 1.3.0
epoch: 0
release: 1
summary: Provides convenience functions for carculator_utils
url: https://github.com/romainsacchi/carculator_utils
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carculator-utils-1.3.0-1.src.rpm
checksum_type: sha256
description:
  Base classes and functions for the carculator package suite.
  Provides base classes to:

  * carculator
  * carculator_bus
  * carculator_truck
  * carculator_two-wheeler



  Do not hesitate to contact the development team at [carculator@psi.ch](mailto:carculator@psi.ch).



  * [Romain Sacchi](https://github.com/romainsacchi)



  See [contributing](https://github.com/romainsacchi/carculator_utils/blob/master/CONTRIBUTING.md).



  [BSD-3-Clause](https://github.com/romainsacchi/carculator_utils/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: 6d7b6370d0608fd4abefc3c58e163d9434987ea87c24130a2c88de5ea693c1a5
name: python-cardano-clusterlib
arch: src
version: 0.6.3
epoch: 0
release: 1
summary: Python wrapper for cardano-cli for working with cardano cluster
url: https://github.com/input-output-hk/cardano-clusterlib-py
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardano-clusterlib-0.6.3-1.src.rpm
checksum_type: sha256
description:
  [![Documentation Status](https://readthedocs.org/projects/cardano-clusterlib-py/badge/?version=latest)](https://cardano-clusterlib-py.readthedocs.io/en/latest/?badge=latest)
  [![PyPi Version](https://img.shields.io/pypi/v/cardano-clusterlib.svg)](https://pypi.org/project/cardano-clusterlib/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

  Python wrapper for cardano-cli for working with cardano cluster. It supports all cardano-cli commands (except parts of `genesis` and `governance`).

  The library is used for development of [cardano-node system tests](https://github.com/input-output-hk/cardano-node-tests).



  ```sh

  $ python3 -m venv .env
  $ . .env/bin/activate

  $ pip install cardano-clusterlib

  $ make install
  ```



  The library needs working `cardano-cli` (the command is available on `PATH`, `cardano-node` is running, `CARDANO_NODE_SOCKET_PATH` is set). In `state_dir` it expects "shelley/genesis.json".

  ```python

  cluster = clusterlib.ClusterLib(state_dir="path/to/cluster/state_dir")
  ```

  On custom testnets that were started in Byron era, you might need to specify a slots offset between Byron epochs and Shelley epochs.
  The "slots_offset" is a difference between number of slots in Byron epochs and in the same number of Shelley epochs.

  E.g. for a testnet with parameters

  * 100 slots per epoch in Byron era
  * 1000 slots per epoch in Shelley era
  * two epochs in Byron era before forking to Shelley

  The offset will be `2 * (1000 - 100) = 1800`.

  ```python
  cluster = clusterlib.ClusterLib(state_dir="path/to/cluster/state_dir", slots_offset=1800)
  ```



  ```python
  from cardano_clusterlib import clusterlib


  cluster = clusterlib.ClusterLib(state_dir="path/to/cluster/state_dir")

  src_address = "addr_test1vpst87uzwafqkxumyf446zr2jsyn44cfpu9fe8yqanyuh6glj2hkl"
  src_skey_file = "/path/to/skey"

  dst_addr = cluster.g_address.gen_payment_addr_and_keys(name="destination_address")
  amount_lovelace = 10_000_000  # 10 ADA


  txouts = [clusterlib.TxOut(address=dst_addr.address, amount=amount_lovelace)]


  tx_files = clusterlib.TxFiles(signing_key_files=[src_skey_file])


  tx_raw_output = cluster.g_transaction.send_tx(
      src_address=src_address,
      tx_name="send_funds",
      txouts=txouts,
      tx_files=tx_files,
  )


  cluster.g_query.get_utxo(dst_addr.address)
  ```



  ```python
  from cardano_clusterlib import clusterlib


  cluster = clusterlib.ClusterLib(state_dir="path/to/cluster/state_dir", tx_era="babbage")


  src_address = "addr_test1vpst87uzwafqkxumyf446zr2jsyn44cfpu9fe8yqanyuh6glj2hkl"
  src_skey_file = "/path/to/skey"


  dst_addr = cluster.g_address.gen_payment_addr_and_keys(name="destination_address")

  amount_fund = 10_000_000  # 10 ADA
  amount_redeem = 5_000_000  # 5 ADA


  script_address = cluster.g_address.gen_payment_addr(
      addr_name="script_address", payment_script_file="path/to/script.plutus"
  )




  tx_files_fund = clusterlib.TxFiles(signing_key_files=[src_skey_file])


  datum_hash = cluster.g_transaction.get_hash_script_data(script_data_file="path/to/file.datum")


  txouts_fund = [
      clusterlib.TxOut(address=script_address, amount=amount_fund, datum_hash=datum_hash),
      
      clusterlib.TxOut(address=dst_addr.address, amount=2_000_000),
  ]


  tx_output_fund = cluster.g_transaction.build_tx(
      src_address=src_address,
      tx_name="fund_script_address",
      tx_files=tx_files_fund,
      txouts=txouts_fund,
      fee_buffer=2_000_000,
  )
  tx_signed_fund = cluster.g_transaction.sign_tx(
      tx_body_file=tx_output_fund.out_file,
      signing_key_files=tx_files_fund.signing_key_files,
      tx_name="fund_script_address",
  )
  cluster.g_transaction.submit_tx(tx_file=tx_signed_fund, txins=tx_output_fund.txins)


  fund_utxos = cluster.g_query.get_utxo(tx_raw_output=tx_output_fund)
  script_utxos = clusterlib.filter_utxos(utxos=fund_utxos, address=script_address)
  collateral_utxos = clusterlib.filter_utxos(utxos=fund_utxos, address=dst_addr.address)



  plutus_txins = [
      clusterlib.ScriptTxIn(
          txins=script_utxos,
          script_file="path/to/script.plutus",
          collaterals=collateral_utxos,
          datum_file="path/to/file.datum",
          redeemer_file="path/to/file.redeemer",
      )
  ]

  tx_files_redeem = clusterlib.TxFiles(signing_key_files=[dst_addr.skey_file])

  txouts_redeem = [
      clusterlib.TxOut(address=dst_addr.address, amount=amount_redeem),
  ]




  tx_output_redeem = cluster.g_transaction.build_tx(
      src_address=src_address,  # this will not be used, because txins (`script_txins`) are specified explicitly
      tx_name="redeem_funds",
      tx_files=tx_files_redeem,
      txouts=txouts_redeem,
      script_txins=plutus_txins,
      change_address=dst_addr.address,
  )
  tx_signed_redeem = cluster.g_transaction.sign_tx(
      tx_body_file=tx_output_redeem.out_file,
      signing_key_files=tx_files_redeem.signing_key_files,
      tx_name="redeem_funds",
  )
  cluster.g_transaction.submit_tx(tx_file=tx_signed_redeem, txins=tx_output_fund.txins)
  ```



  See [cardano-node-tests](https://github.com/input-output-hk/cardano-node-tests) for more examples, e.g. [minting new tokens](https://github.com/input-output-hk/cardano-node-tests/blob/4b50e8069f5294aaba14140ef0509e2857bec35d/cardano_node_tests/utils/clusterlib_utils.py#L491) or [minting new tokens with Plutus](https://github.com/input-output-hk/cardano-node-tests/blob/4b50e8069f5294aaba14140ef0509e2857bec35d/cardano_node_tests/tests/tests_plutus/test_mint_build.py#L151-L195)




  <https://cardano-clusterlib-py.readthedocs.io/en/latest/cardano_clusterlib.html>




  Install this package and its dependencies as described above.

  Run `pre-commit install` to set up the git hook scripts that will check you changes before every commit. Alternatively run `make lint` manually before pushing your changes.

  Follow the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html), with the exception that formatting is handled automatically by [Black](https://github.com/psf/black) (through `pre-commit` command).


pkgId: 0e2aadc8fd7730ee629ccc9b2341753ac960ba1985ea836d7d35d185717d50f2
name: python-cardano-tools
arch: src
version: 2.1.0
epoch: 0
release: 1
url: https://gitlab.com/viper-staking/cardano-tools
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardano-tools-2.1.0-1.src.rpm
checksum_type: sha256
summary:
  A collection of tools to enable development in the Cardano ecosystem using the Python programming language.

description:
  A python module for interacting with the [Cardano](https://www.cardano.org/)
  blockchain.



  You can install Cardano Tools from PyPI:

  ```
  pip install cardano-tools
  ```

  The Cardano Tools package supports Python 3.9 and above.



  The library provides objects for interfacing with different parts of the Cardano ecosystem: the node, the node CLI, and the wallet server. The basic usage is outlined below. For more help see the [example scripts](https://gitlab.com/viper-staking/cardano-tools/-/tree/master/examples) and browse through the code.

  The cardano-node and cardano-wallet applications can be run natively, by installing them on your local machine, or via Docker.



  To run the Cardano node and wallet binaries on your local machine, follow the installation instructions in the respective GitHub README: [cardano-node](https://github.com/input-output-hk/cardano-node), [cardano-wallet](https://github.com/input-output-hk/cardano-wallet).



  To avoid building and installing the Cardano node and wallet binaries on your local machine, IOG provides prebuilt Docker containers with a corresponding Docker [Compose](https://github.com/input-output-hk/cardano-wallet/blob/master/docker-compose.yml) file. Download this file somewhere on your local machine.

  **NOTE**: Some cardano-cli commands require files to be provided. This poses a problem, as Cardano Tools runs from the local filesystem and the CLI runs within Docker. In order to share files between the two environments, we must setup a bind volume in the cardano-node docker container, which will link a local directory to a directory within the docker container. To do this, we must edit the docker-compose.yml file. The cardano-node section will look like this:

  ```
  services:
    cardano-node:
      image: <image_name>
      environment:
        NETWORK:
      volumes:
        - node-${NETWORK}-db:/data
        - node-ipc:/ipc
      restart: on-failure
      ...
  ```

  Setup a bind volume in this container by adding the following lines below the `node-ipc` definition:
  ```
        - type: bind
          source: ${CARDANO_TOOLS_PATH}/config
          target: /config
  ```

  Now set the CARDANO_TOOLS_PATH environment variable to the location where Cardano Tools in installed, e.g.:

  `export CARDANO_TOOLS_PATH=${HOME}/cardano-tools`

  Finally run the applications via docker compose:

  `NETWORK=preview docker compose up -d`

  This will start up the Cardano node and wallet applications and connect to the specified network (mainnet, preview, preprod)



  A cardano-node may be started in passive mode from a Python script using the code:

      node = CardanoNode(
          binary="/usr/local/bin/cardano-node",
          topology=base_path / "mainnet-topology.json",
          database=base_path / "db",
          socket=base_path / "db" / "node.socket",
          config=base_path / "mainnet-config.json",
          show_output=True,  # Optionally print node output to the terminal.
      )
      node.start()

  To run the node as a block producer, supply the additional parameters to the `CardanoNode` object constructor before starting.

      node = CardanoNode(
          binary="/usr/local/bin/cardano-node",
          topology="mainnet-topology.json",
          database="db",
          socket="node.socket",
          config="mainnet-config.json",
          kes_key="pool_kes.skey",
          vrf_key="pool_vrf.skey",
          cert="pool.cert",
          port=3002,  # defaults to 3001
      )
      node.start()

  A running node may then be later stopped by calling `node.stop()` which sends the `SIGINT` signal to the node process. This allows the node to shutdown gracefully by closing the database files and results in faster startup times during the next run. This feature may be useful for using Python to automate node restarts.

  See the [official cardano-node GitHub repository](https://github.com/input-output-hk/cardano-node) for details on the necessary arguments and files needed for operating the node as well as how to install the binary.


  The Cardano-Tools `NodeCLI` object provides a wrapped interface to functionality within the Cardano CLI. Raw methods are wrapped and provide a simple way to get results from CLI commands into your Python scripts. Also, common tasks that require multiple CLI commands are combined into easy to call methods.

      cli = NodeCLI(
          binary="/usr/local/bin/cardano-cli",
          socket="/home/nalyd88/ViperStaking/cardano-node/db/node.socket",
          working_dir=os.getcwd(),
          ttl_buffer=1000,          # optional (default 1000)
          network="--mainnet",      # optional (default --mainnet)
          era="--mary-era",         # optional (default --mary-era)
      )

      print(f"Tip = {cli.get_tip()}")


  Many common tasks like checking balances and sending ADA are provided.

      
      addr = open(working_dir + "/mywallet.addr", 'r').read()
      print(cli.query_balance(addr))

      
      print(json.dumps(cli.get_utxos(addr), indent=4, sort_keys=True))

      
      key_file = "/home/lovelace/cardano-node/owner.skey"
      to_addr = "addr_test1qpzft..."
      from_addr = "addr_test1qrjpd..."
      amt_ada = 10
      cli.send_payment(amt_ada, to_addr, from_addr, key_file)


  The Cardano-Tools library provides tools to help Cardano Stake-Pool Operators (SPOs) setup and maintain pools.

      
      pool_id = cli.create_block_producing_keys(
          "/home/lovelace/cardano-node/mainnet-shelley-genesis.json",
          pool_name="TESTS"
      )

  Remember to keep your cold keys in a secure, off-line, location!

      
      pledges = {
          "owner1": 110_000,
          "owner2": 340_000,
      } # ADA
      pmt_addr = "addr1..."
      args = {
          "pool_name": "TESTS",
          "pool_pledge": sum(pledges.values())*1_000_000,
          "pool_cost": 340*1_000_000,
          "pool_margin": 1.0,
          "pool_cold_vkey":   "keys/TESTS_cold.vkey",
          "pool_vrf_key":     "keys/TESTS_vrf.vkey",
          "pool_reward_vkey": "owner1_pledge_stake.vkey",
          "owner_stake_vkeys": [
              "owner1_pledge_stake.vkey",
              "owner2_pledge_stake.vkey",
          ],
          "pool_relays": [
              {
                  "port": "3001",
                  "host": "myrelay.testspool.io",
                  "host-type": "single"
              }
          ],
          "pool_metadata_url": "https://testspool.io/files/TESTS_metadata.json",
          "folder": working_dir
      }

      
      witness_files = [
          working_dir / "cold_witness.json",
          working_dir / "fees_witness.json",
          working_dir / "owner1_witness.json",
          working_dir / "owner2_witness.json",
      ]

      
      
      raw_tx = cli.build_raw_transaction(
          pool_addr,
          witness_count=len(witness_files),
          certs=[
              cli.generate_stake_pool_cert(**args)
          ]
      )

  After the registration transaction is successfully signed by all the required keys (hardware wallets and cold keys), collect the witness files and then sign and send the stake pool registration transaction.

      
      signed_tx = cli.witness_transaction(raw_tx, witness_files)

      
      cli.submit_transaction(signed_tx)



  The first step in minting an NFT, other than the art work 😉, is to create a policy ID.

      
      vkey_hash = cli.get_key_hash("./payment.vkey")

      
      genesis = "/home/lovelace/cardano-node/mainnet-shelley-genesis.json"
      slots_till_close = cli.days2slots(365, genesis)  # 1 yr
      closing_slot = cli.get_tip() + slots_till_close

      
      multi_script = cli.build_multisignature_scripts(
          "policyid-name-multisig",
          [vkey_hash],  # Supports multiple signing keys
          "all",
          end_slot=closing_slot,
      )

      
      policy_id = cli.generate_policy(multi_script)

  Next, we must create the asset metadata and then store it in a JSON file.
  This is not specific to the Cardano-Tools library.

      metadata = {
          "721": {
              policy_id: policy_id,
              "version": "1.0"
              "COOL_NFT_00": {
                  "image": "ipfs://...",
                  ...
              }
          }
      }

      with open("my_nft_metadata.json", 'w') as outfile:
          json.dump(metadata, outfile, indent=4)

  Then all we have to do is simply build and send the minting transaction.

      
      addr = "addr1..."

      
      asset_names = ["COOL_NFT_00",]

      
      asset_amounts = [1 for i in asset_names]

      
      tx_file = cli.build_mint_transaction(
          policy_id,
          asset_names,
          asset_amounts,
          addr,
          n_wit := 1,  # Number of signing keys in multi-sig script
          tx_metadata="my_nft_metadata.json",
          minting_script="policyid-name-multisig.json",
          ada=3  # Optionally specify some ADA to exist in the UTxO with the NFT
      )

      
      skey = "payment.skey"
      signed_tx = cli.sign_transaction(tx_file, [skey,])

      
      cli.submit_transaction(signed_tx)

  If you need to burn an NFT, the process is similar.

      tx_file = cli.build_burn_transaction(
          policy_id,
          asset_names,
          asset_amounts,
          addr,
          n_wit := 1,
          minting_script="policyid-name-multisig.json",
      )

  Sending an NFT is also covered.


      
      from_addr = open("payment.addr", 'r').read().strip()

      
      to_addr = "addr1..."

      
      asset_name = "COOL_NFT_00"

      
      tx_file = cli.build_send_tx(
          to_addr,
          from_addr,
          quantity := 1,
          policy_id,
          asset_name=asset_name,
      )

      
      skey1 = "payment.skey"
      signed_tx = cli.sign_transaction(tx_file, [skey1])

      
      txid = cli.submit_transaction(signed_tx)


  The Cardano-Tools library contains an interface to the [Cardano wallet back end](https://github.com/input-output-hk/cardano-wallet), which may be accessed via either the CLI or through HTTP requests.



      cw_cli = WalletCLI(
          path_to_cli="/usr/local/bin/cardano-wallet"
      )

      logging.basicConfig(level=logging.DEBUG)

      
      wallet = cw_cli.get_wallet_by_name("ADDER_Rewards")

      
      print(int(wallet["balance"]["total"]["quantity"])/1_000_000)

      
      print(cw_cli.get_wallet_balance(wallet["id"]))



      cw_http = WalletHTTP(
          wallet_server="http://127.0.0.1",
          wallet_server_port=8090
      )

      ada_amt = 100.5
      rx_address = "addr1...."

      wallet = cw_http.get_wallet_by_name("ExampleWallet")

      
      
      
      
      
      
      
      passphrase = os.getenv('WALLET_PASS')

      cw_http.send_ada(
          wallet.get("id"),
          rx_address,
          ada_amt,
          passphrase,
          wait=True
      )



  The modules include detailed logging for debugging. To enable most log messages, import the logging module and include the following at the beginning of your scripts.

      logging.basicConfig(level=logging.DEBUG)

  The [example scripts](https://gitlab.com/viper-staking/cardano-tools/-/tree/master/examples) illustrate how to enable logging.



  This repository uses [Poetry](https://python-poetry.org/) as the build system. To get started, clone the repository and install the dependencies.

      git clone https://gitlab.com/viper-staking/cardano-tools.git
      cd cardano-tools
      poetry install

  To run the unit tests with coverage reports use the following:

      poetry run pytest --cov=cardano_tools/ --cov-report term-missing



  This project is developed and maintained by the team at [Viper Staking](https://viperstaking.com/).



  The Cardano-Tools library is also used in the official [Viper Staking Docker containers](https://gitlab.com/viper-staking/docker-containers).


pkgId: 0c865f1b72da19640c1bc76f96fcba8f979159249620bf31d16322bd96574e6d
name: python-cardboardlint
arch: src
version: 1.3.1
epoch: 0
release: 1
summary: Cheap lint solution for PRs.
url: https://pypi.org/project/cardboardlint/
rpm_license: GNU General Public License v3 or later (GPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardboardlint-1.3.1-1.src.rpm
checksum_type: sha256
description:
  Cardboardlint is a cheap lint solution for pull requests.
  It is a non-hosted and customizable tool similar to commercial services like:
  - Hound CI: https://houndci.com/
  - Stickler CI: https://stickler-ci.com/
  - landscape.io: https://landscape.io/
  - ...
  For more advanced analysis, one could use Coverty Scan.
  (https://scan.coverity.com/)
  Cardboardlint wraps a collection of linters, intended to be used on a project
  in a Git repository. Cardboardlint is able to report just those messages related
  to lines that have changed in your development branch, compared to another
  commit, e.g. the HEAD of the master branch. This is intended to make life easier
  for contributors to a project: in their pull requests, they will only see
  linting issues related to the code they have touched. For some linters,
  cardboardlint also supports automatic fixes of linting issues, optionally
  restricted to code that has changed in your development branch.
  Some example projects that use Cardboardlint:
  - Cardboardlint, obviously
  - Roberto: https://github.com/theochem/roberto (Cardboardlint also uses Roberto.)
  - IOData: https://github.com/theochem/iodata
  - CellCutoff: https://github.com/theochem/cellcutoff
  - CGrid: https://github.com/theochem/cgrid


pkgId: 5f673791280563e7da34f085343603510621ce3fa3ab99bc39ef7f1d29c8e78c
name: python-cardec
arch: src
version: 1.0.3
epoch: 0
release: 1
url: https://github.com/jlakkis/CarDEC
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardec-1.0.3-1.src.rpm
checksum_type: sha256
summary:
  A deep learning method for joint batch correction, denoting, and clustering of single-cell rna-seq data.

description:
  CarDEC (**C**ount **a**dapted **r**egularized **D**eep **E**mbedded **C**lustering) is a joint deep learning computational tool that is useful for analyses of single-cell RNA-seq data. CarDEC can be used to:

  1. Correct for batch effect in the full gene expression space, allowing the investigator to remove batch effect from downstream analyses like psuedotime analysis and coexpression analysis. Batch correction is also possible in a low-dimensional embedding space.
  2. Denoise gene expression.
  3. Cluster cells.



  We described and introduced CarDEC in our [methodological paper](https://www.biorxiv.org/content/10.1101/2020.09.23.310003v1). To find code to reproduce the results we generated in that paper, please visit this separate [github repository](https://github.com/jlakkis/CarDEC_Codes), which provides all code (including that for other methods) necessary to reproduce our results.



  Recomended installation procedure is as follows.

  1. Install [Anaconda](https://www.anaconda.com/products/individual) if you do not already have it.
  2. Create a conda environment, and then activate it as follows in terminal.

  ```
  $ conda create -n cardecenv
  $ conda activate cardecenv
  ```

  3. Install an appropriate version of python.

  ```
  $ conda install python==3.7
  ```

  4. Install nb_conda_kernels so that you can change python kernels in jupyter notebook.

  ```
  $ conda install nb_conda_kernels
  ```

  5. Finally, install CarDEC.

  ```
  $ pip install CarDEC
  ```

  Now, to use CarDEC, always make sure you activate the environment in terminal first ("conda activate cardecenv"). And then run jupyter notebook. When you create a notebook to run CarDEC, make sure the active kernel is switched to "cardecenv"



  A [tutorial jupyter notebook](https://drive.google.com/drive/folders/19VVOoq4XSdDFRZDou-VbTMyV2Na9z53O?usp=sharing), together with a dataset, is publicly downloadable.



  - Python >= 3.7
  - TensorFlow >= 2.0.1, <= 2.3.1
  - scikit-learn == 0.22.2.post1
  - scanpy == 1.5.1
  - louvain == 0.6.1
  - pandas == 1.0.1
  - scipy == 1.4.1



  Installation on MacOS should be smooth. If installing on Windows Subsystem for Linux (WSL), the user must properly configure their g++ compiler to ensure that the louvain package can be built during installation. If the compiler is not properly configured, the user may encounter a following deprecation error similar to the following.

  "DEPRECATION: Could not build wheels for louvain which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above."

  To fix this error, try to install the libxml2-dev package.


pkgId: dba56e65718eb4531f164a6b639a9150b4611fa58722ea1ef501ce2f1232e6dd
name: python-cardiac-geometries
arch: src
version: 1.1.7
epoch: 0
release: 1
summary: A python library for cardiac geometries
url: https://github.com/ComputationalPhysiology/cardiac_geometries
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardiac-geometries-1.1.7-1.src.rpm
checksum_type: sha256
description:
  This is a library for creating idealized cardiac geometries in FEniCS using `gmsh`.
  Currently you can create bi-ventricular (BiV) and left-ventricular (LV) ellipsoidal geometries as well as slab geometries. There is also support for creating bi-ventricular and slab geometries embedded in a torso / bath.


  This package can also output analytic fiber orientations for LV and Slab and integrated with the [ldrb](https://github.com/finsberg/ldrb) algorithm BiV geometries.


  User are encourage to use the the [provided docker image](https://github.com/ComputationalPhysiology/cardiac_geometries/pkgs/container/cardiac_geometries)
  ```
  docker pull ghcr.io/computationalphysiology/cardiac_geometries:latest
  ```
  which comes pre-installed with FEniCs and gmsh.

  You can also install `cardiac-geometries` using `pip`
  ```
  python3 -m pip install cardiac-geometries
  ```
  but this requires FEniCS and gmsh to be installed in other ways. See more at https://computationalphysiology.github.io/cardiac_geometries/install.html


  `cardiac-geometries` comes with a command-line interface, and to e.g create an LV mesh you can do
  ```
  cardiac-geometries create-lv-ellipsoid lv-mesh
  ```
  The same functionality can be accessed through the Python API, e.g
  ```python
  import cardiac_geometries

  geo = cardiac_geometries.mesh.create_lv_ellipsoid(outdir="lv-mesh")
  ```
  See https://computationalphysiology.github.io/cardiac_geometries/quickstart.html for more info.



  Please read the documentation at http://computationalphysiology.github.io/cardiac_geometries for more info.


  See https://computationalphysiology.github.io/cardiac_geometries/CONTRIBUTING.html


  MIT


pkgId: c661eeeaef5a5ec9e4bf8a0ab3a29ea15c55eb6410a2af54754a863c6834eccc
name: python-cardiac-geometries-core
arch: src
version: 0.2.3
epoch: 0
release: 1
summary: Gmsh files for cardiac geometries
url: https://github.com/finsberg/cardiac-geometries-core
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardiac-geometries-core-0.2.3-1.src.rpm
checksum_type: sha256
description:
  Gmsh files for caridac geometries

  Source code : https://github.com/ComputationalPhysiology/cardiac-geometries-core



  You can install the package with pip
  ```
  python3 -m pip install cardiac-geometries-core
  ```
  or you can just run a container without any installation, i.e
  ```
  docker run --rm -w /home/shared -v $PWD:/home/shared -it ghcr.io/computationalphysiology/cardiac-geometries-core:latest
  ```
  For example the following command will create an lv ellipsoid and save it to a file called `lv-mesh.msh`
  ```
  docker run --rm -w /home/shared -v $PWD:/home/shared -it ghcr.io/computationalphysiology/cardiac-geometries-core:latest lv-ellipsoid lv-mesh.msh
  ```


  Henrik Finsberg (henriknf@simula.no)


  MIT


pkgId: a31aaaf78523dd90af1afd6cc7fb42654bd05030b74c81b19242531cc94f6a10
name: python-cardiac-geometriesx
arch: src
version: 0.4.3
epoch: 0
release: 1
summary: A python library for cardiac geometries
url: https://github.com/finsberg/cardiac-geometriesx
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardiac-geometriesx-0.4.3-1.src.rpm
checksum_type: sha256
description:
  ![_](docs/_static/logo.png)

  [![Create and publish a Docker image](https://github.com/ComputationalPhysiology/cardiac-geometriesx/actions/workflows/docker-image.yml/badge.svg)](https://github.com/ComputationalPhysiology/cardiac-geometriesx/actions/workflows/docker-image.yml)
  [![Test package](https://github.com/ComputationalPhysiology/cardiac-geometriesx/actions/workflows/test.yml/badge.svg)](https://github.com/ComputationalPhysiology/cardiac-geometriesx/actions/workflows/test.yml)
  [![Test package MPI](https://github.com/ComputationalPhysiology/cardiac-geometriesx/actions/workflows/test-mpi.yml/badge.svg)](https://github.com/ComputationalPhysiology/cardiac-geometriesx/actions/workflows/test-mpi.yml)
  [![Pre-commit](https://github.com/ComputationalPhysiology/cardiac-geometriesx/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/ComputationalPhysiology/cardiac-geometriesx/actions/workflows/pre-commit.yml)
  [![PyPI version](https://badge.fury.io/py/cardiac-geometriesx.svg)](https://badge.fury.io/py/cardiac-geometriesx)



  Cardiac geometries is a software package built on top of [`cariac-geometries-core`](https://github.com/ComputationalPhysiology/cardiac-geometries-core) that adds support for creating idealized cardiac geometries for dolfinx.

  There are two ways you can use `cardiac-geomtries`, either using the command line interface, e.g
  ```
  geox lv-ellipsoid --create-fibers lv-mesh --fiber-space P_2
  ```

  or using the python API e.g
  ```python
  geo =  cardiac_geometries.mesh.lv_ellipsoid(outdir="lv-mesh", create_fibers=True, fiber_space="P_2")
  ```



  To install the package you can use `pip`
  ```
  python3 -m pip install cardiac-geometriesx
  ```
  however, this assumes that you already have `dolfinx` pre-installed. You can also use the provided docker image e.g
  ```
  docker pull ghcr.io/computationalphysiology/cardiac-geometriesx:latest
  ```
  To start a new container interactive you can do
  ```
  docker run --name geox -v $PWD:/home/shared -w /home/shared -it ghcr.io/computationalphysiology/cardiac-geometriesx:latest
  ```
  or if you just want to create a mesh and exit you can run the command line interface directly e.g
  ```
  docker run --rm -v $PWD:/home/shared -w /home/shared -it ghcr.io/computationalphysiology/cardiac-geometriesx:latest geox lv-ellipsoid --create-fibers lv-mesh --fiber-space P_2
  ```


  Henrik Finsberg (henriknf@simula.no)


  MIT


pkgId: 8e759dd483f04f063016b57cd5b9263d292efbfe41d1ee46b56cc7557ab0510d
name: python-cardiac-mps
arch: src
version: 2024.0.0
epoch: 0
release: 1
summary: Tools for working with caridac mps files
url: https://github.com/ComputationalPhysiology/mps
rpm_license: LGPL-2.1
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardiac-mps-2024.0.0-1.src.rpm
checksum_type: sha256
description:
  [![CI](https://github.com/ComputationalPhysiology/mps/actions/workflows/main.yml/badge.svg)](https://github.com/ComputationalPhysiology/mps/actions/workflows/main.yml)
  [![PyPI version](https://badge.fury.io/py/cardiac-mps.svg)](https://badge.fury.io/py/cardiac-mps)
  [![codecov](https://codecov.io/gh/ComputationalPhysiology/mps/branch/master/graph/badge.svg?token=V5DOQ1PUVF)](https://codecov.io/gh/ComputationalPhysiology/mps)
  [![github pages](https://github.com/ComputationalPhysiology/mps/actions/workflows/github-pages.yml/badge.svg)](https://github.com/ComputationalPhysiology/mps/actions/workflows/github-pages.yml)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![License: LGPL v3](https://img.shields.io/badge/License-LGPL_v2.1-blue.svg)](https://www.gnu.org/licenses/lgpl-2.1)




  A library for reading and analyzing MPS data.
  The analysis scripts are heavily based on [ap_features](https://github.com/ComputationalPhysiology/ap_features) which is a package for computing features of action potential traces.



  To install the package you can simply di
  ```
  python -m pip install cardiac-mps
  ```

  For more options see <https://computationalphysiology.github.io/mps/docs/install.html>



  <https://computationalphysiology.github.io/mps>



  See <https://computationalphysiology.github.io/mps/CONTRIBUTING.html>




  This software is developed by Henrik Finsberg at Simula Research Laboratory.
  If you need to get in contact, please send me an email at [henriknf@simula.no](mailto:henriknf@simula.no).



  LGPLv2


pkgId: ce1f5c292fe054950ba6c26c013b1da9abdc8f8fee1ea1170121950603ffbc0a
name: python-cardiffwaste
arch: src
version: 0.2.6
epoch: 0
release: 1
summary: A package to gather waste collection details for UK addresses served by Cardiff Council.
url: https://github.com/tombrien/cardiffwastepy
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardiffwaste-0.2.6-1.src.rpm
checksum_type: sha256
description:
  This is a simple package to collect upcoming waste collections for an addresses served by Cardiff Council.



  ```
  pip install cardiffwaste
  ```





  Getting collections requires your Unique Property Reference Number (UPRN), the example below uses `123456789012`. If you don't know this (highly likely), you can use the `address_search` helper to look up the UPRN as decribed [below](#address-search)

  ```python
  from cardiffwaste import WasteCollections

  address = WasteCollections(123456789012)
  collections = address.get_next_collections()

  print(collections["general"]["collection_date"])


  ```

  Five collection types are currently handled, which are `general`, `recycling`, `food`, `garden` and `hygiene`. These keys will only be present if a collection is scheduled in the next 4 weeks. For scheduled collections, each collection will have the following keys:

  | Attribute | Value Type | Description |
  | --- | --- | --- |
  | `type` | `str` | The collection type (`general`, `recycling`, `food`, or `garden`) |
  | `collection_date` | `datetime.date` | Date of next collection |
  | `collection_type` | `str` | `scheduled` or `rescheduled` depending on if planned has been missed |
  | `image` | `str` | URL of a representation of the collection type |




  You can find your UPRN using the `address_search` helper. This takes any reasonable string describing the address, such as a post code, and returns a dictionary of possible matches. The returned dictionary is of the form `{int(UPRN): str(address_description)}`

  The helper can be called as follows:

  ```python
  from cardiffwaste import address_search

  address_search("CF10 1AA")








  address_search("mansion house")





  ```





  My current plans are to get this to what might actually be called a stable state and sort out CI.


pkgId: db55040eb589015fa986296e38bff779bc20133b6aeac4788dc71ee619891d93
name: python-cardinal-pythonlib
arch: src
version: 1.1.27
epoch: 0
release: 1
summary: Miscellaneous Python libraries
url: https://github.com/RudolfCardinal/pythonlib
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardinal-pythonlib-1.1.27-1.src.rpm
checksum_type: sha256
description:
  Simple library functions used by other code, and some basic command-line tools.
  By Rudolf Cardinal (rudolf@pobox.com)
  Install with ``pip install cardinal_pythonlib``.
  Documentation is at https://cardinalpythonlib.readthedocs.io/.


pkgId: 23770a2ba839576677a77451749f9fe0934f206fa5b94026a3ad951b5ee96704
name: python-cardpay
arch: src
version: 3.87.5
epoch: 0
release: 1
summary: Unlimit APIv3 Python SDK
url: https://github.com/cardpay/python-sdk-v3.git
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardpay-3.87.5-1.src.rpm
checksum_type: sha256
description:
  You can sign up for a Unlimit account at https://www.unlimit.com



  Please follow the [installation](#installation) instruction and take a look at [usage examples](tests).




  Python 3+




  If the python package is hosted on Github, you can install directly from Github

  ```sh
  pip install git+https://github.com/cardpay/python-sdk-v3.git --upgrade
  ```
  or

  ```sh
  pip install 'cardpay>=3.87.5' --upgrade
  ```

  Then import the package:
  ```python
  from cardpay import *
  ```



  Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

  ```sh
  python setup.py install --user
  ```

  Then import the package:
  ```python
  from cardpay import *
  ```



  Example for Auth
  ```python
  import os
  from cardpay import *

  CARDPAY_API_URL = os.getenv('CARDPAY_API_URL', 'https://sandbox.cardpay.com')
  GATEWAY_TERMINAL_CODE = os.getenv('GATEWAY_TERMINAL_CODE', '00000')
  GATEWAY_PASSWORD = os.getenv('GATEWAY_PASSWORD', 'password')

  auth = AuthApi(ApiClient(baseUrl=CARDPAY_API_URL))

  result = auth.obtain_tokens(
      grant_type="password",
      terminal_code=GATEWAY_TERMINAL_CODE,
      password=GATEWAY_PASSWORD
  )

  access_token = result.access_token
  refresh_token = result.refresh_token

  print('access_token:',access_token)
  print('refresh_token:', refresh_token)
  ```

  Example for payment
  ```python
  import os
  from cardpay import *

  CARDPAY_API_URL = os.getenv('CARDPAY_API_URL', 'https://sandbox.cardpay.com')
  GATEWAY_TERMINAL_CODE = os.getenv('GATEWAY_TERMINAL_CODE', '00000')
  GATEWAY_PASSWORD = os.getenv('GATEWAY_PASSWORD', 'password')

  config = Configuration(
      base_url=CARDPAY_API_URL,
      terminal_code=GATEWAY_TERMINAL_CODE,
      password=GATEWAY_PASSWORD
  )
  payments = PaymentsApi(ApiClient(config))

  request = PaymentRequest(
      request=ApiClient.uuid_request(),
      merchant_order=PaymentRequestMerchantOrder(
          id='merchant order id',
          description='merchant description'
      ),
      card_account=PaymentRequestCardAccount(
          card=PaymentRequestCard(
              pan='card pan',
              holder='cardholder in Upper Case',
              expiration='expiration date',
              security_code='123'
          ),
          billing_address = BillingAddress(
              country='USA',
              state='NY',
              zip='10001',
              city='New York',
              addr_line_1='address1',
              addr_line_2='address2'
          )
      ),
      customer=PaymentRequestCustomer(
          id='000',
          full_name='full name',
          birth_date='birth date',
          email='e-mail',
          phone='+###########',
          work_phone='+###########',
          home_phone='+###########',
          locale='en'
      ),
      payment_method="BANKCARD",
      payment_data=PaymentRequestPaymentData(
          currency="currency",
          amount=1.23
      )
  )

  create_payment_response = payments.create_payment(request)
  payment_id = create_payment_response.payment_data.id
  redirect_url = create_payment_response.redirect_url

  print("payment_id:", payment_id);
  print("redirect_url:", redirect_url);

  payment_response = payments.get_payment(payment_id)
  print('payment_response:', payment_response)
  print('payment_status:', payment_response.payment_data.status)
  ```




  The SDK will automatically use a proxy if the `HTTPS_PROXY` or `HTTP_PROXY` environment variable is set.

  If the `NO_PROXY` env variable is set, the SDK won't use the proxy for hosts from this variable. The format of
  `NO_PROXY`: comma separated domain names (e.g. "cardpay.com,.example.com").


pkgId: 414dda594dc3c02b2dba27c3203123ae55d8bdccdb382bc0e768d46d7c95be6a
name: python-cardpay
arch: src
version: 3.89.16
epoch: 0
release: 1
summary: Unlimit APIv3 Python SDK
url: https://github.com/cardpay/python-sdk-v3.git
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardpay-3.89.16-1.src.rpm
checksum_type: sha256
description:
  You can sign up for a Unlimit account at https://www.unlimit.com



  Please follow the [installation](#installation) instruction and take a look at [usage examples](tests).




  Python 3+




  If the python package is hosted on Github, you can install directly from Github

  ```sh
  pip install git+https://github.com/cardpay/python-sdk-v3.git --upgrade
  ```
  or

  ```sh
  pip install 'cardpay>=3.89.16' --upgrade
  ```

  Then import the package:
  ```python
  from cardpay import *
  ```



  Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

  ```sh
  python setup.py install --user
  ```

  Then import the package:
  ```python
  from cardpay import *
  ```



  Example for Auth
  ```python
  import os
  from cardpay import *

  CARDPAY_API_URL = os.getenv('CARDPAY_API_URL', 'https://sandbox.cardpay.com')
  GATEWAY_TERMINAL_CODE = os.getenv('GATEWAY_TERMINAL_CODE', '00000')
  GATEWAY_PASSWORD = os.getenv('GATEWAY_PASSWORD', 'password')

  auth = AuthApi(ApiClient(baseUrl=CARDPAY_API_URL))

  result = auth.obtain_tokens(
      grant_type="password",
      terminal_code=GATEWAY_TERMINAL_CODE,
      password=GATEWAY_PASSWORD
  )

  access_token = result.access_token
  refresh_token = result.refresh_token

  print('access_token:',access_token)
  print('refresh_token:', refresh_token)
  ```

  Example for payment
  ```python
  import os
  from cardpay import *

  CARDPAY_API_URL = os.getenv('CARDPAY_API_URL', 'https://sandbox.cardpay.com')
  GATEWAY_TERMINAL_CODE = os.getenv('GATEWAY_TERMINAL_CODE', '00000')
  GATEWAY_PASSWORD = os.getenv('GATEWAY_PASSWORD', 'password')

  config = Configuration(
      base_url=CARDPAY_API_URL,
      terminal_code=GATEWAY_TERMINAL_CODE,
      password=GATEWAY_PASSWORD
  )
  payments = PaymentsApi(ApiClient(config))

  request = PaymentRequest(
      request=ApiClient.uuid_request(),
      merchant_order=PaymentRequestMerchantOrder(
          id='merchant order id',
          description='merchant description'
      ),
      card_account=PaymentRequestCardAccount(
          card=PaymentRequestCard(
              pan='card pan',
              holder='cardholder in Upper Case',
              expiration='expiration date',
              security_code='123'
          ),
          billing_address = BillingAddress(
              country='USA',
              state='NY',
              zip='10001',
              city='New York',
              addr_line_1='address1',
              addr_line_2='address2'
          )
      ),
      customer=PaymentRequestCustomer(
          id='000',
          full_name='full name',
          birth_date='birth date',
          email='e-mail',
          phone='+###########',
          work_phone='+###########',
          home_phone='+###########',
          locale='en'
      ),
      payment_method="BANKCARD",
      payment_data=PaymentRequestPaymentData(
          currency="currency",
          amount=1.23
      )
  )

  create_payment_response = payments.create_payment(request)
  payment_id = create_payment_response.payment_data.id
  redirect_url = create_payment_response.redirect_url

  print("payment_id:", payment_id);
  print("redirect_url:", redirect_url);

  payment_response = payments.get_payment(payment_id)
  print('payment_response:', payment_response)
  print('payment_status:', payment_response.payment_data.status)
  ```




  The SDK will automatically use a proxy if the `HTTPS_PROXY` or `HTTP_PROXY` environment variable is set.

  If the `NO_PROXY` env variable is set, the SDK won't use the proxy for hosts from this variable. The format of
  `NO_PROXY`: comma separated domain names (e.g. "cardpay.com,.example.com").


pkgId: 5b95dc88248a47d2cc6dc209eb2102091deff5bd57534302a01cb062be9293fe
name: python-cardscan-client
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: Python CardScan API client
url: https://github.com/CardScan-ai/api-clients.git
rpm_license: SEE LICENSE IN LICENSE.md
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardscan-client-0.6.0-1.src.rpm
checksum_type: sha256
description:
  The official python client for the CardScan API



  Python 3.8+



  ```bash
  pip install cardscan-client
  ```



  Please follow the [installation procedure](#installation--usage) and then run the following:

  ```python
  from cardscan_client.api_client import ApiClient
  from cardscan_client.api.card_scan_api import CardScanApi
  from cardscan_client.configuration import Configuration
  from cardscan_client.exceptions import ApiException
  from pprint import pprint










  configuration = Configuration(
      api_key=os.environ['API_KEY'],
      environment='sandbox'
  )


  def main():
      client = CardScanApi(api_client=ApiClient(configuration=configuration))

      try:
          api_response = client.full_scan(front_image_path="test/cards/front.jpg")

          pprint(api_response)
      except ApiException as e:
          print("Exception when calling FullScan->full_scan: %s\n" % e)


  if __name__ == "__main__":
      main()

  ```



  All URIs are relative to *https://sandbox.cardscan.ai/v1*

  | Class         | Method                                                                       | HTTP request                                  | Description                |
  | ------------- | ---------------------------------------------------------------------------- | --------------------------------------------- | -------------------------- |
  | _CardScanApi_ | [**create_card**](docs/CardScanApi.md#create_card)                           | **POST** /cards                               | Creates a new card         |
  | _CardScanApi_ | [**create_eligibility**](docs/CardScanApi.md#create_eligibility)             | **POST** /eligibility                         | Create Eligibility Record  |
  | _CardScanApi_ | [**delete_card_by_id**](docs/CardScanApi.md#delete_card_by_id)               | **DELETE** /cards/{card_id}                   | Delete Card                |
  | _CardScanApi_ | [**direct_upload**](docs/CardScanApi.md#direct_upload)                       | **POST** /cards/{card_id}/upload              | Direct Upload              |
  | _CardScanApi_ | [**generate_card_upload_url**](docs/CardScanApi.md#generate_card_upload_url) | **POST** /cards/{card_id}/generate-upload-url | Card - Generate Upload URL |
  | _CardScanApi_ | [**generate_magic_link**](docs/CardScanApi.md#generate_magic_link)           | **GET** /generate-magic-link                  | Generate Magic Link        |
  | _CardScanApi_ | [**generate_upload_url**](docs/CardScanApi.md#generate_upload_url)           | **GET** /generate-upload-url                  | Generate an upload URL     |
  | _CardScanApi_ | [**get_access_token**](docs/CardScanApi.md#get_access_token)                 | **GET** /access-token                         | Access Token               |
  | _CardScanApi_ | [**get_card_by_id**](docs/CardScanApi.md#get_card_by_id)                     | **GET** /cards/{card_id}                      | Get Card by ID             |
  | _CardScanApi_ | [**get_eligibility_by_id**](docs/CardScanApi.md#get_eligibility_by_id)       | **GET** /eligibility/{eligibility_id}         | Get Eligibility            |
  | _CardScanApi_ | [**get_scan_metadata**](docs/CardScanApi.md#get_scan_metadata)               | **GET** /scans/{scan_id}/metadata             | Get Scan Metadata          |
  | _CardScanApi_ | [**list_cards**](docs/CardScanApi.md#list_cards)                             | **GET** /cards                                | List Cards                 |
  | _CardScanApi_ | [**list_eligibility**](docs/CardScanApi.md#list_eligibility)                 | **GET** /eligibility                          | List Eligibility           |
  | _CardScanApi_ | [**search_cards**](docs/CardScanApi.md#search_cards)                         | **GET** /cards/search                         | Search Cards (200) OK      |
  | _CardScanApi_ | [**validate_magic_link**](docs/CardScanApi.md#validate_magic_link)           | **GET** /validate-magic-link                  | Validate Magic Link        |



  - [Address](docs/Address.md)
  - [ApiErrorResponse](docs/ApiErrorResponse.md)
  - [CardApiResponse](docs/CardApiResponse.md)
  - [CardApiResponseDetails](docs/CardApiResponseDetails.md)
  - [CardApiResponseImages](docs/CardApiResponseImages.md)
  - [CardApiResponseImagesBack](docs/CardApiResponseImagesBack.md)
  - [CardApiResponseImagesFront](docs/CardApiResponseImagesFront.md)
  - [CardState](docs/CardState.md)
  - [CardWebsocketEvent](docs/CardWebsocketEvent.md)
  - [CoInsurance](docs/CoInsurance.md)
  - [CoPayment](docs/CoPayment.md)
  - [CoverageSummary](docs/CoverageSummary.md)
  - [CreateCardRequest](docs/CreateCardRequest.md)
  - [CreateCardRequestBackside](docs/CreateCardRequestBackside.md)
  - [CreateEligibilityRequest](docs/CreateEligibilityRequest.md)
  - [Deductible](docs/Deductible.md)
  - [DirectUpload200Response](docs/DirectUpload200Response.md)
  - [DirectUpload200ResponseMetadata](docs/DirectUpload200ResponseMetadata.md)
  - [DirectUploadRequest](docs/DirectUploadRequest.md)
  - [EligibilityApiResponse](docs/EligibilityApiResponse.md)
  - [EligibilityApiResponseEligibilityRequest](docs/EligibilityApiResponseEligibilityRequest.md)
  - [EligibilityApiResponseEligibilityRequestSubscriber](docs/EligibilityApiResponseEligibilityRequestSubscriber.md)
  - [EligibilityApiResponseError](docs/EligibilityApiResponseError.md)
  - [EligibilityInfo](docs/EligibilityInfo.md)
  - [EligibilityState](docs/EligibilityState.md)
  - [EligibilitySummarizedResponse](docs/EligibilitySummarizedResponse.md)
  - [EligibilityWebsocketEvent](docs/EligibilityWebsocketEvent.md)
  - [GenerateCardUploadUrl200Response](docs/GenerateCardUploadUrl200Response.md)
  - [GenerateCardUploadUrlRequest](docs/GenerateCardUploadUrlRequest.md)
  - [GenerateMagicLink200Response](docs/GenerateMagicLink200Response.md)
  - [GetAccessToken200Response](docs/GetAccessToken200Response.md)
  - [GetAccessToken500Response](docs/GetAccessToken500Response.md)
  - [ListEligibility200Response](docs/ListEligibility200Response.md)
  - [MatchScore](docs/MatchScore.md)
  - [OOP](docs/OOP.md)
  - [PayerDetails](docs/PayerDetails.md)
  - [PlanDetails](docs/PlanDetails.md)
  - [ProviderDto](docs/ProviderDto.md)
  - [ResponseMetadata](docs/ResponseMetadata.md)
  - [ScanCaptureType](docs/ScanCaptureType.md)
  - [ScanMetadata](docs/ScanMetadata.md)
  - [ScanMetadataCameraCapabilities](docs/ScanMetadataCameraCapabilities.md)
  - [ScanMetadataCameraCapabilitiesAspectRatio](docs/ScanMetadataCameraCapabilitiesAspectRatio.md)
  - [ScanMetadataCaptureCanvas](docs/ScanMetadataCaptureCanvas.md)
  - [ScanMetadataCaptureScore](docs/ScanMetadataCaptureScore.md)
  - [ScanMetadataCaptureScoreScoresInner](docs/ScanMetadataCaptureScoreScoresInner.md)
  - [ScanMetadataGuides](docs/ScanMetadataGuides.md)
  - [ScanMetadataVideoBackground](docs/ScanMetadataVideoBackground.md)
  - [ScanMetadataVideoTrack](docs/ScanMetadataVideoTrack.md)
  - [ScanMetadataWindowInner](docs/ScanMetadataWindowInner.md)
  - [ScanOrientation](docs/ScanOrientation.md)
  - [SearchCards200Response](docs/SearchCards200Response.md)
  - [Service](docs/Service.md)
  - [SubscriberDetails](docs/SubscriberDetails.md)
  - [SubscriberDto](docs/SubscriberDto.md)
  - [UploadParameters](docs/UploadParameters.md)
  - [ValidateMagicLink200Response](docs/ValidateMagicLink200Response.md)

  <a id="documentation-for-authorization"></a>



  Authentication schemes defined for the API:
  <a id="bearerAuth"></a>



  - **Type**: Bearer authentication


pkgId: 7be22f00796b71308804f2b6f7ecee706fa197707a5ad2bde711325009034d1c
name: python-cardstock
arch: src
version: 0.99.7
epoch: 0
release: 1
url: https://github.com/benjie-git/CardStock/wiki
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cardstock-0.99.7-1.src.rpm
checksum_type: sha256
summary:
  A simple development and rapid prototyping tool for quickly building multi-platform desktop programs and web apps.

description:
  **CardStock** is a cross-platform tool for quickly and easily building graphical programs, called **stacks**, which can be made up of multiple pages called **cards**.  It provides a drawing-program-like editor for building Graphical User Interfaces, and a code editor for adding event-driven python code.

  ![Pong example](https://github.com/benjie-git/CardStock/wiki/images/pong.png?raw=true)

  There have been many open source projects in the past that tried to capture the fun and simplicity of building programs in HyperCard, but in my opinion, none of them offered the open-ended possibilities and ease of use that made HyperCard such a magical-feeling tool.  So in the grand open source tradition, I built my own.

  The guiding principles behind my vision for CardStock are the following, in order of importance:
  1. Keep it approachable, understandable, simple, and efficient to use for python beginners, through the most salty of Senior Software Engineers.
  2. Make it as capable as possible, without adding unnecessary complexity.




  * CardStock lets you design stacks on MacOS, Windows, and GNU/Linux.  You can run CardStock stacks on those platforms, or on any modern web browser, include on Chromebooks and smartphones.
  * You can build programs using objects including text and graphics, images, buttons, text entry fields, and web views.
  * You can use your own python code to manipulate the objects and respond to mouse and keyboard events.
  * You can play sound files from your code.
  * You can search and use clip art in your stacks, thanks to integration with https://openclipart.org.
  * In-context help appears in the app, right where you need it.  And can be turned off when you no longer want it taking up space.
  * All of the creature comforts you've come to expect from a proper application, like full Undo/Redo, and a Find/Replace system that works throughout all of your code and object properties.


  * You can animate changes to most properties of objects, to bring your creations to life.
  * Objects can have speed, and can be set up to automatically bounce off of other objects.
  * You can **import** other python modules into your code, and use them make web requests and display the results, control robots, or run machine learning code, all from within your CardStock stack.
  * Basic IDE features, like syntax highlighting, underlining syntax errors while editing, and autocomplete for objects, variables, functions, methods, properties.
  * Run python commands in an interactive Console window while your stack runs, to check or set variable values, call functions, or any other python you want to run.
  * Browse your running stack's variables and objects, and modify them live in the Variables window.
  * View all code used in a whole stack in one place, and click a line to jump to that line in that object's code editor for that event.
  * View recent error messages, and click one to jump to the offending line of code in the Designer app.
  * You can export a stack into a standalone application that you can share and distribute, or upload it to the web, on https://cardstock.run.


  * Add a built-in library of sounds to use, and the ability to record your own sounds.
  * Allow looping sounds.
  * Add more tutorials for CardStock, and for learning python through CardStock.
  * Allow filling shapes with color gradients.
  * Add an app icon.
  * Improve bounce physics and collision detection performance.

  ________

  * TextFields, and WebViews always remain in front of shapes and images, which get drawn directly on the card view.
  * Visual selection indicators (the blue dotted outlines) are drawn behind native views, and so can hide behind overlapping text fields and web views.
  * Stacks can only import additional modules, and export stacks that include them, when running from source.  Not when running from the prebuilt applications. (The prebuilt applications are built with a few additional libraries: requests, pyserial, and more could be added by request.)
  * Ironically, WebViews do not work in the web-based viewer on https://cardstock.run.
  * For performance reasons, currently mouse events don't propagate through all overlapping objects when running on the web-viewer, just the topmost object under the mouse, any containing groups, and the card.


  The prebuilt applications for Mac and Windows have no external dependencies.

  Running CardStock from source requires Python 3.9 or newer (3.11+ recommended), and wxPython 4.1 or newer (wxPython 4.2.x recommended).
  CardStock requires installing the python modules attrdict3(linux-only), wxpython,simpleaudio, PyInstaller, and requests.
  For mp3 playback support, you'll need to install the lame package (mp3 decoder), and python's streamp3.


  You can either:



  1. Download CardStock for Mac or Windows here: https://github.com/benjie-git/CardStock/releases/latest
  2. Note that the pre-built Windows app is not yet code-signed, so Windows may complain the first time you open the app. If a window appears saying "Windows protected your PC", click the More Info link at the end of the warning paragraph, and then the "Run Anyway" button that appears at the bottom of the window.


  1. install python3
  2. Linux-only: apt install libasound2-dev lame libwebkit2gtk-4.0-dev  # or equivalent on non-debian/ubuntu distros
  3. Mac-only: brew install lame
  4. pip3 install attrdict3
  5. pip3 install wxpython PyInstaller requests  # note that wxpython can take a long time to build
  6. pip3 install --force git+https://github.com/cexen/py-simple-audio.git  # The official simpleaudio package is no longer maintained.  This fork includes a fix for compatability with python 3.12+
  7. To include mp3 support: pip3 install streamp3

     Note that this may require setting LDFLAGS and CPPFLAGS to allow finding the lame header and library files.

      You may need to run this as something like

     `CPPFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib pip3 install streamp3` or

      `CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib pip3 install streamp3`

      depending on where the lame library was installed.

  7. download or clone this repository
  8. run python3 designer.py
  9. optionally run build.py to create your own standalone applications for the CardStock Designer application.


  1. Linux-only: apt install libasound2-dev lame libwebkit2gtk-4.0-dev  # or equivalent on non-debian/ubuntu distros
  2. Mac-only: brew install lame
  3. To include mp3 support: pip3 install streamp3

     Note that this may require setting LDFLAGS and CPPFLAGS to allow finding the lame header and library files.

      You may need to run this as something like

     `CPPFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib pip3 install streamp3` or

      `CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib pip3 install streamp3`

      depending on where the lame library was installed.

  4. pip3 install cardstock  # note that the dependency wxpython can take a very long time to build
  5. run using the newly installed cardstock command



  * [CardStock Wiki](https://github.com/benjie-git/CardStock/wiki)
  * [CardStock on Reddit](https://www.reddit.com/r/CardStockPython/)
  * [CardStock Manual](https://github.com/benjie-git/CardStock/wiki/Manual)
  * [CardStock Tutorial](https://github.com/benjie-git/CardStock/wiki/Tutorial-Dice)
  * [CardStock Reference Guide](https://github.com/benjie-git/CardStock/wiki/Reference)


pkgId: b18c698d44fc7dbc17153d64d1b33e31ac52b009ce0f6def8527ecf900954394
name: python-care-sm-toolkit
arch: src
version: 0.1.5
epoch: 0
release: 1
summary: A toolkit for CARE-SM data transformation.
url: https://github.com/CARE-SM/CARE-SM-Toolkit
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-care-sm-toolkit-0.1.5-1.src.rpm
checksum_type: sha256
description:
  **CSV datatable toolkit for CARE semantic model implementation**

  The implementation of the Clinical And Registry Entries (CARE) Semantic Model for CSV data entails a meticulous and technically advanced workflow. By leveraging the power of the CARE-SM, YARRRML templates and incorporating the critical curation step executed by the CARE-SM toolkit, this implementation achieves robustness, accuracy, and reliability in generating RDF-based CDE-oriented patient data.

  The toolkit serves as a module dedicated to performing a curation step prior to the conversion of data into RDF. The primary transformations carried out by the toolkit include:

  * Quality control for column names.

  * Adding every domain specific ontological term required to define every instances of the model, these terms are specific for every data element.

  * Splitting the column labeled as `value` into distinct datatypes. This enables YARRRML to interpret each datatype differently, facilitating the subsequent processing.

  * Conducting a quality control among `age`/`date`, `stardate` and `enddate` columns to ensure data consistency and validity.

  * Eliminating any row that lacks of the minimal required data to minimize the generation of incomplete RDF transformations.

  * Creation of the column called `uniqid` that assigns a unique identifier to each observation. This prevents the RDF instances from overlapping with one another, ensuring their distinctiveness and integrity.



  There's a Docker-based implementation controlled via API (using FastAPI) that you can use for mounting this data transformation step as a part of your CARE-SM implementation. Use our docker compose to control your Docker image, ports where its located and volumes in order to pass your CSV-based patient data:

  ```yaml
  version: "3.3"

  services:
    api:
      image: pabloalarconm/care-sm-toolkit:latest # check for latest version
      ports:
        - "8000:8000"
      volumes:
        - ./data:/code/data
  ```



  If you are not interested on running Docker image, you can install the Pyhton module for local implementation.



  ```bash
  pip install CARE-SM-Toolkit
  ```
  **Requirements:**

  - CSV data table glossary with every data element documented at [CARE-SM implementation](https://github.com/CARE-SM/CARE-SM-Implementation/blob/main/CSV/README.md)

  **Test:**

  ```py
  import pandas as pd
  from main import Toolkit

  test= Toolkit()

  test_done = test.whole_quality_control(input_data="toolkit/exemplar_data/preCARE.csv")
  test_done.to_csv ("toolkit/exemplar_data/CARE.csv", index = False, header=True)
  ```


pkgId: 1a21cdf762aec9fd358cfb9bd31072cb47c2eca654c8b632091b4cb37c564633
name: python-careamics
arch: src
version: 0.0.4.2
epoch: 0
release: 1
summary: Toolbox for running N2V and friends.
url: https://pypi.org/project/careamics/
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-careamics-0.0.4.2-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <a href="https://careamics.github.io/">
      <img src="https://raw.githubusercontent.com/CAREamics/.github/main/profile/images/banner_careamics.png">
    </a>
  </p>



  [![License](https://img.shields.io/pypi/l/careamics.svg?color=green)](https://github.com/CAREamics/careamics/blob/main/LICENSE)
  [![PyPI](https://img.shields.io/pypi/v/careamics.svg?color=green)](https://pypi.org/project/careamics)
  [![Python Version](https://img.shields.io/pypi/pyversions/careamics.svg?color=green)](https://python.org)
  [![CI](https://github.com/CAREamics/careamics/actions/workflows/ci.yml/badge.svg)](https://github.com/CAREamics/careamics/actions/workflows/ci.yml)
  [![codecov](https://codecov.io/gh/CAREamics/careamics/branch/main/graph/badge.svg)](https://codecov.io/gh/CAREamics/careamics)


  CAREamics is a PyTorch library aimed at simplifying the use of Noise2Void and its many
  variants and cousins (CARE, Noise2Noise, N2V2, P(P)N2V, HDN, muSplit etc.).



  Noise2Void is a widely used denoising algorithm, and is readily available from the `n2v`
  python package. However, `n2v` is based on TensorFlow, while more recent methods
  denoising methods (PPN2V, DivNoising, HDN) are all implemented in PyTorch, but are
  lacking the extra features that would make them usable by the community.

  The aim of CAREamics is to provide a PyTorch library reuniting all the latest methods
  in one package, while providing a simple and consistent API. The library relies on
  PyTorch Lightning as a back-end. In addition, we will provide extensive documentation and
  tutorials on how to best apply these methods in a scientific context.



  Check out the [documentation](https://careamics.github.io/) for installation instructions and guides!


pkgId: e8f96f5a99dce0be3d35dcff549f494c3d26f870ce6344f1647a9eaaecd3ba20
name: python-carefree-learn
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: Deep Learning with PyTorch made easy
url: https://github.com/carefree0910/carefree-learn
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carefree-learn-0.5.0-1.src.rpm
checksum_type: sha256
description:
  ![carefree-learn][socialify-image]

  Deep Learning with [PyTorch](https://pytorch.org/) made easy 🚀 !



  Here are the main design principles:
  - The codes should be '`module` first', which means all previous `model`s should be a simple `module` now.
    - And `model` should only be related to the training stuffs. If we only want to use the fancy AI models at inference stage, `module` should be all we need.
  - The `module`s should be as 'native' as possible: no inheritance from base classes except `nn.Module` should be the best, and previous inheritance-based features should be achieved by **dependency injection**.
    - This helps the `module`s to be more `torch.compile` friendly.
  - Training stuffs are not considered at the first place, but they will definitely be added later on, based on the modern AI developments.
  - APIs will be as BC as possible.



  `carefree-learn` is MIT licensed, as found in the [`LICENSE`](https://carefree0910.me/carefree-learn-doc/docs/about/license) file.


  [socialify-image]: https://socialify.git.ci/carefree0910/carefree-learn/image?description=1&descriptionEditable=Deep%20Learning%20%E2%9D%A4%EF%B8%8F%20PyTorch&forks=1&issues=1&logo=https%3A%2F%2Fraw.githubusercontent.com%2Fcarefree0910%2Fcarefree-learn-doc%2Fmaster%2Fstatic%2Fimg%2Flogo.min.svg&pattern=Floating%20Cogs&stargazers=1


pkgId: 373cd911ac129d4abaf15a146afde5f46e53954172c5c914e6f6923b1b4705b2
name: python-cargo
arch: src
version: 0.3
epoch: 0
release: 1
summary: Dependency injection library for Python.
url: https://github.com/larose/cargo
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cargo-0.3-1.src.rpm
checksum_type: sha256
description:
  Cargo is a dependency injection library for Python.

  Cargo is [simple to use](#getting-started), [typed](#cargo-is-typed),
  [flexible](#cargo-is-flexible), [extensible](#cargo-is-extensible) and
  [easy to debug](#cargo-is-easy-to-debug).






  With pip:

  ```shell script
  $ pip install cargo
  ```

  With pipenv:

  ```shell script
  $ pipenv install cargo
  ```

  With poetry:

  ```shell script
  $ poetry add cargo
  ```



  [examples/intro.py](./examples/intro.py):

  ```python
  import cargo




  class A:
      def __str__(self):
          return "A"


  class B:
      def __init__(self, a: A):
          self.a = a




  container = cargo.containers.Standard()




  container[A] = A
  container[B] = B




  b = container[B]




  print(b.a)
  ```



  All the examples are located in the [examples](examples) directory.




  Cargo uses the argument types to inject the dependencies; not their
  names.

  [examples/hello_dependencies.py](examples/hello_dependencies.py):

  ```python
  import cargo


  class A:
      pass


  class B:
      pass


  class Hello:
      def __init__(self, foo: A, bar: B):
          print(f"Hello {foo} and {bar}")


  container = cargo.containers.Standard()

  container[A] = A
  container[B] = B
  container[Hello] = Hello


  container[Hello]
  ```



  Functions and methods can be used as factories; and objects as values.

  [examples/factory_and_value.py](examples/factory_and_value.py):

  ```python
  ...

  DatabaseURL = typing.NewType("DatabaseURL", str)

  def database_client_factory(db_url: DatabaseURL) -> DatabaseClient:
      if db_url.startswith("mysql://"):
          return MysqlClient(db_url)

      if db_url.startswith("postgres://"):
          return PostgresClient(db_url)

      raise Exception(f"Invalid database url: {db_url}")


  container = cargo.containers.Standard()


  container[DatabaseClient] = database_client_factory


  container[DatabaseURL] = "mysql://user:password@host:3306/db"

  db_client = container[DatabaseClient]

  print(db_client)  # Prints: <__main__.MysqlClient object at 0x7f681975b390>
  ```





  Cargo composes middlewares to create containers. The
  [`Standard`](cargo/containers.py) container is just a stack of
  opiniated middlewares. You can create your own types of containers
  with the [middlewares](cargo/middlewares.py) you want, or even create
  your own middlewares.


  [examples/my_container.py](examples/my_container.py):

  ```python
  import cargo


  class LoggerMiddleware(cargo.types.Middleware):
      def execute(
          self,
          dependency_type: cargo.types.DependencyType,
          next_middleware: cargo.types.NextMiddleware,
      ):
          print(f"Start resolving {dependency_type}")
          dependency_value = next_middleware()
          print(f"End resolving {dependency_type}")
          return dependency_value


  middleware_factories = [
      LoggerMiddleware,
      cargo.middlewares.CircularDependencyCircuitBreaker,
      cargo.middlewares.Singleton,
  ]
  container = cargo.containers.create(middleware_factories)


  class A:
      pass


  class B:
      def __init__(self, a: A):
          pass


  container[A] = A
  container[B] = B






  container[B]
  ```






  Cargo raises a [`DependencyNotFound`](cargo/exceptions.py) exception
  with the missing dependency type when a dependency is not found.

  [examples/dependency_not_found.py](examples/dependency_not_found.py):

  ```python
  ...

  class A:
      def __init__(self, b: B):
          pass


  class B:
      pass


  container = cargo.containers.Standard()
  container[A] = A



  container[A]
  ```



  Cargo raises a [`CircularDependency`](cargo/exceptions.py) exception
  with the dependency cycle when a circular dependency is detected.

  [examples/circular_dependency.py](examples/circular_dependency.py):

  ```python
  ...









  ...

  container = cargo.containers.Standard()
  container[A] = A
  container[B] = B
  container[C] = C
  container[D] = D



  container[A]
  ```




  - [Mathieu Larose](https://mathieularose.com)




  Cargo is licensed under the terms of the [MIT license](./LICENSE).




  https://github.com/larose/cargo


pkgId: aece0946fec261a7ede33eb941ac32eba8f6d654626a922d4fb3d0246a017984
name: python-cargo-lambda-cdk
arch: src
version: 0.0.29
epoch: 0
release: 1
summary: CDK Construct to build Rust functions with Cargo Lambda
url: https://github.com/cargo-lambda/cargo-lambda-cdk.git
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cargo-lambda-cdk-0.0.29-1.src.rpm
checksum_type: sha256
description:
  This library provides constructs for Rust Lambda functions built with Cargo Lambda

  To use this module you will either need to have [Cargo Lambda installed](https://www.cargo-lambda.info/guide/installation.html) (`0.12.0` or later), or `Docker` installed.
  See [Local Bundling](#local-bundling)/[Docker Bundling](#docker-bundling) for more information.





  You can add [the npm package](https://npmjs.com/package/cargo-lambda-cdk) to your program as follows,

  ```bash
  npm i cargo-lambda-cdk
  ```

  Or using any other compatible package manager



  Add the following to your imports,

  ```plain
  github.com/cargo-lambda/cargo-lambda-cdk/cargolambdacdk
  ```



  You can add [the Python package](https://pypi.org/project/cargo-lambda-cdk) using `pip`, or any other package manager compatible with PyPI,

  ```bash
  pip install cargo-lambda-cdk
  ```



  Define a `RustFunction`:

  ```python
  import { RustFunction } from 'cargo-lambda-cdk';

  new RustFunction(stack, 'Rust function', {
    manifestPath: 'path/to/package/directory/with/Cargo.toml',
  });
  ```

  The layout for this Rust project could look like this:

  ```bash
  lambda-project
  ├── Cargo.toml
  └── src
      └── main.rs
  ```



  The `RustFunction` uses the `provided.al2023` runtime. If you want to change it, you can use the property `runtime`. The only other valid option is `provided.al2`:

  ```python
  import { RustFunction } from 'cargo-lambda-cdk';

  new RustFunction(stack, 'Rust function', {
    manifestPath: 'path/to/package/directory/with/Cargo.toml',
    runtime: 'provided.al2',
  });
  ```



  Define a `RustExtension` that get's deployed as a layer to use it with any other function later.

  ```python
  import { RustExtension, RustFunction } from 'cargo-lambda-cdk';

  const extensionLayer = new RustExtension(this, 'Rust extension', {
    manifestPath: 'path/to/package/directory/with/Cargo.toml',
  });

  new RustFunction(this, 'Rust function', {
    manifestPath: 'path/to/package/directory/with/Cargo.toml',
    layers: [
      extensionLayer
    ],
  });
  ```



  Both `RustFunction` and `RustExtension` support cloning a git repository to get the source code for the function or extension.
  To download the source code from a remote git repository, specify the `gitRemote`. This option can be a valid git remote url, such as `https://github.com/your_user/your_repo`, or a valid ssh url, such as `git@github.com:your_user/your_repo.git`.

  By default, the latest commit from the `HEAD` branch will be downloaded. To download a different git reference, specify the `gitReference` option. This can be a branch name, tag, or commit hash.

  If you want to always clone the repository even if it has already been cloned to the temporary directory, set the `gitForceClone` option to `true`.

  If you specify a `manifestPath`, it will be relative to the root of the git repository once it has been cloned.

  ```python
  import { RustFunction } from 'cargo-lambda-cdk';

  new RustFunction(stack, 'Rust function', {
    gitRemote: 'https://github.com/your_user/your_repo',
    gitReference: 'branch',
    gitForceClone: true,
  });
  ```



  Bundling is the process by which `cargo lambda` gets called to build, package, and deliver the Rust
  binary for CDK. This construct provides two methods of bundling:

  * Local bundling where the locally installed cargo lambda tool will run
  * Docker bundling where a Dockerfile can be specified to build an image



  If `Cargo Lambda` is installed locally then it will be used to bundle your code in your environment. Otherwise, bundling will happen in a Lambda compatible Docker container with the Docker platform based on the target architecture of the Lambda function.



  Use the `environment` prop to define additional environment variables when Cargo Lambda runs:

  ```python
  import { RustFunction } from 'cargo-lambda-cdk';

  new RustFunction(this, 'Rust function', {
    manifestPath: 'path/to/package/directory/with/Cargo.toml',
    bundling: {
      environment: {
        HELLO: 'WORLD',
      },
    },
  });
  ```



  Use the `profile` option if you want to build with a different Cargo profile that's not `release`:

  ```python
  import { RustFunction } from 'cargo-lambda-cdk';

  new RustFunction(this, 'Rust function', {
    manifestPath: 'path/to/package/directory/with/Cargo.toml',
    bundling: {
      profile: 'dev'
    },
  });
  ```



  Use the `cargoLambdaFlags` option to add additional flags to the `cargo lambda build` command that's executed to bundle your function. You don't need to use this flag to set options like the target architecture or the binary to compile, since the construct infers those from other props.

  If these flags include a `--target` flag, it will override the `architecture` option. If these flags include a `--release` or `--profile` flag, it will override the release or any other profile specified.

  ```python
  import { RustFunction } from 'cargo-lambda-cdk';

  new RustFunction(this, 'Rust function', {
    manifestPath: 'path/to/package/directory/with/Cargo.toml',
    bundling: {
      cargoLambdaFlags: [
        '--target',
        'x86_64-unknown-linux-musl',
        '--debug',
        '--disable-optimizations',
      ],
    },
  });
  ```



  To force bundling in a docker container even if `Cargo Lambda` is available in your environment, set the `forcedDockerBundling` prop to `true`. This is useful if you want to make sure that your function is built in a consistent Lambda compatible environment.

  By default, these constructs use `ghcr.io/cargo-lambda/cargo-lambda` as the image to build with. Use the `bundling.dockerImage` prop to use a custom bundling image:

  ```python
  import { RustFunction } from 'cargo-lambda-cdk';

  new RustFunction(this, 'Rust function', {
    manifestPath: 'path/to/package/directory/with/Cargo.toml',
    bundling: {
      dockerImage: DockerImage.fromBuild('/path/to/Dockerfile'),
    },
  });
  ```

  Additional docker options such as the user, file access, working directory or volumes can be configured by using the `bundling.dockerOptions` prop:

  ```python
  import * as cdk from 'aws-cdk-lib';
  import { RustFunction } from 'cargo-lambda-cdk';

  new RustFunction(this, 'Rust function', {
    manifestPath: 'path/to/package/directory/with/Cargo.toml',
    bundling: {
      dockerOptions: {
        bundlingFileAccess: cdk.BundlingFileAccess.VOLUME_COPY,
      },
    },
  });
  ```

  This property mirrors values from the `cdk.BundlingOptions` and is passed into `Code.fromAsset`.



  It is  possible to run additional commands by specifying the `commandHooks` prop:

  ```python
  import { RustFunction } from 'cargo-lambda-cdk';

  new RustFunction(this, 'Rust function', {
    manifestPath: 'path/to/package/directory/with/Cargo.toml',
    bundling: {
      commandHooks: {
        // run tests
        beforeBundling(inputDir: string, _outputDir: string): string[] {
          return ['cargo test'];
        },
      },
    },
  });
  ```

  The following hooks are available:

  * `beforeBundling`: runs before all bundling commands
  * `afterBundling`: runs after all bundling commands

  They all receive the directory containing the `Cargo.toml` file (`inputDir`) and the
  directory where the bundled asset will be output (`outputDir`). They must return
  an array of commands to run. Commands are chained with `&&`.

  The commands will run in the environment in which bundling occurs: inside the
  container for Docker bundling or on the host OS for local bundling.



  Depending on how you structure your Rust application, you may want to change the `assetHashType` parameter.
  By default this parameter is set to `AssetHashType.OUTPUT` which means that the CDK will calculate the asset hash
  (and determine whether or not your code has changed) based on the Rust executable that is created.

  If you specify `AssetHashType.SOURCE`, the CDK will calculate the asset hash by looking at the folder
  that contains your `Cargo.toml` file. If you are deploying a single Lambda function, or you want to redeploy
  all of your functions if anything changes, then `AssetHashType.SOURCE` will probaby work.



  This software is released under MIT license.


pkgId: d48c9cae478993bf25fcf79d05d9d1d7a2d8ddbcdf9788ae178815f86e0b7dd1
name: python-cargospace
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: A small example package
url: https://example.com
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cargospace-1.0.0-1.src.rpm
checksum_type: sha256
description:
  [build-system]
  requires = [
      "setuptools>=42",
      "wheel"
  ]
  build-backend = "setuptools.build_meta"


pkgId: b82d20f9ed3163190925a7f9bf62afdc80ca9e2c2df6136487a9376233509ae6
name: python-carica-cfn-tools
arch: src
version: 1.26
epoch: 0
release: 1
summary: Tools to manage CloudFormation stack configuration
url: https://github.com/caricalabs/carica-cfn-tools
rpm_license: APL 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carica-cfn-tools-1.26-1.src.rpm
checksum_type: sha256
description:
  Simple command line tools to create and update CloudFormation stacks that
  make it easy to version-control both your templates and stack configurations
  in one place.  Supports a few proprietary transforms useful for dynamically
  merging a manually maintained template with a generated template (for example,
  sam.json from "chalice package") that contains resources you'd like to include
  in your main template.


pkgId: efacc437d9d6dceb2ecb30a81e4fbf618422a321b758661faca374f190a234bc
name: python-carling
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Useful transforms for supporting apache beam pipelines.
url: https://github.com/mc-digital/carling
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carling-0.4.0-1.src.rpm
checksum_type: sha256
description:
  [![CI](https://github.com/mc-digital/carling/actions/workflows/ci.yml/badge.svg)](https://github.com/mc-digital/carling/actions?query=workflow%3ACI)
  [![versions](https://img.shields.io/pypi/pyversions/carling.svg)](https://pypi.org/project/carling/)
  [![pypi](https://img.shields.io/pypi/v/carling)](https://pypi.org/project/carling/)
  [![license](https://img.shields.io/pypi/l/carling)](https://github.com/mc-digital/carling/blob/main/LICENSE)

  Via [Wikipedia](<https://en.wikipedia.org/wiki/Carling_(sailing)>):

  > Carlings are pieces of timber laid fore and aft under the deck of a ship, from one beam to another.
  > They serve as a foundation for the whole body of the ship.

  Useful transforms for supporting our apache beam pipelines.





  Labels all elements.



  Removes all columns which are not specified in `*keys`.



  Transforms each element into a tuple of values of the specified columns.



  Transforms each element `V` into a tuple `(K, V)`.

  `K` is the projection of `V` by `*keys`, which is equal to the tuple
  produced by the `Project` transform.



  Transforms each element into its JSON representation.



  Transforms each element `V` into a tuple `(K, V)`.

  The difference between `IndexBySingle(key)` and `IndexBy(key)` with a single
  key is as follows:

  - `IndexBySingle` produces the index as a plain value.
  - `IndexBy` produces the index as a single-element tuple.



  Rename columns according to `from_to_key_mapping`.



  Removes all columns specified in `*keys`.



  Generic grouping transform utils



  Produces elements that are the only elements per key after deduplication.

  Given a `PCollection` of `(K, V)`,
  this transform produces the collection of all `V`s that do not share
  the same corresponding `K`s with any other elements after deduplicating
  all equivalent `(K, V)` pairs.

  This transform is equivalent to `SingletonOnly` with `apache_beam.Distinct`.

  `[(1, "A"), (2, "B1"), (2, "B2"), (3, "C"), (3, "C"), (4, "A")]` will be
  transformed into `["A", "C", "A"]`.



  Produces elements that are the only elements per key.

  Given a `PCollection` of `(K, V)`,
  this transform produces the collection of all `V`s that do not share
  the same corresponding `K`s with any other elements.

  `[(1, "A"), (2, "B1"), (2, "B2"), (3, "C"), (3, "C"), (4, "A")]` will be
  transformed into `["A", "A"]`.



  Produces the intersection of given `PCollection`s.

  Given a list of `PCollection`s,
  this transform produces every element that appears in all collections of
  the list.
  Elements are deduplicated before taking the intersection.



  Filters elements by their keys.

  The constructor receives one or more `PCollection`s of `K`s,
  which are regarded as key lists.
  Given a `PCollection` of `(K, V)`,
  this transform discards all elements with `K`s that do not appear
  in the key lists.

  If multiple collections are given to the constructor,
  this transform treats the intersection of them as the key list.



  Filters a single collection by a single lookup collection, using a common key.

  Given: - a `PCollection` (lookup_entries) of `(V)`, as a lookup collection - a `PCollection` (pcoll) of `(V)`, as values to be filtered - a common key (filter_key)

  A dictionary called `filter_dict` - is created by mapping the value of `filter_key`
  for each entry in `lookup_entries` to True.

  Then, for each item in pcoll, the value associated with `filter_key` checkd against
  `filter_dict`, and if it is found, the entry passes through. Otherwise, the entry is
  discarded.

  Note: `lookup_entries` will be used as a **side input**, so care
  must be taken regarding the size of the `lookup_entries`



  Produces the difference per key between two `PCollection`s.

  Given two `PCollection`s of `V`,
  this transform indexes the collections by the specified keys `primary_keys`,
  compares corresponding two `V` lists for every `K`,
  and produces the difference per `K`.
  If there is no difference, this transform produces nothing.

  Two `V` lists are considered to be different if the numbers of elements
  differ or two elements of the lists with a same index differ
  at one of the specified columns `columns`.



  - Groups items by a set of `keys` -- column names per row
  - Emits the "MAX" _value_ for each collection as defined by the `key_fn`
  - Can emit "MIN" by passing `reverse=True` kwarg



  Emits two tagged PCollections:

  - Default (`result[None]`): Rows are guaranteed not to have any `None` values
  - `result["contains_none"]`: Rows for which at least one column had a `None` value





  For a set of columnular data inputs this function takes:

      - cat_cols:

          Type: `[str]`

          An array of "categorical" columns

      - existing_dicts:

          Type: `PCollection[(string, string, int)]`

          Rows of tuples of type:
          (column, previously_seen_value, mapped_unique_int)

          Mapping a set of "previously seen" keys to unique int values for each
          column.
          Not optional.
          If none exist, pass an empty PCollection.

  It then creates a transform which takes a pcollection and

      - looks at the input pcoll for unseen values in each categorical column
      - creates new unique integers for each distinct unseen value, starting at max(previous value for column)+1
      - ammends the existing mappings with (col, unseen_value, new_unique_int)

  Output is:

      - Type: `PCollection[(string, string, int)]`

  This is useful for preparing data to be trained by eg. LightGBM



  - Utilizes the "categorical dictionary rows" generated by `CreateCategoricalDicts` which is a list of pairs of type of `(column, value,unique_int)`.

  - Replaces each column with the appropriate value found in the mapping.





  This module contains the `equal_to` function from apache beam, but adapted to output results using pretty print. Reading the results as a large, unformatted string makes it harder to pick out what changed/is missing.





  Print items of the given `PCollection` to the log.

  `LogSample` prints the JSON representations of the input items to the Python's
  standard logging system.

  To avoid too much log entries being printed, `LogSample` limits the number of
  logged items. The constructor parameter `n` determines the limit.

  By default, `LogSample` prints logs with the `INFO` log level. The constructor
  parameter `level` determines the level.



  Prepares multi-value delimited options. Useful in contexts where
  you want to create a multi-value option in a template environment.

  - inputs:
    - delimited string option
    - optional delimiter string (default is "|")

  * output:
    - Type: `PCollection[str]`


pkgId: b66f743f3f6ca445f0f4015aaef826e91044fac19f4b0a00a19d9cd43ef51daf
name: python-carly
arch: src
version: 0.13.0
epoch: 0
release: 1
url: https://github.com/cjw296/carly
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carly-0.13.0-1.src.rpm
checksum_type: sha256
summary:
  A tool for putting messages into and collecting responses from Twisted servers using real networking

description:
  |CircleCI|_
  A tool for putting messages into and collecting responses from Twisted servers and clients using real networking.
  "call me maybe"
  Why carly? 'cos someone already took `Jepsen!`__
  __ https://jepsen.io/


pkgId: db2e230d9bd592e9e5f17d9d34014a684b54644962878ab0095e88161074853f
name: python-carneiro-graficos
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Uma simples biblioteca para criar gráficos usando matplotlib
url: https://github.com/antonioanerao/carneiro_graficos
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carneiro-graficos-0.1.0-1.src.rpm
checksum_type: sha256
description:
  Uma biblioteca simples com gráficos personalizados com matplotlib



  ```bash
  pip install carneiro_graficos


pkgId: 7833a05da425b9609ee2bcdd2e56d97af2c45227deeae3aa3fea46e3ffede2fd
name: python-carnifex
arch: src
version: 0.2.5
epoch: 0
release: 1
summary: Execute commands and run processes locally and remote
url: http://github.com/sporsh/carnifex
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carnifex-0.2.5-1.src.rpm
checksum_type: sha256
description:
  Carnifex provides an api for executing commands.
  The processes can be started locally or remotely on another machine with
  minimal effort for the user.
  Carnifex builds on Twisted and uses Twisted Conch for executing commands
  on a remote machine.
  License
  *******************************************************************************
  Carnifex is made available under the MIT license. See the included LICENSE file
  for details.
  Changes
  *******************************************************************************


pkgId: 9ba045b1c61d3f1b7b7a47eb7cffd5ae4e03ada76627448f55e3a46f63f39ef7
name: python-carolina
arch: src
version: 1.0.15
epoch: 0
release: 1
summary: Python wrapper around Dakota
url: https://pypi.org/project/carolina/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carolina-1.0.15-1.src.rpm
checksum_type: sha256
description:
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/carolina)](https://img.shields.io/pypi/pyversions/carolina)
  [![PyPI version](https://img.shields.io/pypi/v/Carolina)](https://badge.fury.io/py/carolina)
  [![Platform](https://img.shields.io/badge/platform-macos%20%7C%20linux-lightgrey)](https://img.shields.io/badge/platform-macos%20%7C%20linux-lightgrey)

  Carolina is a [pyDAKOTA](https://github.com/wisdem/pyDAKOTA) fork maintained by Equinor.  Its raison d'être is to have easier building of a Python [Dakota](https://dakota.sandia.gov/) wrapper, without any MPI support. Carolina supports Python version 3.8, 3.9, 3.10, 3.11, 3.12


  For Linux and MacOS:

  ```pip install carolina```

  Otherwise, build Carolina youself as described below.


  In order to build Carolina, [Boost](https://www.boost.org/), including Boost.Python, and [Dakota](https://dakota.sandia.gov/) must be installed. This requires [CMake](https://cmake.org/) and a C/C++ compiler. It is recommended to check the build scripts at `.github/workflows/bundle_with_dakota_*` where the full installation is described. The installation will likely vary across different operating systems. Roughly speaking, the following steps must be done:

  1. Install CMAKE
  2. Install Boost with correct python version (NOTE: you may need to edit the python version into the project-config.jam if on MacOS, see the excerpt from the MacOS install script below)

      ```bash
      python_version=$(python --version | sed -E 's/.*([0-9]+\.[0-9]+)\.([0-9]+).*/\1/')
      python_bin_include_lib="    using python : $python_version : $(python -c "from sysconfig import get_paths as gp; g=gp(); print(f\"$(which python) : {g['include']} : {g['stdlib']} ;\")")"
      sed -i '' "s|.*using python.*|$python_bin_include_lib|" project-config.jam
      ```
  3. Install dakota
      * after downloading, replace `<DAKOTA_VERSION>` with the dakota version, for example 6.18
      * In order to install Dakota to a specific folder, use `-DCMAKE_INSTALL_PREFIX="<INSTALL_DIR>"` as part of the cmake invocation.
      ```bash
      cd dakota-<DAKOTA_VERSION>-public-src-cli
      mkdir -p build
      cd build
      cmake \
          -DCMAKE_CXX_STANDARD=14 \
          -DBUILD_SHARED_LIBS=ON \
          -DDAKOTA_PYTHON_DIRECT_INTERFACE=ON \
          -DDAKOTA_PYTHON_DIRECT_INTERFACE_NUMPY=ON \
          -DDAKOTA_DLL_API=OFF \
          -DHAVE_X_GRAPHICS=OFF \
          -DDAKOTA_ENABLE_TESTS=OFF \
          -DDAKOTA_ENABLE_TPL_TESTS=OFF \
          -DCMAKE_BUILD_TYPE='Release' \
          -DDAKOTA_NO_FIND_TRILINOS:BOOL=TRUE \
          ..
      make -j4 install
      ```
      This step is the one that might be the most tricky to get working on your local OS. It expects a number of packages to be found, including `libgfortran`, `eigen`, `lapack`, `numpy`, and for the appropriate libraries to be on `LD_LIBRARY_PATH`(linux)/`DYLD_LIBRARY_PATH`(MacOS). Build errors often arise from (1) the package not being installed or (2) library folders/files of the installed package not being on the library path (`LD_LIBRARY_PATH` for linux  or `DYLD_LIBRARY_PATH` for MacOS).

  4. After installing Dakota, it is possible to run `pip install .` as it will look for the following environment variables:
  * The `BOOST_ROOT` environment variable can be set to the location of the boost library containing the folders `include` and `lib`, if they are not already included globally.
  * The `BOOST_PYTHON` can be set if a given version of `boost_python` is needed. For instance if Python 3.8 is to be used:

      ```bash
          export BOOST_PYTHON=boost_python38
      ```
      By default the installation script will try to guess the `boost_python` version from the minor version of Python, i.e. for Python 3.10, it will try `boost_python310`.

  * It also expects `dakota` binary executable to be on the system `PATH`. To verify this, see if you can type `dakota` in the terminal and run it without errors. Then, try start up python and see if you can `import dakota`. If these two "tests" pass, you should be able to install Carolina.

  Carolina can then be installed with:

  ```bash
      pip install .
  ```

  The library can then be tested by entering the tests directory and execute:

  ```bash
      pytest
  ```

  In the case of testing newer versions of Dakota, scripts can be found in the script folder.

  Carolina requires Dakota 6.18, but will work with older versions as well.
  Pathes can be reverted to allow for building against versions prior to 6.13 or 6.16.

  From Dakota version 6.13 a different set of boost libraries is needed: instead of `boost_signals`, `boost_program_options` is used.
  From Dakota version 6.16 a small change was made in the Python interface.
  From Dakota version 6.18 a file was removed from the source and build script was altered.


pkgId: 0cea85ccd197a59c2c529ce8f7b273c9b7d85d2008c2ef1a534421210fed6669
name: python-carreralib
arch: src
version: 1.0.2
epoch: 0
release: 1
summary: Python interface to Carrera(R) DIGITAL 124/132 slotcar systems
url: https://github.com/tkem/carreralib/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carreralib-1.0.2-1.src.rpm
checksum_type: sha256
description:
  This module provides a Python interface to Carrera® DIGITAL 124/132
  slotcar systems connected via a serial (cable) connection, or via
  Bluetooth LE using Carrera AppConnect®.
     >>> from carreralib import ControlUnit
     >>> cu = ControlUnit('/dev/ttyUSB0')
     >>> cu.version()
     '5337'
     >>> cu.poll()
     Status(fuel=(14, 14, 14, 14, 14, 14, 0, 0), start=0, mode=6,
            pit=(False, False, False, False, False, False, False, False),
            display=8)
     >>> cu.start()
     >>> cu.poll()
     Status(fuel=(14, 14, 14, 14, 14, 14, 0, 0), start=1, mode=6,
            pit=(False, False, False, False, False, False, False, False),
            display=8)
     >>> cu.start()
     >>> cu.poll()
     Timer(address=1, timestamp=105295, sector=1)
     >>> cu.poll()
     Timer(address=0, timestamp=105410, sector=1)
  For demonstration purposes, the ``carreralib`` module can also be used
  from the command line as a simple race management system (RMS).
  Please refer to the online documentation_ for more information.


pkgId: bc3a00cf26562f8a36116c879390790e354c7fb6fabe8868fe2342ff55e7c4db
name: python-carrier-api
arch: src
version: 1.12.1
epoch: 0
release: 1
summary: Carrier Api Wrapper
url: https://github.com/dahlb/carrier_api
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carrier-api-1.12.1-1.src.rpm
checksum_type: sha256
description:
  [![GitHub Release][releases-shield]][releases]
  [![GitHub Activity][commits-shield]][commits]
  [![License][license-shield]](LICENSE)

  ![Project Maintenance][maintenance-shield]
  [![BuyMeCoffee][buymecoffeebadge]][buymecoffee]


  Api Wrapper for Carrier Infinity API using async in python, this was inspired by [this guide](https://developers.home-assistant.io/docs/api_lib_index) to be a lightweight wrapper, with simple error handling.

  a lot of this is based on [homebridge-carrier-infinity](https://github.com/grivkees/homebridge-carrier-infinity).


  ***

  [carrier_api]: https://github.com/dahlb/carrier_api
  [commits-shield]: https://img.shields.io/github/commit-activity/y/dahlb/carrier_api.svg?style=for-the-badge
  [commits]: https://github.com/dahlb/carrier_api/commits/main
  [forum]: https://community.home-assistant.io/
  [license-shield]: https://img.shields.io/github/license/dahlb/carrier_api.svg?style=for-the-badge
  [maintenance-shield]: https://img.shields.io/badge/maintainer-Bren%20Dahl%20%40dahlb-blue.svg?style=for-the-badge
  [releases-shield]: https://img.shields.io/github/release/dahlb/carrier_api.svg?style=for-the-badge
  [releases]: https://github.com/dahlb/carrier_api/releases
  [buymecoffee]: https://www.buymeacoffee.com/dahlb
  [buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge


pkgId: b8ca7fe2be908b2bd4c13d509f0959666101d884c4ce510ec6b1fbd237151c37
name: python-carrot-rcc
arch: src
version: 0.8.3
epoch: 0
release: 1
summary: Camunda external task Robot Framework RCC client
url: https://github.com/datakurre/carrot-rcc
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carrot-rcc-0.8.3-1.src.rpm
checksum_type: sha256
description:
  **Technology preview.**
  `carrot-rcc` is an opinionated [Camunda external task](https://docs.camunda.org/manual/latest/user-guide/process-engine/external-tasks/) client for executing [Robot Framework](https://robotframework.org/rpa/) [RPA framework](https://rpaframework.org/) automation tasks. It is based on Robocorp [RCC toolchain](https://robocorp.com/docs/rcc/overview) and [Camunda external task client for Node JS](https://github.com/camunda/camunda-external-task-client-js).
  `carrot-rcc` executes automation tasks built and wrapped into robot.zip packages as instructed by [Robocorp documentation](https://robocorp.com/docs/). Single `carrot-rcc` service can subscribe multiple topics and execute tasks from same or different robot-packages concurrently, although only locally on the same computer. `carrot-rcc` should work fine on Windows, Linux and on MacOS.
  ```bash
  usage: carrot-rcc [<robots>...]
                    [--base-url] [--authorization]
                    [--worker-id] [--max-tasks] [--poll-interval]
                    [--rcc-executable] [--rcc-encoding] [--rcc-telemetry]
                    [--rcc-controller] [--rcc-fixed-spaces]
                    [--vault-addr] [--vault-token]
                    [--healthz-host] [--healthz-port]
                    [--log-level]
                    [-h] [--help]
  <robots> could also be passed as a comma separated env RCC_ROBOTS
  options:
    --base-url[=<url>]                       [env: CAMUNDA_API_BASE_URL] [default: http://localhost:8080/engine-rest]
    --authorization[=<header>]               [env: CAMUNDA_API_AUTHORIZATION] [example: Basic ZGVtbzpkZW1v]
    --worker-id[=<string>]                   [env: CLIENT_WORKER_ID] [default: carrot-rcc]
    --max-tasks[=<cpus>]                     [env: CLIENT_MAX_TASKS] [default: [cpu count]]
    --poll-interval[=<milliseconds>]         [env: CLIENT_POLL_INTERVAL] [default: 60000]
    --log-level[=<debug|info|warn|error>]    [env: CLIENT_LOG_LEVEL] [default: info]
    --rcc-executable[=<path>]                [env: RCC_EXECUTABLE] (or RCC_EXE) [default: rcc]
    --rcc-controller[=<controller>]          [env: RCC_CONTROLLER] [default: carrot]
    --rcc-encoding[=<encoding>]              [env: RCC_ENCODING] [default: utf-8]
    --rcc-telemetry                          [env: RCC_TELEMETRY]
    --rcc-fixed-spaces                       [env: RCC_FIXED_SPACES]
    --vault-addr[=<addr>]                    [env: VAULT_ADDR] [default: http://127.0.0.1:8200]
    --vault-token[=<token>]                  [env: VAULT_TOKEN] [default: token]
    --healthz-host[=<host>]                  [env: HEALTHZ_HOST] [default: localhost]
    --healthz-port[=<port>]                  [env: HEALTHZ_PORT] (default: disabled)
    -h, --help
  examples:
    $ carrot-rcc robot1.zip
    $ carrot-rcc robot1.zip robot2.zip --log-level=debug
    $ RCC_ROBOTS="robot1.zip,robot2.zip" LOG_LEVEL="debug" carrot-rcc
    $ CAMUNDA_API_AUTHORIZATION="Bearer MY_TOKEN" carrot-rcc robot1.zip
  When --rcc-fixed-spaces is set, concurrent tasks for the same topic may share
  RCC space, possibly resulting in faster startup.
  ```


pkgId: 1aa8b58b53b9555db85baad51498290b3e5721d7d411fb7ce3b6a0909c71439b
name: python-cars
arch: src
version: 0.10.0
epoch: 0
release: 1
summary: A satellite multi view stereo pipeline
url: https://cars.readthedocs.io/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cars-0.10.0-1.src.rpm
checksum_type: sha256
description:
  <div align="center">
  <a target="_blank" href="https://github.com/CNES/cars">
  <picture>
    <source
      srcset="https://raw.githubusercontent.com/CNES/cars/master/docs/source/images/picto_dark.png"
      media="(prefers-color-scheme: dark)"
    />
    <img
      src="https://raw.githubusercontent.com/CNES/cars/master/docs/source/images/picto_light.png"
      alt="CARS"
      width="40%"
    />
  </picture>
  </a>

  <h4>CARS, a satellite multi view stereo framework </h4>

  [![Python](https://img.shields.io/badge/python-v3.9+-blue.svg)](https://www.python.org/downloads/release/python-390/)
  [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](CONTRIBUTING.md)
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0/)
  [![Documentation](https://readthedocs.org/projects/cars/badge/?version=latest)](https://cars.readthedocs.io/?badge=latest)
  [![Github Action](https://github.com/CNES/cars/actions/workflows/cars-ci.yml/badge.svg?branch=master)](https://github.com/CNES/cars/actions)

  <p>
    <a href="#overview">Overview</a> •
    <a href="#quick-start">Quick Start</a> •
    <a href="#documentation">Documentation</a> •
    <a href="#contribution">Contribution</a> •
    <a href="#references">References</a>
  </p>
  </div>



  From stereo images  |  CARS produces a Digital Surface Model (DSM)
  :-------------------------:|:-------------------------:
  <img src="https://raw.githubusercontent.com/CNES/cars/master/docs/source/images/animation_sat.gif" alt="drawing" width="100%"/> |  <img src="https://raw.githubusercontent.com/CNES/cars/master/docs/source/images/overview_dsm_3d.gif" alt="drawing" width="100%"/>


  **CARS** is an open source 3D tool dedicated to produce **Digital Surface Models** from satellite imaging by photogrammetry.
  This Multiview Stereo framework is intended for massive DSM production with a robust, performant and modular design.

  Be aware that the project is new and is evolving to maturity with CNES usage roadmaps and projects such as:
  - <a href="https://co3d.cnes.fr/en/co3d-0">CO3D project &nbsp;&nbsp;&nbsp;  <img src="https://raw.githubusercontent.com/CNES/cars/master/docs/source/images/logo_co3D_cnes.jpg" height="20"/></a>
  - <a href="https://www.ai4geo.eu">AI4GEO project &nbsp;&nbsp;&nbsp; <img src="https://raw.githubusercontent.com/CNES/cars/master/docs/source/images/logo-ai4geo.png" height="20"/> </a>
  - <a href="https://www.evo-land.eu">Evoland project &nbsp;&nbsp;&nbsp; <img src="https://raw.githubusercontent.com/CNES/cars/master/docs/source/images/logo-evoland.png" height="20"/> </a>





  [![Docker Status](http://dockeri.co/image/cnes/cars)](https://hub.docker.com/r/cnes/cars)

  CARS is available on Docker Hub and can be downloaded by:
  ``` bash
  docker pull cnes/cars
  ```



  You only need to launch one command:

  ```
  docker run -w /data -v "$(pwd)"/data_gizeh:/data cnes/cars /data/configfile.json
  ```

  with one configuration input file ("configfile.json") located in a "data" folder to be consistent with the previous command lines:
  ```
  {
      "inputs": {
          "sensors" : {
              "one": {
                  "image": "img1.tif",
                  "geomodel": "img1.geom"
              },
              "two": {
                  "image": "img2.tif",
                  "geomodel": "img2.geom"
              }
          }
      },
      "output": {
          "directory": "outresults"
      }
  }

  ```



  You want to build the pyramids by yourself? Download our [open licence](https://www.etalab.gouv.fr/licence-ouverte-open-licence) Pleiades [data sample](https://raw.githubusercontent.com/CNES/cars/master/tutorials/data_gizeh.tar.bz2) to give CARS a try!



  Go to [CARS Main Documentation](https://cars.readthedocs.io/?badge=latest).




  To do a bug report or a contribution, see the [**Contribution Guide**](https://github.com/CNES/cars/blob/master/CONTRIBUTING.md).

  For project evolution, see [**Changelog**](https://github.com/CNES/cars/blob/master/CHANGELOG.md).



  See [Authors file](https://github.com/CNES/cars/blob/master/AUTHORS.md)




  - [Youssefi D., Michel, J., Sarrazin, E., Buffe, F., Cournet, M., Delvit, J., L’Helguen, C., Melet, O., Emilien, A., Bosman, J., 2020. Cars: A photogrammetry pipeline using dask graphs to construct a global 3d model. IGARSS - IEEE International Geoscience and Remote Sensing Symposium.](https://ieeexplore.ieee.org/document/9324020)
  - [Michel, J., Sarrazin, E., Youssefi, D., Cournet, M., Buffe, F., Delvit, J., Emilien, A., Bosman, J., Melet, O., L’Helguen, C., 2020. A new satellite imagery stereo pipeline designed for scalability, robustness and performance. ISPRS - International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences.](https://www.isprs-ann-photogramm-remote-sens-spatial-inf-sci.net/V-2-2020/171/2020/)


pkgId: f722a88860f4ee4da1e48bf4da6d20ea7fb720636bd8c72ca7585583dce007d7
name: python-cart
arch: src
version: 1.2.2
epoch: 0
release: 1
summary: CaRT Neutering format
url: https://github.com/CybercentreCanada/cart
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cart-1.2.2-1.src.rpm
checksum_type: sha256
description:
  Compressed and RC4 Transport (CaRT) Neutering format. This is a file format that is used to neuter malware files for distribution in the malware analyst community.


pkgId: 448adf07dc7770eadde92f7754e1efba1a0cbda7533d111b192d98090d77426b
name: python-carta
arch: src
version: 1.3.3
epoch: 0
release: 1
url: https://pypi.org/project/carta/
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carta-1.3.3-1.src.rpm
checksum_type: sha256
summary:
  Python library for making GUI applications on the ReMarkable tablet wrapped around the "simple" application

description:
  Python library for making GUI applications on the reMarkable tablet wrapped around the ["simple"](https://rmkit.dev/apps/sas) application


  It can be a pain having to transfer the script & run the script from the RM each time. Especially if you want to use the device for something else at the time. To help with this, I've made the option to manually set the command to a `simple` x64 binary that can be run on linux which will write to `fb.pnm` - This is the framebuffer file that you'll need to read from.

  In the `misc` folder I've provided the binary and a basic script as an example. To use this, just initialize the ReMarkable object like so:

  ```python
  rm = ReMarkable(simple="path/to/simple/binay")
  ```

  Finally, checkout [remarkable-sim](https://github.com/Evidlo/remarkable_sim/) for events (like button clicking) support


  Carta's purpose is to function as a Python wrapper around [*sas*](https://rmkit.dev/apps/sas) - the simple app script for making apps on the reMarkable without need to compiling code.
  It's written in python and is designed to be as user-friendly and easy to use as possible.

  To use it, you'll need to install a few things onto your reMarkable, in an SSH session:
  - [`toltec`](https://toltec-dev.org/) - an unofficial reMarkable-specific package manager
    See instructions on toltec's website.
  - `simple`
    `opkg install simple`
  - rM2 users need `display`
    `opkg install display`
  - `pip` - the package manager for python
    ```
    wget https://bootstrap.pypa.io/get-pip.py
    python get-pip.py
    ```
  - `carta` - this library
    `pip install carta`

  After having installed all the prerequisites, you are ready to start developing.
  Make a python script on the rM and run `chmod +x` on the script to make it executable.
  You'll also need to add a `shebang` to the script (`#!/opt/bin/python` at the top) so that it knows what to run it with.

  Here's an example script that you can copy:

  ```python

  from carta import ReMarkable, Widget
  rm = ReMarkable()

  my_button = Widget(id="but1", typ="button", value="Hello!", x="50%", y="50%")

  rm.add(my_button)
  rm.display()
  ```

  Let's walk through it line by line,

  ```python
  from carta import ReMarkable, Widget
  rm = ReMarkable()
  ```

  This imports the necessary "parts" for the library to function. The `ReMarkable` class is the main "driver" code and handles everything from interacting with `simple` to display your app to managing the widgets themselves. The `widget` dataclass are the actual contents themselves and there are 6 **core types**;
  * Label
  * Paragraph
  * Button
  * TextInput
  * Text Area
  * Image

  Please refer to [the `simple` spec](https://rmkit.dev/apps/sas/spec) for more detailed information.

  ```python
  my_button = Widget(id="but1", typ="button", value="Hello!", x="50%", y="50%")
  ```

  Here we are making a new `Widget` which we have assigned to `my_button`.
  The following is a table outlining information about supported arguments which can be given.

  | Argument | Required                      | Use                                                               | Supported inputs                                                                          | Notes                                                                                                               |
  | -------- | ----------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
  | id       | Yes                           | Used to uniquely identify a widget when being interacted with     | Any string that hasn't been used before                                                   | Spaces will be converted to `_`                                                                                     |
  | typ     | Yes                           | Gives a widget specific properties so it knows what to be used as | Any from the following: `label`, `paragraph`, `burtton`, `textinput`, `textarea`, `image` | Range is a WIP                                                                                                      |
  | value    | Yes                           | What will be displayed on the widget                              | Any string (Image path for the `image` widget type)                                       | Be careful about using new lines                                                                                    |
  | x        | Yes                           | Used to calculate the rendering position of the widget            | A percentage, keyword or an integer                                                       | Supported keywords are `same` (same value as previous item) and `step` (previous item's cord + previous items size) |
  | y        | Yes                           | Used to calculate the rendering position of the widget            | A percentage, keyword or an integer                                                       | Supported keywords are `same` (same value as previous item) and `step` (previous item's cord + previous items size) |
  | width    | No (Automatically calculated) | The width of the widget                                           | Any integer                                                                               | You might have some trouble with getting the right value for this                                                   |
  | height   | No (Automatically calculated) | The height of the widget                                          | Any integer                                                                               | You might have some trouble with getting the right value for this                                                   |
  | justify         | No (Optional for buttons) | Where the text sits in a button                                | Any string from the following: `center`, `right`, `left`                                                                                          |                                                                                                                     |

  Finally, we want to add the widget to the actual screen.

  ```python
  rm.add(my_button)
  rm.display()
  ```

  I've made the decision to have widgets be manually added like this to make it easier to manage when making apps).
  We can do this easily with `add(args*)`, where `args*` are any `Widget` types - For example,

  ```python
  rm.add(my_button, label1, logo)
  ```

  And then display it to the rM! The `display()` function will take all the currently active `Widgets` and convert them into something that simple can understand and render. The active widgets are all stored in the `screen` list (in this case `rm.screen`) and you can easily access and modify any of the widgets in there at any time via the `lookup` function which will return the `Widget` object that has the corresponding ID

  ```python
  print(rm.lookup("<id>"))
  ```

  To remove a `Widget` you can use the `remove()` function and either supply it an `ID` or `Widget` object like so

  ```python
  rm.remove("<id>")

  rm.remove(my_button)
  ```

  In case you want to fully clear the screen, you can use the `eclear()` function - however this does require the modified updated simple binary which `okeh` can provide for you!

  ```python
  rm.eclear()
  ```

  Finally, there are two other options that the `ReMarkable` class has that we can modify.
  * Fontsize - Changes the fontsize of the text on the screen
  * Timeout - The time after `simple` quits if no input is given
  	* In this case, carrying on the program after `rm.display()`  has been run and no input has been given after a set time

  For example, if we wanted to make the `fontsize` 24 and timeout the program after `30` seconds we would do

  ```python
  rm.timeout = 32
  rm.fontsize = 24
  ```

  When you run the `display` function, carta will wait on any input being given **OR** the timeout being reached. When it's done this, it will return a `dict` object with the input given.

  ```python
  clicked = rm.display()

  print(clicked) # {"<id>": True}
  ```

  If it's a `button` that has been pressed it will return `True` as the value, if anything else has been given it will use that specific input (for example, from the keyboard) as the value.


  Hope this guide was helpful, feel free to ask if you need some help (`jake.sh` on discord)


pkgId: eba8931b3d4d43dd7be99b8fd205826b2caa502ac8b7bd9f85b7e7e276d3c07b
name: python-carta-ach
arch: src
version: 0.4.5
epoch: 0
release: 1
summary: Library to create and parse ACH files (NACHA)
url: https://github.com/carta/python-ach
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carta-ach-0.4.5-1.src.rpm
checksum_type: sha256
description:
  ACH file generator module for python. So far, this has been tested with
  "PPD" and "CCD" batches with addenda records.
  Forked from `python-ach` by Travis Hathaway and released on PyPI as `carta-ach`.


pkgId: 83a3a012e4eeb7bfaf1682142a67d2170ffc4d7c836ee948181f8cd7845b8287
name: python-cartagen
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: Cartographic generalisation of spatial objects
url: https://pypi.org/project/cartagen/
rpm_license: EUPL-1.2
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartagen-1.0.1-1.src.rpm
checksum_type: sha256
description:
  |logosub| CartAGen


  .. |logosub| image:: docs/img/logo.svg
     :height: 25px

  .. image:: https://img.shields.io/readthedocs/cartagen?color=306998&style=flat-square
     :alt: Read the Docs
     :target: https://cartagen.readthedocs.io/en/latest/

  .. image:: https://img.shields.io/pypi/v/cartagen?color=306998&style=flat-square
     :alt: PyPI - Version
     :target: https://pypi.org/project/cartagen/

  .. image:: https://img.shields.io/badge/QGIS-Plugin-306998?style=flat-square
     :alt: QGIS plugin
     :target: https://github.com/LostInZoom/cartagen-qgis/

  .. image:: https://img.shields.io/github/last-commit/LostInZoom/cartagen?color=ffd43b&style=flat-square
     :alt: GitHub last commit
     :target: https://github.com/LostInZoom/cartagen/commits/main/

  .. image:: https://img.shields.io/github/contributors/LostInZoom/cartagen?color=ffd43b&style=flat-square
     :alt: GitHub contributors
     :target: https://github.com/LostInZoom/cartagen/graphs/contributors

  A Python library for cartogaphic generalisation using Shapely and GeoPandas

  |

  **CartAGen** is an open source Python library dedicated to cartogaphic generalisation, published under
  the `EUPL-1.2 <https://github.com/IGNF/CartAGen>`_ (European Union Public License).
  It is a port of the `Java application, <https://github.com/IGNF/CartAGen>`_
  originally developed at IGN France.

  It aims at providing a set of tools to generalise spatial data.
  Those tools constitutes the foundation on which you have to construct your own
  generalisation process. That being said, if you want to learn more about
  cartographic generalisation or simply want to familiarize yourself with
  the algorithms provided by CartAGen, some Jupyter notebooks are available
  `here. <https://github.com/LostInZoom/cartagen-notebooks>`_

  CartAGen relies on the usage of the `Shapely <https://github.com/shapely/shapely>`_ geometry objects
  and `GeoPandas <https://github.com/geopandas/geopanda>`_ dataset objects.
  This approach is based on the idea those libraries are the most commonly used among the
  community and provide advantages as powerful spatial operations, measures, indexes, *etc*.
  It is recommended for users to have an understanding of those libraries as CartAGen heavily
  relies on them.


pkgId: 5c0ac1a178a3d40b3f01ced73b2b6bf845a714831988d12956b2a5fc6b4ba8f2
name: python-cartagen4py
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Cartographic generalisation of spatial objects
url: https://github.com/LostInZoom/cartagen4py
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartagen4py-0.4.0-1.src.rpm
checksum_type: sha256
description:
  Guillaume Touya
  Justin Berli
  Azelle Courtial
  Author-email: guillaume.touya@ign.fr
  License: EUPL-1.2
  Keywords: gis,cartography,generalisation
  Classifier: Development Status :: 3 - Alpha
  Classifier: Intended Audience :: Science/Research
  Classifier: License :: OSI Approved :: EUPL-1.2
  Classifier: Operating System :: Unix
  Classifier: Operating System :: MacOS
  Classifier: Operating System :: Microsoft :: Windows
  Classifier: Programming Language :: Python :: 3.10
  Classifier: Programming Language :: Python :: 3.11
  Classifier: Topic :: Scientific/Engineering :: GIS
  Requires-Python: >=3.10
  License-File: LICENSE.md
  Requires-Dist: setuptools


pkgId: e687cddb486623a31b05246870d290bd924c7ecad9a7a29a0c38f1096d8604b5
name: python-carte-ai
arch: src
version: 0.0.23
epoch: 0
release: 1
summary: CARTE-AI: Context Aware Representation of Table Entries for AI
url: https://github.com/soda-inria/carte
rpm_license: MIT license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carte-ai-0.0.23-1.src.rpm
checksum_type: sha256
description:
  [![Downloads](https://img.shields.io/pypi/dm/carte-ai)](https://pypi.org/project/carte-ai/)
  [![PyPI Version](https://img.shields.io/pypi/v/carte-ai)](https://pypi.org/project/carte-ai/)
  [![Python Version](https://img.shields.io/pypi/pyversions/carte-ai)](https://pypi.org/project/carte-ai/)
  [![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)





  ![CARTE_outline](carte_ai/data/etc/outline_carte.jpg)

  This repository contains the implementation of the paper CARTE: Pretraining and Transfer for Tabular Learning.

  CARTE is a pretrained model for tabular data by treating each table row as a star graph and training a graph transformer on top of this representation.


  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1PeltEmNLehQ26VQtFJhl7OxnzCS8rPMT?usp=sharing)
  * CARTERegressor on Wine Poland dataset
  * CARTEClassifier on Spotify dataset





  The library has been tested on Linux, MacOSX and Windows.

  CARTE-AI can be installed from [PyPI](https://pypi.org/project/carte-ai):

  <pre>
  pip install carte-ai
  </pre>


  After a correct installation, you should be able to import the module without errors:

  ```python
  import carte_ai
  ```




  ```python
  import pandas as pd
  from carte_ai.data.load_data import *

  num_train = 128  # Example: set the number of training groups/entities
  random_state = 1  # Set a random seed for reproducibility
  X_train, X_test, y_train, y_test = wina_pl(num_train, random_state)
  print("Wina Poland dataset:", X_train.shape, X_test.shape)
  ```
  ![sample](images/data_wina.png)



  The basic preparations are:
  - preprocess raw data
  - load the prepared data and configs; set train/test split
  - generate graphs for each table entries (rows) using the Table2GraphTransformer
  - create an estimator and make inference

  ```python
  import fasttext
  from huggingface_hub import hf_hub_download
  from carte_ai import Table2GraphTransformer

  model_path = hf_hub_download(repo_id="hi-paris/fastText", filename="cc.en.300.bin")

  preprocessor = Table2GraphTransformer(fasttext_model_path=model_path)


  X_train = preprocessor.fit_transform(X_train, y=y_train)


  X_test = preprocessor.transform(X_test)
  ```
  ![sample](images/t2g.png)


  For learning, CARTE currently runs with the sklearn interface (fit/predict) and the process is:
  - Define parameters
  - Set the estimator
  - Run 'fit' to train the model and 'predict' to make predictions

  ```python
  from carte_ai import CARTERegressor, CARTEClassifier


  fixed_params = dict()
  fixed_params["num_model"] = 10 # 10 models for the bagging strategy
  fixed_params["disable_pbar"] = False # True if you want cleanness
  fixed_params["random_state"] = 0
  fixed_params["device"] = "cpu"
  fixed_params["n_jobs"] = 10
  fixed_params["pretrained_model_path"] = config_directory["pretrained_model"]




  estimator = CARTERegressor(**fixed_params) # CARTERegressor for Regression
  estimator.fit(X=X_train, y=y_train)
  y_pred = estimator.predict(X_test)



  score = r2_score(y_test, y_pred)
  print(f"\nThe R2 score for CARTE:", "{:.4f}".format(score))
  ```
  ![sample](images/performance.png)



  ➡️ [installation instructions setup paper](INSTALL.md)



  ➡️ [read the contributions guidelines](CONTRIBUTIONS.md)



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



  ```
  @article{kim2024carte,
    title={CARTE: pretraining and transfer for tabular learning},
    author={Kim, Myung Jun and Grinsztajn, L{\'e}o and Varoquaux, Ga{\"e}l},
    journal={arXiv preprint arXiv:2402.16785},
    year={2024}
  }
  ```


pkgId: 57aa3209cd1e85acb1b6b8b556d0e00e9699d9d595a5ee1de569609f040e4200
name: python-cartes
arch: src
version: 0.8.3
epoch: 0
release: 1
summary: A generic toolbox for building maps in Python
url: https://pypi.org/project/cartes/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartes-0.8.3-1.src.rpm
checksum_type: sha256
description:
  ![tests](https://github.com/xoolive/cartes/workflows/tests/badge.svg)
  ![docs](https://github.com/xoolive/cartes/workflows/docs/badge.svg)
  ![Code Coverage](https://img.shields.io/codecov/c/github/xoolive/cartes.svg)
  ![Checked with mypy](https://img.shields.io/badge/mypy-checked-blue.svg)
  ![Code style: black](https://img.shields.io/badge/code%20style-black-black.svg)
  ![License](https://img.shields.io/pypi/l/cartes.svg)\
  ![PyPI version](https://img.shields.io/pypi/v/cartes)
  ![PyPI downloads](https://img.shields.io/pypi/dm/cartes)
  ![Conda version](https://img.shields.io/conda/vn/conda-forge/cartes)
  ![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/cartes.svg)

  Cartes is a Python library providing facilities to produce meaningful maps.

  Cartes builds on top of most common Python visualisation libraries (Matplotlib/Cartopy, Altair, ipyleaflet) and data manipulation libraries (Pandas, Geopandas) and provides mostly:

  - a **comprehensive set of geographic projections**, built on top of Cartopy and Altair/d3.js;
  - an **interface to OpenstreetMap Nominatim and Overpass API**. Result of requests are parsed in a convenient format for preprocessing and storing in standard formats;
  - beautiful **default parameters** for quality visualisations;
  - **advanced caching facilities**. Do not download twice the same content in the same day.

  The cartes library is a powerful asset to **publish clean, lightweight geographical datasets**; and to **produce decent geographical visualisations** in few lines of code.



  <a href="https://cartes-viz.github.io/gallery/mercantour.html"><img width="20%" src="https://cartes-viz.github.io/_static/homepage/mercantour.png"></a>
  <a href="https://cartes-viz.github.io/gallery/footprint.html"><img width="20%" src="https://cartes-viz.github.io/_static/homepage/antibes.png"></a>
  <a href="https://cartes-viz.github.io/gallery/airports.html"><img width="20%" src="https://cartes-viz.github.io/_static/homepage/airports.png"></a>
  <a href="https://cartes-viz.github.io/gallery/tokyo_metro.html#zoom-in-to-downtown-tokyo"><img width="20%" src="https://cartes-viz.github.io/_static/homepage/tokyo.png"></a>

  More in the [documentation](https://cartes-viz.github.io/gallery.html)



  Latest release:

  Recommended, with conda:

  ```sh
  conda install -c conda-forge cartes
  ```

  or with pip:

  ```sh
  pip install cartes
  ```

  Development version:

  ```sh
  git clone https://github.com/xoolive/cartes
  cd cartes
  pip install .
  ```



  ![docs](https://github.com/xoolive/cartes/workflows/docs/badge.svg)

  Documentation available at https://cartes-viz.github.io/


pkgId: ce3bf94ef90fa2a34d65b254e4a27881bc8245fd4985c1d68c07cc8b40490c17
name: python-cartesia
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: The official Python library for the Cartesia API.
url: https://pypi.org/project/cartesia/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartesia-1.1.0-1.src.rpm
checksum_type: sha256
description:
  ![PyPI - Version](https://img.shields.io/pypi/v/cartesia)
  [![Discord](https://badgen.net/badge/black/Cartesia/icon?icon=discord&label)](https://discord.gg/cartesia)

  The official Cartesia Python library which provides convenient access to the Cartesia REST and Websocket API from any Python 3.8+ application.

  > [!IMPORTANT]
  > The client library introduces breaking changes in v1.0.0, which was released on June 24th 2024. See the [release notes](https://github.com/cartesia-ai/cartesia-python/releases/tag/v1.0.0) and [migration guide](https://github.com/cartesia-ai/cartesia-python/discussions/44). Reach out to us on [Discord](https://discord.gg/cartesia) for any support requests!

  - [Cartesia Python API Library](#cartesia-python-api-library)
    - [Documentation](#documentation)
    - [Installation](#installation)
    - [Voices](#voices)
    - [Text-to-Speech](#text-to-speech)
      - [Bytes](#bytes)
      - [Server-Sent Events (SSE)](#server-sent-events-sse)
      - [WebSocket](#websocket)
        - [Conditioning speech on previous generations using WebSocket](#conditioning-speech-on-previous-generations-using-websocket)
      - [Generating timestamps using WebSocket](#generating-timestamps-using-websocket)
      - [Multilingual Text-to-Speech \[Alpha\]](#multilingual-text-to-speech-alpha)
      - [Speed and Emotion Control \[Experimental\]](#speed-and-emotion-control-experimental)
      - [Jupyter Notebook Usage](#jupyter-notebook-usage)
      - [Utility methods](#utility-methods)
        - [Output Formats](#output-formats)




  Our complete API documentation can be found [on docs.cartesia.ai](https://docs.cartesia.ai).



  ```bash
  pip install cartesia


  pip install -e '.[dev]'
  ```



  ```python
  from cartesia import Cartesia
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))


  voices = client.voices.list()
  print(voices)


  voice = client.voices.get(id="a0e99841-438c-4a64-b679-ae501e7d6091")
  print("The embedding for", voice["name"], "is", voice["embedding"])


  cloned_voice_embedding = client.voices.clone(filepath="path/to/voice")


  mixed_voice_embedding = client.voices.mix(
      [{ "id": "voice_id_1", "weight": 0.5 }, { "id": "voice_id_2", "weight": 0.25 }, { "id": "voice_id_3", "weight": 0.25 }]
  )


  new_voice = client.voices.create(
      name="New Voice",
      description="A clone of my own voice",
      embedding=cloned_voice_embedding,
  )
  ```





  ```python
  from cartesia import Cartesia
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))

  data = client.tts.bytes(
      model_id="sonic-english",
      transcript="Hello, world! I'm generating audio on Cartesia.",
      voice_id="a0e99841-438c-4a64-b679-ae501e7d6091",  # Barbershop Man
      
      output_format={
          "container": "wav",
          "encoding": "pcm_f32le",
          "sample_rate": 44100,
      },
  )

  with open("output.wav", "wb") as f:
      f.write(data)
  ```



  ```python
  from cartesia import Cartesia
  import pyaudio
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))
  voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
  voice = client.voices.get(id=voice_id)

  transcript = "Hello! Welcome to Cartesia"


  model_id = "sonic-english"


  output_format = {
      "container": "raw",
      "encoding": "pcm_f32le",
      "sample_rate": 44100,
  }

  p = pyaudio.PyAudio()
  rate = 44100

  stream = None


  for output in client.tts.sse(
      model_id=model_id,
      transcript=transcript,
      voice_embedding=voice["embedding"],
      stream=True,
      output_format=output_format,
  ):
      buffer = output["audio"]

      if not stream:
          stream = p.open(format=pyaudio.paFloat32, channels=1, rate=rate, output=True)

      
      stream.write(buffer)

  stream.stop_stream()
  stream.close()
  p.terminate()
  ```

  You can also use the async client if you want to make asynchronous API calls. Simply import `AsyncCartesia` instead of `Cartesia` and use await with each API call:

  ```python
  from cartesia import AsyncCartesia
  import asyncio
  import pyaudio
  import os


  async def write_stream():
      client = AsyncCartesia(api_key=os.environ.get("CARTESIA_API_KEY"))
      voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
      voice = client.voices.get(id=voice_id)
      transcript = "Hello! Welcome to Cartesia"
      
      model_id = "sonic-english"

      
      output_format = {
          "container": "raw",
          "encoding": "pcm_f32le",
          "sample_rate": 44100,
      }

      p = pyaudio.PyAudio()
      rate = 44100

      stream = None

      
      async for output in await client.tts.sse(
          model_id=model_id,
          transcript=transcript,
          voice_embedding=voice["embedding"],
          stream=True,
          output_format=output_format,
      ):
          buffer = output["audio"]

          if not stream:
              stream = p.open(
                  format=pyaudio.paFloat32, channels=1, rate=rate, output=True
              )

          
          stream.write(buffer)

      stream.stop_stream()
      stream.close()
      p.terminate()
      await client.close()


  asyncio.run(write_stream())
  ```



  ```python
  from cartesia import Cartesia
  import pyaudio
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))
  voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
  voice = client.voices.get(id=voice_id)
  transcript = "Hello! Welcome to Cartesia"


  model_id = "sonic-english"


  output_format = {
      "container": "raw",
      "encoding": "pcm_f32le",
      "sample_rate": 22050,
  }

  p = pyaudio.PyAudio()
  rate = 22050

  stream = None


  ws = client.tts.websocket()


  for output in ws.send(
      model_id=model_id,
      transcript=transcript,
      voice_embedding=voice["embedding"],
      stream=True,
      output_format=output_format,
  ):
      buffer = output["audio"]

      if not stream:
          stream = p.open(format=pyaudio.paFloat32, channels=1, rate=rate, output=True)

      
      stream.write(buffer)

  stream.stop_stream()
  stream.close()
  p.terminate()

  ws.close()  # Close the websocket connection
  ```



  In some cases, input text may need to be streamed in. In these cases, it would be slow to wait for all the text to buffer before sending it to Cartesia's TTS service.

  To mitigate this, Cartesia offers audio continuations. In this setting, users can send input text, as it becomes available, over a websocket connection.

  To do this, we will create a `context` and send multiple requests without awaiting the response. Then you can listen to the responses in the order they were sent.

  Each `context` will be closed automatically after 5 seconds of inactivity or when the `no_more_inputs` method is called. `no_more_inputs` sends a request with the `continue_=False`, which indicates no more inputs will be sent over this context

  ```python
  import asyncio
  import os
  import pyaudio
  from cartesia import AsyncCartesia

  async def send_transcripts(ctx):
      
      voice_id = "87748186-23bb-4158-a1eb-332911b0b708"

      
      model_id = "sonic-english"

      
      output_format = {
          "container": "raw",
          "encoding": "pcm_f32le",
          "sample_rate": 44100,
      }

      transcripts = [
          "Sonic and Yoshi team up in a dimension-hopping adventure! ",
          "Racing through twisting zones, they dodge Eggman's badniks and solve ancient puzzles. ",
          "In the Echoing Caverns, they find the Harmonic Crystal, unlocking new powers. ",
          "Sonic's speed creates sound waves, while Yoshi's eggs become sonic bolts. ",
          "As they near Eggman's lair, our heroes charge their abilities for an epic boss battle. ",
          "Get ready to spin, jump, and sound-blast your way to victory in this high-octane crossover!"
      ]

      for transcript in transcripts:
          
          await ctx.send(
              model_id=model_id,
              transcript=transcript,
              voice_id=voice_id,
              continue_=True,
              output_format=output_format,
          )

      
      await ctx.no_more_inputs()

  async def receive_and_play_audio(ctx):
      p = pyaudio.PyAudio()
      stream = None
      rate = 44100

      async for output in ctx.receive():
          buffer = output["audio"]

          if not stream:
              stream = p.open(
                  format=pyaudio.paFloat32,
                  channels=1,
                  rate=rate,
                  output=True
              )

          stream.write(buffer)

      stream.stop_stream()
      stream.close()
      p.terminate()

  async def stream_and_listen():
      client = AsyncCartesia(api_key=os.environ.get("CARTESIA_API_KEY"))

      
      ws = await client.tts.websocket()

      
      ctx = ws.context() # Generates a random context ID if not provided

      send_task = asyncio.create_task(send_transcripts(ctx))
      listen_task = asyncio.create_task(receive_and_play_audio(ctx))

      
      await asyncio.gather(send_task, listen_task)

      await ws.close()
      await client.close()

  asyncio.run(stream_and_listen())
  ```

  You can also use continuations on the synchronous Cartesia client to stream in text as it becomes available. To do this, pass in a text generator that produces text chunks at intervals of less than 1 second, as shown below. This ensures smooth audio playback.

  Note: the sync client has a different API for continuations compared to the async client.

  ```python
  from cartesia import Cartesia
  import pyaudio
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))

  transcripts = [
      "The crew engaged in a range of activities designed to mirror those "
      "they might perform on a real Mars mission. ",
      "Aside from growing vegetables and maintaining their habitat, they faced "
      "additional stressors like communication delays with Earth, ",
      "up to twenty-two minutes each way, to simulate the distance from Mars to our planet. ",
      "These exercises were critical for understanding how astronauts can "
      "maintain not just physical health but also mental well-being under such challenging conditions. ",
  ]


  def chunk_generator(transcripts):
      for transcript in transcripts:
          if transcript.endswith(" "):
              yield transcript
          else:
              yield transcript + " "



  voice_id = "87748186-23bb-4158-a1eb-332911b0b708"


  model_id = "sonic-english"


  output_format = {
      "container": "raw",
      "encoding": "pcm_f32le",
      "sample_rate": 44100,
  }

  p = pyaudio.PyAudio()
  rate = 44100

  stream = None


  ws = client.tts.websocket()


  ctx = ws.context()  # Generates a random context ID if not provided


  output_stream = ctx.send(
      model_id=model_id,
      transcript=chunk_generator(transcripts),
      voice_id=voice_id,
      output_format=output_format,
  )

  for output in output_stream:
      buffer = output["audio"]

      if not stream:
          stream = p.open(format=pyaudio.paFloat32, channels=1, rate=rate, output=True)

      
      stream.write(buffer)

  stream.stop_stream()
  stream.close()
  p.terminate()

  ws.close()  # Close the websocket connection
  ```



  The WebSocket endpoint supports timestamps, allowing you to get detailed timing information for each word in the transcript. To enable this feature, pass an `add_timestamps` boolean flag to the `send` method. The results are returned in the `word_timestamps` object, which contains three keys:
  - words (list): The individual words in the transcript.
  - start (list): The starting timestamp for each word (in seconds).
  - end (list): The ending timestamp for each word (in seconds).

  ```python
  response = ws.send(
      model_id=model_id,
      transcript=transcript,
      voice_id=voice_id,
      output_format=output_format,
      stream=False,
      add_timestamps=True
  )


  word_timestamps = response['word_timestamps']

  words = word_timestamps['words']
  start_times = word_timestamps['start']
  end_times = word_timestamps['end']

  for word, start, end in zip(words, start_times, end_times):
      print(f"Word: {word}, Start: {start}, End: {end}")
  ```



  You can use our `sonic-multilingual` model to generate audio in multiple languages. The languages supported are available at [docs.cartesia.ai](https://docs.cartesia.ai/getting-started/available-models).

  ```python
  from cartesia import Cartesia
  import pyaudio
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))
  voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
  voice = client.voices.get(id=voice_id)

  transcript = "Hola! Bienvenido a Cartesia"
  language = "es"  # Language code corresponding to the language of the transcript


  model_id = "sonic-multilingual"


  output_format = {
      "container": "raw",
      "encoding": "pcm_f32le",
      "sample_rate": 44100,
  }

  p = pyaudio.PyAudio()
  rate = 44100

  stream = None


  for output in client.tts.sse(
      model_id=model_id,
      transcript=transcript,
      voice_embedding=voice["embedding"],
      stream=True,
      output_format=output_format,
      language=language,
  ):
      buffer = output["audio"]

      if not stream:
          stream = p.open(format=pyaudio.paFloat32, channels=1, rate=rate, output=True)

      stream.write(buffer)

  stream.stop_stream()
  stream.close()
  p.terminate()
  ```



  You can enhance the voice output by adjusting the `speed` and `emotion` parameters. To do this, pass a `_experimental_voice_controls` dictionary with the desired `speed` and `emotion` values to any `send` method.

  Speed Options:
  - `slowest`, `slow`, `normal`, `fast`, `fastest`
  - Float values between -1.0 and 1.0, where -1.0 is the slowest speed and 1.0 is the fastest speed.

  Emotion Options:
  Use a list of tags in the format `emotion_name:level` where:
  - Emotion Names: `anger`, `positivity`, `surprise`, `sadness`, `curiosity`
  - Levels: `lowest`, `low`, (omit for medium level), `high`, `highest`
  The emotion tag levels add the specified emotion to the voice at the indicated intensity, with the omission of a level tag resulting in a medium intensity.

  ```python
  ws.send(
      model_id=model_id,
      transcript=transcript,
      voice_id=voice_id,
      output_format=output_format,
      _experimental_voice_controls={"speed": "fast", "emotion": ["positivity:high"]},
  )
  ```



  If you are using Jupyter Notebook or JupyterLab, you can use IPython.display.Audio to play the generated audio directly in the notebook.
  Additionally, in these notebook examples we show how to use the client as a context manager (though this is not required).

  ```python
  from IPython.display import Audio
  import io
  import os
  import numpy as np

  from cartesia import Cartesia

  with Cartesia(api_key=os.environ.get("CARTESIA_API_KEY")) as client:
      output_format = {
          "container": "raw",
          "encoding": "pcm_f32le",
          "sample_rate": 8000,
      }
      rate = 8000
      voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
      voice = client.voices.get(id=voice_id)
      transcript = "Hey there! Welcome to Cartesia"

      
      audio_data = io.BytesIO()

      
      for output in client.tts.sse(
          model_id="sonic-english",
          transcript=transcript,
          voice_embedding=voice["embedding"],
          stream=True,
          output_format=output_format,
      ):
          buffer = output["audio"]
          audio_data.write(buffer)


  audio_data.seek(0)


  audio = Audio(np.frombuffer(audio_data.read(), dtype=np.float32), rate=rate)


  display(audio)
  ```

  Below is the same example using the async client:

  ```python
  from IPython.display import Audio
  import io
  import os
  import numpy as np

  from cartesia import AsyncCartesia

  async with AsyncCartesia(api_key=os.environ.get("CARTESIA_API_KEY")) as client:
      output_format = {
          "container": "raw",
          "encoding": "pcm_f32le",
          "sample_rate": 8000,
      }
      rate = 8000
      voice_id = "248be419-c632-4f23-adf1-5324ed7dbf1d"
      transcript = "Hey there! Welcome to Cartesia"

      
      audio_data = io.BytesIO()

      
      async for output in client.tts.sse(
          model_id="sonic-english",
          transcript=transcript,
          voice_id=voice_id,
          stream=True,
          output_format=output_format,
      ):
          buffer = output["audio"]
          audio_data.write(buffer)


  audio_data.seek(0)


  audio = Audio(np.frombuffer(audio_data.read(), dtype=np.float32), rate=rate)


  display(audio)
  ```





  You can use the `client.tts.get_output_format` method to convert string-based output format names into the `output_format` dictionary which is expected by the `output_format` parameter. You can see the `OutputFormatMapping` class in `cartesia._types` for the currently supported output format names. You can also view the currently supported `output_format`s in our [API Reference](https://docs.cartesia.ai/reference/api-reference/rest/stream-speech-server-sent-events).

  The previously used `output_format` strings are now deprecated and will be removed in v1.2.0. These are listed in the `DeprecatedOutputFormatMapping` class in `cartesia._types`.

  ```python

  output_format = client.tts.get_output_format("raw_pcm_f32le_44100")


  generator = client.tts.sse(
      model_id=model,
      transcript=transcript,
      voice_id=SAMPLE_VOICE_ID,
      stream=True,
      output_format=output_format,
  )
  ```

  To avoid storing your API key in the source code, we recommend doing one of the following:

  1. Use [`python-dotenv`](https://pypi.org/project/python-dotenv/) to add `CARTESIA_API_KEY="my-api-key"` to your .env file.
  1. Set the `CARTESIA_API_KEY` environment variable, preferably to a secure shell init file (e.g. `~/.zshrc`, `~/.bashrc`)


pkgId: 8f0ed3b93f99d2c725499fb005cc5c5002da9e6cdbc71f3b77caee46f7fa3ba5
name: python-cartesia
arch: src
version: 1.3.0
epoch: 0
release: 1
summary: The official Python library for the Cartesia API.
url: https://pypi.org/project/cartesia/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartesia-1.3.0-1.src.rpm
checksum_type: sha256
description:
  ![PyPI - Version](https://img.shields.io/pypi/v/cartesia)
  [![Discord](https://badgen.net/badge/black/Cartesia/icon?icon=discord&label)](https://discord.gg/cartesia)

  The official Cartesia Python library which provides convenient access to the Cartesia REST and Websocket API from any Python 3.8+ application.

  > [!IMPORTANT]
  > The client library introduces breaking changes in v1.0.0, which was released on June 24th 2024. See the [release notes](https://github.com/cartesia-ai/cartesia-python/releases/tag/v1.0.0) and [migration guide](https://github.com/cartesia-ai/cartesia-python/discussions/44). Reach out to us on [Discord](https://discord.gg/cartesia) for any support requests!

  - [Cartesia Python API Library](#cartesia-python-api-library)
    - [Documentation](#documentation)
    - [Installation](#installation)
    - [Voices](#voices)
    - [Text-to-Speech](#text-to-speech)
      - [Bytes](#bytes)
      - [Server-Sent Events (SSE)](#server-sent-events-sse)
      - [WebSocket](#websocket)
        - [Conditioning speech on previous generations using WebSocket](#conditioning-speech-on-previous-generations-using-websocket)
      - [Generating timestamps using WebSocket](#generating-timestamps-using-websocket)
      - [Multilingual Text-to-Speech \[Alpha\]](#multilingual-text-to-speech-alpha)
      - [Speed and Emotion Control \[Experimental\]](#speed-and-emotion-control-experimental)
      - [Jupyter Notebook Usage](#jupyter-notebook-usage)
      - [Utility methods](#utility-methods)
        - [Output Formats](#output-formats)




  Our complete API documentation can be found [on docs.cartesia.ai](https://docs.cartesia.ai).



  ```bash
  pip install cartesia


  pip install -e '.[dev]'
  ```



  ```python
  from cartesia import Cartesia
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))


  voices = client.voices.list()
  print(voices)


  voice = client.voices.get(id="a0e99841-438c-4a64-b679-ae501e7d6091")
  print("The embedding for", voice["name"], "is", voice["embedding"])


  cloned_voice_embedding = client.voices.clone(filepath="path/to/voice")


  mixed_voice_embedding = client.voices.mix(
      [{ "id": "voice_id_1", "weight": 0.5 }, { "id": "voice_id_2", "weight": 0.25 }, { "id": "voice_id_3", "weight": 0.25 }]
  )


  new_voice = client.voices.create(
      name="New Voice",
      description="A clone of my own voice",
      embedding=cloned_voice_embedding,
  )
  ```





  ```python
  from cartesia import Cartesia
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))

  data = client.tts.bytes(
      model_id="sonic-english",
      transcript="Hello, world! I'm generating audio on Cartesia.",
      voice_id="a0e99841-438c-4a64-b679-ae501e7d6091",  # Barbershop Man
      
      output_format={
          "container": "wav",
          "encoding": "pcm_f32le",
          "sample_rate": 44100,
      },
  )

  with open("output.wav", "wb") as f:
      f.write(data)
  ```



  ```python
  from cartesia import Cartesia
  import pyaudio
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))
  voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
  voice = client.voices.get(id=voice_id)

  transcript = "Hello! Welcome to Cartesia"


  model_id = "sonic-english"


  output_format = {
      "container": "raw",
      "encoding": "pcm_f32le",
      "sample_rate": 44100,
  }

  p = pyaudio.PyAudio()
  rate = 44100

  stream = None


  for output in client.tts.sse(
      model_id=model_id,
      transcript=transcript,
      voice_embedding=voice["embedding"],
      stream=True,
      output_format=output_format,
  ):
      buffer = output["audio"]

      if not stream:
          stream = p.open(format=pyaudio.paFloat32, channels=1, rate=rate, output=True)

      
      stream.write(buffer)

  stream.stop_stream()
  stream.close()
  p.terminate()
  ```

  You can also use the async client if you want to make asynchronous API calls. Simply import `AsyncCartesia` instead of `Cartesia` and use await with each API call:

  ```python
  from cartesia import AsyncCartesia
  import asyncio
  import pyaudio
  import os


  async def write_stream():
      client = AsyncCartesia(api_key=os.environ.get("CARTESIA_API_KEY"))
      voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
      voice = client.voices.get(id=voice_id)
      transcript = "Hello! Welcome to Cartesia"
      
      model_id = "sonic-english"

      
      output_format = {
          "container": "raw",
          "encoding": "pcm_f32le",
          "sample_rate": 44100,
      }

      p = pyaudio.PyAudio()
      rate = 44100

      stream = None

      
      async for output in await client.tts.sse(
          model_id=model_id,
          transcript=transcript,
          voice_embedding=voice["embedding"],
          stream=True,
          output_format=output_format,
      ):
          buffer = output["audio"]

          if not stream:
              stream = p.open(
                  format=pyaudio.paFloat32, channels=1, rate=rate, output=True
              )

          
          stream.write(buffer)

      stream.stop_stream()
      stream.close()
      p.terminate()
      await client.close()


  asyncio.run(write_stream())
  ```



  ```python
  from cartesia import Cartesia
  import pyaudio
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))
  voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
  voice = client.voices.get(id=voice_id)
  transcript = "Hello! Welcome to Cartesia"


  model_id = "sonic-english"


  output_format = {
      "container": "raw",
      "encoding": "pcm_f32le",
      "sample_rate": 22050,
  }

  p = pyaudio.PyAudio()
  rate = 22050

  stream = None


  ws = client.tts.websocket()


  for output in ws.send(
      model_id=model_id,
      transcript=transcript,
      voice_embedding=voice["embedding"],
      stream=True,
      output_format=output_format,
  ):
      buffer = output["audio"]

      if not stream:
          stream = p.open(format=pyaudio.paFloat32, channels=1, rate=rate, output=True)

      
      stream.write(buffer)

  stream.stop_stream()
  stream.close()
  p.terminate()

  ws.close()  # Close the websocket connection
  ```



  In some cases, input text may need to be streamed in. In these cases, it would be slow to wait for all the text to buffer before sending it to Cartesia's TTS service.

  To mitigate this, Cartesia offers audio continuations. In this setting, users can send input text, as it becomes available, over a websocket connection.

  To do this, we will create a `context` and send multiple requests without awaiting the response. Then you can listen to the responses in the order they were sent.

  Each `context` will be closed automatically after 5 seconds of inactivity or when the `no_more_inputs` method is called. `no_more_inputs` sends a request with the `continue_=False`, which indicates no more inputs will be sent over this context

  ```python
  import asyncio
  import os
  import pyaudio
  from cartesia import AsyncCartesia

  async def send_transcripts(ctx):
      
      voice_id = "87748186-23bb-4158-a1eb-332911b0b708"

      
      model_id = "sonic-english"

      
      output_format = {
          "container": "raw",
          "encoding": "pcm_f32le",
          "sample_rate": 44100,
      }

      transcripts = [
          "Sonic and Yoshi team up in a dimension-hopping adventure! ",
          "Racing through twisting zones, they dodge Eggman's badniks and solve ancient puzzles. ",
          "In the Echoing Caverns, they find the Harmonic Crystal, unlocking new powers. ",
          "Sonic's speed creates sound waves, while Yoshi's eggs become sonic bolts. ",
          "As they near Eggman's lair, our heroes charge their abilities for an epic boss battle. ",
          "Get ready to spin, jump, and sound-blast your way to victory in this high-octane crossover!"
      ]

      for transcript in transcripts:
          
          await ctx.send(
              model_id=model_id,
              transcript=transcript,
              voice_id=voice_id,
              continue_=True,
              output_format=output_format,
          )

      
      await ctx.no_more_inputs()

  async def receive_and_play_audio(ctx):
      p = pyaudio.PyAudio()
      stream = None
      rate = 44100

      async for output in ctx.receive():
          buffer = output["audio"]

          if not stream:
              stream = p.open(
                  format=pyaudio.paFloat32,
                  channels=1,
                  rate=rate,
                  output=True
              )

          stream.write(buffer)

      stream.stop_stream()
      stream.close()
      p.terminate()

  async def stream_and_listen():
      client = AsyncCartesia(api_key=os.environ.get("CARTESIA_API_KEY"))

      
      ws = await client.tts.websocket()

      
      ctx = ws.context() # Generates a random context ID if not provided

      send_task = asyncio.create_task(send_transcripts(ctx))
      listen_task = asyncio.create_task(receive_and_play_audio(ctx))

      
      await asyncio.gather(send_task, listen_task)

      await ws.close()
      await client.close()

  asyncio.run(stream_and_listen())
  ```

  You can also use continuations on the synchronous Cartesia client to stream in text as it becomes available. To do this, pass in a text generator that produces text chunks at intervals of less than 1 second, as shown below. This ensures smooth audio playback.

  Note: the sync client has a different API for continuations compared to the async client.

  ```python
  from cartesia import Cartesia
  import pyaudio
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))

  transcripts = [
      "The crew engaged in a range of activities designed to mirror those "
      "they might perform on a real Mars mission. ",
      "Aside from growing vegetables and maintaining their habitat, they faced "
      "additional stressors like communication delays with Earth, ",
      "up to twenty-two minutes each way, to simulate the distance from Mars to our planet. ",
      "These exercises were critical for understanding how astronauts can "
      "maintain not just physical health but also mental well-being under such challenging conditions. ",
  ]


  def chunk_generator(transcripts):
      for transcript in transcripts:
          if transcript.endswith(" "):
              yield transcript
          else:
              yield transcript + " "



  voice_id = "87748186-23bb-4158-a1eb-332911b0b708"


  model_id = "sonic-english"


  output_format = {
      "container": "raw",
      "encoding": "pcm_f32le",
      "sample_rate": 44100,
  }

  p = pyaudio.PyAudio()
  rate = 44100

  stream = None


  ws = client.tts.websocket()


  ctx = ws.context()  # Generates a random context ID if not provided


  output_stream = ctx.send(
      model_id=model_id,
      transcript=chunk_generator(transcripts),
      voice_id=voice_id,
      output_format=output_format,
  )

  for output in output_stream:
      buffer = output["audio"]

      if not stream:
          stream = p.open(format=pyaudio.paFloat32, channels=1, rate=rate, output=True)

      
      stream.write(buffer)

  stream.stop_stream()
  stream.close()
  p.terminate()

  ws.close()  # Close the websocket connection
  ```



  The WebSocket endpoint supports timestamps, allowing you to get detailed timing information for each word in the transcript. To enable this feature, pass an `add_timestamps` boolean flag to the `send` method. The results are returned in the `word_timestamps` object, which contains three keys:
  - words (list): The individual words in the transcript.
  - start (list): The starting timestamp for each word (in seconds).
  - end (list): The ending timestamp for each word (in seconds).

  ```python
  response = ws.send(
      model_id=model_id,
      transcript=transcript,
      voice_id=voice_id,
      output_format=output_format,
      stream=False,
      add_timestamps=True
  )


  word_timestamps = response['word_timestamps']

  words = word_timestamps['words']
  start_times = word_timestamps['start']
  end_times = word_timestamps['end']

  for word, start, end in zip(words, start_times, end_times):
      print(f"Word: {word}, Start: {start}, End: {end}")
  ```



  You can use our `sonic-multilingual` model to generate audio in multiple languages. The languages supported are available at [docs.cartesia.ai](https://docs.cartesia.ai/getting-started/available-models).

  ```python
  from cartesia import Cartesia
  import pyaudio
  import os

  client = Cartesia(api_key=os.environ.get("CARTESIA_API_KEY"))
  voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
  voice = client.voices.get(id=voice_id)

  transcript = "Hola! Bienvenido a Cartesia"
  language = "es"  # Language code corresponding to the language of the transcript


  model_id = "sonic-multilingual"


  output_format = {
      "container": "raw",
      "encoding": "pcm_f32le",
      "sample_rate": 44100,
  }

  p = pyaudio.PyAudio()
  rate = 44100

  stream = None


  for output in client.tts.sse(
      model_id=model_id,
      transcript=transcript,
      voice_embedding=voice["embedding"],
      stream=True,
      output_format=output_format,
      language=language,
  ):
      buffer = output["audio"]

      if not stream:
          stream = p.open(format=pyaudio.paFloat32, channels=1, rate=rate, output=True)

      stream.write(buffer)

  stream.stop_stream()
  stream.close()
  p.terminate()
  ```



  You can enhance the voice output by adjusting the `speed` and `emotion` parameters. To do this, pass a `_experimental_voice_controls` dictionary with the desired `speed` and `emotion` values to any `send` method.

  Speed Options:
  - `slowest`, `slow`, `normal`, `fast`, `fastest`
  - Float values between -1.0 and 1.0, where -1.0 is the slowest speed and 1.0 is the fastest speed.

  Emotion Options:
  Use a list of tags in the format `emotion_name:level` where:
  - Emotion Names: `anger`, `positivity`, `surprise`, `sadness`, `curiosity`
  - Levels: `lowest`, `low`, (omit for medium level), `high`, `highest`
  The emotion tag levels add the specified emotion to the voice at the indicated intensity, with the omission of a level tag resulting in a medium intensity.

  ```python
  ws.send(
      model_id=model_id,
      transcript=transcript,
      voice_id=voice_id,
      output_format=output_format,
      _experimental_voice_controls={"speed": "fast", "emotion": ["positivity:high"]},
  )
  ```



  If you are using Jupyter Notebook or JupyterLab, you can use IPython.display.Audio to play the generated audio directly in the notebook.
  Additionally, in these notebook examples we show how to use the client as a context manager (though this is not required).

  ```python
  from IPython.display import Audio
  import io
  import os
  import numpy as np

  from cartesia import Cartesia

  with Cartesia(api_key=os.environ.get("CARTESIA_API_KEY")) as client:
      output_format = {
          "container": "raw",
          "encoding": "pcm_f32le",
          "sample_rate": 8000,
      }
      rate = 8000
      voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
      voice = client.voices.get(id=voice_id)
      transcript = "Hey there! Welcome to Cartesia"

      
      audio_data = io.BytesIO()

      
      for output in client.tts.sse(
          model_id="sonic-english",
          transcript=transcript,
          voice_embedding=voice["embedding"],
          stream=True,
          output_format=output_format,
      ):
          buffer = output["audio"]
          audio_data.write(buffer)


  audio_data.seek(0)


  audio = Audio(np.frombuffer(audio_data.read(), dtype=np.float32), rate=rate)


  display(audio)
  ```

  Below is the same example using the async client:

  ```python
  from IPython.display import Audio
  import io
  import os
  import numpy as np

  from cartesia import AsyncCartesia

  async with AsyncCartesia(api_key=os.environ.get("CARTESIA_API_KEY")) as client:
      output_format = {
          "container": "raw",
          "encoding": "pcm_f32le",
          "sample_rate": 8000,
      }
      rate = 8000
      voice_id = "248be419-c632-4f23-adf1-5324ed7dbf1d"
      transcript = "Hey there! Welcome to Cartesia"

      
      audio_data = io.BytesIO()

      
      async for output in client.tts.sse(
          model_id="sonic-english",
          transcript=transcript,
          voice_id=voice_id,
          stream=True,
          output_format=output_format,
      ):
          buffer = output["audio"]
          audio_data.write(buffer)


  audio_data.seek(0)


  audio = Audio(np.frombuffer(audio_data.read(), dtype=np.float32), rate=rate)


  display(audio)
  ```





  You can use the `client.tts.get_output_format` method to convert string-based output format names into the `output_format` dictionary which is expected by the `output_format` parameter. You can see the `OutputFormatMapping` class in `cartesia._types` for the currently supported output format names. You can also view the currently supported `output_format`s in our [API Reference](https://docs.cartesia.ai/reference/api-reference/rest/stream-speech-server-sent-events).

  ```python

  output_format = client.tts.get_output_format("raw_pcm_f32le_44100")


  generator = client.tts.sse(
      model_id=model,
      transcript=transcript,
      voice_id=SAMPLE_VOICE_ID,
      stream=True,
      output_format=output_format,
  )
  ```

  To avoid storing your API key in the source code, we recommend doing one of the following:

  1. Use [`python-dotenv`](https://pypi.org/project/python-dotenv/) to add `CARTESIA_API_KEY="my-api-key"` to your .env file.
  1. Set the `CARTESIA_API_KEY` environment variable, preferably to a secure shell init file (e.g. `~/.zshrc`, `~/.bashrc`)


pkgId: b6716831981f9fc254199abce7c187b80bd05f71affe42b2f8f25746d57a7cce
name: python-cartiflette
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: Tools to easily retrieve French borders for geographic data analytics
url: https://pypi.org/project/cartiflette/
rpm_license: OPEN LICENCE 2.0/LICENCE OUVERTE 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartiflette-0.1.1-1.src.rpm
checksum_type: sha256
description:
  `cartiflette` est un projet pour faciliter l’association de sources
  géographiques en proposant des récupérations facilitées de coutours de
  cartes officiels.

  Une documentation interactive est disponible [ici](https://inseefrlab.github.io/cartiflette-website/index.html).

  L'objectif de `cartiflette` est d'offrir des méthodes fiables,
  reproductibles et multi-langages pour récupérer des fonds de carte officiels de l'IGN
  enrichis de métadonnées utiles pour la cartographie et la _data science_.

  La librairie python `cartiflette` ![](https://cdn.simpleicons.org/python/00ccff99?viewbox=auto&size=18) permet la récupération des fonds de carte de l'IGN.


  ``` python
  pip install cartiflette
  ```




  Plus d'exemples sont disponibles dans la [documentation interactive](https://inseefrlab.github.io/cartiflette-website/index.html).

  Exemple de récupération du fonds de carte des départements avec les DROM rapprochés de la France métropolitaine
  ```
  from cartiflette.client import CartifletteSession

  carti = CartifletteSession()
  data = carti.get_dataset(
      values = ["France"],
      crs = 4326,
      borders = "DEPARTEMENT",
      vectorfile_format="topojson",
      simplification=50,
      filter_by="FRANCE_ENTIERE_DROM_RAPPROCHES",
      source="EXPRESS-COG-CARTO-TERRITOIRE",
      year=2022
  )
  ```



  Le projet `cartiflette` est un projet collaboratif lancé par des agents de l'Etat dans le cadre d'un programme interministériel
  nommé [Programme 10%](https://www.10pourcent.etalab.gouv.fr/).

  __Vous désirez contribuer ?__ Plus d'information sont disponibles dans le fichier [CONTRIBUTING.md](https://github.com/InseeFrLab/cartiflette/blob/main/CONTRIBUTING.md)


pkgId: 1292a123efa866bd472a89b3d73ef8a8767477aee70044ced80d25592b45182d
name: python-carto-auth
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Python library to authenticate with CARTO
url: https://github.com/cartodb/carto-auth
rpm_license: BSD 3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carto-auth-0.2.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/carto-auth.svg)](https://badge.fury.io/py/carto-auth)
  [![PyPI downloads](https://img.shields.io/pypi/dm/carto-auth.svg)](https://pypistats.org/packages/carto-auth)
  [![Tests](https://github.com/cartodb/carto-auth/actions/workflows/ci.yml/badge.svg)](https://github.com/cartodb/carto-auth/actions)

  Python library to authenticate with [CARTO](carto.com).



  ```bash
  pip install carto-auth
  ```

  To install the CARTO DW extension:

  ```bash
  pip install carto-auth[carto-dw]
  ```



  ```bash
  git clone https://github.com/cartodb/carto-auth
  cd carto-auth
  pip install .
  ```



  ```py
  from carto_auth import CartoAuth


  carto_auth = CartoAuth.from_oauth()



  api_base_url = carto_auth.get_api_base_url()


  access_token = carto_auth.get_access_token()


  carto_dw_project, carto_dw_token = carto_auth.get_carto_dw_credentials()
  carto_dw_client = carto_auth.get_carto_dw_client()
  ```

  For more information, check the [examples](./examples) section.



  Make commands:

  - init: create the environment and install dependencies
  - lint: run linter (black + flake8)
  - test: run tests (pytest)
  - docs: build the documentation
  - publish-pypi: publish package in pypi.org
  - publish-test-pypi: publish package in test.pypi.org
  - clean: remove the environment

  Check the development [documentation](./docs) section.



  - [Jesús Arroyo](https://github.com/jesus89)
  - [Óscar Ramírez](https://github.com/tuxskar)


pkgId: 55792d66f283ecf626228fd0657e08671abd69dfb1eff75821cd81e820f24cbd
name: python-cartocss-doc-parser
arch: src
version: 2.0.0
epoch: 0
release: 1
summary: CartoCSS documentation parser.
url: https://github.com/mondeja/cartocss-doc-parser
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartocss-doc-parser-2.0.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI][pypi-version-image]][pypi-link]
  [![Python versions][pypi-pyversions-image]][pypi-link]
  [![Tests][tests-image]][tests-link]
  [![Coverage Status][coverage-image]][coverage-link]


  [CartoCSS documentation][cartocss-doc-link] Python parser.

  <p align="center">
    <img width="512" height="512" src="https://raw.githubusercontent.com/mondeja/cartocss-doc-parser/master/cartocss-doc-parsed.png">
  </p>



  ```bash
  pip install cartocss-doc-parser
  ```



  The main function [cartocss_doc](#cartocss_doc) returns a dictionary with
  almost every section of the documentation. All the properties are wrapped in
  generators.

  ```python
  >>> from pprint import pprint
  >>> from cartocss_doc_parser import cartocss_doc
  >>>
  >>> doc = cartocss_doc()
  >>> pprint(doc)
  {'building': <generator object ...>,
   'common_elements': <generator object ...>,
   'line': <generator object ...>,
   'line_pattern': <generator object ...>,
   'map_background_and_string_elements': <generator object ...>,
   'markers': <generator object ...>,
   'other_parameters': <generator object ...>,
   'point': <generator object ...>,
   'polygon': <generator object ...>,
   'polygon_pattern': <generator object ...>,
   'raster': <generator object ...>,
   'shield': <generator object ...>,
   'symbolizers': <generator object ...>,
   'text': <generator object ...>,
   'torque_properties': <generator object ...>,
   'values': <generator object ...>}
  ```

  All properties contains the attributes

  - **`default`** Default value.
  - **`description`** Description.
  - **`id`** Identificator.
  - **`link`** Link to the property on documentation.
  - **`name`** Name of the property.
  - **`sample`** Example of use.
  - **`type`** Value data type. For a complete list see
   [cartocss_data_types](#cartocss_data_types).

  and if the data type is `keyword` contains an additional attribute

  - **`variants`** Possible values for the property.

  ```python
  >>> pprint(list(doc["polygon"]))
  [{'default': 'gray',
    'description': 'The fill color assigned to a polygon.',
    'id': 'polygon-fill-color',
    'link': 'https://carto.com/developers/styling/cartocss/#polygon-fill-color',
    'name': 'polygon-fill',
    'sample': 'polygon-fill: rgba(128, 128, 128, 1);',
    'type': 'color'},
   {'default': '1',
    'description': 'The opacity of the polygon.',
    'id': 'polygon-opacity-float',
    'link': 'https://carto.com/developers/styling/cartocss/#polygon-opacity-float',
    'name': 'polygon-opacity',
    'sample': 'polygon-opacity: 1;',
    'type': 'float'},
   ...,
   {'default': 'power',
    'description': 'An anti-grain geometry method that represents a 2D rendering '
                   'library, specific to controlling the quality of antialiasing '
                   'and used to calculate pixel gamma (pow(x,gamma), which '
                   'produces slightly smoother line and polygon antialiasing '
                   "than the 'linear' method.",
    'id': 'polygon-gamma-method-keyword',
    'link': 'https://carto.com/developers/styling/cartocss/#polygon-gamma-method-keyword',
    'name': 'polygon-gamma-method',
    'sample': 'polygon-gamma-method: power;',
    'type': 'keyword',
    'variants': ['power', 'linear', 'none', 'threshold', 'multiply']},
   ...
  ]
  ```

  All data types can be requested with [cartocss_data_types](#cartocss_data_types) function:

  ```python
  >>> from cartocss_doc_parser import cartocss_data_types
  >>> pprint(list(cartocss_data_types()))
  ['color',
   'float',
   'uri',
   'string',
   'boolean',
   'expression',
   'numbers',
   'number',
   'percentages',
   'percentage',
   'functions',
   'function',
   'keyword',
   'unsigned',
   'tags']
  ```



  <a name="cartocss_doc" href="#cartocss_doc">#</a> <b>cartocss_doc</b>(<i>url="https://carto.com/developers/styling/cartocss/"</i>, <i>user_agent="cartocss_doc_parser vX.Y.Z"</i>) ⇒ `dict`

  Provides information for almost every section of CartoCSS documentation.

  - **url** (str) URL to the documentation page. Can be a local file, in which
   case any HTTP request would be performed, instead the file would be read.
  - **user_agent** (str) User agent performing the HTTP request to documentation
   page. As default is `cartocss_doc_parser (vs)`.

  <a name="cartocss_data_types" href="#cartocss_data_types">#</a> <b>cartocss_data_types</b>(<i>url="https://carto.com/developers/styling/cartocss/"</i>, <i>user_agent="cartocss_doc_parser vX.Y.Z"</i>) ⇒ `gen`

  Lists all available data types for properties for CartoCSS.

  - **url** (str) URL to the documentation page. Can be a local file, in which
   case any HTTP request would be performed, instead the file would be read.
  - **user_agent** (str) User agent performing the HTTP request to documentation
   page. As default is `cartocss_doc_parser (vs)`.

  [pypi-link]: https://pypi.org/project/cartocss-doc-parser
  [pypi-version-image]: https://img.shields.io/pypi/v/cartocss-doc-parser
  [pypi-pyversions-image]: https://img.shields.io/pypi/pyversions/cartocss-doc-parser
  [tests-image]: https://img.shields.io/github/actions/workflow/status/mondeja/cartocss-doc-parser/ci.yml?branch=master&logo=github&label=tests
  [tests-link]: https://github.com/mondeja/cartocss-doc-parser/actions?query=workflow%3ATest
  [coverage-image]: https://coveralls.io/repos/github/mondeja/cartocss-doc-parser/badge.svg
  [coverage-link]: https://coveralls.io/github/mondeja/cartocss-doc-parser
  [cartocss-doc-link]: https://carto.com/developers/styling/cartocss


pkgId: 430473bb396a7dd62134a719815de9bfb718c687b11f82b66e6ad48554cab8eb
name: python-cartoframes
arch: src
version: 1.2.5
epoch: 0
release: 1
summary: CARTO Python package for data scientists
url: https://github.com/CartoDB/cartoframes
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartoframes-1.2.5-1.src.rpm
checksum_type: sha256
description:
  * Stable (1.2.5): |stable|
  * Latest (develop branch): |develop|
  If you do not have an API key, you can still use cartoframes for creating maps locally.
      The example context only provides read access, so not all cartoframes features are available. For full access, `Start a free trial <https://carto.com/signup>`__ or get free access with a `GitHub Student Developer Pack <https://education.github.com/pack>`__.


pkgId: 0ecad630f73b0937111ada3ac340795905f77cf05ef5e9696ae617e9193795ca
name: python-cartola
arch: src
version: 0.18
epoch: 0
release: 1
summary: Candango's Shared Functions.
url: https://github.com/candango/cartola
rpm_license: Apache License V2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartola-0.18-1.src.rpm
checksum_type: sha256
description:
  [![Latest PyPI version](https://img.shields.io/pypi/v/cartola.svg)](https://pypi.org/project/cartola/)
  [![Number of PyPI downloads](https://img.shields.io/pypi/dm/cartola.svg)](https://pypi.org/project/cartola/#files)
  [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fcandango%2Fcartola%2Fbadge&style=flat)](https://actions-badge.atrox.dev/candango/cartola/goto)
  [![GitHub license](https://img.shields.io/github/license/candango/firenado)](https://github.com/candango/cartola/blob/develop/LICENSE)
  [![Requirements Status](https://requires.io/github/candango/cartola/requirements.svg?branch=master)](https://requires.io/github/candango/cartola/requirements/?branch=master)

  Candango's Shared Utilities.

  Cartola means Top Hat. You see? A magician gets a rabbit from a Top Hat, right?
  Right? I think you got the joke...

  I'm pretty creative. ;)

  We just needed a namespace to share some util modules, that's a great one.



  **Apache License V2.0**

  Copyright © 2015-2024 Flavio Garcia


pkgId: 008cd1b95ab3bd3599c6553bf82dd2bc7d2bf87096321d0aed1e503f1ffaca91
name: python-cartonml-nightly
arch: src
version: 0.0.1.dev20231020
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cartonml-nightly/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartonml-nightly-0.0.1.dev20231020-1.src.rpm
checksum_type: sha256
description:
  Python bindings for Carton.

  The `python` subfolder contains the python code and `src` contains rust


pkgId: 64f84ef0b57b2108d7cb34b557b426518536b1203c4142d4871ef3acc044afb2
name: python-cartoonfight
arch: src
version: 1.0.dev23
epoch: 0
release: 1
summary: 2D Fighting game with cartoon characters
url: https://github.com/kmmelcher/cartoonfight
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartoonfight-1.0.dev23-1.src.rpm
checksum_type: sha256
description:
  Cartoon Fight is a 2D battle game to play against your friends
  with your favorites cartoon characters.



  `$ pip install cartoonfight`

  Cartoon Fight works with Python 3.6+.

  To **update** it just run `$ pip install --upgrade cartoonfight`.



  Just run `$ cartoonfight`.



  Player One

  `A` Left, `W` Jump, `D` Right, `F` Attack

  Player Two

  &#8592; Left &#8593; Jump &#8594; Right `CTRL` Attack



  Programmed by

  Kilian Melcher :email: kilian.melcher@gmail.com

  Filipe Ramalho :email: filiperamalhodasilva@gmail.com

  Artwork by

  Isabella Lúcio :email: isabella.lucio1@gmail.com


pkgId: 4b507891ad2d6258064d9413fdd3fa404d9416b04a21c12ecc756c0e41298f9c
name: python-cartorio
arch: src
version: 3.0.0
epoch: 0
release: 1
summary: Cartorio: A library for logging
url: https://github.com/hsteinshiromoto/cartorio
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartorio-3.0.0-1.src.rpm
checksum_type: sha256
description:
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5563175.svg)](https://doi.org/10.5281/zenodo.5563175)
  [![Documentation Status](https://readthedocs.org/projects/cartorio/badge/?version=stable)](https://cartorio.readthedocs.io/en/stable/?badge=stable)
  ![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/hsteinshiromoto/cartorio?style=flat)
  ![LICENSE](https://img.shields.io/badge/license-MIT-lightgrey.svg)



  A wrapper on the `logging` module for Python that provides a simple and easy-to-use interface for logging.


  - [1. Cartorio](#1-cartorio)
  - [2. Contents](#2-contents)
  - [3. Installation](#3-installation)
  - [4. Documentation](#4-documentation)
  - [5. Usage](#5-usage)


  ```bash
  pip install cartorio
  ```



  https://cartorio.readthedocs.io/en/stable/



  Consider that your project consists of two scripts:

  ```bash
  parent.py
  child/
  └──  child.py
  ```

  An example of these scripts are:
  ```python


  from pathlib import Path
  from cartorio import make_logger, log

  from child.child import multiply

  @log
  def main()
      multiply(10, 1)

  if __name__ == "__main__":
      
      logger, _ = make_logger(filename=Path(__file__).resolve().stem, logs_path=Path(__file__).resolve().parent)
      
      
      
      main()
  ```

  ```python


  from cartorio import fun, log

  @log
  def multiply(num1, num2):
      return num1 * num2
  ```

  The log filename will be `parent_<timestamp>.log` and it will contain the information in the form
  ```
  <timestamp> || root || 30664 || INFO || parent.py || parent || <line_number> || Enter || multiply
  <timestamp> || root || 30664 || INFO || parent.py || parent || <line_number> || Leave || multiply || Elapsed: 0:00:00.001708
  ```


pkgId: 8090538991af6d2e8ed5d2388c52377e1578e44d4f24513dc0fa281b276a32c2
name: python-cartoview
arch: src
version: 1.33.2
epoch: 0
release: 1
url: https://github.com/cartologic/cartoview
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cartoview-1.33.2-1.src.rpm
checksum_type: sha256
summary:
  Cartoview is a GIS web mapping application framework to     easily share and deploy apps based on Geonode

description:
  ![Cartoview Logo](./docs/img/cartoview-logo.png)

  [![GitHub stars](https://img.shields.io/github/stars/cartologic/cartoview.svg)](https://github.com/cartologic/cartoview/stargazers)
  [![GitHub forks](https://img.shields.io/github/forks/cartologic/cartoview.svg)](https://github.com/cartologic/cartoview/network)
  [![Coverage Status](https://coveralls.io/repos/github/cartologic/cartoview/badge.svg?branch=master&service=github)](https://coveralls.io/github/cartologic/cartoview?branch=master&service=github)
  [![Build Status](https://travis-ci.org/cartologic/cartoview.svg?branch=master)](https://travis-ci.org/cartologic/cartoview)
  [![GitHub license](https://img.shields.io/github/license/cartologic/cartoview.svg)](https://github.com/cartologic/cartoview/blob/master/LICENSE)
  [![GitHub issues](https://img.shields.io/github/issues/cartologic/cartoview.svg)](https://github.com/cartologic/cartoview/issues)
  [![Twitter](https://img.shields.io/twitter/url/https/github.com/cartologic/cartoview.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fcartologic%2Fcartoview)



  [Cartoview](https://cartoview.net/) is a web platform that extends the popular [GeoNode](https://geonode.org/) SDI to provide the ability to create, share, and visualize GIS Web Mapping Applications easily and quickly from the browser. Cartoview Provides an [App Store](https://appstore.cartoview.net/) for GIS Developers.

  Cartoview enables communities of users to share geospatial applications, to collaborate on these applications, and to exchange the underlying data as Open Geospatial Consortium (OGC) compliant web services.

  Cartoview has been built utilizing open source software and open standards to make it available for all GIS operators and to maximize interoperability.



  You can try Cartoview by visiting our official demo online at: [http://try.cartoview.net/](http://try.cartoview.net/).

  After registration, you will be able to explore all the basic functionalities of GeoNode like uploading layers, creation of maps, editing metadata, styles and much more but more importantly, the apps provided by Cartoview.



  Cartoview can be setup and installed in different ways, flavors and plattforms. If you´re planning to do development or install for production please visit the offical Cartoview installation documentation:

  - [Ubuntu 20.04 LTS](https://cartoview.readthedocs.io/en/latest/installation/ubuntu/)
  - [Windows](https://cartoview.readthedocs.io/en/latest/installation/windows/)
  - [Docker](https://cartoview.readthedocs.io/en/latest/installation/docker/)

  Cartoview also has a Windows installer which doesn't require any knowledge regarding programming and can be requested and downloaded from [here](https://cartoview.net/).



  If you're planning of customizing your Cartoview instance, or to extend its functionalities it's not advisable to change the core files here in any case.

  It's recommended to set up and install a [Cartoview Project Template](https://github.com/cartologic/cartoview-project) following the available guide [here](https://cartoview.readthedocs.io/en/latest/cartoview-project/).



  If you have any inquiry regarding Cartoview, feel free to contact us by filling out the form [here](https://cartoview.net/#Contact) or sending an e-mail to [cartoview@cartologic.com](mailto:cartoview@cartologic.com).



  - Project homepage: [https://cartoview.net](https://cartoview.net)
  - Repository: [https://github.com/cartologic/cartoview](https://github.com/cartologic/cartoview)
  - Cartoview Project: [https://github.com/cartologic/cartoview-project](https://github.com/cartologic/cartoview-project)
  - Official Demo: [http://try.cartoview.net](http://try.cartoview.net)
  - Documentation: [https://cartoview.readthedocs.io](https://cartoview.readthedocs.io)


pkgId: 8257a4d0601ca76853c1d9153027084bacf0db7deb2a3c91737cbb72f028dd1c
name: python-carvekit
arch: src
version: 4.1.2
epoch: 0
release: 1
summary: Open-Source background removal framework
url: https://github.com/OPHoperHPO/image-background-remove-tool
rpm_license: Apache License v2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carvekit-4.1.2-1.src.rpm
checksum_type: sha256
description:
  <p align="center"> <img src="docs/imgs/logo.png"> </p>

  <p align="center">
  <img src="https://github.com/OPHoperHPO/image-background-remove-tool/actions/workflows/master_docker.yaml/badge.svg">
  <img src="https://github.com/OPHoperHPO/image-background-remove-tool/actions/workflows/master.yml/badge.svg">
  <a href="https://colab.research.google.com/github/OPHoperHPO/image-background-remove-tool/blob/master/docs/other/carvekit_try.ipynb">
  <img src="https://camo.githubusercontent.com/52feade06f2fecbf006889a904d221e6a730c194/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667"></a>

  </p>


  **********************************************************************
  <p align="center"> <img align="center" width="512" height="288" src="docs/imgs/compare/readme.jpg"> </p>


  > The higher resolution images from the picture above can be seen in the docs/imgs/compare/ and docs/imgs/input folders.


  [Russian](docs/readme/ru.md)
  [English](README.md)


  Automated high-quality background removal framework for an image using neural networks.


  - High Quality
  - Batch Processing
  - NVIDIA CUDA and CPU processing
  - FP16 inference: Fast inference with low memory usage
  - Easy inference
  - 100% remove.bg compatible FastAPI HTTP API
  - Removes background from hairs
  - Easy integration with your code



  It can be briefly described as
  1. The user selects a picture or a folder with pictures for processing
  2. The photo is preprocessed to ensure the best quality of the output image
  3. Using machine learning technology, the background of the image is removed
  4. Image post-processing to improve the quality of the processed image

  |        Networks         |                   Target                    |             Accuracy             |
  |:-----------------------:|:-------------------------------------------:|:--------------------------------:|
  | **Tracer-B7** (default) |     **General** (objects, animals, etc)     | **90%** (mean F1-Score, DUTS-TE) |
  |         U^2-net         | **Hairs** (hairs, people, animals, objects) |  80.4% (mean F1-Score, DUTS-TE)  |
  |         BASNet          |        **General** (people, objects)        |  80.3% (mean F1-Score, DUTS-TE)  |
  |        DeepLabV3        |         People, Animals, Cars, etc          |  67.4% (mean IoU, COCO val2017)  |


  |  Networks   | Segmentation mask  size | Trimap parameters (dilation, erosion) |
  |:-----------:|:-----------------------:|:-------------------------------------:|
  | `tracer_b7` |           640           |                (30, 5)                |
  |   `u2net`   |           320           |                (30, 5)                |
  |  `basnet`   |           320           |                (30, 5)                |
  | `deeplabv3` |          1024           |               (40, 20)                |

  > ### Notes:
  > 1. The final quality may depend on the resolution of your image, the type of scene or object.
  > 2. Use **U2-Net for hairs** and **Tracer-B7 for general images** and correct parameters. \
  > It is very important for final quality! Example images was taken by using U2-Net and FBA post-processing.


  * `none` - No preprocessing methods used.
  > They will be added in the future.

  * `none` - No post-processing methods used.
  * `fba` (default) - This algorithm improves the borders of the image when removing the background from images with hair, etc. using FBA Matting neural network. This method gives the best result in combination with u2net without any preprocessing methods.


  1. `pip install carvekit --extra-index-url https://download.pytorch.org/whl/cpu`
  > The project has been tested on Python versions ranging from 3.9 to 3.11.7.

  1. Make sure you have an NVIDIA GPU with 8 GB VRAM.
  2. Install `CUDA Toolkit 12.1 and Video Driver for your GPU`
  3. `pip install carvekit --extra-index-url https://download.pytorch.org/whl/cu121`
  > The project has been tested on Python versions ranging from 3.9 to 3.11.7.


  ``` python
  import torch
  from carvekit.api.high import HiInterface


  interface = HiInterface(object_type="hairs-like",  # Can be "object" or "hairs-like".
                          batch_size_seg=5,
                          batch_size_matting=1,
                          device='cuda' if torch.cuda.is_available() else 'cpu',
                          seg_mask_size=640,  # Use 640 for Tracer B7 and 320 for U2Net
                          matting_mask_size=2048,
                          trimap_prob_threshold=231,
                          trimap_dilation=30,
                          trimap_erosion_iters=5,
                          fp16=False)
  images_without_background = interface(['./tests/data/cat.jpg'])
  cat_wo_bg = images_without_background[0]
  cat_wo_bg.save('2.png')


  ```


  ``` python
  import PIL.Image

  from carvekit.api.interface import Interface
  from carvekit.ml.wrap.fba_matting import FBAMatting
  from carvekit.ml.wrap.tracer_b7 import TracerUniversalB7
  from carvekit.pipelines.postprocessing import MattingMethod
  from carvekit.pipelines.preprocessing import PreprocessingStub
  from carvekit.trimap.generator import TrimapGenerator


  seg_net = TracerUniversalB7(device='cpu',
                batch_size=1)

  fba = FBAMatting(device='cpu',
                   input_tensor_size=2048,
                   batch_size=1)

  trimap = TrimapGenerator()

  preprocessing = PreprocessingStub()

  postprocessing = MattingMethod(matting_module=fba,
                                 trimap_generator=trimap,
                                 device='cpu')

  interface = Interface(pre_pipe=preprocessing,
                        post_pipe=postprocessing,
                        seg_pipe=seg_net)

  image = PIL.Image.open('tests/data/cat.jpg')
  cat_wo_bg = interface([image])[0]
  cat_wo_bg.save('2.png')

  ```



   * ```python3 -m carvekit  -i <input_path> -o <output_path> --device <device>```


  ````
  Usage: carvekit [OPTIONS]

    Performs background removal on specified photos using console interface.

  Options:
    -i ./2.jpg                   Path to input file or dir  [required]
    -o ./2.png                   Path to output file or dir
    --pre none                   Preprocessing method
    --post fba                   Postprocessing method.
    --net tracer_b7              Segmentation Network. Check README for more info.
    --recursive                  Enables recursive search for images in a folder
    --batch_size 10              Batch Size for list of images to be loaded to
                                 RAM

    --batch_size_seg 5           Batch size for list of images to be processed
                                 by segmentation network

    --batch_size_mat 1           Batch size for list of images to be processed
                                 by matting network

    --seg_mask_size 640          The size of the input image for the
                                 segmentation neural network. Use 640 for Tracer B7 and 320 for U2Net

    --matting_mask_size 2048     The size of the input image for the matting
                                 neural network.
    --trimap_dilation 30       The size of the offset radius from the
                                    object mask in pixels when forming an
                                    unknown area
    --trimap_erosion 5        The number of iterations of erosion that the
                                    object's mask will be subjected to before
                                    forming an unknown area
    --trimap_prob_threshold 231
                                    Probability threshold at which the
                                    prob_filter and prob_as_unknown_area
                                    operations will be applied

    --device cpu                 Processing Device.
    --fp16                       Enables mixed precision processing. Use only with CUDA. CPU support is experimental!
    --help                       Show this message and exit.


  ````

  Using the API via docker is a **fast** and non-complex way to have a working API.
  > **Our docker images are available on [Docker Hub](https://hub.docker.com/r/anodev/carvekit).** \
  > Version tags are the same as the releases of the project with suffixes `-cpu` and `-cuda` for CPU and CUDA versions respectively.


  <p align="center">
  <img src="docs/imgs/screenshot/frontend.png">
  <img src="docs/imgs/screenshot/docs_fastapi.png">
  </p>

  >### Important Notes:
  >1. Docker image has default front-end at `/` url and FastAPI backend with docs at `/docs` url.
  >2. Authentication is **enabled** by default. \
  > **Token keys are reset** on every container restart if ENV variables are not set. \
  See `docker-compose.<device>.yml` for more information. \
  > **You can see your access keys in the docker container logs.**
  >
  >3. There are examples of interaction with the API.\
  > See `docs/code_examples/python` for more details

  1. Install `docker-compose`
  2. Run `docker-compose -f docker-compose.cpu.yml up -d`  # For CPU Processing
  3. Run `docker-compose -f docker-compose.cuda.yml up -d`  # For GPU Processing
  > Also you can mount folders from your host machine to docker container
  > and use the CLI interface inside the docker container to process
  > files in this folder.

  > Building a docker image on Windows is not officially supported. You can try using WSL2 or "Linux Containers Mode" but I haven't tested this.




  1. `pip install -r requirements_test.txt`
  2. `pytest`


  1. Run `docker-compose -f docker-compose.cpu.yml run carvekit_api pytest`  # For testing on CPU
  2. Run `docker-compose -f docker-compose.cuda.yml run carvekit_api pytest`  # For testing on GPU




    You can thank me for developing this project and buy me a small cup of coffee ☕

  | Blockchain |           Cryptocurrency            |          Network          |                                             Wallet                                              |
  |:----------:|:-----------------------------------:|:-------------------------:|:-----------------------------------------------------------------------------------------------:|
  |  Ethereum  | ETH / USDT / USDC / BNB / Dogecoin  |          Mainnet          |                           0x7Ab1B8015020242D2a9bC48F09b2F34b994bc2F8                            |
  |  Ethereum  | ETH / USDT / USDC / BNB / Dogecoin  | BSC (Binance Smart Chain) |                           0x7Ab1B8015020242D2a9bC48F09b2F34b994bc2F8                            |
  |  Bitcoin   |                 BTC                 |             -             |                           bc1qmf4qedujhhvcsg8kxpg5zzc2s3jvqssmu7mmhq                            |
  |   ZCash    |                 ZEC                 |             -             |                               t1d7b9WxdboGFrcVVHG2ZuwWBgWEKhNUbtm                               |
  |    Tron    |                 TRX                 |             -             |                               TH12CADSqSTcNZPvG77GVmYKAe4nrrJB5X                                |
  |   Monero   |                 XMR                 |          Mainnet          | 48w2pDYgPtPenwqgnNneEUC9Qt1EE6eD5MucLvU3FGpY3SABudDa4ce5bT1t32oBwchysRCUimCkZVsD1HQRBbxVLF9GTh3 |
  |    TON     |                 TON                 |             -             |                        EQCznqTdfOKI3L06QX-3Q802tBL0ecSWIKfkSjU-qsoy0CWE                         |

  I will be glad to receive feedback on the project and suggestions for integration.

  For all questions write: [farvard34@gmail.com](mailto://farvard34@gmail.com)


pkgId: b94566bb50bfb195cc0daf544814b1dc1936540c5bf95a04ebb3d1dbc72ee98f
name: python-carvera-controller-community
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: Community developed controller for the Carvera CNC
url: https://pypi.org/project/carvera-controller-community/
rpm_license: GPL-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-carvera-controller-community-0.5.0-1.src.rpm
checksum_type: sha256
description:
  Community developed version of the Makera Carvera Controller software.



  The Controller software works on the following systems:

  - Windows 7 x64 or newer
  - MacOS using Intel CPUs running Ventura (13) or above
  - MacOS using Apple Silicon CPUs running Sonoma (14) or above
  - Linux using x64 CPUs running a Linux distribution with Glibc 2.31 or above (eg. Ubuntu 20.04 or higher)
  - Linux using ARM64 CPUs (eg RasPi 3 or above) running a distribution Glibc 2.36 or above (eg. RasPiOS Bookworm or higher)
  - Other systems might be work via the Python Package, see below for more details.



  See the assets section of [latest release](https://github.com/carvera-community/carvera_controller/releases/latest) for installation packages for your system.

  - carveracontroller-community-\<version\>-windows-x64.exe - Standalone Windows binary, without a installer
  - carveracontroller-community-\<version\>-Intel.dmg - MacOS with Intel CPU
  - carveracontroller-community-\<version\>-AppleSilicon.dmg - MacOS with Apple CPU (M1 etc)
  - carveracontroller-community-\<version\>-x86_64.appimage - Linux AppImage for x64 systems
  - carveracontroller-community-\<version\>-aarch64.appimage - Linux AppImage for ARM64 systems



  Linux AppImages are a self-contained binary with all the required dependencies to run the application.

  To use it, first make it executable (`chmod +x carveracontroller-community-<version>-<arch>.appimage`).

  Then you will be able to run it.

  If you want a shortcut, consider using [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher).



  It's best to use one of the pre-built packages as they they have frozen versions of tested dependencies and python interpreter, however if you prefer the software can be installed as a Python package. This might allow you to use a unsupported platform (eg raspi 1) provided that the dependencies can be met.

  ``` bash
  pip install carvera-controller-community
  ```

  Once installed it can be run via the module

  ``` bash
  python3 -m carveracontroller
  ```



  Review this guide for [how to contribute](CONTRIBUTING.md) to this codebase.



  To contribute to this project or set up a local development environment, follow these steps to install dependencies and prepare your environment.



  - Ensure you have [Python](https://www.python.org/downloads/) installed on your system (preferably version 3.8 or later).
  - [Poetry](https://python-poetry.org/) is required for dependency management. Poetry simplifies packaging and simplifies the management of Python dependencies.
  - One of the python dependencies [QuickLZ](https://pypi.org/project/pyquicklz/) will be compiled by Poetry when installed. Ensure that you have a compiler that Poetry/Pip can use and the Pythong headers. On a debian based Linux system this can be accomplished with `sudo apt-get install python3-dev build essential`. On Windows installation of (just) the Visual C++ 14.x compiler is required, this can be accomplished with [MSBuild tools package](https://wiki.python.org/moin/WindowsCompilers#Microsoft_Visual_C.2B-.2B-_14.2_standalone:_Build_Tools_for_Visual_Studio_2019_.28x86.2C_x64.2C_ARM.2C_ARM64.29).
  - [Squashfs-tools](https://github.com/plougher/squashfs-tools) is required if building Linux AppImages. On Debian based systems it's provided by the package `squashfs-tools`. This is only required if packaging for linux.



  Follow the official installation instructions to install Poetry. The simplest method is via the command line:

  ```bash
  curl -sSL https://install.python-poetry.org | python3 -
  ```

  Once installed, make sure Poetry is in your system's PATH so you can run it from any terminal window. Verify the installation by checking the version:

  ```bash
  poetry --version
  ```



  Once you have Poetry installed, setting up the development environment is straightforward:

  1. Clone the repository:

     ```bash
     git clone https://github.com/Carvera-Community/CarveraController.git
     cd CarveraController
     ```

  2. Install the project dependencies:

     ```bash
     poetry install
     ```

     This command will create a virtual environment (if one doesn't already exist) and install all required dependencies as specified in the `pyproject.toml` file.

  3. Activate the virtual environment (optional, but useful for running scripts directly):

     ```bash
     poetry shell
     ```

     This step is usually not necessary since `poetry run <command>` automatically uses the virtual environment, but it can be helpful if you want to run multiple commands without prefixing `poetry run`.



  You can run the Controller software using Poetry's run command without installation. This is handy for iterative development.

  ```bash
  poetry run python -m carveracontroller
  ```



  The application is packaged using PyInstaller. This tool converts Python applications into a standalone executable, so it can be run on systems without requiring management of a installed Python interpreter or dependent libraries. An build helper script is configured with Poetry and can be run with:

  ```bash
  poetry run python scripts/build.py --os os [--no-appimage]
  ```

  The options for `os` are windows, macos, or linux. If selecting `linux`, an appimage is built by default unless --no-appimage is specified.


pkgId: a9139e93dda84878ff12cb9e7efb5fe68950f34519d07919568a24108aef0473
name: python-cas-python
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Database of CAS Registry Number for Python
url: https://github.com/asergios/cas-python
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cas-python-0.1.0-1.src.rpm
checksum_type: sha256
description:
  cas-python is a Python library that provides access to a database of CAS Registry Numbers, allowing easy retrieval of chemical information by CAS number, chemical formula, or name.



  Use the package manager [pip](https://pip.pypa.io/en/stable/) to install cas-python.

  ```bash
  pip install cas-python
  ```



  ```python
  >>> import cas

  >>> # Get entry by CAS number
  >>> cas.database.get(cas="7732-18-5")
  CASEntry(cas='7732-18-5', name='water', formula='H2O')

  >>> # Get entry by chemical formula
  >>> cas.database.get(formula="H2O")
  CASEntry(cas='7732-18-5', name='water', formula='H2O')

  >>> # Get entry by chemical name
  >>> cas.database.get(name="water")
  CASEntry(cas='7732-18-5', name='water', formula='H2O')

  >>> # Explore the retrieved entry
  >>> gold = cas.database.get(name="gold")
  >>> gold
  CASEntry(cas='7440-57-5', name='gold', formula='Au')

  >>> # Access specific attributes of the entry
  >>> gold.cas
  '7440-57-5'
  >>> gold.formula
  'Au'
  ```


pkgId: 724914807b9452abb6dbf3eb4aff9ab155c9c4d8c3b3d767967fc787dc32abb4
name: python-cas-tools
arch: src
version: 1.0.15
epoch: 0
release: 1
summary: Cell Annotation Schema tools.
url: https://github.com/cellannotation/cas-tools
rpm_license: Apache-2.0 license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cas-tools-1.0.15-1.src.rpm
checksum_type: sha256
description:
  CAS-Tools is a comprehensive utility package designed to facilitate the effective use and manipulation of the [Cell Annotation Schema](https://github.com/cellannotation/cell-annotation-schema) (CAS) in single-cell transcriptomics data analysis.  CAS supports recording the rationale and evidence for single cell annotation, including gene expression evidence and details of automated annotation transfer. The standard can be saved as a separate JSON file with a resolvable link to a martix (AnnData) file containing annotated data, or embedded in the annotated AnnData file.



  You can install CAS-Tools [pypi package](https://pypi.org/project/cas-tools/) using `pip`:

  ```commandline
  pip install cas-tools
  ```



  CAS-Tools simplifies the use of CAS by offering a set of programmatically accessible operations including:

  - Validate Annotations: Validate annotations against the CAS standard to ensure compliance and consistency.
  - Validation of markers against linked AnnData file
  - Merge to Anndata - updating annotations in the AnnData file and saving JSON to the AnnData header.
  - Reporting: Generation of dataframe reports of CAS content from JSON.
  - Export to CAP-Anndata format: Merges into AnnData file following a derived, flattened representation of CAS, used by the Cell Annotation Platform (CAP) ([CAP-Anndata](https://github.com/cellannotation/cell-annotation-schema/blob/main/docs/cap_anndata_schema.md)).
  - Import from [Allen Brain Cell Atlas (ABC) format DataFrames](https://github.com/AllenInstitute/abc_atlas_access):



  CAS-tools functionality can be accessed via imported object in python or via a command line tool. For CLI tool function details please see:

  - [Command line interface](docs/cli.md)


pkgId: ea707f3840100b209a12dee4c7f156fe1050210d4422f3e78d4061cd76fb700e
name: python-casaconfig
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: CASA Operational Configuration Package
url: https://github.com/casangi/casaconfig
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casaconfig-1.0.1-1.src.rpm
checksum_type: sha256
description:
  Runtime data necessary for CASA operation.

  - [latest casaconfig API on casadocs](https://casadocs.readthedocs.io/en/latest/api/casaconfig.html)
  - [stable casaconfig API on casadocs](https://casadocs.readthedocs.io/en/stable/api/casaconfig.html)



  1. Create a release branch with a version name (ie v1.6.2)
  2. Ensure the version number in setup.py on the branch is set correctly
  3. Create a tag of the release branch (ie v1.6.2-1)
  4. Github Action runs automatically to publish a pip package to pypi



  ```
  $: pip install casaconfig
  ```



  See the casaconfig API documentation on casadocs (links above).

  Also see the External Data section of casadocs for additional details

  - [latext External Data section on casadocs](https://casadocs.readthedocs.io/en/latest/notebooks/external-data.html)
  - [stable External Data section on casadocs](https://casadocs.readthedocs.io/en/latest/notebooks/external-data.html)


  1. every push to the casaconfig repository will push a new wheel to [test pypi](https://test.pypi.org/project/casaconfig/#history)
  2. the version in setup.py must be updated before each push so that the wheel has a unique name (e.g. "1.2.3dev2", where "dev?" could be incremented during development)
  3. When testing with a casatools build, "pip install" the development casaconfig wheel before running any tests - it may be installed before casatools is installed or after since the casatools build does not depend on casasconfig (uninstall any already installed casaconfig if necessary).
  4. For release, follow the above instructions.


pkgId: 7c147f7bcf9bb739182a0658de20f2c63700dd2a291a412759bbea629615e67d
name: python-casanova
arch: src
version: 2.0.2
epoch: 0
release: 1
summary: Specialized & performant CSV readers, writers and enrichers for python.
url: http://github.com/medialab/casanova
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casanova-2.0.2-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/medialab/casanova/workflows/Tests/badge.svg)](https://github.com/medialab/casanova/actions)



  If you often find yourself processing CSV files using python, you will quickly notice that, while being more comfortable, `csv.DictReader` remains way slower than `csv.reader`:

  ```

  csv.reader: 24s
  csv.DictReader: 84s
  casanova.reader: 25s
  ```

  `casanova` is therefore an attempt to stick to `csv.reader` performance while still keeping a comfortable interface, still able to consider headers (even duplicate ones also, something that `csv.DictReader` is incapable of) etc.

  `casanova` is thus a good fit for you if you need to:

  - Stream large CSV files without running out of memory
  - Enrich the same CSV files by outputing a similar file, all while adding, filtering and editing cells.
  - Have the possibility to resume said enrichment if your process exited
  - Resume even if your output does not have the same order as the input

  `casanova` also packs exotic utilities able to read csv files in reverse (without loading the whole file into memory and in regular `O(n)` time), so you can, for instance, fetch useful information at the end of a file to restart some aborted process.

  Finally, `casanova` can be used as a command line tool able to evaluate python expressions (that can be parallelized if required) for each row of a given CSV file to produce typical results such as adding a column based on others etc.

  The command line tool documentation can be found [here](./docs/cli.md).

  For more generic task that don't require python evaluation, we recommend the very performant [`xsv`](https://github.com/BurntSushi/xsv) tool instead, or our own [fork](https://github.com/medialab/xsv) of the tool.



  You can install `casanova` with pip with the following command:

  ```
  pip install casanova
  ```

  If you want to be able to feed CSV files from the web to `casanova` readers & enrichers you will also need to install at least `urllib3` and optionally `certifi` (if you want secure SSL). Nnote that a lot of python packages, including the popular `requests` library, already depend on those two, so it is likely you already have them installed anyway:

  ```

  pip install urllib3 certifi


  pip install casanova[http]
  ```



  - [reader](#reader)
  - [reverse_reader](#reverse_reader)
  - [headers](#headers)
  - [writer](#writer)
  - [enricher](#enricher)
  - [indexed_enricher](#indexed_enricher)
  - [batch_enricher](#batch_enricher)
  - [resumers](#resumers)
    - [RowCountResumer](#rowcountresumer)
    - [IndexedResumer](#indexedresumer)
    - [BatchResumer](#batchresumer)
    - [LastCellResumer](#lastcellresumer)
    - [LastCellComparisonResumer](#lastcellcomparisonresumer)
  - [count](#count)
  - [last_cell](#last_cell)
  - [set_defaults](#set_defaults)
  - [xsv selection mini DSL](#xsv-selection-mini-dsl)



  Straightforward CSV reader yielding list rows but giving some information about potential headers and their ipositions.

  ```python
  import casanova

  with open('./people.csv') as f:

      
      reader = casanova.reader(f)

      
      reader.fieldnames
      >>> ['name', 'surname']

      reader.headers
      >>> Headers(name=0, surname=1)

      name_pos = reader.headers.name
      name_pos = reader.headers['name']

      'name' in reader.headers
      >>> True

      
      for row in reader:
          name = row[name_pos] # it's better to cache your pos outside the loop
          name = row[reader.headers.name] # this works, but is slower

      
      for name in reader.cells('name'):
          print(name)

      
      for row, name in reader.cells('name', with_rows=True):
          print(row, name, surname)

      
      
      for name, surname in reader.records('name', 'surname'):
          print(name, surname)

      for record in reader.records(['name', 'age']):
          print(record[0])

      for record in reader.records({'name': 'name', 'age': 1}):
          print(record['age'])

      
      reader = casanova.reader(f, no_headers=True)


  with casanova.reader('./people.csv') as reader:
    ...


  with casanova.reader('./people.csv', encoding='latin1') as reader:
    ...


  with casanova.reader('./people.csv.gz') as reader:
    ...



  with casanova.reader('https://mydomain.fr/some-file.csv') as reader:
      ...


  rows = [['name', 'surname'], ['John', 'Moran']]
  reader = casanova.reader(rows)


  reader = casanova.reader('./french-semicolons.csv', delimiter=';')


  reader.close()
  ```

  _Arguments_

  - **input_file** _str or Path or file or Iterable[list[str]]_: input file given to the reader. Can be a path that will be opened for you by the reader, a file handle or even an arbitrary iterable of list rows.
  - **no_headers** _bool, optional_ [`False`]: set to `True` if `input_file` has no headers.
  - **encoding** _str, optional_ [`utf-8`]: encoding to use to open the file if `input_file` is a path.
  - **dialect** _str or csv.Dialect, optional_: CSV dialect for the reader to use. Check python standard [csv](https://docs.python.org/3/library/csv.html) module documentation for more info.
  - **quotechar** _str, optional_: quote character used by CSV parser.
  - **delimiter** _str, optional_: delimiter characted used by CSV parser.
  - **prebuffer_bytes** _int, optional_: number of bytes of input file to prebuffer in attempt to get a total number of lines ahead of time.
  - **total** _int, optional_: total number of lines to expect in file, if you already know it ahead of time. If given, the reader won't prebuffer data even if `prebuffer_bytes` was set.
  - **multiplex** _casanova.Multiplexer, optional_: multiplexer to use. Read [this](#multiplexing) for more information.
  - **strip_null_bytes_on_read** _bool, optional_ [`False`]: before python 3.11, the `csv` module will raise when attempting to read a CSV file containing null bytes. If set to `True`, the reader will strip null bytes on the fly while parsing rows.
  - **reverse** _bool, optional_ [`False`]: whether to read the file in reverse (except for the header of course).

  _Properties_

  - **total** _int, optional_: total number of lines in the file, if known through prebuffering or through the `total` kwarg.
  - **headers** _casanova.Headers, optional_, optional: CSV file headers if `no_headers=False`.
  - **empty** _bool_: whether the given file was empty.
  - **fieldnames** _list[str], optional_: list representing the CSV file headers if `no_headers=False`.
  - **row_len** _int_: expected number of items per row.

  _Methods_

  - **rows**: returns an iterator over the reader rows. Same as iterating over the reader directly.
  - **cells**: take the name of a column or its position and returns an iterator over values of the given column. Can be given `with_rows=True` if you want to iterate over a `value, row` tuple instead if required.
  - **enumerate**: resuming-safe enumeration over rows yielding `index, row` tuples. Takes an optional `start` kwarg like builtin `enumerate`.
  - **enumerate_cells**: resuming-safe enumeration over cells yielding `index, cell` or `index, row, cell` if given `with_rows=True`. Takes an optional `start` kwarg like builtin `enumerate`.
  - **wrap**: method taking a list row and returning a `RowWrapper` object to wrap it.
  - **close**: cleans up the reader resources manually when not using the dedicated context manager. It is usually only useful when the reader was given a path and not an already opened file handle.

  <em id="multiplexing">Multiplexing</em>

  Sometimes, one column of your CSV file might contain multiple values, separated by an arbitrary separator character such as `|`.

  In this case, it might be desirable to "multiplex" the file by making a reader emit one copy of the line with each of the values contained by a cell.

  To do so, `casanova` exposes a special `Multiplexer` object you can give to any reader like so:

  ```python
  import casanova


  reader = casanova.reader(
      input_file,
      multiplex=casanova.Multiplexer('colors')
  )


  reader = casanova.reader(
      input_file,
      multiplex=casanova.Multiplexer('colors', separator='$')
  )


  reader = casanova.reader(
      input_file,
      multiplex=casanova.Multiplexer('colors', new_column='color')
  )
  ```



  A reverse CSV reader might sound silly, but it can be useful in some scenarios. Especially when you need to read the last line from an output file without reading the whole thing first, in constant time.

  It is mostly used by `casanova` [resumers](#resumers) and it is unlikely you will need to use them on your own.

  ```python
  import casanova







  with open('./people.csv', 'rb') as f:
      reader = casanova.reverse_reader(f)

      reader.fieldnames
      >>> ['name', 'surname']

      next(reader)
      >>> ['Quentin', 'Gold']
  ```



  A class representing the headers of a CSV file. It is useful to find the row position of some columns and perform complex selection.

  ```python
  import casanova


  headers = casanova.headers(['name', 'surname', 'age'])


  headers = casanova.reader(input_file).headers


  headers.surname
  >>> 1


  headers['surname']
  >>> 1


  headers.get('surname')
  >>> 1
  headers.get('not-found')
  >>> None


  casanova.headers(['surname', 'name', 'name'])['name', 1]
  >>> 2

  casanova.headers(['surname', 'name', 'name']).get('name', index=1)
  >>> 2


  'name' in headers:
  >>> True


  headers.fieldnames
  >>> ['name', 'surname', 'age']


  for col in headers:
      print(col)


  len(headers)
  >>> 3


  headers.nth(1)
  >>> 'surname'


  headers.wrap(['John', 'Matthews', '45'])
  >>> RowWrapper(name='John', surname='Matthews', age='45')


  headers.select(['name', 2])
  >>> [0, 2]


  headers.select('name,age')
  >>> [0, 2]
  headers.select('!name')
  >>> [1, 2]
  ```

  For more info about xsv mini DSL, check [this](#xsv-selection-mini-dsl) part of the documentation.



  `casanova` also exports a csv writer. It can automatically write headers when needed and is able to resume some tasks.

  ```python
  import casanova

  with open('output.csv') as f:
      writer = casanova.writer(f, fieldnames=['name', 'surname'])

      writer.writerow(['John', 'Davis'])

      
      writer = casanova.writer(f, fieldnames=['name', 'surname'], write_header=False)

      writer.writeheader()
  ```

  _Arguments_

  - **output_file** _file or casanova.Resumer_: target file.
  - **fieldnames** _Iterable[str], optional_: column names.
  - **strip_null_bytes_on_write** _bool, optional_ [`False`]: whether to strip null bytes when writing rows. Note that on python 3.10, there is a bug that prevents a `csv.writer` will raise an error when attempting to write a row containing a null byte.
  - **dialect** _csv.Dialect or str, optional_: dialect to use to write CSV.
  - **delimiter** _str, optional_: CSV delimiter.
  - **quotechar** _str, optional_: CSV quoting character.
  - **quoting** _csv.QUOTE\_\*, optional_: CSV quoting strategy.
  - **escapechar** _str, optional_: CSV escaping character.
  - **lineterminator** _str, optional_: CSV line terminator.
  - **write_header** _bool, optional_ [`True`]: whether to automatically write header if required (takes resuming into account).

  _Properties_

  - **headers** _casanova.Headers, optional_, optional: CSV file headers if fieldnames were provided
  - **fieldnames** _list[str], optional_: provided fieldnames.

  _Resuming_

  A `casanova.writer` is able to resume through a [`LastCellResumer`](#lastcellresumer).



  `casanova` enrichers are basically a smart combination of both a reader and a writer.

  It can be used to transform a given CSV file. This means you can transform its values on the fly, select some columns to keep from input and add new ones very easily.

  Note that enrichers inherits from both [`casanova.reader`](#reader) and [`casanova.writer`](#writer) and therefore keep both their properties and methods.

  ```python
  import casanova

  with open('./people.csv') as input_file, \
       open('./enriched-people.csv', 'w') as output_file:

      enricher = casanova.enricher(input_file, output_file)

      
      enricher.fieldnames
      >>> ['name', 'surname']

      
      name_pos = enricher.headers.name

      for row in enricher:

          
          row[name_pos] = 'John'
          enricher.writerow(row)

      
      enricher = casanova.enricher(f, of, add=['age', 'hair'])

      for row in enricher:
          enricher.writerow(row, ['34', 'blond'])

      
      enricher = casanova.enricher(f, of, add=['age'], select=['surname'])

      for row in enricher:
          enricher.writerow(row, ['45'])

      
      enricher = casanova.enricher(f, of, select='!1-4')

      
      for row, name in enricher.cells('name', with_rows=True):
          print(row, name)
  ```

  _Arguments_

  - **input_file** _file or str_: file object to read or path to open.
  - **output_file** _file or Resumer_: file object to write.
  - **no_headers** _bool, optional_ [`False`]: set to `True` if `input_file` has no headers.
  - **encoding** _str, optional_ [`utf-8`]: encoding to use to open the file if `input_file` is a path.
  - **add** _Iterable[str|int], optional_: names of columns to add to output.
  - **select** _Iterable[str|int]|str, optional_: selection of columns to keep from input. Can be an iterable of column names and/or column positions or a selection string writting in [xsv mini DSL](#xsv-selection-mini-dsl).
  - **dialect** _str or csv.Dialect, optional_: CSV dialect for the reader to use. Check python standard [csv](https://docs.python.org/3/library/csv.html) module documentation for more info.
  - **quotechar** _str, optional_: quote character used by CSV parser.
  - **delimiter** _str, optional_: delimiter characted used by CSV parser.
  - **prebuffer_bytes** _int, optional_: number of bytes of input file to prebuffer in attempt to get a total number of lines ahead of time.
  - **total** _int, optional_: total number of lines to expect in file, if you already know it ahead of time. If given, the reader won't prebuffer data even if `prebuffer_bytes` was set.
  - **multiplex** _casanova.Multiplexer, optional_: multiplexer to use. Read [this](#multiplexing) for more information.
  - **reverse** _bool, optional_ [`False`]: whether to read the file in reverse (except for the header of course).
  - **strip_null_bytes_on_read** _bool, optional_ [`False`]: before python 3.11, the `csv` module will raise when attempting to read a CSV file containing null bytes. If set to `True`, the reader will strip null bytes on the fly while parsing rows.
  - **strip_null_bytes_on_write** _bool, optional_ [`False`]: whether to strip null bytes when writing rows. Note that on python 3.10, there is a bug that prevents a `csv.writer` will raise an error when attempting to write a row containing a null byte.
  - **writer_dialect** _csv.Dialect or str, optional_: dialect to use to write CSV.
  - **writer_delimiter** _str, optional_: CSV delimiter for writer.
  - **writer_quotechar** _str, optional_: CSV quoting character for writer.
  - **writer_quoting** _csv.QUOTE\_\*, optional_: CSV quoting strategy for writer.
  - **writer_escapechar** _str, optional_: CSV escaping character for writer.
  - **writer_lineterminator** _str, optional_: CSV line terminator for writer.
  - **write_header** _bool, optional_ [`True`]: whether to automatically write
    header if required (takes resuming into account).

  _Properties_

  - **total** _int, optional_: total number of lines in the file, if known through prebuffering or through the `total` kwarg.
  - **headers** _casanova.Headers, optional_, optional: CSV file headers if `no_headers=False`.
  - **empty** _bool_: whether the given file was empty.
  - **fieldnames** _list[str], optional_: list representing the CSV file headers if `no_headers=False`.
  - **row_len** _int_: expected number of items per row.
  - **output_headers** _casanova.Headers, optional_, optional: output CSV headers if `no_headers=False`.
  - **output_fieldnames** _list[str], optional_: list representing the output CSV headers if `no_headers=False`.
  - **added_count** _int_: number of columns added to the output.

  _Resuming_

  A `casanova.enricher` is able to resume through a [`RowCountResumer`](#rowcountresumer) or a [`LastCellComparisonResumer`](#lastcellcomparisonresumer).



  Sometimes, you might want to process multiple input rows concurrently. This can mean that you will emit rows in an arbitrary order, different from the input one.

  This is fine, of course, but if you still want to be able to resume an aborted process efficiently (using the [`IndexedResumer](#indexedresumer)), your output will need specific additions for it to work, namely a column containing the index of an output row in the original input.

  `casanova.indexed_enricher` makes it simpler by providing a tailored `writerow` method and iterators always provided the index of a row safely.

  Note that such resuming is only possible if one row in the input will produce exactly one row in the output.

  ```python
  import casanova

  with open('./people.csv') as f, \
       open('./enriched-people.csv', 'w') as of:

      enricher = casanova.indexed_enricher(f, of, add=['age', 'hair'])

      for index, row in enricher:
          enricher.writerow(index, row, ['67', 'blond'])

      for index, value in enricher.cells('name'):
          ...

      for index, row, value in enricher.cells('name', with_rows=True):
          ...
  ```

  _Arguments_

  Everything from [`casanova.enricher`](#enricher) plus:

  - **index_column** _str, optional_ [`index`]: name of the automatically added index column.

  _Resuming_

  A `casanova.indexed_enricher` is able to resume through a [`IndexedResumer`](#indexedresumer).



  Sometimes, you might want to process a CSV file and paginate API calls per row. This means that each row of your input file should produce multiple new lines, which will be written in batch each time one call from the API returns.

  Sometimes, the pagination might be quite long (think collecting the Twitter followers of a very popular account), and it would not be a good idea to accumulate all the results for a single row before flushing them to file atomically because if something goes wrong, you will lose a lot of work.

  But if you still want to be able to resume if process is aborted, you will need to add some things to your output. Namely, a column containing optional "cursor" data to resume your API calls and an "end" symbol indicating we finished the current input row.

  ```python
  import casanova

  with open('./twitter-users.csv') as input_file, \
       casanova.BatchResumer('./output.csv') as output_file:

      enricher = casanova.batch_resumer(input_file, output_file)

      for row in enricher:
          for results, next_cursor in paginate_api_calls(row):

              
              enricher.writebatch(row, results, next_cursor)
  ```

  _Arguments_

  Everything from [`casanova.enricher`](#enricher) plus:

  - **cursor_column** _str, optional_ [`cursor`]: name of the cursor column to add.
  - **end_symbol** _str, optional_ [`end`]: unambiguous (from cursor) end symbol to mark end of input row processing.

  _Resuming_

  A `casanova.batch_enricher` is able to resume through a [`BatchResumer`](#batchresumer).



  Through handy `Resumer` classes, `casanova` lets its enrichers and writers resume an aborted process.

  Those classes must be used as a wrapper to open the output file and can assess whether resuming is actually useful or not for you.

  All resumers act like file handles, can be used as a context manager using the `with` keyword and can be manually closed using the `close` method if required.

  <!--
  They also all accept a `listener` kwarg taking a function that will receive an event name and an event payload and that can be useful to update progress bars and such correctly when actually resuming. -->

  Finally know that resumers should work perfectly well with [multiplexing](#multiplexing)



  The `RowCountResumer` works by counting the number of line of the output and skipping that many lines from the input.

  It can only work in 1-to-1 scenarios where you only emit a single row per input row.

  It works in `O(2n) => O(n)` time and `O(1)` memory, `n` being the number of already processed rows.

  It is only supported by [`casanova.enricher`](#enricher).

  ```python
  import casanova

  with open('input.csv') as input_file, \
       casanova.RowCountResumer('output.csv') as resumer:

      
      resumer.can_resume()

      
      resumer.already_done_count()

      
      enricher = casanova.enricher(input_file, resumer)
  ```



  `casanova` exports an indexed resumer that allows row to be processed concurrently and emitted in a different order.

  In this precise case, couting the rows is not enough and we need to be smarter.

  One way to proceed is to leverage the index column added by the indexed enricher to compute a set of already processed row while reading the output. Then we can just skip the input rows whose indices are in this set.

  The issue here is that this consumes up to `O(n)` memory, which is prohibitive in some use cases.

  To make sure this still can be done while consuming very little memory, `casanova` uses an exotic data structure we named a "contiguous range set".

  This means we can resume operation in `O(n + log(h) * n)) => O(log(h) * n)` time and `O(log(h))` memory, `n` being the number of already processed rows and `h` being the size of the largest hole in the sorted indices of those same rows. Note that most of the time `h << n` since the output is mostly sorted (albeit not at a local level).

  You can read more about this data structure in [this](http://yomguithereal.github.io/posts/contiguous-range-set) blog post.

  Note finally this resumer can only work in 1-to-1 scenarios where you only emit a single row per input row.

  It is supported by [`casanova.indexed_enricher`](#indexed_enricher) only.

  ```python
  import casanova

  with open('input.csv') as input_file, \
       casanova.IndexedResumer('output.csv') as resumer:

      
      resumer.can_resume()

      
      resumer.already_done_count()

      
      enricher = casanova.indexed_enricher(input_file, resumer)


  from casanova import ContiguousRangeSet
  ```



  todo...



  Sometimes you might write an output CSV file while performing some paginated action. Said action could be aborted and you might want to resume it where you left it.

  The `LastCellResumer` therefore enables you to resume writing a CSV file by reading its output's last row using a [`casanova.reverse_reader`](#reverse_reader) and extracting the value you need to resume in constant time and memory.

  It is only supported by [`casanova.writer`](#writer).

  ```python
  import casanova

  with casanova.LastCellResumer('output.csv', value_column='user_id') as resumer:

      
      writer = casanova.writer(resumer)

      
      last_value = resumer.get_state()
  ```



  In some scenarios, it is possible to resume the operation of an enricher if you can know what was the last value of some column emitted in the output.

  Fortunately, using [`casanova.reverse_reader`](#reverse_reader), one can read the last line of a CSV file in constant time.

  As such the `LastCellComparisonResumer` enables you to resume the work of an enricher in `O(n)` time and `O(1)` memory, with `n` being the number of already done lines that you must quickly skip when repositioning yourself in the input.

  Note that it only works when the enricher emits a single line per line in the input and when the considered column value is unique across the input file.

  It is only supported by [`casanova.enricher`](#enricher).

  ```python
  import casanova

  with open('input.csv') as input_file, \
       casanova.LastCellComparisonResumer('output.csv', value_colum='user_id') as resumer:

      
      enricher = casanova.enricher(input_file, resumer)
  ```



  `casanova` exposes a helper function that one can use to quickly count the number of lines in a CSV file.

  ```python
  import casanova

  count = casanova.count('./people.csv')


  count = casanova.count('./people.csv', max_rows=100)
  >>> None # if the file has more than 100 rows
  >>> 34   # else the actual count


  count = casanova.count('./people.csv', delimiter=';')
  ```



  `casanova` exposes a helper function using a [reverse_reader](#reverse_reader) to read only the last cell value from a given column of a CSV file.

  ```python
  import casanova

  last_cell = casanova.last_cell('./people.csv', column='name')
  >>> 'Quentin'


  last_cell = casanova.last_cell('./empty.csv', column='name')
  >>> None


  last_cell = casanova.last_cell('./people.csv', column='name', delimiter=';')
  ```



  `casanova.set_defaults` lets you edit global defaults for `casanova`:

  ```python
  import casanova

  casanova.set_defaults(strip_null_bytes_on_read=True)


  with casanova.temporary_defaults(strip_null_bytes_on_read=True):
      ...
  ```

  _Arguments_

  - **strip_null_bytes_on_read** _bool, optional_ [`False`]: should readers and enrichers strip null bytes on read?
  - **strip_null_bytes_on_write** _bool, optional_ [`False`]: should writers and enrichers strip null bytes on write?
  - **prebuffer_bytes** _int, optional_: default prebuffer bytes for readers and enrichers.



  [xsv](https://github.com/BurntSushi/xsv), a command line tool written in Rust to handle csv files, uses a clever mini DSL to let users specify column selections.

  `casanova` has a working python implementation of this mini DSL that can be used by the `headers.select` method and the enrichers `select` kwargs.

  Here is the gist of it (copied right from xsv documentation itself):

  ```
  Select one column by name:
      * name

  Select one column by index (1-based):
      * 2

  Select the first and fourth columns:
      * 1,4

  Select the first 4 columns (by index and by name):
      * 1-4
      * Header1-Header4

  Ignore the first 2 columns (by range and by omission):
      * 3-
      * '!1-2'

  Select the third column named 'Foo':
      * 'Foo[2]'

  Re-order and duplicate columns arbitrarily:
      * 3-1,Header3-Header1,Header1,Foo[2],Header1

  Quote column names that conflict with selector syntax:
      * '"Date - Opening","Date - Actual Closing"'
  ```


pkgId: 2e4d26666b1403b8334354010d43d2e1ffeeb421b13a506894074d9b16f54d45
name: python-casanovo
arch: src
version: 4.2.1
epoch: 0
release: 1
summary: De novo mass spectrometry peptide sequencing with a transformer model
url: https://github.com/Noble-Lab/casanovo
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casanovo-4.2.1-1.src.rpm
checksum_type: sha256
description:
  **_De Novo_ Mass Spectrometry Peptide Sequencing with a Transformer Model**

  ![image](https://user-images.githubusercontent.com/32707537/152622912-ca87da20-a64c-4e3f-9ca1-721c6b0d9c64.png)

  If you use Casanovo in your work, please cite the following publications:

  - Yilmaz, M., Fondrie, W. E., Bittremieux, W., Oh, S. & Noble, W. S. *De novo* mass spectrometry peptide sequencing with a transformer model. in *Proceedings of the 39th International Conference on Machine Learning - ICML '22* vol. 162 25514–25522 (PMLR, 2022). [https://proceedings.mlr.press/v162/yilmaz22a.html](https://proceedings.mlr.press/v162/yilmaz22a.html)
  - Yilmaz, M., Fondrie, W. E., Bittremieux, W., Nelson, R., Ananth, V., Oh, S. & Noble, W. S. Sequence-to-sequence translation from mass spectra to peptides with a transformer model. in *bioRxiv* (2023). [doi:10.1101/2023.01.03.522621](https://doi.org/10.1101/2023.01.03.522621)


pkgId: ef7d61f6c5bf7b8e5f7763fcb234bf0d30e53ca39dab8b3661a0a96b4ded0f36
name: python-casatestutils
arch: src
version: 6.6.5.31
epoch: 0
release: 1
summary: Tools for use with casatest and testing
url: https://open-bitbucket.nrao.edu/projects/CASA/repos/casa6/browse
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casatestutils-6.6.5.31-1.src.rpm
checksum_type: sha256
description:
  ```

  Run from a local test script, from git trunk or from a JIRA branch. When **runtest.py**
  checks out the test script from git trunk or a branch, the test script should not be given
  with the ".py" extension.

  ```
  python3 runtest.py /path-to/test_mytask.py
  ```

  ```
  python3 runtest.py test_task_sdpolaverage
  Testnames: ['test_task_sdpolaverage']
  Fetching Tests From Git Main Since No Local Test is Given
  ```

  ```
  python3 runtest.py -b CAS-13640 test_tclean[test_onefield_clark]
  Testnames: ['test_task_tclean[test_onefield_clark]']
  CHECKING OUT BRANCH: CAS-13640
  test_tclean.py::test_onefield::test_onefield_clark
  [onefield] Test_Onefield_clark : mfs with clark minor cycle
  ```

  ```
  ./casa.6.4.0.16/bin/casa -c ./runtest.py <path-to>/test_task_tclean.py
  ```

  This is useful when knowing a priori the name of the test case or class to run.
  ```
  ./python3 -c ./runtest.py <path-to>/test_task_tclean.py[test_onefield_clark,test_onefield_mem]
  ```

  ```
  python3 -m casashell
  > from casatestutils import runtest
  > runtest.run(['test_task_tclean'])                       # pull test script from git trunk
  > runtest.run(['/path-to/test_task_flagdata.py'])         # run a local test script
  > runtest.run(['test_ttask_clean[test_onefield_clark]'])  # pull test script from git trunk
  ```

  This option is used to ignore a test from a test suite when using the -j option.
  The parameter can be a list of comma separated tests or a JSON file in the same structure as component_to_test_map.py.
  In this example, the component Flagging will pull 3 test scripts for flagcmd, flagdata and flagmanager.
  and the parameters are asking to ignore test_flagdata and test_flagcmd. Only test_flagmanager.py will run in this example.
  ```
  ./python3 ./runtest.py -j Flagging --ignore_list [test_task_flagdata,test_task_flagcmd]
  ```

  Experimental for Developers, mainly for Test Infrastructure Team use.
  ```
  Required Flags
  -m, --pmode     : Parallelization mode: serial, parallel, both
  -w, --work_dir  : Path to Working Directory to Unpack Tar/Dmg and run tests
  -p, --pkg       : Tarball / Dmg to be tested
  --bamboo        : Flag to Tell runtest similar to Bamboo
  -j / --test_group  or -l / --test_list : A test group ( Component) or test list must be passed
  Optional Flags
  -n, --ncores    : Number of Cores to Use for MPI Tests ( Default to 2)
  -r, --cachedir     : Casa cachedir ( previously --rcdir, which also covered the paths to the startup and config files)

  python3 runtest.py --bamboo -n 4 -p casa-6.4.3-3-py3.6.tar.xz -m serial -j asdmsummary -w /path/to/working/directory
  python3 runtest.py --bamboo -p casa-6.4.3-3-py3.6.tar.xz -m serial  -w /path/to/working/directory --test_list test_coordsys,test_tclean,
  ```

  --bamboo option requires [testrunner module] (https://open-bitbucket.nrao.edu/projects/CASA/repos/casa6/browse/casatestutils/testrunner).

  Run the unit tests of runtest.py in the command-line or in a Jupyter notebook
  Run locally using a casa tarball:
  ```
  <tarball>/bin/pip3 install jupyter
  <tarball>/bin/python3 -m jupyter notebook --generate-config
  <tarball>/bin/python3 -m jupyter notebook --browser=firefox --ip='*' --NotebookApp.toke='' --NotebookApp.password='' tests/nb_test_runtest.ipynb
  ```
  Run in [Google Colab](https://colab.research.google.com/drive/1lunhY-8iLot2H0UwFJ98_IWsmBM2TIMd?usp=sharing)

  Download test datasets from casatestdata.git using a sparse checkout. Use it inside a script or
  in the command line. See the usage:
  ```
  ./python3 sparse_check.py -h
  ```

  Import the module to download datasets on-the-fly based on the dataset name stored in casatestdata.git.
  ```
  from casatestutils import sparse_check
  sparse_check.download_data(["ngc5921.ms"])
  ```

  Download datasets used in a specific test script based on the taskname. The script will create a
  taskname-data file with the contents to be fetched from git and will create a local casatestdata directory
  containing symbolic links to the datasets. Follow the steps below to sparse checkout data for test_task_flagdata.
  ```
  ./python3 sparse_check.py -j flagdata
  cd casatestdata
  mv ../flagdata-data .
  source flagdata-data
  git checkout master
  cd ../
  ```
  With the above steps the datasets needed to run the flagdata tests will be checked out to casatestdata.
  Run the tests in the usual way; for example:
  ```
  ./python3 ./test_task_flagdata.py
  ```


pkgId: 4f0963f6e3941d7dbae1320d5daf58321738a1f8e0fe85750b19f1686fcb7579
name: python-casbin
arch: src
version: 1.36.3
epoch: 0
release: 1
summary: An authorization library that supports access control models like ACL, RBAC, ABAC in Python
url: https://pypi.org/project/casbin/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casbin-1.36.3-1.src.rpm
checksum_type: sha256
description:
  [![GitHub Action](https://github.com/casbin/pycasbin/workflows/build/badge.svg?branch=master)](https://github.com/casbin/pycasbin/actions)
  [![Coverage Status](https://coveralls.io/repos/github/casbin/pycasbin/badge.svg)](https://coveralls.io/github/casbin/pycasbin)
  [![Version](https://img.shields.io/pypi/v/casbin.svg)](https://pypi.org/project/casbin/)
  [![PyPI - Wheel](https://img.shields.io/pypi/wheel/casbin.svg)](https://pypi.org/project/casbin/)
  [![Pyversions](https://img.shields.io/pypi/pyversions/casbin.svg)](https://pypi.org/project/casbin/)
  [![Download](https://img.shields.io/pypi/dm/casbin.svg)](https://pypi.org/project/casbin/)
  [![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/S5UjpzGZjN)
  <p align="center">
    <sup>Sponsored by</sup>
    <br>
    <a href="https://stytch.com/docs?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_campaign=casbin">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://cdn.casbin.org/img/stytch-white.png">
        <source media="(prefers-color-scheme: light)" srcset="https://cdn.casbin.org/img/stytch-charcoal.png">
        <img src="https://cdn.casbin.org/img/stytch-charcoal.png" width="275">
      </picture>
    </a><br/>
    <a href="https://stytch.com/docs?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_campaign=casbin"><b>Build auth with fraud prevention, faster.</b><br/> Try Stytch for API-first authentication, user & org management, multi-tenant SSO, MFA, device fingerprinting, and more.</a>
    <br>
  </p>
  💖 [**Looking for an open-source identity and access management solution like Okta, Auth0, Keycloak ? Learn more about: Casdoor**](https://casdoor.org/)
  <a href="https://casdoor.org/"><img src="https://user-images.githubusercontent.com/3787410/147868267-6ac74908-5654-4f9c-ac79-8852af9ff925.png" alt="casdoor" style="width: 50%; height: 50%"/></a>
  **News**: 🔥 How to use it with `Django` ? Try [Django Authorization](https://github.com/pycasbin/django-authorization), an authorization library for `Django` framework.
  **News**: Async is now supported by Pycasbin >= 1.23.0!
  **News**: still worry about how to write the correct Casbin policy? ``Casbin online editor`` is coming to help! Try it at: http://casbin.org/editor/
  Casbin is a powerful and efficient open-source access control library for Python projects. It provides support for enforcing authorization based on various [access control models](https://en.wikipedia.org/wiki/Computer_security_model).


pkgId: a16cd84633439cd35e064a28b90cab637bcd16eeee93361f9065465badaed293
name: python-casbin-async-postgres-watcher
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: Async casbin role watcher to be used for monitoring updates to policies for PyCasbin
url: https://pypi.org/project/casbin-async-postgres-watcher/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casbin-async-postgres-watcher-1.2.0-1.src.rpm
checksum_type: sha256
description:
  [![tests](https://github.com/officialpycasbin/async-postgres-watcher/actions/workflows/release.yml/badge.svg)](https://github.com/officialpycasbin/async-postgres-watcher/actions)
  [![PyPI - Version](https://img.shields.io/pypi/v/casbin-async-postgres-watcher)](https://pypi.org/project/casbin-async-postgres-watcher/)
  [![PyPI - Wheel](https://img.shields.io/pypi/wheel/casbin-async-postgres-watcher.svg)](https://pypi.org/project/casbin-async-postgres-watcher/)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/casbin-async-postgres-watcher)](https://pypi.org/project/casbin-async-postgres-watcher/)
  [![PyPI - License](https://img.shields.io/pypi/l/casbin-async-postgres-watcher)](https://pypi.org/project/casbin-async-postgres-watcher/)
  [![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/S5UjpzGZjN)

  Async Casbin PostgreSQL watcher to be used for monitoring updates to Casbin policies.



  ```bash
  pip install casbin-async-postgres-watcher
  ```





  ```python
  from flask_authz import CasbinEnforcer
  from async_postgres_watcher import AsyncPostgresWatcher
  from flask import Flask
  from casbin.persist.adapters import FileAdapter

  casbin_enforcer = CasbinEnforcer(app, adapter)

  watcher = AsyncPostgresWatcher(host=HOST, port=PORT, user=USER, password=PASSWORD, dbname=DBNAME)
  watcher.set_update_callback(casbin_enforcer.e.load_policy)

  casbin_enforcer.set_watcher(watcher)
  ```



  See [asyncpg documentation](https://magicstack.github.io/asyncpg/current/api/index.html#connection) for full details of SSL parameters.



  ```python
  from flask_authz import CasbinEnforcer
  from async_postgres_watcher import AsyncPostgresWatcher
  from flask import Flask
  from casbin.persist.adapters import FileAdapter

  casbin_enforcer = CasbinEnforcer(app, adapter)



  watcher = AsyncPostgresWatcher(host=HOST, port=PORT, user=USER, password=PASSWORD, dbname=DBNAME, sslrootcert=SSLROOTCERT, check_hostname = True, sslcert=SSLCERT, sslkey=SSLKEY)
  watcher.set_update_callback(casbin_enforcer.e.load_policy)

  casbin_enforcer.set_watcher(watcher)
  ```



  - [PyCasbin](https://github.com/casbin/pycasbin)



  This project is under Apache 2.0 License. See the [LICENSE](LICENSE) file for the full license text.


pkgId: ac772f5058a05faa5b9ea94c985863740b8317e7f4add67cc772a7ec64d30d5d
name: python-casbin-django-orm-adapter
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: Django's ORM adapter for PyCasbin
url: https://pypi.org/project/casbin-django-orm-adapter/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casbin-django-orm-adapter-1.4.0-1.src.rpm
checksum_type: sha256
description:
  [![GitHub Action](https://github.com/officialpycasbin/django-orm-adapter/workflows/build/badge.svg?branch=master)](https://github.com/officialpycasbin/django-orm-adapter/actions)
  [![Coverage Status](https://coveralls.io/repos/github/officialpycasbin/django-orm-adapter/badge.svg)](https://coveralls.io/github/officialpycasbin/django-orm-adapter)
  [![Version](https://img.shields.io/pypi/v/casbin-django-orm-adapter.svg)](https://pypi.org/project/casbin-django-orm-adapter/)
  [![PyPI - Wheel](https://img.shields.io/pypi/wheel/casbin-django-orm-adapter.svg)](https://pypi.org/project/casbin-django-orm-adapter/)
  [![Pyversions](https://img.shields.io/pypi/pyversions/casbin-django-orm-adapter.svg)](https://pypi.org/project/casbin-django-orm-adapter/)
  [![Download](https://img.shields.io/pypi/dm/casbin-django-orm-adapter.svg)](https://pypi.org/project/casbin-django-orm-adapter/)
  [![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/S5UjpzGZjN)

  Django ORM Adapter is the [Django](https://www.djangoproject.com/)'s [ORM](https://docs.djangoproject.com/en/3.0/ref/databases/) adapter for [PyCasbin](https://github.com/casbin/pycasbin). With this library, Casbin can load policy from Django ORM supported database or save policy to it.

  Based on [Officially Supported Databases](https://docs.djangoproject.com/en/3.0/ref/databases/), The current supported databases are:

  - PostgreSQL
  - MariaDB
  - MySQL
  - Oracle
  - SQLite
  - IBM DB2
  - Microsoft SQL Server
  - Firebird
  - ODBC



  ```
  pip install casbin-django-orm-adapter
  ```

  Add `casbin_adapter.apps.CasbinAdapterConfig` to your `INSTALLED_APPS`

  ```python

  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

  INSTALLED_APPS = [
      ...
      'casbin_adapter.apps.CasbinAdapterConfig',
      ...
  ]

  CASBIN_MODEL = os.path.join(BASE_DIR, 'casbin.conf')
  ```

  To run schema migration, execute `python manage.py migrate casbin_adapter`



  ```python

  from casbin_adapter.enforcer import enforcer

  def hello(request):
      sub = "alice"  # the user that wants to access a resource.
      obj = "data1"  # the resource that is going to be accessed.
      act = "read"  # the operation that the user performs on the resource.

      if e.enforce(sub, obj, act):
          
          pass
      else:
          
          pass
  ```




  A string containing the file location of your casbin model.


  A string containing the adapter import path. Default to the django adapter shipped with this package: `casbin_adapter.adapter.Adapter`


  A tuple of arguments to be passed into the constructor of the adapter specified
  in `CASBIN_ADAPTER`. Refer to adapters to see available arguments.

  E.g. if you wish to use the file adapter
  set the adapter to `casbin.persist.adapters.FileAdapter` and use
  `CASBIN_ADAPTER_ARGS = ('path/to/policy_file.csv',)`


  The database the adapter uses. Default to "default".


  Watcher instance to be set as the watcher on the enforcer instance.


  Role manager instance to be set as the role manager on the enforcer instance.




  - [PyCasbin](https://github.com/casbin/pycasbin)



  This project is licensed under the [Apache 2.0 license](LICENSE).


pkgId: 8b25c9ea84558ff1231d19f28181a7af5f8ba157688e8be5bbbed10acc206940
name: python-casbin-redis-watcher
arch: src
version: 1.3.0
epoch: 0
release: 1
summary: Casbin role watcher to be used for monitoring updates to policies for PyCasbin
url: https://pypi.org/project/casbin-redis-watcher/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casbin-redis-watcher-1.3.0-1.src.rpm
checksum_type: sha256
description:
  [![GitHub Action](https://github.com/pycasbin/redis-watcher/workflows/build/badge.svg?branch=master)](https://github.com/pycasbin/redis-watcher/actions)
  [![Coverage Status](https://coveralls.io/repos/github/pycasbin/redis-watcher/badge.svg)](https://coveralls.io/github/pycasbin/redis-watcher)
  [![Version](https://img.shields.io/pypi/v/casbin-redis-watcher.svg)](https://pypi.org/project/casbin-redis-watcher/)
  [![PyPI - Wheel](https://img.shields.io/pypi/wheel/casbin-redis-watcher.svg)](https://pypi.org/project/casbin-redis-watcher/)
  [![Pyversions](https://img.shields.io/pypi/pyversions/casbin-redis-watcher.svg)](https://pypi.org/project/casbin-redis-watcher/)
  [![Download](https://img.shields.io/pypi/dm/casbin-redis-watcher.svg)](https://pypi.org/project/casbin-redis-watcher/)
  [![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/S5UjpzGZjN)

  redis-watcher is the [Redis](https://github.com/redis/redis) watcher for [pycasbin](https://github.com/casbin/pycasbin). With this library, Casbin can synchronize the policy with the database in multiple enforcer instances.



      pip install casbin-redis-watcher



  ```python
  import os
  import casbin
  from casbin_redis_watcher import new_watcher, WatcherOptions

  def callback_function(event):
      print("update for remove filtered policy callback, event: {}".format(event))

  def get_examples(path):
      examples_path = os.path.split(os.path.realpath(__file__))[0] + "/../examples/"
      return os.path.abspath(examples_path + path)

  if __name__ == "main":
      test_option = WatcherOptions()
      test_option.host = "localhost"
      test_option.port = "6379"
      test_option.channel = "test"
      test_option.ssl = False
      test_option.optional_update_callback = callback_function
      w = new_watcher(test_option)

      e = casbin.Enforcer(
          get_examples("rbac_model.conf"), get_examples("rbac_policy.csv")
      )
      e.set_watcher(w)
      
      e.save_policy()

  ```



  - [pycasbin](https://github.com/casbin/pycasbin)



  This project is under Apache 2.0 License. See the [LICENSE](LICENSE) file for the full license text.


pkgId: a534f349a2c9db98f94ea3131437254fcdf088717a6a0c5e2e4b0b5ebfe858ad
name: python-casbin_motor_adapter
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Motor Adapter for PyCasbin
url: https://pypi.org/project/casbin_motor_adapter/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casbin_motor_adapter-0.4.0-1.src.rpm
checksum_type: sha256
description:
  [![Test](https://github.com/wf-yamaday/motor-adapter/actions/workflows/ci-test.yml/badge.svg)](https://github.com/wf-yamaday/motor-adapter/actions/workflows/ci-test.yml)
  [![Lint](https://github.com/wf-yamaday/motor-adapter/actions/workflows/ci-lint.yml/badge.svg)](https://github.com/wf-yamaday/motor-adapter/actions/workflows/ci-lint.yml)
  [![Release](https://github.com/wf-yamaday/motor-adapter/actions/workflows/release.yml/badge.svg)](https://github.com/wf-yamaday/motor-adapter/actions/workflows/release.yml)
  [![Coverage Status](https://coveralls.io/repos/github/wf-yamaday/motor-adapter/badge.svg?branch=main)](https://coveralls.io/github/wf-yamaday/motor-adapter?branch=main)
  ![PyPI - Version](https://img.shields.io/pypi/v/casbin_motor_adapter)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/casbin_motor_adapter)
  ![PyPI - License](https://img.shields.io/pypi/l/casbin_motor_adapter)


  [Motor](https://motor.readthedocs.io/en/stable/) adapter for [PyCasbin](https://github.com/casbin/pycasbin).
  With this library, Casbin can load policy from MongoDB or save policy to it.



  Motor support a coroutine-based API for non-blocking access to MongoDB.
  So that, this adapter allows you to use pycasbin's [AsyncEnforcer](https://github.com/casbin/pycasbin/blob/master/casbin/async_enforcer.py).



  `load_policy()` loads all policies from storage.

  ```py
  import casbin_motor_adapter
  import casbin

  adapter = casbin_motor_adapter.Adapter('mongodb://localhost:27017/', "dbname")

  e = casbin.AsyncEnforcer('path/to/model.conf', adapter, True)
  await e.load_policy()

  sub = "alice"  # the user that wants to access a resource.
  obj = "data1"  # the resource that is going to be accessed.
  act = "read"  # the operation that the user performs on the resource.

  if e.enforce(sub, obj, act):
      
      pass
  else:
      
      pass
  ```



  `load_filtered_policy()` loads filtered policies from storage. This is useful for performance optimization.

  > Policy Subset Loading, https://casbin.org/docs/policy-subset-loading

  Additionally, `load_filtered_policy()` supports the MongoDB native queries for filtering conditions.

  ```py
  import casbin_motor_adapter
  import casbin

  adapter = casbin_motor_adapter.Adapter('mongodb://localhost:27017/', "dbname")

  e = casbin.AsyncEnforcer('path/to/model.conf', adapter, True)


  filter = Filter()
  filter.ptype = ["p"]
  filter.v0 = ["alice"]


  filter.raw_query = {
      "ptype": "p",
      "v0": {
          "$in": ["alice"]
      }
  }


  await e.load_filtered_policy(filter)

  sub = "alice"  # the user that wants to access a resource.
  obj = "data1"  # the resource that is going to be accessed.
  act = "read"  # the operation that the user performs on the resource.

  if e.enforce(sub, obj, act):
      
      pass
  else:
      
      pass

  ```



  This adapter was inspired by [pymongo-adapter](https://github.com/pycasbin/pymongo-adapter).



  [Apache 2.0 license](./LICENSE.txt).


pkgId: e9eea67eb72a6d0a4e782235d65ac8f674d4391527f832c4339264150c667b3e
name: python-cascadetoml
arch: src
version: 0.3.3
epoch: 0
release: 1
summary: Command for cascading toml files together
url: https://github.com/adafruit/cascadetoml
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cascadetoml-0.3.3-1.src.rpm
checksum_type: sha256
description:
  [![Discord](https://img.shields.io/discord/327254708534116352.svg)](https://adafru.it/discord)
  [![Build Status](https://github.com/adafruit/cascadetoml/workflows/Build%20CI/badge.svg)](https://github.com/adafruit/cascadetoml/actions)
  [![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  Command for cascading toml "databases" into their full objects
  TOML cascades are file trees that define generic configuration. Cascading allows
  for shared setting to be set in one place.
  The root of a cascade has two files that define it:
  * `.cascade.toml` defines settings for `cascadetoml`. Settings are:
    * `paths` a list of strings where each string is a python format-style string. These strings are used to pull out setting defined by the path.
  * `<type>.template.toml` defines the full structure of the resulting TOML object. `<type>` is used as the name for the array of tables output when a cascade results in multiple objects. The keys in the table are the only ones allowed in TOML files within the tree. The types of values must also be consistent.
  Settings for a particular folder are in a TOML file with the folder name plus the `.toml` extension.
  The first repo using this is the
  [`nvm.toml`](https://github.com/adafruit/nvm.toml) repo. Its only path is `{technology}/{manufacturer}/{sku}.toml`. A file such as `flash/gigadevice/GD1.toml` will have the implicit values:
  ```toml
  technology = "flash"
  manufacturer = "gigadevice"
  sku = "GD1"
  ```
  All of the other values come from these files in order:
  * `flash/flash.toml`
  * `flash/gigadevice/gigadevice.toml`
  * `flash/gigadevice/GD1.toml`
  No key may exist at multiple levels.
  `cascadetoml check` can be used to validate much of this.


pkgId: e97869cb63116bf5c256efb67719352404aff88b0e1421f9306c0e521e513286
name: python-cascadia
arch: src
version: 0.0.3
epoch: 0
release: 1
summary: De novo sequencing for DIA mass spectrometry data
url: https://github.com/Noble-Lab/cascadia
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cascadia-0.0.3-1.src.rpm
checksum_type: sha256
description:
  **A transformer model for de novo sequencing of data-independent acquisition mass spectrometry data**

  ![image](docs/source/cascadia-graphical-abstract.png)

  If you use Casanovo in your work, please cite the following publication:

  Sanders, Justin, et al. ‘A Transformer Model for de Novo Sequencing of Data-Independent Acquisition Mass Spectrometry Data’. bioRxiv, Cold Spring Harbor Laboratory, 2024, [https://doi.org/10.1101/2024.06.03.597251](https://doi.org/10.1101/2024.06.03.597251).



  Documentation for Cascadia is avaialable at:
  [https://cascadia.readthedocs.io/en/latest/index.html](https://cascadia.readthedocs.io/en/latest/index.html)


pkgId: 3306b499f5eda7cec91e6ce9e1445efd6325adc59a0772b7e43bca9f896d8e3c
name: python-cascadict
arch: src
version: 0.8.5
epoch: 0
release: 1
url: https://github.com/JNevrly/cascadict
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cascadict-0.8.5-1.src.rpm
checksum_type: sha256
summary:
  Cascading dictionary - CascaDict implements something like class inheritance, but on dictionary-key level. Ideal for representing cascading properties, e.g. configurations with default parameters etc.

description:
  0.8.4 (2015-11-16)
  ~~~~~~~~~~~~~~~~~~
  * Fixed pip build problem.
  0.8.3 (2015-11-16)
  ~~~~~~~~~~~~~~~~~~
  * Fixed import bug in Python 3.x. (#1) Thanks `@nicodemus26`_.
  * Added tox testing for Python 2.7, 3.4. (#2) Again, thanks `@nicodemus26`_.
  0.8.2 (2015-09-08)
  ~~~~~~~~~~~~~~~~~~
  * First release on PyPI.


pkgId: 8b0db057f41d1c5116f69af8af8eb2bf1d54b6f615be1dcc6076bcf2b34da707
name: python-casdoor
arch: src
version: 1.25.0
epoch: 0
release: 1
summary: Python SDK built for Casdoor
url: https://github.com/casdoor/casdoor-python-sdk
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casdoor-1.25.0-1.src.rpm
checksum_type: sha256
description:
  sdk = CasdoorSDK(
      endpoint,
      client_id,
      client_secret,
      certificate,
      org_name,
      application_name,
  )
  ```
  OR use async version
  ```python
  from casdoor import AsyncCasdoorSDK
  certificate = b'''-----BEGIN CERTIFICATE-----

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


pkgId: 685c844ab984edf8d3dda9b4ffdbafda9197d70165cfe641ef49180a98b04f1e
name: python-case-convert
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: Cross library to convert case with permissive input
url: https://gitlab.com/olive007/case-convert
rpm_license: GNU Lesser General Public License v3 or later (LGPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-case-convert-1.1.0-1.src.rpm
checksum_type: sha256
description:
  Cross-language library to convert case with permissive inputs.


  The library is available in:
  - [js](#code-example-javascript)
  - [python](#code-example-python)




  ```js
  import { camelCase } from "../src/index";

  camelCase("helloGreat world");  // helloGreatWorld
  camelCase("__hello Great--world");  // helloGreatWorld
  ```


  ```python
  from case_convert import camel_case

  camel_case("helloGreat world")  # helloGreatWorld
  camel_case("__hello Great--world")  # helloGreatWorld
  ```


  The library can convert to the following cases:
  - camel
  - kebab
  - pascal
  - snake
  - upper


  https://gitlab.com/olive007/case-convert/-/issues


  GNU Lesser General Public License v3 or later (LGPLv3+)


pkgId: 2042c977cf4e4821ee95f44d406d4f45ca0c4dc7f7a37ab840469c0adfba001b
name: python-case-converter
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: A string case conversion package.
url: https://github.com/chrisdoherty4/python-case-converter
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-case-converter-1.1.0-1.src.rpm
checksum_type: sha256
description:
  [![pipline](https://img.shields.io/gitlab/pipeline/chrisdoherty4/python-case-converter)](https://gitlab.com/chrisdoherty4/python-case-converter/-/pipelines) [![wheel](https://img.shields.io/pypi/wheel/case-converter)](https://pypi.org/project/case-converter/) ![coverage](https://gitlab.com/chrisdoherty4/python-case-converter/badges/master/coverage.svg) ![license](https://img.shields.io/github/license/chrisdoherty4/python-case-converter)

  A robust python package for transforming string cases such as `Hello, world!` into
   `helloWorld` (camelcase).



  ```python
  from caseconverter import camelcase

  camelcase("Hello, world!") # output: helloWorld
  ```



  If multiple delimeter characters are identified next to eachother they will be considered as a single delimeter. For example, `-_` contains 2 different delimeter characters and is considered a single delimeter.





  ```python
  from caseconverter import camelcase

  camelcase("Hello, world!")
  ```

  ```text
  helloWorld
  ```



  ```python
  from caseconverter import cobolcase

  cobolcase("Hello, world!")
  ```

  ```text
  HELLO-WORLD
  ```



  ```python
  from caseconverter import flatcase

  flatcase("Hello, world!")
  ```

  ```text
  helloworld
  ```



  ```python

  from caseconverter import kebabcase

  kebabcase("Hello, world!")
  ```

  ```text
  hello-world
  ```



  ```python
  from caseconverter import macrocase

  macrocase("Hello, world!")
  ```

  ```text
  HELLO_WORLD
  ```



  `delims_only : bool` - Only consider delimiters as boundaries (default: `False`).



  ```python
  from caseconverter import pascalcase

  pascalcase("Hello, world!")
  ```

  ```text
  HelloWorld
  ```



  ```python
  from caseconverter import snakecase

  snakecase("Hello, world!")
  ```

  ```text
  hello_world
  ```





  Punctuation is stripped when doing a case conversion. However, should you
  wish to keep the punctuation you can do so by passing `strip_punctuation=False`.

  ```python
  camelcase("Hello, world!", strip_punctuation=False) # output: hello,World!
  ```



  Default delimiters used to denote a token boundary.

  ```python
  DELIMITERS = " -_"
  ```

  You can pass `delims` to each case conversion function to specify a custom
  set of delimiters.

  ```python

  camelcase("Hello,|world!", delims="|") # output: helloWorld
  ```




  |Name|Description|
  |---|---|
  |OnDelimeterUppercaseNext|On a delimieter, upper case the following character|
  |OnDelimeterLowercaseNext|On a delimeter, lower case the following character|
  |OnUpperPrecededByLowerAppendUpper|On an upper case character followed by a lower case character, append the upper case character|
  |OnUpperPrecededByLowerAppendLower|On an upper case character preceeded by a lower case character append the lower case character|
  |OnUpperPrecededByUpperAppendJoin|On an upper case caharacter preceeded by an upper append the join character. Join characters are context dependent. Example: macro cast join character is `_`|
  |OnUpperPrecededByUpperAppendCurrent|On an upper case character preceeded by an upper case character append the upper case character|



  1. Write clean code.
  2. Write new tests for new use-cases.
  3. Test your code before raising a PR.
  4. Use [black](https://pypi.org/project/black/) to format your code.


pkgId: b92dff7385f2f9918f80a0955abb480f74b0347bc32541ddea81a166372a3bd8
name: python-case-insensitive-dictionary
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: Typed Python Case Insensitive Dictionary
url: https://github.com/DeveloperRSquared/case-insensitive-dict
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-case-insensitive-dictionary-0.2.1-1.src.rpm
checksum_type: sha256
description:
  Typed Python Case Insensitive Dictionary

  [![Publish](https://github.com/DeveloperRSquared/case-insensitive-dict/actions/workflows/publish.yml/badge.svg)](https://github.com/DeveloperRSquared/case-insensitive-dict/actions/workflows/publish.yml)

  [![Python 3.7+](https://img.shields.io/badge/python-3.7+-brightgreen.svg)](#case-insensitive-dict)
  [![PyPI - License](https://img.shields.io/pypi/l/case-insensitive-dictionary.svg)](LICENSE)
  [![PyPI - Version](https://img.shields.io/pypi/v/case-insensitive-dictionary.svg)](https://pypi.org/project/case-insensitive-dictionary)

  [![CodeQL](https://github.com/DeveloperRSquared/case-insensitive-dict/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/DeveloperRSquared/case-insensitive-dict/actions/workflows/codeql-analysis.yml)
  [![codecov](https://codecov.io/gh/DeveloperRSquared/case-insensitive-dict/branch/main/graph/badge.svg?token=45JCHX8KT9)](https://codecov.io/gh/DeveloperRSquared/case-insensitive-dict)
  [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DeveloperRSquared/case-insensitive-dict/main.svg)](https://results.pre-commit.ci/latest/github/DeveloperRSquared/case-insensitive-dict/main)

  [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)



  Install and update using [pip](https://pypi.org/project/case-insensitive-dictionary/).

  ```sh
  $ pip install -U case-insensitive-dictionary
  ```



  | Method                    | Description                                                                                                                                         |
  | :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
  | clear()                   | Removes all elements from the dictionary.                                                                                                           |
  | copy()                    | Returns a copy of the dictionary.                                                                                                                   |
  | get(key, default)         | Returns the value (case-insensitively), of the item specified with the key.<br>Falls back to the default value if the specified key does not exist. |
  | fromkeys(iterable, value) | Returns a dictionary with the specified keys and the specified value.                                                                               |
  | keys()                    | Returns the dictionary's keys.                                                                                                                      |
  | values()                  | Returns the dictionary's values.                                                                                                                    |
  | items()                   | Returns the key-value pairs.                                                                                                                        |
  | pop(key)                  | Remove the specified item (case-insensitively).<br>The value of the removed item is the return value.                                               |
  | popitem()                 | Remove the last item that was inserted into the dictionary.<br>For Python version <3.7, popitem() removes a random item.                            |



  CaseInsensitiveDict:

  ```py
  >>> from typing import Union

  >>> from case_insensitive_dict import CaseInsensitiveDict

  >>> case_insensitive_dict = CaseInsensitiveDict[Union[str, int], str](data={"Aa": "b", 1: "c"})
  >>> case_insensitive_dict["aa"]
  'b'
  >>> case_insensitive_dict[1]
  'c'

  ```

  which also supports json encoding/decoding:

  ```py
  >>> import json

  >>> from case_insensitive_dict import CaseInsensitiveDict, CaseInsensitiveDictJSONEncoder, case_insensitive_dict_json_decoder

  >>> case_insensitive_dict = CaseInsensitiveDict[str, str](data={"Aa": "b"})
  >>> json_string = json.dumps(obj=case_insensitive_dict, cls=CaseInsensitiveDictJSONEncoder)
  >>> json_string
  '{"Aa": "b"}'

  >>> case_insensitive_dict = json.loads(s=json_string, object_hook=case_insensitive_dict_json_decoder)
  >>> case_insensitive_dict
  CaseInsensitiveDict({'Aa': 'b'})
  ```



  Contributions are welcome via pull requests.



  ```sh
  $ git clone git@github.com:DeveloperRSquared/case-insensitive-dict.git
  $ cd case-insensitive-dict
  $ poetry install
  $ poetry shell
  ```

  Tools including black, mypy etc. will run automatically if you install [pre-commit](https://pre-commit.com) using the instructions below

  ```sh
  $ pre-commit install
  $ pre-commit run --all-files
  ```



  ```sh
  $ poetry run pytest
  ```



  - Source Code: <https://github.com/DeveloperRSquared/case-insensitive-dict/>
  - PyPI Releases: <https://pypi.org/project/case-insensitive-dictionary/>
  - Issue Tracker: <https://github.com/DeveloperRSquared/case-insensitive-dict/issues/>


pkgId: 2919537a6372cc314d6e440604e595c649ed4e053533144b752822e3bc8b0917
name: python-case-prov
arch: src
version: 0.12.0
epoch: 0
release: 1
summary: A mapping of CASE to W3C PROV
url: https://github.com/casework/CASE-Implementation-PROV-O
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-case-prov-0.12.0-1.src.rpm
checksum_type: sha256
description:
  This repository maps [CASE](https://caseontology.org/) to [W3C PROV-O](https://www.w3.org/TR/prov-o/) and [OWL-Time](https://www.w3.org/TR/owl-time/).  Note that contrary to other CASE implementations, this maps CASE out to another data model, instead of mapping another data model or tool into CASE.

  Full documentation is available at the [project homepage](https://github.com/casework/CASE-Implementation-PROV-O).


pkgId: 197d87479ebbb37bbbe21ad4c9fd62a1e296ec025ef34c27d0a003c0d9324942
name: python-case-switcher
arch: src
version: 1.3.13
epoch: 0
release: 1
summary: Library to change the casing of strings.
url: https://gitlab.com/mburkard/case-switcher
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-case-switcher-1.3.13-1.src.rpm
checksum_type: sha256
description:
  <div align=center>
  <!-- Title: -->
    <h1>Case Switcher</h1>
    <h3>Change the casing of a string.</h3>
  <!-- Labels: -->
    <!-- First row: -->
    <img src="https://img.shields.io/badge/license-MIT-green"
     height="20"
     alt="License: MIT">
    <img src="https://img.shields.io/badge/code%20style-black-000000.svg"
     height="20"
     alt="Code style: black">
    <img src="https://img.shields.io/pypi/v/case-switcher.svg"
     height="20"
     alt="PyPI version">
    <img src="https://img.shields.io/badge/coverage-100%25-success"
     height="20"
     alt="Code Coverage">
  </div>

  This library provides functions to change the casing convention of a string.

  Supported cases:

  - camelCase
  - dot.case
  - kebab-case
  - PascalCase
  - path/case
  - snake_case
  - Title Case
  - UPPER.DOT.CASE
  - UPPER-KEBAB-CASE
  - UPPER_SNAKE_CASE



  ```shell
  poetry add case-switcher
  ```

  ```shell
  pip install case-switcher
  ```



  ```python
  import caseswitcher

  sample = "avocado bagel-coffeeDONUTEclair_food.gravy"

  caseswitcher.to_camel(sample)  # -> "avocadoBagelCoffeeDONUTEclairFoodGravy"
  caseswitcher.to_dot(sample)  # -> "avocado.bagel.coffee.donut.eclair.food.gravy"
  caseswitcher.to_kebab(sample)  # -> "avocado-bagel-coffee-donut-eclair-food-gravy"
  caseswitcher.to_pascal(sample)  # -> "AvocadoBagelCoffeeDONUTEclairFoodGravy"
  caseswitcher.to_path(sample)  # -> "avocado/bagel/coffee/donut/eclair/food/gravy"
  caseswitcher.to_snake(sample)  # -> "avocado_bagel_coffee_donut_eclair_food_gravy"
  caseswitcher.to_title(sample)  # -> "Avocado Bagel Coffee DONUT Eclair Food Gravy"

  caseswitcher.to_upper_dot(sample)  # -> "AVOCADO.BAGEL.COFFEE.DONUT.ECLAIR.FOOD.GRAVY"

  caseswitcher.to_upper_kebab(sample)  # -> "AVOCADO-BAGEL-COFFEE-DONUT-ECLAIR-FOOD-GRAVY"

  caseswitcher.to_upper_snake(sample)  # -> "AVOCADO_BAGEL_COFFEE_DONUT_ECLAIR_FOOD_GRAVY"
  ```



  <a href="https://www.buymeacoffee.com/mburkard" target="_blank">
    <img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png"
         width="217"
         height="60"
         alt="Buy Me A Coffee">
  </a>


pkgId: a1aebbbb6bdd50bbe3607dcb0196e68f4ac7d27657ec6ab45d6abf75da569a77
name: python-cased
arch: src
version: 0.6.6
epoch: 0
release: 1
summary: Cased CLI adds security and visibility features to the command line tools you and your team love.
url: https://github.com/cased/cli
rpm_license: BSL 1.1
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cased-0.6.6-1.src.rpm
checksum_type: sha256
description:
  Cased CLI adds security and visibility features to the command line tools you and your team love. https://cased.com/guard


pkgId: 37316b5e6a99024021824009fb8df6828cab0dcccd0f412b1fb467ff6e973de3
name: python-casefy
arch: src
version: 0.1.7
epoch: 0
release: 1
summary: Utilities for string case conversion.
url: https://github.com/dmlls/python-casefy
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casefy-0.1.7-1.src.rpm
checksum_type: sha256
description:
  <p align="center"><img width="400" src="https://github.com/dmlls/python-casefy/blob/main/docs/source/_static/images/cover.png" alt=""></p>
  <p align="center" display="inline-block">
    <a href="https://docs.jizt.it">
      <a href="https://pypi.org/project/casefy/">
        <img src="https://img.shields.io/pypi/v/casefy">
      </a>
      <a href="https://deepsource.io/gh/dmlls/python-casefy/?ref=repository-badge}" target="_blank">
        <img alt="Active Issues" title="DeepSource" src="https://deepsource.io/gh/dmlls/python-casefy.svg/?label=active+issues&token=dbO3UyrUPWvJp6K_PVZpTcnU"/>
      </a>
    </a>
  </p>



  Casefy (/keɪsfaɪ/) is a lightweight Python package to convert the casing of strings. It has no third-party dependencies and supports Unicode.

  <br>



  The latest release can be installed using [pip](https://pypi.org/project/casefy/):
  ```shell
  pip install -U casefy
  ```

  Casefy is also [available](https://aur.archlinux.org/packages/python-casefy) as an Arch Linux AUR package.

  <br>



  Note: for more details, you can check the [API Reference](https://dmlls.github.io/python-casefy/api.html).

  ```python
  import casefy


  string = casefy.camelcase("foo_bar")
  print(string)  # fooBar

  string = casefy.camelcase("FooBar")
  print(string)  # fooBar

  string = casefy.camelcase("FOO BAR")
  print(string)  # fooBar



  string = casefy.pascalcase("foo_bar")
  print(string)  # FooBar

  string = casefy.pascalcase("fooBar")
  print(string)  # FooBar



  string = casefy.snakecase("fooBar")
  print(string)  # foo_bar

  string = casefy.snakecase("fooBARbaz", keep_together=["bar"])
  print(string)  # foo_bar_baz

  string = casefy.snakecase("FOO BAR")
  print(string)  # foo_bar



  string = casefy.constcase("fooBar")
  print(string)  # FOO_BAR



  string = casefy.kebabcase("fooBar")
  print(string)  # foo-bar



  string = casefy.upperkebabcase("fooBar")
  print(string)  # FOO-BAR



  string = casefy.separatorcase("fooBar", separator="/")
  print(string)  # foo/bar

  string = casefy.separatorcase("fooBARbaz", separator="%", keep_together=["bar"])
  print(string)  # foo%bar%baz



  string = casefy.sentencecase("fooBar")
  print(string)  # Foo bar



  string = casefy.titlecase("fooBar")
  print(string)  # Foo Bar



  string = casefy.alphanumcase("foo - 123 ; bar!")
  print(string)  # foo123bar
  ```

  <br>


  If you find a bug, please open an issue. Pull Requests are also welcome!

  <br>



  This project started when I saw that the package [`python-stringcase`](https://aur.archlinux.org/pkgbase/python-stringcase) was flagged-out-of-date in the Arch AUR Repository. The project [stringcase](https://github.com/okunishinishi/python-stringcase) seems not to be actively maintained anymore, so I decided to address its issues and pull requests and solve them in this new package. I kept the API as similar as possible, in order to facilitate any possible migration. I thank [Taka Okunishi](https://github.com/okunishinishi) (author of stringcase) and its contributors for their work.

  <br>



  - [`case-conversion`](https://github.com/AlejandroFrias/case-conversion) offers a very similar functionality as this project. I probably wouldn't have written this package if I had known of it before. However, the code of Casefy is more lightweight and just enough for most cases. If you need more functionality, e.g., detecting the case of a string, go with `case-conversion`.

  - [Inflection](https://github.com/jpvanhal/inflection) presents some overlap with this project as well, allowing the transformation of strings from CamelCase to underscored_string, but also singularizing and pluralizing English words.

  <br>


  Casefy is distributed under the [MIT](https://github.com/dmlls/python-casefy/blob/main/LICENSE) license.

rpm_license:
  MIT License  Copyright (c) 2022 Diego Miguel Lozano  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: 92746b0ac043dcfd96075d42277871bd0b853ebecff093b7689921dcb8ca681c
name: python-casegenmc
arch: src
version: 0.1.5
epoch: 0
release: 1
summary: Case generator, optimizer, and summarizer for models.
url: https://github.com/lvenneri/casegenmc
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casegenmc-0.1.5-1.src.rpm
checksum_type: sha256
description:
  Probe a model to see the possibilities. Takes model and input dictionary and evaluates cases to explore the model space using grids, random sampling, and optimization techniques.

  The input dictionary is defined by the user with mean value, uncertainty, uncertainty distribution, range, and bounds. Sparse definition okay and assumes 0 unc and range by default. Numerical and categorical parameters are supported. For categorical parameters, the range is defined as a list of options (subset of options), and the uncertainty distribution is defined as "choice" with unc defining the probability of each option.

  Includes matplotlib utility functions for standard plotting using toggle "plotting" which calls the function basic_plot_set().





  mean: float or array_like
      Mean value of the parameter.
  unc: float or array_like, optional
      Standard deviation of the parameter. Only used if "unc_frac" is not defined.
  unc_frac: float or array_like, optional
      Fraction of the mean to use as the standard deviation. Only used if "unc" is not defined.
  range: float or array_like, optional
      Range of the parameter used for regular grid and random uniform grid. Will default to the mean +/- 3x the unc if not defined.
  bounds: float or array_like, optional
      Bounds of the parameter. Used for optimization. Will default to [0, 100x the mean] if not defined.
  unc_type: str, optional
      Type of uncertainty distribution. If not defined, it is assumed to be uniform. Options: normal, lognormal, choice, exponential. Can add more, but working with normals is convenient for now.



  | Analysis Type                    | Description                                                                                      |
  |----------------------------|--------------------------------------------------------------------------------------------------|
  | `estimate`                 | Runs the model with the mean values of the input parameters.                                    |
  | `estimate_unc`        | Runs the model with sampled input parameters based on their uncertainty distributions.          |
  | `estimate_unc_extreme_combos` | Runs the model with combinations of extreme values of the input parameters.                     |
  | `sensitivity_analysis_unc` | Performs sensitivity analysis by varying each parameter individually based on its uncertainty distribution. |
  | `sensitivity_analysis_range` | Performs sensitivity analysis by varying each parameter individually over its entire range.    |
  | `sensitivity_analysis_2D`  | Performs 2D sensitivity analysis by varying two parameters simultaneously over a grid.         |
  | `regular_grid`             | Runs the model over a regular grid of input parameter values.                                   |
  | `random_uniform_grid`      | Runs the model over a grid of randomly sampled input



  ```
  pip install casegenmc
  ```



  ```python
  import casegenmc as cgm

  cgm.init_casegenmc(setup_tex=False,fontsize=8,figsize=[6,6])



  def model(x):
      out = {}
      out["y0"] = x["x0"]**2 + np.exp(x["x1"]) + x['x3']
      out["y1"] = x["x0"] + x["x1"] + x["x2"] + x["x3"]
      return out



  input_stack = {
      "x0": {"mean": 1., "unc": .2, 'range': [0, 5], 'bounds': [0, 100], 'unc_type': 'normal'},
      "x1": {"mean": 1., "unc": .2, 'range': [0, 3], 'unc_type': 'lognormal'},
      "x2": 3.,
      "x3": 4,
      "x4": {"mean": "a",  'range': ["a", "b"], "options": ["a", "b", "c"], "unc_type": "choice", },
      "x5": {"mean": "a", 'unc':[.2,.8], 'range': ["a", "b"], "options": ["a", "b", "c"], "unc_type": "choice", },
      }


  input_stack = cgm.process_input_stack(input_stack)
  print(input_stack)


  cgm.run_analysis(model=model, input_stack=input_stack, analyses=["estimate"])


  cgm.run_analysis(model, input_stack, n_samples=1000, analyses=["estimate_unc"], par_output="y0")


  cgm.run_analysis(model, input_stack, n_samples=1000, analyses=["estimate_unc_extreme_combos"], par_output="y0")


  cgm.run_analysis(model, input_stack, n_samples=1000, analyses=["sensitivity_analysis_2D"],  par_grid_xy=["x0", "x1"], par_output="y0")


  cgm.run_analysis(model, input_stack, n_samples=1000, analyses=["regular_grid"],  par_output="y0")


  ```

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


pkgId: 22dea3d5853e934e3c9a565070fdeaac200f48ca23b9af759e2603009570fbac
name: python-casestyle
arch: src
version: 0.0.4
epoch: 0
release: 1
url: https://github.com/zhoujin7/casestyle
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casestyle-0.0.4-1.src.rpm
checksum_type: sha256
summary:
  String case style converter (snake_case, camelCase, PascalCase, kebab-case, MACRO_CASE can be converted to each other).

description:
  String case style converter (snake_case, camelCase, PascalCase, kebab-case, MACRO_CASE can be converted to each other).
  * Functions:
      * casestyle.camelcase(string)
      * casestyle.pascalcase(string)
      * casestyle.snakecase(string)
      * casestyle.kebabcase(string)
      * casestyle.macrocase(string)
      * casestyle.casepreprocess(string)
  * Other Useful Python String Methods:
      * str.title()
      * str.capitalize()
      * str.lower()
      * str.upper()
      * str.swapcase()


pkgId: 03dc937f25ba332c003db25c694854deca3908db3a2dcd9315f81ec1b60cb80b
name: python-caseutil
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: Case convert and verify for Python: snake_case, camelCase, kebab-case, and more.
url: https://pypi.org/project/caseutil/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caseutil-0.7.0-1.src.rpm
checksum_type: sha256
description:
  > Case conversion and verification for Python: snake_case, camelCase, kebab-case, etc.

  [![versions](https://img.shields.io/pypi/pyversions/caseutil.svg)](https://pypi.org/project/caseutil)
  [![pypi](https://img.shields.io/pypi/v/caseutil.svg#v0.7.0)](https://pypi.python.org/pypi/caseutil)
  [![Tests](https://raw.githubusercontent.com/makukha/caseutil/v0.7.0/docs/badge/tests.svg)](https://github.com/makukha/caseutil)
  [![Coverage](https://raw.githubusercontent.com/makukha/caseutil/v0.7.0/docs/badge/coverage.svg)](https://github.com/makukha/caseutil)
  [![PyPI - Downloads](https://img.shields.io/pypi/dw/caseutil)](https://pypistats.org/packages/caseutil)
  [![license](https://img.shields.io/github/license/makukha/caseutil.svg)](https://github.com/makukha/caseutil/blob/main/LICENSE)
  [![Documentation Status](https://readthedocs.org/projects/caseutil/badge/?version=latest)](https://caseutil.readthedocs.io/en/latest/?badge=latest)
  [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9342/badge)](https://www.bestpractices.dev/projects/9342)



  * Verify and convert between most popular cases
  * Custom separators: `'foo.bar.baz'`, `'foo/bar/baz'`
  * Case detection
  * Command line utility `caseutil`
  * Pure Python 2.7 to 3.14+
  * No dependencies
  * 100% test coverage



  | Case          | Verify        | Convert       |
  |---------------|---------------|---------------|
  | snake_case    | `is_snake`    | `to_snake`    |
  | Ada_Case      | `is_ada`      | `to_ada`      |
  | CONST_CASE    | `is_const`    | `to_const`    |
  | camelCase     | `is_camel`    | `to_camel`    |
  | PascalCase    | `is_pascal`   | `to_pascal`   |
  | kebab-case    | `is_kebab`    | `to_kebab`    |
  | Train-Case    | `is_train`    | `to_train`    |
  | COBOL-CASE    | `is_cobol`    | `to_cobol`    |
  | lower case    | `is_lower`    | `to_lower`    |
  | UPPER CASE    | `is_upper`    | `to_upper`    |
  | Title Case    | `is_title`    | `to_title`    |
  | Sentence case | `is_sentence` | `to_sentence` |

  For more details about cases and their relations, see [Cases classification](https://caseutil.readthedocs.io/en/latest/classification/).



  ```shell
  $ pip install caseutil
  ```



  ```shell
  $ caseutil -c const "hi there"
  HI_THERE
  ```

  Invoke as Python module:
  ```shell
  $ python -m caseutil -c const "hi there"
  HI_THERE
  ```

  When reading from stdin, each line is processed separately:
  ```shell
  $ echo "hi_there\nsee you" | python -m caseutil -c camel
  hiThere
  seeYou
  ```



  ```doctest
  >>> from caseutil import *

  >>> is_snake('Foo bar-baz')
  False

  >>> to_snake('Foo bar-baz')
  'foo_bar_baz'
  ```





  All supported cases are gathered in `Case` enum:
  ```python
  class Case(StrEnum):
      ADA = 'ada'
      CAMEL = 'camel'
      COBOL = 'cobol'
      CONST = 'const'
      KEBAB = 'kebab'
      LOWER = 'lower'
      PASCAL = 'pascal'
      SENTENCE = 'sentence'
      SNAKE = 'snake'
      TITLE = 'title'
      TRAIN = 'train'
      UPPER = 'upper'
  ```



  Use functions `is_case()` and `to_case()` to deal with any supported case:

  ```doctest
  >>> is_case(Case.CAMEL, 'myVarName')
  True
  >>> to_case(Case.CONST, 'myVarName')
  'MY_VAR_NAME'
  ```



  Use `get_cases()` function to determine case (or cases, if [ambiguous](https://caseutil.readthedocs.io/en/latest/classification/#ambiguity)):

  ```doctest
  >>> get_cases('fooBar')
  ('camel',)
  >>> get_cases('My var-name')  # mixed case
  ()
  >>> get_cases('Title')
  ('ada', 'pascal', 'sentence', 'title', 'train')
  ```



  Use `words()` function:

  ```doctest
  >>> '/'.join(words(to_lower('myVarName')))
  'my/var/name'
  >>> '.'.join(words('myVarName'))
  'my.Var.Name'
  ```



  Word separators are non-word characters including underscore, and places where text case is changed from lower to upper. Digits are not treated as separators. For more details, see [Tokenization rules](https://caseutil.readthedocs.io/en/latest/tokenize/).

  ```doctest
  >>> words('!some_reallyMESsy text--wit4Digits.3VeryWh3re--')
  ['some', 'really', 'ME', 'Ssy', 'text', 'wit4', 'Digits', '3Very', 'Wh3re']
  ```



  Only ASCII names are supported. Unicode support is planned.



  This project requires [Docker](https://www.docker.com).

  ```shell
  git clone https://github.com/makukha/caseutil.git
  cd caseutil
  task dev
  ```

  ```shell
  root@caseutil:/project# task lint
  root@caseutil:/project# task format
  root@caseutil:/project# task test
  ```



  See [Contributing](.github/CONTRIBUTING.md) guidelines.



  * [Michael Makukha](https://github.com/makukha)



  [MIT License](https://github.com/makukha/caseutil/blob/main/LICENSE)


pkgId: 35d153e18e531636a4310c03e87af982c3736d1518c258cb1f7286804860b895
name: python-casey
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: A simple library to support various naming conventions and convert strings from one to another
url: https://github.com/marverix/casey
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casey-1.2.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/casey)](https://pypi.org/project/casey/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/casey)](https://github.com/marverix/casey/actions/workflows/tests.yml)
  [![Codecov](https://img.shields.io/codecov/c/gh/marverix/casey?token=NPX0JP4458)](https://app.codecov.io/gh/marverix/casey)
  [![GitHub](https://img.shields.io/github/license/marverix/casey)](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))
  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmarverix%2Fcasey.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmarverix%2Fcasey?ref=badge_shield)

  A simple library to support various naming conventions and convert strings from one to another.

  Casey supports:

  * camelCase
  * PascalCase
  * kebab-case
  * snake_case and SNAKE_CASE





  ```sh
  pip install casey
  ```



  ```python
  import casey

  subject = "every 1 WORD is very IMPORTANT"

  print(casey.camel(subject))


  print(casey.kebab(subject))


  print(casey.pascal(subject))


  print(casey.snake(subject))


  print(casey.snake(subject, upper=True))


  def my_transformation(word: str, idx: int) -> str:
    if idx % 2 == 0:
      return word.lower()
    else:
      return word.upper()

  print(casey.transform(subject, my_transformation, "_"))


  ```



  * `clean(subject: str) -> str: ...`

      Returns string with removed cases.

  * `camel(subject: str) -> str: ...`

      Returns string in camelCase.

  * `pascal(subject: str) -> str: ...`

      Returns string in PascalCase.

  * `kebab(subject: str) -> str: ...`

      Returns string in kebab-case.

  * `snake(subject: str) -> str: ...`

      Returns string in snake_case.

  * `snake(subject: str, upper=False) -> str: ...`

      Returns string in snake_case.

      If `upper` is `True`, it will convert whole subject to upper snake case.

  * `upper_first(subject: str) -> str: ...`

      Returns string with upper first letter (A-Z).

  * `lower_first(subject: str) -> str: ...`

      Returns string with lower first letter (A-Z).

  * `transform(subject: str, transformation: Callable, glue=" ") -> str: ...`

      Returns string transformed by the transformation function.
      The transformation function accepts 2 parameters: current word index (int), and a word itself (str).
      Glue is the string used to concat transformed words into one string.



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


  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmarverix%2Fcasey.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmarverix%2Fcasey?ref=badge_large)


pkgId: 46f45a7a38b955576ec000dc70a0b79d5c6a8eb00ed0c58712ce88a5dac81fea
name: python-cashews
arch: src
version: 7.3.2
epoch: 0
release: 1
summary: cache tools with async power
url: https://github.com/Krukov/cashews/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cashews-7.3.2-1.src.rpm
checksum_type: sha256
description:
  Cache plays a significant role in modern applications and everybody wants to use all the power of async programming and cache.
  There are a few advanced techniques with cache and async programming that can help you build simple, fast,
  scalable and reliable applications. This library intends to make it easy to implement such techniques.

  - Easy to configure and use
  - Decorator-based API, decorate and play
  - Different cache strategies out-of-the-box
  - Support for multiple storage backends ([In-memory](#in-memory), [Redis](#redis), [DiskCache](diskcache))
  - Set TTL as a string ("2h5m"), as `timedelta` or use a function in case TTL depends on key parameters
  - Transactionality
  - Middlewares
  - Client-side cache (10x faster than simple cache with redis)
  - Bloom filters
  - Different cache invalidation techniques (time-based or tags)
  - Cache any objects securely with pickle (use [secret](#redis))
  - 2x faster than `aiocache` (with client side caching)

  ```python
  from cashews import cache
  cache.setup("mem://")  # configure as in-memory cache, but redis/diskcache is also supported

  @cache(ttl="3h", key="user:{request.user.uid}")
  async def long_running_function(request):

  async def cache_using_function(request):
      await cache.set(key=request.user.uid, value=request.user, expire="20h")
  ```
  More examples [here](https://github.com/Krukov/cashews/tree/master/examples)

  - [Configuration](#configuration)
  - [Available Backends](#available-backends)
  - [Basic API](#basic-api)
  - [Disable Cache](#disable-cache)
  - [Strategies](#strategies)
    - [Cache condition](#cache-condition)
    - [Keys templating](#template-keys)
    - [TTL](#ttl)
    - [What can be cached](#what-can-be-cached)
  - [Cache Invalidation](#cache-invalidation)
    - [Cache invalidation on code change](#cache-invalidation-on-code-change)
  - [Detect the source of a result](#detect-the-source-of-a-result)
  - [Middleware](#middleware)
  - [Callbacks](#callbacks)
  - [Transactional mode](#transactional)
  - [Contrib](#contrib)
    - [Fastapi](#fastapi)
    - [Prometheus](#prometheus)

  `cashews` provides a default cache, that you can setup in two different ways:
  ```python
  from cashews import cache

  cache.setup("redis://0.0.0.0/?db=1&socket_connect_timeout=0.5&suppress=0&secret=my_secret&enable=1")

  cache.setup("redis://0.0.0.0/", db=1, wait_for_connection_timeout=0.5, suppress=False, secret=b"my_key", enable=True)
  ```
  Alternatively, you can create a cache instance yourself:
  ```python
  from cashews import Cache
  cache = Cache()
  cache.setup(...)
  ```
  Optionally, you can disable cache with `disable`/`enable` parameter (see [Disable Cache](#disable-cache)):
  ```python
  cache.setup("redis://redis/0?enable=1")
  cache.setup("mem://?size=500", disable=True)
  cache.setup("mem://?size=500", enable=False)
  ```
  You can setup different Backends based on a prefix:
  ```python
  cache.setup("redis://redis/0")
  cache.setup("mem://?size=500", prefix="user")
  await cache.get("accounts")  # will use the redis backend
  await cache.get("user:1")  # will use the memory backend
  ```


  The in-memory cache uses fixed-sized LRU dict to store values. It checks expiration on `get`
  and periodically purge expired keys.
  ```python
  cache.setup("mem://")
  cache.setup("mem://?check_interval=10&size=10000")
  ```

  _Requires [redis](https://github.com/redis/redis-py) package._\
  This will use Redis as a storage.
  This backend uses [pickle](https://docs.python.org/3/library/pickle.html) module to serialize
  values, but the cashes can store values with sha1-keyed hash.
  Use `secret` and `digestmod` parameters to protect your application from security vulnerabilities.
  The `digestmod` is a hashing algorithm that can be used: `sum`, `md5` (default), `sha1` and `sha256`
  The `secret` is a salt for a hash.
  Pickle can't serialize any type of object. In case you need to store more complex types
  you can use [dill](https://github.com/uqfoundation/dill) - set `pickle_type="dill"`.
  Dill is great, but less performance.
  If you need complex serializer for [sqlalchemy](https://docs.sqlalchemy.org/en/14/core/serializer.html) objects you can set `pickle_type="sqlalchemy"`
  Use `json` also an option to serialize/deserialize an object, but it very limited (`pickle_type="json"`)
  Any connection errors are suppressed, to disable it use `suppress=False` - a `CacheBackendInteractionError` will be raised
  If you would like to use [client-side cache](https://redis.io/topics/client-side-caching) set `client_side=True`
  Client side cache will add `cashews:` prefix for each key, to customize it use `client_side_prefix` option.
  ```python
  cache.setup("redis://0.0.0.0/?db=1&minsize=10&suppress=false&secret=my_secret", prefix="func")
  cache.setup("redis://0.0.0.0/2", password="my_pass", socket_connect_timeout=0.1, retry_on_timeout=True, secret="my_secret")
  cache.setup("redis://0.0.0.0", client_side=True, client_side_prefix="my_prefix:", pickle_type="dill")
  ```
  For using secure connections to redis (over ssl) uri should have `rediss` as schema
  ```python
  cache.setup("rediss://0.0.0.0/", ssl_ca_certs="path/to/ca.crt", ssl_keyfile="path/to/client.key",ssl_certfile="path/to/client.crt",)
  ```

  _Requires [diskcache](https://github.com/grantjenks/python-diskcache) package._
  This will use local sqlite databases (with shards) as storage.
  It is a good choice if you don't want to use redis, but you need a shared storage, or your cache takes a lot of local memory.
  Also, it is a good choice for client side local storage.
  You can setup disk cache with [FanoutCache parameters](http://www.grantjenks.com/docs/diskcache/api.html#fanoutcache)
  ** Warning ** `cache.scan` and `cache.get_match` does not work with this storage (works only if shards are disabled)
  ```python
  cache.setup("disk://")
  cache.setup("disk://?directory=/tmp/cache&timeout=1&shards=0")  # disable shards
  Gb = 1073741824
  cache.setup("disk://", size_limit=3 * Gb, shards=12)
  ```

  There are a few basic methods to work with cache:
  ```python
  from cashews import cache
  cache.setup("mem://")  # configure as in-memory cache
  await cache.set(key="key", value=90, expire="2h", exist=None)  # -> bool
  await cache.set_raw(key="key", value="str")  # -> bool
  await cache.set_many({"key1": value, "key2": value})  # -> None
  await cache.get("key", default=None)  # -> Any
  await cache.get_or_set("key", default=awaitable_or_callable, expire="1h")  # -> Any
  await cache.get_raw("key") # -> Any
  await cache.get_many("key1", "key2", default=None)  # -> tuple[Any]
  async for key, value in cache.get_match("pattern:*", batch_size=100):
  await cache.incr("key") # -> int
  await cache.exists("key") # -> bool
  await cache.delete("key")
  await cache.delete_many("key1", "key2")
  await cache.delete_match("pattern:*")
  async for key in cache.scan("pattern:*"):
  await cache.expire("key", timeout=10)
  await cache.get_expire("key")  # -> int seconds to expire
  await cache.ping(message=None)  # -> bytes
  await cache.clear()
  await cache.is_locked("key", wait=60)  # -> bool
  async with cache.lock("key", expire=10):
  await cache.set_lock("key", value="value", expire=60)  # -> bool
  await cache.unlock("key", "value")  # -> bool
  await cache.get_keys_count()  # -> int - total number of keys in cache
  await cache.close()
  ```

  Cache can be disabled not only at setup, but also in runtime. Cashews allow you to disable/enable any call of cache or specific commands:
  ```python
  from cashews import cache, Command
  cache.setup("mem://")  # configure as in-memory cache
  cache.disable(Command.DELETE)
  cache.disable()
  cache.enable(Command.GET, Command.SET)
  cache.enable()
  with cache.disabling():
  ```

  - [Simple cache](#simple-cache)
  - [Fail cache (Failover cache)](#fail-cache-failover-cache)
  - [Hit cache](#hit-cache)
  - [Early](#early)
  - [Soft](#soft)
  - [Async Iterators](#iterators)
  - [Locked](#locked)
  - [Rate limit](#rate-limit)
  - [Circuit breaker](#circuit-breaker)

  This is a typical cache strategy: execute, store and return from cache until it expires.
  ```python
  from datetime import timedelta
  from cashews import cache
  cache.setup("mem://")
  @cache(ttl=timedelta(hours=3), key="user:{request.user.uid}")
  async def long_running_function(request):
  ```

  Return cache result, if one of the given exceptions is raised (at least one function
  call should succeed prior to that).
  ```python
  from cashews import cache
  cache.setup("mem://")

  @cache.failover(ttl="2h", exceptions=(ValueError, MyException))
  async def get_status(name):
      value = await api_call()
      return {"status": value}
  ```
  If exceptions didn't get will catch all exceptions or use default if it is set by:
  ```python
  cache.set_default_fail_exceptions(ValueError, MyException)
  ```

  Expire cache after given numbers of call `cache_hits`.
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache.hit(ttl="2h", cache_hits=100, update_after=2)
  async def get(name):
      value = await api_call()
      return {"status": value}
  ```

  Cache strategy that tries to solve [Cache stampede problem](https://en.wikipedia.org/wiki/Cache_stampede)
  with a hot cache recalculating result in a background.
  ```python
  from cashews import cache  # or: from cashews import early

  @cache.early(ttl="10m", early_ttl="7m")
  async def get(name):
      value = await api_call()
      return {"status": value}
  ```

  Like a simple cache, but with a fail protection base on soft ttl.
  ```python
  from cashews import cache
  cache.setup("mem://")


  @cache.soft(ttl="10m", soft_ttl="7m")
  async def get(name):
      value = await api_call()
      return {"status": value}
  ```

  All upper decorators can be used only with coroutines. Cashing async iterators works differently.
  To cache async iterators use `iterator` decorator
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache.iterator(ttl="10m", key="get:{name}")
  async def get(name):
      async for item in get_pages(name):
          yield ...
  ```

  Decorator that can help you to solve [Cache stampede problem](https://en.wikipedia.org/wiki/Cache_stampede).
  Lock the following function calls until the first one is finished.
  This guarantees exactly one function call for given ttl.
  > :warning: \*\*Warning: this decorator will not cache the result
  > To do it you can combine this decorator with any cache decorator or use parameter `lock=True` with `@cache()`
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache.locked(ttl="10s")
  async def get(name):
      value = await api_call()
      return {"status": value}
  ```

  Rate limit for a function call: if rate limit is reached raise an `RateLimitError` exception.
  > :warning: \*\*Warning: this decorator will not cache the result
  > To do it you can combine this decorator with any cache failover decorator`
  ```python
  from cashews import cache, RateLimitError
  cache.setup("mem://")

  @cache.rate_limit(limit=10, period="1m", ttl="10m")
  async def get(name):
      value = await api_call()
      return {"status": value}

  @cache.failover(ttl="10m", exceptions=(RateLimitError, ))
  @cache.slice_rate_limit(limit=100, period="10m")
  async def get_next(name):
      value = await api_call()
      return {"status": value}
  ```

  Circuit breaker pattern. Count the number of failed calls and if the error rate reaches the specified value, it will raise `CircuitBreakerOpen` exception
  > :warning: \*\*Warning: this decorator will not cache the result
  > To do it you can combine this decorator with any cache failover decorator`
  ```python
  from cashews import cache, CircuitBreakerOpen
  cache.setup("mem://")
  @cache.circuit_breaker(errors_rate=10, period="1m", ttl="5m")
  async def get(name):
  @cache.failover(ttl="10m", exceptions=(CircuitBreakerOpen, ))
  @cache.circuit_breaker(errors_rate=10, period="10m", ttl="5m", half_open_ttl="1m")
  async def get_next(name):
  ```

  Simple Bloom filter:
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache.bloom(capacity=10_000, false_positives=1)
  async def email_exists(email: str) -> bool:
  for email in all_users_emails:
      await email_exists.set(email)
  await email_exists("example@example.com")
  ```

  By default, any successful result of the function call is stored, even if it is a `None`.
  Caching decorators have the parameter - `condition`, which can be:
  - a callable object that receives the result of a function call or an exception, args, kwargs and a cache key
  - a string: "not_none" or "skip_none" to do not cache `None` values in
  ```python
  from cashews import cache, NOT_NONE
  cache.setup("mem://")
  @cache(ttl="1h", condition=NOT_NONE)
  async def get():
  def skit_test_result(result, args, kwargs, key=None) -> bool:
      return result and result != "test"
  @cache(ttl="1h", condition=skit_test_result)
  async def get():
  ```
  It is also possible to cache an exception that the function can raise, to do so use special conditions (only for simple, hit and early)
  ```python
  from cashews import cache, with_exceptions, only_exceptions
  cache.setup("mem://")
  @cache(ttl="1h", condition=with_exceptions(MyException, TimeoutError))
  async def get():
  @cache(ttl="1h", condition=only_exceptions(MyException, TimeoutError))
  async def get():
  ```
  Also caching decorators have the parameter `time_condition` - min latency in seconds (can be set like `ttl`)
  of getting the result of a function call to be cached.
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache(ttl="1h", time_condition="3s")  # to cache for 1 hour if execution takes more than 3 seconds
  async def get():
  ```

  Often, to compose a cache key, you need all the parameters of the function call.
  By default, Cashews will generate a key using the function name, module names and parameters
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache(ttl=timedelta(hours=3))
  async def get_name(user, *args, version="v1", **kwargs):

  await get_name("me", version="v2")

  await get_name("me", version="v1", foo="bar")

  await get_name("me", "opt", "attr", opt="opt", attr="attr")

  ```
  For more advanced usage it better to define a cache key manually:
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache(ttl="2h", key="user_info:{user_id}")
  async def get_info(user_id: str):
  ```
  You may use objects in a key and access to an attribute through a template:
  ```python
  @cache(ttl="2h", key="user_info:{user.uuid}")
  async def get_info(user: User):
  ```
  You may use built-in functions to format template values (`lower`, `upper`, `len`, `jwt`, `hash`)
  ```python
  @cache(ttl="2h", key="user_info:{user.name:lower}:{password:hash(sha1)}")
  async def get_info(user: User, password: str):
  @cache(ttl="2h", key="user:{token:jwt(client_id)}")
  async def get_user_by_token(token: str) -> User:
  ```
  Or define your own transformation functions:
  ```python
  from cashews import default_formatter, cache
  cache.setup("mem://")
  @default_formatter.register("prefix")
  def _prefix(value, chars=3):
      return value[:chars].upper()
  @cache(ttl="2h", key="servers-user:{user.index:prefix(4)}")  # a key will be "servers-user:DWQS"
  async def get_user_servers(user):
  ```
  or register type formatters:
  ```python
  from decimal import Decimal
  from cashews import default_formatter, cache
  @default_formatter.type_format(Decimal)
  def _decimal(value: Decimal) -> str:
      return str(value.quantize(Decimal("0.00")))
  @cache(ttl="2h", key="price-{item.price}:{item.currency:upper}")  # a key will be "price-10.00:USD"
  async def convert_price(item):
  ```
  Not only function arguments can participate in a key formation. Cashews have a `template_context`. You may use any variable registered in it:
  ```python
  from cashews import cache, key_context, register_key_context
  cache.setup("mem://")
  register_key_context("client_id")
  @cache(ttl="2h", key="user:{client_id}")
  async def get_current_user():
    pass
  with key_context(client_id=135356):
      await get_current_user()
  ```

  ```python
  from cashews import cache
  cache.setup("mem://")
  class MyClass:
      @cache(ttl="2h")
      async def get_name(self, user, version="v1"):

  await MyClass().get_name("me", version="v2")

  ```
  As you can see, there is an ugly reference to the instance in the key. That is not what we expect to see.
  That cache will not work properly. There are 3 solutions to avoid it:
  1. define `__str__` magic method in our class
  ```python
  class MyClass:
      @cache(ttl="2h")
      async def get_name(self, user, version="v1"):
      def __str__(self) -> str:
          return self._host
  await MyClass(host="http://example.com").get_name("me", version="v2")

  ```
  2. Set a key template
  ```python
  class MyClass:
      @cache(ttl="2h", key="{self._host}:name:{user}:{version}")
      async def get_name(self, user, version="v1"):
  await MyClass(host="http://example.com").get_name("me", version="v2")

  ```
  3. Use `noself` or `noself_cache` if you want to exclude `self` from a key
  ```python
  from cashews import cache, noself, noself_cache
  cache.setup("mem://")
  class MyClass:
      @noself(cache)(ttl="2h")
      async def get_name(self, user, version="v1"):
      @noself_cache(ttl="2h")  # for python <= 3.8
      async def get_name(self, user, version="v1"):

  await MyClass().get_name("me", version="v2")

  ```

  Cache time to live (`ttl`) is a required parameter for all cache decorators. TTL can be:
  - an integer as the number of seconds
  - a `timedelta`
  - a string like in golang e.g `1d2h3m50s`
  - a callable object like a function that receives `args` and `kwargs` of the decorated function and returns one of the previous format for TTL
  Examples:
  ```python
  from cashews import cache
  from datetime import timedelta
  cache.setup("mem://")
  @cache(ttl=60 * 10)
  async def get(item_id: int) -> Item:
      pass
  @cache(ttl=timedelta(minutes=10))
  async def get(item_id: int) -> Item:
      pass
  @cache(ttl="10m")
  async def get(item_id: int) -> Item:
      pass
  def _ttl(item_id: int) -> str:
      return "2h" if item_id > 10 else "1h"
  @cache(ttl=_ttl)
  async def get(item_id: int) -> Item:
      pass
  ```

  Cashews mostly use built-in pickle to store data but also support other pickle-like serialization like dill.
  Some types of objects are not picklable, in this case, cashews has API to define custom encoding/decoding:
  ```python
  from cashews.serialize import register_type
  async def my_encoder(value: CustomType, *args, **kwargs) -> bytes:
  async def my_decoder(value: bytes, *args, **kwargs) -> CustomType:
  register_type(CustomType, my_encoder, my_decoder)
  ```

  Cache invalidation - one of the main Computer Science well-known problems.
  Sometimes, you want to invalidate the cache after some action is triggered.
  Consider this example:
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache(ttl="1h", key="items:page:{page}")
  async def items(page=1):
  @cache.invalidate("items:page:*")
  async def create_item(item):
  ```
  Here, the cache for `items` will be invalidated every time `create_item` is called
  There are two problems:
  1. with redis backend you cashews will scan a full database to get a key that match a pattern (`items:page:*`) - not good for performance reasons
  2. what if we do not specify a key for cache:
  ```python
  @cache(ttl="1h")
  async def items(page=1):
  ```
  Cashews provide the tag system: you can tag cache keys, so they will be stored in a separate [SET](https://redis.io/docs/data-types/sets/)
  to avoid high load on redis storage. To use the tags in a more efficient way please use it with the client side feature.
  > :warning: \*\*Warning: Tags require setting up default cache or cache for tags prefix
  > ```python
  > from cashews import cache
  > cache.setup(...)
  > # or
  > cache.setup_tags_backend(...)
  > ```
  ```python
  from cashews import cache
  cache.setup("redis://", client_side=True)
  @cache(ttl="1h", tags=["items", "page:{page}"])
  async def items(page=1):
  await cache.delete_tags("page:1")
  await cache.delete_tags("items")

  cache.register_tag("my_tag", key_template="key{i}")
  await cache.set("key1", "value", expire="1d", tags=["my_tag"])
  ```
  You can invalidate future call of cache request by context manager:
  ```python
  from cashews import cache, invalidate_further
  @cache(ttl="3h")
  async def items():
  async def add_item(item: Item) -> List[Item]:
      with invalidate_further():
          await items
  ```

  Often, you may face a problem with an invalid cache after the code is changed. For example:
  ```python
  @cache(ttl=timedelta(days=1), key="user:{user_id}")
  async def get_user(user_id):
      return {"name": "Dmitry", "surname": "Krykov"}
  ```
  Then, the returned value was changed to:
  ```bash
  -    return {"name": "Dmitry", "surname": "Krykov"}
  +    return {"full_name": "Dmitry Krykov"}
  ```
  Since the function returns a dict, there is no simple way to automatically detect
  that kind of cache invalidity
  One way to solve the problem is to add a prefix for this cache:
  ```python
  @cache(ttl=timedelta(days=1), prefix="v2")
  async def get_user(user_id):
      return {"full_name": "Dmitry Krykov"}
  ```
  but it is so easy to forget to do it...
  The best defense against this problem is to use your own datacontainers, like
  [dataclasses](https://docs.python.org/3/library/dataclasses.html),
  with defined `__repr__` method.
  This will add distinctness and `cashews` can detect changes in such structures automatically
  by checking [object representation](https://docs.python.org/3/reference/datamodel.html#object.__repr__).
  ```python
  from dataclasses import dataclass
  from cashews import cache
  cache.setup("mem://")
  @dataclass
  class User:
      name: str
      surname: str

  class User:
      def __init__(self, name, surname):
          self.name, self.surname = name, surname
      def __repr__(self):
          return f"{self.name} {self.surname}"

  @cache(ttl="1d", prefix="v2")
  async def get_user(user_id):
      return User("Dima", "Krykov")
  ```

  Decorators give us a very simple API but also make it difficult to understand where
  the result is coming from - cache or direct call.
  To solve this problem `cashews` has `detect` context manager:
  ```python
  from cashews import cache
  with cache.detect as detector:
      response = await something_that_use_cache()
      calls = detector.calls
  print(calls)

  ```
  E.g. A simple middleware to use it in a web app:
  ```python
  @app.middleware("http")
  async def add_from_cache_headers(request: Request, call_next):
      with cache.detect as detector:
          response = await call_next(request)
          if detector.calls:
              key = list(detector.calls.keys())[0]
              response.headers["X-From-Cache"] = key
              expire = await cache.get_expire(key)
              response.headers["X-From-Cache-Expire-In-Seconds"] = str(expire)
      return response
  ```

  Cashews provide the interface for a "middleware" pattern:
  ```python
  import logging
  from cashews import cache
  logger = logging.getLogger(__name__)
  async def logging_middleware(call, cmd: Command, backend: Backend, *args, **kwargs):
      key = args[0] if args else kwargs.get("key", kwargs.get("pattern", ""))
      logger.info("=> Cache request: %s ", cmd.value, extra={"args": args, "cache_key": key})
      return await call(*args, **kwargs)
  cache.setup("mem://", middlewares=(logging_middleware, ))
  ```

  One of the middleware that is preinstalled in cache instance is `CallbackMiddleware`.
  This middleware also add to a cache a new interface that allow to add a function that will be called before given command will be triggered
  ```python
  from cashews import cache, Command
  def callback(key, result):
    print(f"GET key={key}")
  with cache.callback(callback, cmd=Command.GET):
      await cache.get("test")  # also will print "GET key=test"
  ```

  Applications are more often based on a database with transaction (OLTP) usage. Usually cache supports transactions poorly.
  Here is just a simple example of how we can make our cache inconsistent:
  ```python
  async def my_handler():
      async with db.transaction():
          await db.insert(user)
          await cache.set(f"key:{user.id}", user)
          await api.service.register(user)
  ```
  Here the API call may fail, the database transaction will rollback, but the cache will not.
  Of course, in this code, we can solve it by moving the cache call outside transaction, but in real code it may not so easy.
  Another case: we want to make bulk operations with a group of keys to keep it consistent:
  ```python
  async def login(user, token, session):
      old_session = await cache.get(f"current_session:{user.id}")
      await cache.incr(f"sessions_count:{user.id}")
      await cache.set(f"current_session:{user.id}", session)
      await cache.set(f"token:{token.id}", user)
      return old_session
  ```
  Here we want to have some way to protect our code from race conditions and do operations with cache simultaneously.
  Cashews support transaction operations:
    > :warning: \*\*Warning: transaction operations are `set`, `set_many`, `delete`, `delete_many`, `delete_match` and `incr`
  ```python
  from cashews import cache
  @cache.transaction()
  async def my_handler():
      async with db.transaction():
          await db.insert(user)
          await cache.set(f"key:{user.id}", user)
          await api.service.register(user)

  async def login(user, token, session):
      async with cache.transaction() as tx:
          old_session = await cache.get(f"current_session:{user.id}")
          await cache.incr(f"sessions_count:{user.id}")
          await cache.set(f"current_session:{user.id}", session)
          await cache.set(f"token:{token.id}", user)
          if ...:
              tx.rollback()
      return old_session
  ```
  Transactions in cashews support different modes of "isolation"
  - fast (0-7% overhead) - memory based, can't protect of race conditions, but may use for atomicity
  - locked (default - 4-9% overhead) - use kind of shared lock per cache key (in case of redis or disk backend), protect of race conditions
  - serializable (7-50% overhead) - use global shared lock - one transaction per time (almost useless)
  ```python
  from cashews import cache, TransactionMode
  @cache.transaction(TransactionMode.SERIALIZABLE, timeout=1)
  async def my_handler():
  ```

  This library is framework agnostic, but includes several "batteries" for most popular tools.

  You may find a few middlewares useful that can help you to control a cache in you web application based on fastapi.
  1. `CacheEtagMiddleware` - middleware add Etag and check 'If-None-Match' header based on Etag
  2. `CacheRequestControlMiddleware` - middleware check and add `Cache-Control` header
  3. `CacheDeleteMiddleware` - clear cache for an endpoint based on `Clear-Site-Data` header
  > :warning: \*\*Warning: CacheEtagMiddleware requires setting up default cache or cache with prefix "fastapi:"
  > ```python
  > from cashews import cache
  > cache.setup(...)
  > # or
  > cache.setup(..., prefix="fastapi:")
  > ```
  Example:
  ```python
  from fastapi import FastAPI, Header, Query
  from fastapi.responses import StreamingResponse
  from cashews import cache
  from cashews.contrib.fastapi import (
      CacheDeleteMiddleware,
      CacheEtagMiddleware,
      CacheRequestControlMiddleware,
      cache_control_ttl,
  )
  app = FastAPI()
  app.add_middleware(CacheDeleteMiddleware)
  app.add_middleware(CacheEtagMiddleware)
  app.add_middleware(CacheRequestControlMiddleware)
  metrics_middleware = create_metrics_middleware()
  cache.setup(os.environ.get("CACHE_URI", "redis://"))
  @app.get("/")
  @cache.failover(ttl="1h")
  @cache(ttl=cache_control_ttl(default="4m"), key="simple:{user_agent:hash}", time_condition="1s")
  async def simple(user_agent: str = Header("No")):
  @app.get("/stream")
  @cache(ttl="1m", key="stream:{file_path}")
  async def stream(file_path: str = Query(__file__)):
      return StreamingResponse(_read_file(file_path=file_path))
  async def _read_file(_read_file):
  ```
  Also cashews can cache stream responses

  You can easily provide metrics using the Prometheus middleware.
  ```python
  from cashews import cache
  from cashews.contrib.prometheus import create_metrics_middleware
  metrics_middleware = create_metrics_middleware(with_tag=False)
  cache.setup("redis://", middlewares=(metrics_middleware,))
  ```


  - Clone the project.
  - After creating a virtual environment, install [pre-commit](https://pre-commit.com/):
    ```shell
    pip install pre-commit && pre-commit install --install-hooks
    ```

  To run tests you can use `tox`:
  ```shell
  pip install tox
  tox -e py  // tests for inmemory backend
  tox -e py-diskcache  // tests for diskcache backend
  tox -e py-redis  // tests for redis backend  - you need to run redis
  tox -e py-integration  // tests for integrations with aiohttp and fastapi
  tox // to run all tests for all python that is installed on your machine
  ```
  Or use `pytest`, but 2 tests always fail, it is OK:
  ```shell
  pip install .[tests,redis,diskcache,speedup] fastapi aiohttp requests httpx SQLAlchemy prometheus-client
  pytest // run all tests with all backends
  pytest -m "not redis" // all tests without tests for redis backend
  ```


pkgId: eab9ca73697b2272b278b85ea34896088c4d2bc095d097e5bf5f5fd7cd5c4441
name: python-cashews
arch: src
version: 7.4.0
epoch: 0
release: 1
summary: cache tools with async power
url: https://github.com/Krukov/cashews/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cashews-7.4.0-1.src.rpm
checksum_type: sha256
description:
  Cache plays a significant role in modern applications and everybody wants to use all the power of async programming and cache.
  There are a few advanced techniques with cache and async programming that can help you build simple, fast,
  scalable and reliable applications. This library intends to make it easy to implement such techniques.

  - Easy to configure and use
  - Decorator-based API, decorate and play
  - Different cache strategies out-of-the-box
  - Support for multiple storage backends ([In-memory](#in-memory), [Redis](#redis), [DiskCache](diskcache))
  - Set TTL as a string ("2h5m"), as `timedelta` or use a function in case TTL depends on key parameters
  - Transactionality
  - Middlewares
  - Client-side cache (10x faster than simple cache with redis)
  - Bloom filters
  - Different cache invalidation techniques (time-based or tags)
  - Cache any objects securely with pickle (use [secret](#redis))
  - 2x faster than `aiocache` (with client side caching)

  ```python
  from cashews import cache
  cache.setup("mem://")  # configure as in-memory cache, but redis/diskcache is also supported

  @cache(ttl="3h", key="user:{request.user.uid}")
  async def long_running_function(request):

  async def cache_using_function(request):
      await cache.set(key=request.user.uid, value=request.user, expire="20h")
  ```
  More examples [here](https://github.com/Krukov/cashews/tree/master/examples)

  - [Configuration](#configuration)
  - [Available Backends](#available-backends)
  - [Basic API](#basic-api)
  - [Disable Cache](#disable-cache)
  - [Strategies](#strategies)
    - [Cache condition](#cache-condition)
    - [Keys templating](#template-keys)
    - [TTL](#ttl)
    - [What can be cached](#what-can-be-cached)
  - [Cache Invalidation](#cache-invalidation)
    - [Cache invalidation on code change](#cache-invalidation-on-code-change)
  - [Detect the source of a result](#detect-the-source-of-a-result)
  - [Middleware](#middleware)
  - [Callbacks](#callbacks)
  - [Transactional mode](#transactional)
  - [Contrib](#contrib)
    - [Fastapi](#fastapi)
    - [Prometheus](#prometheus)

  `cashews` provides a default cache, that you can setup in two different ways:
  ```python
  from cashews import cache

  cache.setup("redis://0.0.0.0/?db=1&socket_connect_timeout=0.5&suppress=0&secret=my_secret&enable=1")

  cache.setup("redis://0.0.0.0/", db=1, wait_for_connection_timeout=0.5, suppress=False, secret=b"my_key", enable=True)
  ```
  Alternatively, you can create a cache instance yourself:
  ```python
  from cashews import Cache
  cache = Cache()
  cache.setup(...)
  ```
  Optionally, you can disable cache with `disable`/`enable` parameter (see [Disable Cache](#disable-cache)):
  ```python
  cache.setup("redis://redis/0?enable=1")
  cache.setup("mem://?size=500", disable=True)
  cache.setup("mem://?size=500", enable=False)
  ```
  You can setup different Backends based on a prefix:
  ```python
  cache.setup("redis://redis/0")
  cache.setup("mem://?size=500", prefix="user")
  await cache.get("accounts")  # will use the redis backend
  await cache.get("user:1")  # will use the memory backend
  ```


  The in-memory cache uses fixed-sized LRU dict to store values. It checks expiration on `get`
  and periodically purge expired keys.
  ```python
  cache.setup("mem://")
  cache.setup("mem://?check_interval=10&size=10000")
  ```

  _Requires [redis](https://github.com/redis/redis-py) package._\
  This will use Redis as a storage.
  This backend uses [pickle](https://docs.python.org/3/library/pickle.html) module to serialize
  values, but the cashes can store values with sha1-keyed hash.
  Use `secret` and `digestmod` parameters to protect your application from security vulnerabilities.
  The `digestmod` is a hashing algorithm that can be used: `sum`, `md5` (default), `sha1` and `sha256`
  The `secret` is a salt for a hash.
  Pickle can't serialize any type of object. In case you need to store more complex types
  you can use [dill](https://github.com/uqfoundation/dill) - set `pickle_type="dill"`.
  Dill is great, but less performance.
  If you need complex serializer for [sqlalchemy](https://docs.sqlalchemy.org/en/14/core/serializer.html) objects you can set `pickle_type="sqlalchemy"`
  Use `json` also an option to serialize/deserialize an object, but it very limited (`pickle_type="json"`)
  Any connection errors are suppressed, to disable it use `suppress=False` - a `CacheBackendInteractionError` will be raised
  If you would like to use [client-side cache](https://redis.io/topics/client-side-caching) set `client_side=True`
  Client side cache will add `cashews:` prefix for each key, to customize it use `client_side_prefix` option.
  ```python
  cache.setup("redis://0.0.0.0/?db=1&minsize=10&suppress=false&secret=my_secret", prefix="func")
  cache.setup("redis://0.0.0.0/2", password="my_pass", socket_connect_timeout=0.1, retry_on_timeout=True, secret="my_secret")
  cache.setup("redis://0.0.0.0", client_side=True, client_side_prefix="my_prefix:", pickle_type="dill")
  ```
  For using secure connections to redis (over ssl) uri should have `rediss` as schema
  ```python
  cache.setup("rediss://0.0.0.0/", ssl_ca_certs="path/to/ca.crt", ssl_keyfile="path/to/client.key",ssl_certfile="path/to/client.crt",)
  ```

  _Requires [diskcache](https://github.com/grantjenks/python-diskcache) package._
  This will use local sqlite databases (with shards) as storage.
  It is a good choice if you don't want to use redis, but you need a shared storage, or your cache takes a lot of local memory.
  Also, it is a good choice for client side local storage.
  You can setup disk cache with [FanoutCache parameters](http://www.grantjenks.com/docs/diskcache/api.html#fanoutcache)
  ** Warning ** `cache.scan` and `cache.get_match` does not work with this storage (works only if shards are disabled)
  ```python
  cache.setup("disk://")
  cache.setup("disk://?directory=/tmp/cache&timeout=1&shards=0")  # disable shards
  Gb = 1073741824
  cache.setup("disk://", size_limit=3 * Gb, shards=12)
  ```

  There are a few basic methods to work with cache:
  ```python
  from cashews import cache
  cache.setup("mem://")  # configure as in-memory cache
  await cache.set(key="key", value=90, expire="2h", exist=None)  # -> bool
  await cache.set_raw(key="key", value="str")  # -> bool
  await cache.set_many({"key1": value, "key2": value})  # -> None
  await cache.get("key", default=None)  # -> Any
  await cache.get_or_set("key", default=awaitable_or_callable, expire="1h")  # -> Any
  await cache.get_raw("key") # -> Any
  await cache.get_many("key1", "key2", default=None)  # -> tuple[Any]
  async for key, value in cache.get_match("pattern:*", batch_size=100):
  await cache.incr("key") # -> int
  await cache.exists("key") # -> bool
  await cache.delete("key")
  await cache.delete_many("key1", "key2")
  await cache.delete_match("pattern:*")
  async for key in cache.scan("pattern:*"):
  await cache.expire("key", timeout=10)
  await cache.get_expire("key")  # -> int seconds to expire
  await cache.ping(message=None)  # -> bytes
  await cache.clear()
  await cache.is_locked("key", wait=60)  # -> bool
  async with cache.lock("key", expire=10):
  await cache.set_lock("key", value="value", expire=60)  # -> bool
  await cache.unlock("key", "value")  # -> bool
  await cache.get_keys_count()  # -> int - total number of keys in cache
  await cache.close()
  ```

  Cache can be disabled not only at setup, but also in runtime. Cashews allow you to disable/enable any call of cache or specific commands:
  ```python
  from cashews import cache, Command
  cache.setup("mem://")  # configure as in-memory cache
  cache.disable(Command.DELETE)
  cache.disable()
  cache.enable(Command.GET, Command.SET)
  cache.enable()
  with cache.disabling():
  ```

  - [Simple cache](#simple-cache)
  - [Fail cache (Failover cache)](#fail-cache-failover-cache)
  - [Hit cache](#hit-cache)
  - [Early](#early)
  - [Soft](#soft)
  - [Async Iterators](#iterators)
  - [Locked](#locked)
  - [Rate limit](#rate-limit)
  - [Circuit breaker](#circuit-breaker)

  This is a typical cache strategy: execute, store and return from cache until it expires.
  ```python
  from datetime import timedelta
  from cashews import cache
  cache.setup("mem://")
  @cache(ttl=timedelta(hours=3), key="user:{request.user.uid}")
  async def long_running_function(request):
  ```

  Return cache result, if one of the given exceptions is raised (at least one function
  call should succeed prior to that).
  ```python
  from cashews import cache
  cache.setup("mem://")

  @cache.failover(ttl="2h", exceptions=(ValueError, MyException))
  async def get_status(name):
      value = await api_call()
      return {"status": value}
  ```
  If exceptions didn't get will catch all exceptions or use default if it is set by:
  ```python
  cache.set_default_fail_exceptions(ValueError, MyException)
  ```

  Expire cache after given numbers of call `cache_hits`.
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache.hit(ttl="2h", cache_hits=100, update_after=2)
  async def get(name):
      value = await api_call()
      return {"status": value}
  ```

  Cache strategy that tries to solve [Cache stampede problem](https://en.wikipedia.org/wiki/Cache_stampede)
  with a hot cache recalculating result in a background.
  ```python
  from cashews import cache  # or: from cashews import early

  @cache.early(ttl="10m", early_ttl="7m")
  async def get(name):
      value = await api_call()
      return {"status": value}
  ```

  Like a simple cache, but with a fail protection base on soft ttl.
  ```python
  from cashews import cache
  cache.setup("mem://")


  @cache.soft(ttl="10m", soft_ttl="7m")
  async def get(name):
      value = await api_call()
      return {"status": value}
  ```

  All upper decorators can be used only with coroutines. Cashing async iterators works differently.
  To cache async iterators use `iterator` decorator
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache.iterator(ttl="10m", key="get:{name}")
  async def get(name):
      async for item in get_pages(name):
          yield ...
  ```

  Decorator that can help you to solve [Cache stampede problem](https://en.wikipedia.org/wiki/Cache_stampede).
  Lock the following function calls until the first one is finished.
  This guarantees exactly one function call for given ttl.
  > :warning: \*\*Warning: this decorator will not cache the result
  > To do it you can combine this decorator with any cache decorator or use parameter `lock=True` with `@cache()`
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache.locked(ttl="10s")
  async def get(name):
      value = await api_call()
      return {"status": value}
  ```

  Rate limit for a function call: if rate limit is reached raise an `RateLimitError` exception.
  > :warning: \*\*Warning: this decorator will not cache the result
  > To do it you can combine this decorator with any cache failover decorator`
  ```python
  from cashews import cache, RateLimitError
  cache.setup("mem://")

  @cache.rate_limit(limit=10, period="1m", ttl="10m")
  async def get(name):
      value = await api_call()
      return {"status": value}

  @cache.failover(ttl="10m", exceptions=(RateLimitError, ))
  @cache.slice_rate_limit(limit=100, period="10m")
  async def get_next(name):
      value = await api_call()
      return {"status": value}
  ```

  Circuit breaker pattern. Count the number of failed calls and if the error rate reaches the specified value, it will raise `CircuitBreakerOpen` exception
  > :warning: \*\*Warning: this decorator will not cache the result
  > To do it you can combine this decorator with any cache failover decorator`
  ```python
  from cashews import cache, CircuitBreakerOpen
  cache.setup("mem://")
  @cache.circuit_breaker(errors_rate=10, period="1m", ttl="5m")
  async def get(name):
  @cache.failover(ttl="10m", exceptions=(CircuitBreakerOpen, ))
  @cache.circuit_breaker(errors_rate=10, period="10m", ttl="5m", half_open_ttl="1m")
  async def get_next(name):
  ```

  Simple Bloom filter:
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache.bloom(capacity=10_000, false_positives=1)
  async def email_exists(email: str) -> bool:
  for email in all_users_emails:
      await email_exists.set(email)
  await email_exists("example@example.com")
  ```

  By default, any successful result of the function call is stored, even if it is a `None`.
  Caching decorators have the parameter - `condition`, which can be:
  - a callable object that receives the result of a function call or an exception, args, kwargs and a cache key
  - a string: "not_none" or "skip_none" to do not cache `None` values in
  ```python
  from cashews import cache, NOT_NONE
  cache.setup("mem://")
  @cache(ttl="1h", condition=NOT_NONE)
  async def get():
  def skit_test_result(result, args, kwargs, key=None) -> bool:
      return result and result != "test"
  @cache(ttl="1h", condition=skit_test_result)
  async def get():
  ```
  It is also possible to cache an exception that the function can raise, to do so use special conditions (only for simple, hit and early)
  ```python
  from cashews import cache, with_exceptions, only_exceptions
  cache.setup("mem://")
  @cache(ttl="1h", condition=with_exceptions(MyException, TimeoutError))
  async def get():
  @cache(ttl="1h", condition=only_exceptions(MyException, TimeoutError))
  async def get():
  ```
  Also caching decorators have the parameter `time_condition` - min latency in seconds (can be set like `ttl`)
  of getting the result of a function call to be cached.
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache(ttl="1h", time_condition="3s")  # to cache for 1 hour if execution takes more than 3 seconds
  async def get():
  ```

  Often, to compose a cache key, you need all the parameters of the function call.
  By default, Cashews will generate a key using the function name, module names and parameters
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache(ttl=timedelta(hours=3))
  async def get_name(user, *args, version="v1", **kwargs):

  await get_name("me", version="v2")

  await get_name("me", version="v1", foo="bar")

  await get_name("me", "opt", "attr", opt="opt", attr="attr")

  ```
  For more advanced usage it better to define a cache key manually:
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache(ttl="2h", key="user_info:{user_id}")
  async def get_info(user_id: str):
  ```
  You may use objects in a key and access to an attribute through a template:
  ```python
  @cache(ttl="2h", key="user_info:{user.uuid}")
  async def get_info(user: User):
  ```
  You may use built-in functions to format template values (`lower`, `upper`, `len`, `jwt`, `hash`)
  ```python
  @cache(ttl="2h", key="user_info:{user.name:lower}:{password:hash(sha1)}")
  async def get_info(user: User, password: str):
  @cache(ttl="2h", key="user:{token:jwt(client_id)}")
  async def get_user_by_token(token: str) -> User:
  ```
  Or define your own transformation functions:
  ```python
  from cashews import default_formatter, cache
  cache.setup("mem://")
  @default_formatter.register("prefix")
  def _prefix(value, chars=3):
      return value[:chars].upper()
  @cache(ttl="2h", key="servers-user:{user.index:prefix(4)}")  # a key will be "servers-user:DWQS"
  async def get_user_servers(user):
  ```
  or register type formatters:
  ```python
  from decimal import Decimal
  from cashews import default_formatter, cache
  @default_formatter.type_format(Decimal)
  def _decimal(value: Decimal) -> str:
      return str(value.quantize(Decimal("0.00")))
  @cache(ttl="2h", key="price-{item.price}:{item.currency:upper}")  # a key will be "price-10.00:USD"
  async def convert_price(item):
  ```
  Not only function arguments can participate in a key formation. Cashews have a `template_context', use `@:get` in a template to paste variable from a context:
  ```python
  from cashews import cache, key_context
  cache.setup("mem://")
  @cache(ttl="2h", key="user:{@:get(client_id)}")
  async def get_current_user():
    pass
  with key_context(client_id=135356):
      await get_current_user()
  ```

  ```python
  from cashews import cache
  cache.setup("mem://")
  class MyClass:
      @cache(ttl="2h")
      async def get_name(self, user, version="v1"):

  await MyClass().get_name("me", version="v2")

  ```
  As you can see, there is an ugly reference to the instance in the key. That is not what we expect to see.
  That cache will not work properly. There are 3 solutions to avoid it:
  1. define `__str__` magic method in our class
  ```python
  class MyClass:
      @cache(ttl="2h")
      async def get_name(self, user, version="v1"):
      def __str__(self) -> str:
          return self._host
  await MyClass(host="http://example.com").get_name("me", version="v2")

  ```
  2. Set a key template
  ```python
  class MyClass:
      @cache(ttl="2h", key="{self._host}:name:{user}:{version}")
      async def get_name(self, user, version="v1"):
  await MyClass(host="http://example.com").get_name("me", version="v2")

  ```
  3. Use `noself` or `noself_cache` if you want to exclude `self` from a key
  ```python
  from cashews import cache, noself, noself_cache
  cache.setup("mem://")
  class MyClass:
      @noself(cache)(ttl="2h")
      async def get_name(self, user, version="v1"):

  await MyClass().get_name("me", version="v2")

  ```

  Cache time to live (`ttl`) is a required parameter for all cache decorators. TTL can be:
  - an integer as the number of seconds
  - a `timedelta`
  - a string like in golang e.g `1d2h3m50s`
  - a callable object like a function that receives `args` and `kwargs` of the decorated function and returns one of the previous format for TTL
  Examples:
  ```python
  from cashews import cache
  from datetime import timedelta
  cache.setup("mem://")
  @cache(ttl=60 * 10)
  async def get(item_id: int) -> Item:
      pass
  @cache(ttl=timedelta(minutes=10))
  async def get(item_id: int) -> Item:
      pass
  @cache(ttl="10m")
  async def get(item_id: int) -> Item:
      pass
  def _ttl(item_id: int) -> str:
      return "2h" if item_id > 10 else "1h"
  @cache(ttl=_ttl)
  async def get(item_id: int) -> Item:
      pass
  ```

  Cashews mostly use built-in pickle to store data but also support other pickle-like serialization like dill.
  Some types of objects are not picklable, in this case, cashews has API to define custom encoding/decoding:
  ```python
  from cashews.serialize import register_type
  async def my_encoder(value: CustomType, *args, **kwargs) -> bytes:
  async def my_decoder(value: bytes, *args, **kwargs) -> CustomType:
  register_type(CustomType, my_encoder, my_decoder)
  ```

  Cache invalidation - one of the main Computer Science well-known problems.
  Sometimes, you want to invalidate the cache after some action is triggered.
  Consider this example:
  ```python
  from cashews import cache
  cache.setup("mem://")
  @cache(ttl="1h", key="items:page:{page}")
  async def items(page=1):
  @cache.invalidate("items:page:*")
  async def create_item(item):
  ```
  Here, the cache for `items` will be invalidated every time `create_item` is called
  There are two problems:
  1. with redis backend you cashews will scan a full database to get a key that match a pattern (`items:page:*`) - not good for performance reasons
  2. what if we do not specify a key for cache:
  ```python
  @cache(ttl="1h")
  async def items(page=1):
  ```
  Cashews provide the tag system: you can tag cache keys, so they will be stored in a separate [SET](https://redis.io/docs/data-types/sets/)
  to avoid high load on redis storage. To use the tags in a more efficient way please use it with the client side feature.
  > :warning: \*\*Warning: Tags require setting up default cache or cache for tags prefix
  > ```python
  > from cashews import cache
  > cache.setup(...)
  > # or
  > cache.setup_tags_backend(...)
  > ```
  ```python
  from cashews import cache
  cache.setup("redis://", client_side=True)
  @cache(ttl="1h", tags=["items", "page:{page}"])
  async def items(page=1):
  await cache.delete_tags("page:1")
  await cache.delete_tags("items")

  cache.register_tag("my_tag", key_template="key{i}")
  await cache.set("key1", "value", expire="1d", tags=["my_tag"])
  ```
  You can invalidate future call of cache request by context manager:
  ```python
  from cashews import cache, invalidate_further
  @cache(ttl="3h")
  async def items():
  async def add_item(item: Item) -> List[Item]:
      with invalidate_further():
          await items
  ```

  Often, you may face a problem with an invalid cache after the code is changed. For example:
  ```python
  @cache(ttl=timedelta(days=1), key="user:{user_id}")
  async def get_user(user_id):
      return {"name": "Dmitry", "surname": "Krykov"}
  ```
  Then, the returned value was changed to:
  ```bash
  -    return {"name": "Dmitry", "surname": "Krykov"}
  +    return {"full_name": "Dmitry Krykov"}
  ```
  Since the function returns a dict, there is no simple way to automatically detect
  that kind of cache invalidity
  One way to solve the problem is to add a prefix for this cache:
  ```python
  @cache(ttl=timedelta(days=1), prefix="v2")
  async def get_user(user_id):
      return {"full_name": "Dmitry Krykov"}
  ```
  but it is so easy to forget to do it...
  The best defense against this problem is to use your own datacontainers, like
  [dataclasses](https://docs.python.org/3/library/dataclasses.html),
  with defined `__repr__` method.
  This will add distinctness and `cashews` can detect changes in such structures automatically
  by checking [object representation](https://docs.python.org/3/reference/datamodel.html#object.__repr__).
  ```python
  from dataclasses import dataclass
  from cashews import cache
  cache.setup("mem://")
  @dataclass
  class User:
      name: str
      surname: str

  class User:
      def __init__(self, name, surname):
          self.name, self.surname = name, surname
      def __repr__(self):
          return f"{self.name} {self.surname}"

  @cache(ttl="1d", prefix="v2")
  async def get_user(user_id):
      return User("Dima", "Krykov")
  ```

  Decorators give us a very simple API but also make it difficult to understand where
  the result is coming from - cache or direct call.
  To solve this problem `cashews` has `detect` context manager:
  ```python
  from cashews import cache
  with cache.detect as detector:
      response = await something_that_use_cache()
      calls = detector.calls
  print(calls)

  ```
  E.g. A simple middleware to use it in a web app:
  ```python
  @app.middleware("http")
  async def add_from_cache_headers(request: Request, call_next):
      with cache.detect as detector:
          response = await call_next(request)
          if detector.calls:
              key = list(detector.calls.keys())[0]
              response.headers["X-From-Cache"] = key
              expire = await cache.get_expire(key)
              response.headers["X-From-Cache-Expire-In-Seconds"] = str(expire)
      return response
  ```

  Cashews provide the interface for a "middleware" pattern:
  ```python
  import logging
  from cashews import cache
  logger = logging.getLogger(__name__)
  async def logging_middleware(call, cmd: Command, backend: Backend, *args, **kwargs):
      key = args[0] if args else kwargs.get("key", kwargs.get("pattern", ""))
      logger.info("=> Cache request: %s ", cmd.value, extra={"args": args, "cache_key": key})
      return await call(*args, **kwargs)
  cache.setup("mem://", middlewares=(logging_middleware, ))
  ```

  One of the middleware that is preinstalled in cache instance is `CallbackMiddleware`.
  This middleware also add to a cache a new interface that allow to add a function that will be called before given command will be triggered
  ```python
  from cashews import cache, Command
  def callback(key, result):
    print(f"GET key={key}")
  with cache.callback(callback, cmd=Command.GET):
      await cache.get("test")  # also will print "GET key=test"
  ```

  Applications are more often based on a database with transaction (OLTP) usage. Usually cache supports transactions poorly.
  Here is just a simple example of how we can make our cache inconsistent:
  ```python
  async def my_handler():
      async with db.transaction():
          await db.insert(user)
          await cache.set(f"key:{user.id}", user)
          await api.service.register(user)
  ```
  Here the API call may fail, the database transaction will rollback, but the cache will not.
  Of course, in this code, we can solve it by moving the cache call outside transaction, but in real code it may not so easy.
  Another case: we want to make bulk operations with a group of keys to keep it consistent:
  ```python
  async def login(user, token, session):
      old_session = await cache.get(f"current_session:{user.id}")
      await cache.incr(f"sessions_count:{user.id}")
      await cache.set(f"current_session:{user.id}", session)
      await cache.set(f"token:{token.id}", user)
      return old_session
  ```
  Here we want to have some way to protect our code from race conditions and do operations with cache simultaneously.
  Cashews support transaction operations:
    > :warning: \*\*Warning: transaction operations are `set`, `set_many`, `delete`, `delete_many`, `delete_match` and `incr`
  ```python
  from cashews import cache
  @cache.transaction()
  async def my_handler():
      async with db.transaction():
          await db.insert(user)
          await cache.set(f"key:{user.id}", user)
          await api.service.register(user)

  async def login(user, token, session):
      async with cache.transaction() as tx:
          old_session = await cache.get(f"current_session:{user.id}")
          await cache.incr(f"sessions_count:{user.id}")
          await cache.set(f"current_session:{user.id}", session)
          await cache.set(f"token:{token.id}", user)
          if ...:
              tx.rollback()
      return old_session
  ```
  Transactions in cashews support different modes of "isolation"
  - fast (0-7% overhead) - memory based, can't protect of race conditions, but may use for atomicity
  - locked (default - 4-9% overhead) - use kind of shared lock per cache key (in case of redis or disk backend), protect of race conditions
  - serializable (7-50% overhead) - use global shared lock - one transaction per time (almost useless)
  ```python
  from cashews import cache, TransactionMode
  @cache.transaction(TransactionMode.SERIALIZABLE, timeout=1)
  async def my_handler():
  ```

  This library is framework agnostic, but includes several "batteries" for most popular tools.

  You may find a few middlewares useful that can help you to control a cache in you web application based on fastapi.
  1. `CacheEtagMiddleware` - middleware add Etag and check 'If-None-Match' header based on Etag
  2. `CacheRequestControlMiddleware` - middleware check and add `Cache-Control` header
  3. `CacheDeleteMiddleware` - clear cache for an endpoint based on `Clear-Site-Data` header
  > :warning: \*\*Warning: CacheEtagMiddleware requires setting up default cache or cache with prefix "fastapi:"
  > ```python
  > from cashews import cache
  > cache.setup(...)
  > # or
  > cache.setup(..., prefix="fastapi:")
  > ```
  Example:
  ```python
  from fastapi import FastAPI, Header, Query
  from fastapi.responses import StreamingResponse
  from cashews import cache
  from cashews.contrib.fastapi import (
      CacheDeleteMiddleware,
      CacheEtagMiddleware,
      CacheRequestControlMiddleware,
      cache_control_ttl,
  )
  app = FastAPI()
  app.add_middleware(CacheDeleteMiddleware)
  app.add_middleware(CacheEtagMiddleware)
  app.add_middleware(CacheRequestControlMiddleware)
  metrics_middleware = create_metrics_middleware()
  cache.setup(os.environ.get("CACHE_URI", "redis://"))
  @app.get("/")
  @cache.failover(ttl="1h")
  @cache(ttl=cache_control_ttl(default="4m"), key="simple:{user_agent:hash}", time_condition="1s")
  async def simple(user_agent: str = Header("No")):
  @app.get("/stream")
  @cache(ttl="1m", key="stream:{file_path}")
  async def stream(file_path: str = Query(__file__)):
      return StreamingResponse(_read_file(file_path=file_path))
  async def _read_file(_read_file):
  ```
  Also cashews can cache stream responses

  You can easily provide metrics using the Prometheus middleware.
  ```python
  from cashews import cache
  from cashews.contrib.prometheus import create_metrics_middleware
  metrics_middleware = create_metrics_middleware(with_tag=False)
  cache.setup("redis://", middlewares=(metrics_middleware,))
  ```


  - Clone the project.
  - After creating a virtual environment, install [pre-commit](https://pre-commit.com/):
    ```shell
    pip install pre-commit && pre-commit install --install-hooks
    ```

  To run tests you can use `tox`:
  ```shell
  pip install tox
  tox -e py  // tests for inmemory backend
  tox -e py-diskcache  // tests for diskcache backend
  tox -e py-redis  // tests for redis backend  - you need to run redis
  tox -e py-integration  // tests for integrations with aiohttp and fastapi
  tox // to run all tests for all python that is installed on your machine
  ```
  Or use `pytest`, but 2 tests always fail, it is OK:
  ```shell
  pip install .[tests,redis,diskcache,speedup] fastapi aiohttp requests httpx SQLAlchemy prometheus-client
  pytest // run all tests with all backends
  pytest -m "not redis" // all tests without tests for redis backend
  ```


pkgId: 07e39cff66e9723d573479066cd5eee14098549430520123202ebc044db7c05f
name: python-cashfree-lrs-client
arch: src
version: 1.0.17
epoch: 0
release: 1
summary: Cashfree LRS
url: https://github.com/GIT_USER_ID/GIT_REPO_ID
rpm_license: NoLicense
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cashfree-lrs-client-1.0.17-1.src.rpm
checksum_type: sha256
description:
  *LrsApi* | [**bulk_documents_upload**](docs/LrsApi.md#bulk_documents_upload) | **POST** /orders/documents/upload | Upload Documents in Bulk
  *LrsApi* | [**create_beneficiary**](docs/LrsApi.md#create_beneficiary) | **POST** /beneficiaries | Create Beneficiary
  *LrsApi* | [**create_order**](docs/LrsApi.md#create_order) | **POST** /orders | Create LRS Order
  *LrsApi* | [**create_remitter**](docs/LrsApi.md#create_remitter) | **POST** /remitters | Create Remitter
  *LrsApi* | [**fetch_forex_rate**](docs/LrsApi.md#fetch_forex_rate) | **POST** /fx-rate/details | Fetch FX Rate
  *LrsApi* | [**process_order**](docs/LrsApi.md#process_order) | **POST** /orders/{order_id}/process | Process Order
  *LrsApi* | [**setup_webhooks**](docs/LrsApi.md#setup_webhooks) | **POST** /webhooks | Setup Webhooks
  *LrsApi* | [**upload_documents**](docs/LrsApi.md#upload_documents) | **POST** /orders/{order_id}/documents/upload | Upload Documents

   - [BulkDocumentsUploadResponse](docs/BulkDocumentsUploadResponse.md)
   - [Country](docs/Country.md)
   - [CreateBeneficiaryRequest](docs/CreateBeneficiaryRequest.md)
   - [CreateOrderRequest](docs/CreateOrderRequest.md)
   - [CreateOrderResponse](docs/CreateOrderResponse.md)
   - [CreateRemitterRequest](docs/CreateRemitterRequest.md)
   - [Currency](docs/Currency.md)
   - [Document](docs/Document.md)
   - [Error](docs/Error.md)
   - [FetchForexRateRequest](docs/FetchForexRateRequest.md)
   - [FetchForexRateResponse](docs/FetchForexRateResponse.md)
   - [FetchForexRateResponseTcs](docs/FetchForexRateResponseTcs.md)
   - [Purpose](docs/Purpose.md)
   - [SetupWebhooksRequest](docs/SetupWebhooksRequest.md)
   - [SuccessMessage](docs/SuccessMessage.md)
  <a id="documentation-for-authorization"></a>

  Authentication schemes defined for the API:
  <a id="X-API-Version"></a>

  - **Type**: API key
  - **API key parameter name**: X-API-Version
  - **Location**: HTTP header
  <a id="X-Client-ID"></a>

  - **Type**: API key
  - **API key parameter name**: X-Client-ID
  - **Location**: HTTP header
  <a id="X-Client-Secret"></a>

  - **Type**: API key
  - **API key parameter name**: X-Client-Secret
  - **Location**: HTTP header

  nextgenapi@cashfree.com


pkgId: fdbdac3050769130526d22454aefd8f04b1e7739ce0999bdc406de879d73561b
name: python-cashfree-pg
arch: src
version: 4.2.4
epoch: 0
release: 1
summary: Cashfree Payment Gateway APIs
url: https://cashfree.com
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cashfree-pg-4.2.4-1.src.rpm
checksum_type: sha256
description:
  ![GitHub](https://img.shields.io/github/license/cashfree/cashfree-pg-sdk-python) ![Discord](https://img.shields.io/discord/931125665669972018?label=discord) ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/cashfree/cashfree-pg-sdk-python/master) ![GitHub release (with filter)](https://img.shields.io/github/v/release/cashfree/cashfree-pg-sdk-python?label=latest) ![GitHub forks](https://img.shields.io/github/forks/cashfree/cashfree-pg-sdk-python) ![Order Create API Order Create API](https://statuspage.cashfree.com/badge/pg-create-order-api/status)

  The Cashfree PG Python SDK offers a convenient solution to access [Cashfree PG APIs](https://docs.cashfree.com/reference/pg-new-apis-endpoint) from a server-side Go  applications.





  Cashfree's PG API Documentation - https://docs.cashfree.com/reference/pg-new-apis-endpoint

  Learn and understand payment gateway workflows at Cashfree Payments [here](https://docs.cashfree.com/docs/payment-gateway)

  Try out our interactive guides at [Cashfree Dev Studio](https://www.cashfree.com/devstudio) !




  ```bash
  pip install cashfree_pg
  ```


  ```python
  from cashfree_pg.models.create_order_request import CreateOrderRequest
  from cashfree_pg.api_client import Cashfree
  from cashfree_pg.models.customer_details import CustomerDetails
  from cashfree_pg.models.order_meta import OrderMeta

  Cashfree.XClientId = "<x-client-id>"
  Cashfree.XClientSecret = "<x-client-secret>"
  Cashfree.XEnvironment = Cashfree.SANDBOX
  x_api_version = "2022-09-01"
  ```

  Generate your API keys (x-client-id , x-client-secret) from [Cashfree Merchant Dashboard](https://merchant.cashfree.com/merchants/login)


  Create Order
  ```python
  customerDetails = CustomerDetails(customer_id="walterwNrcMi", customer_phone="9999999999")
  orderMeta = OrderMeta(return_url="https://www.cashfree.com/devstudio/preview/pg/web/checkout?order_id={order_id}")
  createOrderRequest = CreateOrderRequest(order_amount=1, order_currency="INR", customer_details=customerDetails, order_meta=orderMeta)
  try:
      api_response = Cashfree().PGCreateOrder(x_api_version, createOrderRequest, None, None)
      print(api_response.data)
  except Exception as e:
      print(e)
  ```

  Get Order
  ```python
  try:
      api_response = Cashfree().PGFetchOrder(x_api_version, "order_3242X4jQ5f0S9KYxZO9mtDL1Kx2Y7u", None)
      print(api_response.data)
  except Exception as e:
      print(e)
  ```



  - [Order](docs/Orders.md)

  - [Payment](docs/Payments.md)

  - [Refund](docs/Refunds.md)

  - [Token Vault](docs/TokenVault.md)

  - [Eligiblity](docs/Eligibility.md)

  - [PaymentLink](docs/PaymentLink.md)

  - [Settlements](docs/Settlements.md)

  - [Reconciliation](docs/Reconciliation.md)

  - [Webhook](docs/Webhook.md)




  Apache Licensed. See [LICENSE.md](LICENSE.md) for more details


pkgId: 47e8cad3cea38ffd866447959967235054e4e54d3905c108eb902561ada12a81
name: python-cashfree-pg
arch: src
version: 4.3.0
epoch: 0
release: 1
summary: Cashfree Payment Gateway APIs
url: https://cashfree.com
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cashfree-pg-4.3.0-1.src.rpm
checksum_type: sha256
description:
  ![GitHub](https://img.shields.io/github/license/cashfree/cashfree-pg-sdk-python) ![Discord](https://img.shields.io/discord/931125665669972018?label=discord) ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/cashfree/cashfree-pg-sdk-python/master) ![GitHub release (with filter)](https://img.shields.io/github/v/release/cashfree/cashfree-pg-sdk-python?label=latest) ![GitHub forks](https://img.shields.io/github/forks/cashfree/cashfree-pg-sdk-python) ![Order Create API Order Create API](https://statuspage.cashfree.com/badge/pg-create-order-api/status)

  The Cashfree PG Python SDK offers a convenient solution to access [Cashfree PG APIs](https://docs.cashfree.com/reference/pg-new-apis-endpoint) from a server-side Go  applications.





  Cashfree's PG API Documentation - https://docs.cashfree.com/reference/pg-new-apis-endpoint

  Learn and understand payment gateway workflows at Cashfree Payments [here](https://docs.cashfree.com/docs/payment-gateway)

  Try out our interactive guides at [Cashfree Dev Studio](https://www.cashfree.com/devstudio) !




  ```bash
  pip install cashfree_pg
  ```


  ```python
  from cashfree_pg.models.create_order_request import CreateOrderRequest
  from cashfree_pg.api_client import Cashfree
  from cashfree_pg.models.customer_details import CustomerDetails
  from cashfree_pg.models.order_meta import OrderMeta

  Cashfree.XClientId = "<x-client-id>"
  Cashfree.XClientSecret = "<x-client-secret>"
  Cashfree.XEnvironment = Cashfree.SANDBOX
  x_api_version = "2023-08-01"
  ```

  Generate your API keys (x-client-id , x-client-secret) from [Cashfree Merchant Dashboard](https://merchant.cashfree.com/merchants/login)


  Create Order
  ```python
  customerDetails = CustomerDetails(customer_id="walterwNrcMi", customer_phone="9999999999")
  orderMeta = OrderMeta(return_url="https://www.cashfree.com/devstudio/preview/pg/web/checkout?order_id={order_id}")
  createOrderRequest = CreateOrderRequest(order_amount=1, order_currency="INR", customer_details=customerDetails, order_meta=orderMeta)
  try:
      api_response = Cashfree().PGCreateOrder(x_api_version, createOrderRequest, None, None)
      print(api_response.data)
  except Exception as e:
      print(e)
  ```

  Get Order
  ```python
  try:
      api_response = Cashfree().PGFetchOrder(x_api_version, "order_3242X4jQ5f0S9KYxZO9mtDL1Kx2Y7u", None)
      print(api_response.data)
  except Exception as e:
      print(e)
  ```



  - [Order](docs/Orders.md)

  - [Payment](docs/Payments.md)

  - [Refund](docs/Refunds.md)

  - [Token Vault](docs/TokenVault.md)

  - [Eligiblity](docs/Eligibility.md)

  - [PaymentLink](docs/PaymentLink.md)

  - [Settlements](docs/Settlements.md)

  - [Reconciliation](docs/Reconciliation.md)

  - [Webhook](docs/Webhook.md)




  Apache Licensed. See [LICENSE.md](LICENSE.md) for more details


pkgId: 2064aaa24a485254a4e2204bdf7f105c6642787c7ff071e7ae51e3846e6529c0
name: python-cashfree-sdk
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: Library to integrate cashfree APIs
url: https://github.com/cashfree/cashfree-sdk-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cashfree-sdk-0.1.3-1.src.rpm
checksum_type: sha256
description:
  Cashfree SDK's are released in Beta. This is work in progress and we are continuously working on improving various aspects of it. It is released as learning aid and example kit for the API integrators. This is not recommended by Cashfree for direct use in production code. Please report any bugs to Cashfree at techsupport@cashfree.com.


  The official Cashfree SDK for Python3,

  Get started quickly using Cashfree with the Cashfree SDK for python. The SDK helps take the complexity out of coding by providing Python objects for Cashfree services including Payouts, Payment Gateway, Marketplace and Autocollect. The single, downloadable package includes the Cashfree Python Library and documentation.

  Please refer to the [Cashfree Docs](https://docs.cashfree.com/docs/)  for the complete API reference.




  The preferred way to install the Cashfree SDK for Python is to use the [pip](https://pypi.org/project/pip/) package manager for pip. Simply type the following into a terminal window:
  ```sh
  pip3 install cashfree-sdk
  ```



    - A [Cashfree Merchant Account](https://merchant.cashfree.com/merchant/sign-up)
    - API keys for different products. You can generate them from your Dashboard

  Your IP has to be whitelisted to hit Cashfree's server. Or if you have a dynamic IP please pass in the public key parameter during the init method as shown below. For more information please go [here](https://dev.cashfree.com/development/quickstart#ip-whitelisting).


  The package needs to be configured with your account's secret key which is available in your Cashfree Dashboard.
  Init the package with your credentials and add the below code in your config.py of your package.

  ```python

  from cashfree_sdk.payouts import Payouts

  //Initialize Cashfree Payout
  Payouts.init("<client_id>", "<client_secret>", "PROD")
  ```


  ```python

  from cashfree_sdk.payouts import Payouts

  //Initialize Cashfree Payout
  Payouts.init("<client_id>", "<client_secret>", "PROD", public_key_path='/User/Cashfree/file_path.pem')
  // OR
  Payouts.init("<client_id>", "<client_secret>", "PROD", public_key= b'public key')
  ```


  | Option              | Default                       | Description                                                                           |
  | ------------------- | ----------------------------- | ------------------------------------------------------------------------------------- |
  | `env`        | `TEST`                        | Environment to be initialized. Can be set to `TEST` or `PROD` |
  | `client_id` | ``                             | `client_id` which can be generated on cashfree dashboard.                  |
  | `client_secret`         | ``                        | `client_secret` which can be found alongside generated `client_id`. |
  | `public_key_path`         | ``                        | `public_key_path` specify the path to your .pem public key file `. |
  | `public_key`         | ``                        | `public_key` Pass your Public Key to this parameter as an alternative to `public_key_path` . |





  To verify the webhook received from Cashfree for different events and accept the webhook only when it returns `True`.


  Pass the webhook received along with the payload type.

  | Option              | Options                       |
  | ------------------- | ----------------------------- |
  | `payload_type`        | `JSON` for `application/json` , `FORM` for `application/x-www-form-urlencoded`                      |


  ```python
  from cashfree_sdk import verification
  webhook_data = '{"cashgramId": "5b8283182e0711eaa4c531df6a4f439b-28", "event": "CASHGRAM_EXPIRED", "eventTime": "2020-01-03 15:01:06", "reason": "OTP_ATTEMPTS_EXCEEDED", "signature": "TBpM+4nr1DsWsov7QiHSTfRJP4Z9BD8XrDgEhBlf9ss="}'
  verification.verify_webhook(webhook_data, 'JSON')
  ```


  Every method returns a python request object which can be used:
  ```python
  from cashfree_sdk.payouts.beneficiary import Beneficiary
  bene_add = Beneficiary.add("kit_test6", "ankur", "ankur@cashfree.com", "9999999999", "aakjakjakja")
  ```
  ```diff
  - All Optional Arguments Should Be Passed As An Keyword (Named) Arguments
  ```
  [Readme](cashfree_sdk/exceptions) for the exception thrown for invalid operation and how to handle the exceptions.

  - For more information about the APIs go to [Payouts](Payouts).
  - Complete list of [APIs](https://docs.cashfree.com/docs/payout/guide/#fetch-beneficiary-id).

  - [ ] PG
  - [ ] Market Place
  - [ ] Autocollect


pkgId: 60a15e68dd4dafdd06b72f61671fb6240448460a06dacba14ae30d624c86636c
name: python-cashocs
arch: src
version: 2.2.0
epoch: 0
release: 1
summary: Computational Adjoint-Based Shape Optimization and Optimal Control Software
url: https://pypi.org/project/cashocs/
rpm_license: GNU General Public License v3 or later (GPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cashocs-2.2.0-1.src.rpm
checksum_type: sha256
description:
  cashocs is based on the finite element package `FEniCS
  <https://fenicsproject.org>`__ and uses its high-level unified form language UFL
  to treat general PDE constrained optimization problems, in particular, shape
  optimization and optimal control problems.
  For some applications and further information about cashocs, we also refer to the website `Fluid Dynamical Shape Optimization with cashocs <https://www.itwm.fraunhofer.de/en/departments/tv/products-and-services/shape-optimization-cashocs-software.html>`_.
  Note, that we assume that you are (at least somewhat) familiar with PDE
  constrained optimization and FEniCS. For a introduction to these topics,
  we can recommend the textbooks
  - Optimal Control and general PDE constrained optimization
      - `Hinze, Ulbrich, Ulbrich, and Pinnau - Optimization with PDE Constraints <https://doi.org/10.1007/978-1-4020-8839-1>`_
      - `Tröltzsch - Optimal Control of Partial Differential Equations <https://doi.org/10.1090/gsm/112>`_
  - Shape Optimization
      - `Delfour and Zolesio - Shapes and Geometries <https://doi.org/10.1137/1.9780898719826>`_
      - `Sokolowski and Zolesio - Introduction to Shape Optimization <https://doi.org/10.1007/978-3-642-58106-9>`_
  - Topology Optimization
      - `Sokolowski and Novotny - Topological Derivatives in Shape Optimization <https://doi.org/10.1007/978-3-642-35245-4>`_
      - `Amstutz - An Introduction to the Topological Derivative <https://doi.org/10.1108/EC-07-2021-0433>`_
  - FEniCS
      - `Logg, Mardal, and Wells - Automated Solution of Differential Equations by the Finite Element Method <https://doi.org/10.1007/978-3-642-23099-8>`_
      - `The FEniCS demos <https://fenicsproject.org/olddocs/dolfin/2019.1.0/python/demos.html>`_
  However, the `cashocs tutorial <https://cashocs.readthedocs.io/en/stable/user>`_ also gives many references either
  to the underlying theory of PDE constrained optimization or to relevant demos
  and documentation of FEniCS.
  An overview over cashocs and its capabilities can be found in `Blauth - cashocs: A Computational, Adjoint-Based
  Shape Optimization and Optimal Control Software <https://doi.org/10.1016/j.softx.2020.100646>`_ and `Blauth - Version 2.0 - cashocs: A Computational, Adjoint-Based Shape Optimization and Optimal Control Software <https://doi.org/10.1016/j.softx.2023.101577>`_. Moreover, note that
  the full cashocs documentation is available at `<https://cashocs.readthedocs.io>`_.


pkgId: 25d628c553d858067d09978f44f05dcd9b61e6a5701722d437d0135db4aea53f
name: python-casify
arch: src
version: 0.2.14
epoch: 0
release: 1
summary: A CAS-library wrapped around sympy to simplify use of CAS-functionality in mathematics.
url: https://github.com/reneaas/casify
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casify-0.2.14-1.src.rpm
checksum_type: sha256
description:
  `casify` is a Python package that implements a simplified CAS (Computer Algebra System) for symbolic computation, wrapping around `sympy` for facilitate its computations. The implementation provides both Norwegian and English names for all of its functions.





  ```python
  from casify import *

  solution = solve("x**2 - x - 6 = 0")
  print(solution)

  ```



  ```python
  from casify import *

  løsning = løs("x**2 - x - 6 = 0")
  print(løsning)

  ```




  ```python
  from casify import *

  solution = solve("x + y = 2", "x - y = -1")

  print(solution)

  ```



  ```python
  from casify import *

  løsning = løs("x + y = 2", "x - y = -1")

  print(løsning)
  ```




  ```python
  from casify import *

  f = function("x**2 - x - 6")

  print(f(2)) # Computes f(2)
  ```



  ```python
  from casify import *

  f = funksjon("x**2 - x - 6")

  print(f(2)) # Regner ut f(2)
  ```




  ```python
  from casify import *

  f = function("x**2 - x - 6")


  print(f.derivative()) # Gives the general expression for the derivative

  print(f.derivative(2)) # computes f'(2)
  ```



  ```python
  from casify import *

  f = funksjon("x**2 - x - 6")

  print(f.derivert()) # gir det generelle uttrykket for den deriverte

  print(f.derivert(2)) # regner ut f'(2)
  ```




  ```python
  from casify import *

  print(factor("x**2 - x - 6"))  # faktoriserer x**2 - x - 6

  print(expand("2*(x - 1) * (x + 4)"))  # utvider 2 * (x - 1) * (x + 4)
  ```



  ```python
  from casify import *

  print(faktoriser("x**2 - x - 6"))  # faktoriserer x**2 - x - 6

  print(utvid("2*(x - 1) * (x + 4)"))  # utvider 2 * (x - 1) * (x + 4)
  ```


pkgId: dabbed275deb8e270f65e418a432a3eca07d969a2291aa5c89f24ed234bbbcda
name: python-casino-bdata4-e
arch: src
version: 0.0.4
epoch: 0
release: 1
summary: Casino games library created by a group of 4 university students.
url: https://github.com/uunaii/Trabajo_Progra.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casino-bdata4-e-0.0.4-1.src.rpm
checksum_type: sha256
description:
  This project consists of the creation of a library that allows the user to perform the following operations:

  This library contains 4 main casino games: Roulette, Cards, Bingo and Dice.



  - **1. Roulette:** The Roulette module simulates a complete game of roulette, allowing users to place different types of bets and spin a virtual wheel to determine the winning number. The module defines core elements, such as colors (red, black, and green for 0) assigned to each number and betting options like specific numbers, colors, dozens, halves (high/low), and even/odd. Upon spinning the wheel, a random number from 0 to 36 is generated. Players can choose from betting options, and the module evaluates whether they win based on the number and characteristics (like color or parity) of the spun result. Feedback is provided for the outcome of each bet, creating an engaging simulation of a roulette game within a virtual casino setting.



  - **2. Cards:** The Cards module in the library provides simulations for various card-based games, including implementations for Poker, Blackjack, and basic deck handling. This module supports key functionalities such as creating a standard deck of 52 cards with four suits (hearts, diamonds, clubs, and spades) and 13 values, shuffling, and dealing cards. In Blackjack, the game simulates rounds with the player and dealer, managing card values and handling special rules for aces. Players can hit or stand to aim for a score as close to 21 as possible without exceeding it, while the dealer plays under specific constraints. The Poker game allows for simple multi-player rounds, distributing five-card hands to each participant and enabling basic betting or standing options. A simplistic hand strength assessment is used to determine outcomes, with rudimentary decision-making for the AI opponent (machine). This module emphasizes card dealing, hand management, scoring, and basic strategy.



  - **3. Bingo:** The Bingo module allows users to simulate a complete bingo game experience, generating unique 3x5 matrix bingo cards with 15 random numbers for each player. It displays all cards, highlighting called numbers with color-coding (green for matched and red for unmatched). Players can select their card and watch as numbers are drawn from a randomized "bingo drum" of 90 numbers. The game tracks matches on the player's card, announcing a line (a complete row) and full bingo when achieved. Opponents' progress is also monitored, creating a realistic and interactive bingo game environment within the casino games library.



  - **4. Dice:** The Dice Game module simulates a classic dice-rolling game where users can place various types of bets on the outcome of a roll. Players can choose from different betting options, such as predicting a specific number, the sum of two dice rolls, whether the result will be high (large) or low (small), or whether the sum will be even or odd. The game then evaluates whether the player's bet is successful based on the randomly generated dice result, providing feedback on whether they won or lost their bet. This module creates an engaging, virtual dice game experience.




  Using the function **main_menu()** the user can choose the game they want to play and the library will start the game.

        pip install casino-bdata4-e==0.0.4
        from casino-bdata4-e import *
        main_menu()


pkgId: 19bf5847fe62de82a159c6216a072849eb47e5e3099cc0df287943a06aa45ad6
name: python-casino-bdata4-e
arch: src
version: 0.0.5
epoch: 0
release: 1
summary: Casino games library created by a group of 4 university students.
url: https://github.com/uunaii/Trabajo_Progra.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casino-bdata4-e-0.0.5-1.src.rpm
checksum_type: sha256
description:
  This project consists of the creation of a library that allows the user to perform the following operations:

  This library contains 4 main casino games: Roulette, Cards, Bingo and Dice.



  - **1. Roulette:** The Roulette module simulates a complete game of roulette, allowing users to place different types of bets and spin a virtual wheel to determine the winning number. The module defines core elements, such as colors (red, black, and green for 0) assigned to each number and betting options like specific numbers, colors, dozens, halves (high/low), and even/odd. Upon spinning the wheel, a random number from 0 to 36 is generated. Players can choose from betting options, and the module evaluates whether they win based on the number and characteristics (like color or parity) of the spun result. Feedback is provided for the outcome of each bet, creating an engaging simulation of a roulette game within a virtual casino setting.



  - **2. Cards:** The Cards module in the library provides simulations for various card-based games, including implementations for Poker, Blackjack, and basic deck handling. This module supports key functionalities such as creating a standard deck of 52 cards with four suits (hearts, diamonds, clubs, and spades) and 13 values, shuffling, and dealing cards. In Blackjack, the game simulates rounds with the player and dealer, managing card values and handling special rules for aces. Players can hit or stand to aim for a score as close to 21 as possible without exceeding it, while the dealer plays under specific constraints. The Poker game allows for simple multi-player rounds, distributing five-card hands to each participant and enabling basic betting or standing options. A simplistic hand strength assessment is used to determine outcomes, with rudimentary decision-making for the AI opponent (machine). This module emphasizes card dealing, hand management, scoring, and basic strategy.



  - **3. Bingo:** The Bingo module allows users to simulate a complete bingo game experience, generating unique 3x5 matrix bingo cards with 15 random numbers for each player. It displays all cards, highlighting called numbers with color-coding (green for matched and red for unmatched). Players can select their card and watch as numbers are drawn from a randomized "bingo drum" of 90 numbers. The game tracks matches on the player's card, announcing a line (a complete row) and full bingo when achieved. Opponents' progress is also monitored, creating a realistic and interactive bingo game environment within the casino games library.



  - **4. Dice:** The Dice Game module simulates a classic dice-rolling game where users can place various types of bets on the outcome of a roll. Players can choose from different betting options, such as predicting a specific number, the sum of two dice rolls, whether the result will be high (large) or low (small), or whether the sum will be even or odd. The game then evaluates whether the player's bet is successful based on the randomly generated dice result, providing feedback on whether they won or lost their bet. This module creates an engaging, virtual dice game experience.




  Using the function **main_menu()** the user can choose the game they want to play and the library will start the game.

        pip install casino-bdata4-e==0.0.5
        from casino-bdata4-e import *
        main_menu()


pkgId: 06274be9d48d4b1efd00e06053a89ecda689b8cdf2474a5f0662b52641e8aca5
name: python-casjobs
arch: src
version: 0.0.2
epoch: 0
release: 1
summary: An interface to CasJobs for Humans.
url: https://github.com/dfm/casjobs
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casjobs-0.0.2-1.src.rpm
checksum_type: sha256
description:
  Install it:
      pip install casjobs
  Here's how you might get the fields in Stripe 82 that hit the Pisces
  overdensity:
      import casjobs
      query = """SELECT *
      INTO mydb.pisces2
      FROM Stripe82..Field AS p
      WHERE p.mjd_g > 0 AND p.ramin < 355 AND p.ramax > 355
      """
      jobs = CasJobs()
      job_id = jobs.submit(query)
      status = jobs.monitor(job_id)
      print status


pkgId: ae8aac0e72a8a83eba937a9fba3cf82e9746debf580c2284687bd79375e8fa60
name: python-caso
arch: src
version: 5.0.1
epoch: 0
release: 1
summary: cASO is an OpenStack Accounting extractor.
url: http://github.com/IFCA/caso
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caso-5.0.1-1.src.rpm
checksum_type: sha256
description:
  <img src="https://github.com/IFCA/caso/raw/master/doc/source/static/caso.png" width="300">

  [![Python TestingTravis](https://img.shields.io/github/actions/workflow/status/IFCA/caso/python-test.yml)](https://github.com/IFCA/caso/actions/workflows/python-test.yml)
  [![Coveralls](https://img.shields.io/coveralls/IFCA/caso.svg)](https://coveralls.io/github/IFCA/caso)
  [![PyPI](https://img.shields.io/pypi/v/caso.svg)](https://pypi.python.org/pypi/caso)
  [![Python versions](https://img.shields.io/pypi/pyversions/caso.svg)](https://pypi.python.org/pypi/caso)

  cASO is an OpenStack Accounting extractor.

  * Free software: Apache license
  * Source: https://github.com/IFCA/caso
  * Bugs: https://github.com/IFCA/caso/issues

  <img src="https://github.com/IFCA/caso/raw/master/doc/source/static/caso-diagram.png" width="500">

  Documentation (the source is in ``doc/source/``) is online at
  [caso documentation](https://caso.readthedocs.org/en/latest/).



  This work is co-funded by the [EOSC-hub project](http://eosc-hub.eu/) (Horizon 2020) under Grant number 777536.
  <img src="https://wiki.eosc-hub.eu/download/attachments/1867786/eu%20logo.jpeg?version=1&modificationDate=1459256840098&api=v2" height="24">
  <img src="https://wiki.eosc-hub.eu/download/attachments/18973612/eosc-hub-web.png?version=1&modificationDate=1516099993132&api=v2" height="24">


pkgId: bcd0511dd2d33456dfc95c5b707a5f797f72d820e5433003b2be19f8067f9401
name: python-caspailleur
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: Minimalistic python package for mining many concise data representations. Part of SmartFCA project
url: https://github.com/EgorDudyrev/caspailleur
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caspailleur-0.2.1-1.src.rpm
checksum_type: sha256
description:
  <img src="https://github.com/EgorDudyrev/caspailleur/blob/main/logo/caspailleur_logo_v1.png?raw=True" />

  [![PyPi](https://img.shields.io/pypi/v/caspailleur)](https://pypi.org/project/caspailleur)
  [![GitHub Workflow](https://img.shields.io/github/actions/workflow/status/EgorDudyrev/caspailleur/python-package.yml?logo=github)](https://github.com/EgorDudyrev/caspailleur/actions/workflows/python-package.yml)
  [![Licence](https://img.shields.io/github/license/EgorDudyrev/FCApy)](https://github.com/EgorDudyrev/caspailleur/blob/main/LICENSE)
  [![LORIA](https://img.shields.io/badge/Made_in-LORIA-61acdf)](https://www.loria.fr/)
  [![SmartFCA](https://img.shields.io/badge/Funded_by-SmartFCA-537cbb)](https://www.smartfca.org)

  Caspailleur is a python package for mining concepts and implications in binary data with FCA framework.
  Part of [SmartFCA](https://www.smartfca.org) ANR project.



  The stable version of the package can be installed from PyPI with:

  ```console
  pip install caspailleur
  ```

  and the latest version of the package can be installed from GitHub repository:

  ```console
  pip install caspailleur@git+https://github.com/EgorDudyrev/caspailleur
  ```





  The field of Formal Concept Analysis has many mathematical terms and some conflicting notation traditions.
  Here is the glossary used throughout the `caspailleur` package: [Glossary.md](https://github.com/EgorDudyrev/caspailleur/blob/main/Glossary.md).



  Let us study the "Famous Animals" dataset from [FCA repository](https://fcarepository.org):

  ```python
  import caspailleur as csp
  df, meta = csp.io.from_fca_repo('famous_animals_en')

  print(meta)
  print(df.replace({True: 'X', False: ''}))
  ```
  > {
  > **'title'**: 'Famous Animals',\
  > **'source'**: 'Priss, U. (2006), Formal concept analysis in information science. Ann. Rev. Info. Sci. Tech., 40: 521-543. p.525',\
  > **'size'**: {'objects': 5, 'attributes': 6},\
  > **'language'**: 'English', \
  > **'description'**: 'famous animals and their characteristics' }

  |                   | cartoon   | real   | tortoise   | dog   | cat   | mammal   |
  |:------------------|:----------|:-------|:-----------|:------|:------|:---------|
  | Garfield          | X         |        |            |       | X     | X        |
  | Snoopy            | X         |        |            | X     |       | X        |
  | Socks             |           | X      |            |       | X     | X        |
  | Greyfriar's Bobby |           | X      |            | X     |       | X        |
  | Harriet           |           | X      | X          |       |       |          |

  The received `df` object is a pandas dataframe.
  Other supported context data types can be found in [Supported data formats](#supported-data-formats) section.
  Caspailleur works fast enough with datasets of hundreds of objects and dozens of attributes.
  Here, we choose a tiny dataset for illustrative purposes.

  > [!TIP]
  > Caspailleur package can only work with binary data (and is optimised for this).
  > You can consult [Paspailleur](https://github.com/EgorDudyrev/paspailleur) package
  > that extends Caspailleur functionality for complex non-binary data.



  Now we can find all concepts in the data:

  ```python
  concepts_df = csp.mine_concepts(df)

  print(concepts_df[['extent', 'intent']].map(', '.join))
  ```

  _<details><summary>Concepts table (13 rows)</summary>_
  <p>

  |   concept_id | extent                                              | intent                                    |
  |-------------:|:----------------------------------------------------|:------------------------------------------|
  |            0 | Snoopy, Socks, Harriet, Greyfriar's Bobby, Garfield |                                           |
  |            1 | Greyfriar's Bobby, Socks, Harriet                   | real                                      |
  |            2 | Garfield, Greyfriar's Bobby, Snoopy, Socks          | mammal                                    |
  |            3 | Garfield, Snoopy                                    | cartoon, mammal                           |
  |            4 | Harriet                                             | real, tortoise                            |
  |            5 | Greyfriar's Bobby, Socks                            | real, mammal                              |
  |            6 | Greyfriar's Bobby, Snoopy                           | dog, mammal                               |
  |            7 | Garfield, Socks                                     | mammal, cat                               |
  |            8 | Snoopy                                              | dog, cartoon, mammal                      |
  |            9 | Garfield                                            | cartoon, mammal, cat                      |
  |           10 | Greyfriar's Bobby                                   | real, mammal, dog                         |
  |           11 | Socks                                               | real, mammal, cat                         |
  |           12 |                                                     | dog, cat, real, mammal, tortoise, cartoon |

  </p></details>

  The number of concepts is exponential to the number of objects and attributes in the data.
  To find only the most interesting concepts, specify `min_support`, `min_delta_stability` and/or `n_stable_concepts` parameters:
  ```python
  concepts_df = csp.mine_concepts(
    df, min_support=3, min_delta_stability=1,
    to_compute=['intent', 'keys', 'support', 'delta_stability', 'sub_concepts']
  )

  print(concepts_df)
  ```

  |   concept_id | intent     | keys         |   support |   delta_stability | sub_concepts |
  |-------------:|:-----------|:-------------|----------:|------------------:|:-------------|
  |            0 | set()      | [set()]      |         5 |                 1 | {1, 2}       |
  |            1 | { real }   | [{ real }]   |         3 |                 1 | set()        |
  |            2 | { mammal } | [{ mammal }] |         4 |                 2 | set()        |




  For many datasets, the number of concepts is too large to be read by hand.
  Luckily, relationships between attributes can be described via implication bases whose number is usually much smaller
  (although there may be many implications selecting no objects).

  ```python
  implications_df = csp.mine_implications(df)

  print(implications_df[['premise', 'conclusion', 'support']])
  ```
  _<details><summary>Implications table (10 rows)</summary>_
  <p>

  |   implication_id | premise                 | conclusion                      |   support |
  |-----------------:|:------------------------|:--------------------------------|----------:|
  |                0 | {cartoon}             | {mammal}                      |         2 |
  |                1 | {tortoise}            | {real}                        |         1 |
  |                2 | {dog}                 | {mammal}                      |         2 |
  |                3 | {cat}                 | {mammal}                      |         2 |
  |                4 | {dog, cat}          | {tortoise, real, cartoon} |         0 |
  |                5 | {tortoise, mammal}  | {dog, cat, cartoon}       |         0 |
  |                6 | {tortoise, cat}     | {dog, cartoon}              |         0 |
  |                7 | {dog, tortoise}     | {cat, cartoon}              |         0 |
  |                8 | {tortoise, cartoon} | {dog, cat}                  |         0 |
  |                9 | {real, cartoon}     | {dog, tortoise, cat}      |         0 |

  </p></details>

  We can read the implications in the table and find out dependencies in the data. For example:
  - every famous cartoon animal is a mammal\
  (from impl. 0: _cartoon -> mammal_);
  - one can find famous tortoises only in real life\
  (from impl. 1: _tortoise -> real_);
  - nobody is a dog and a cat at the same time \
    (from impl. 4: _dog, cat -> ..._ with support 0).


  If finding full implication basis takes too much time, one can mine only a part of columns and implications:
  ```python
  implications_df = csp.mine_implications(
    df, basis_name='Canonical', unit_base=True,
    to_compute=['premise', 'conclusion', 'extent'],
    min_support=1, min_delta_stability=1
  )

  print(implications_df)
  ```
  |   implication_id | premise    | conclusion   | extent                      |
  |-----------------:|:-----------|:-------------|:----------------------------|
  |                0 | {cat}      | mammal       | {Socks, Garfield}           |
  |                1 | {dog}      | mammal       | {Greyfriar's Bobby, Snoopy} |
  |                2 | {tortoise} | real         | {Harriet}                   |
  |                3 | {cartoon}  | mammal       | {Snoopy, Garfield}          |



  The supported bases are _Canonical_ basis (a.k.a. _Pseudo-Intent_ or _Duquenne-Guigues_ basis)
  and _Canonical Direct_ basis (a.k.a. _Proper Premise_ or _Karell_ basis).
  Every basis can also be transformed in a unit-base where every conclusion consists of only one attribute.



  Finally, Caspailleur can output all descriptions in the data and their characteristics.
  But note that the `number of descriptions` = 2^`number of attributes`.

  ```python
  descriptions_df = csp.mine_descriptions(df)

  print('__n. attributes:__', df.shape[1])
  print('__n. descriptions:__', len(descriptions_df))
  print('__columns:__', ', '.join(descriptions_df.columns))
  print(descriptions_df[['description', 'support', 'is_key']].head(3))
  ```
  > __n. attributes:__ 6 \
  > __n. descriptions:__ 64

  > __columns:__ description, extent, intent, support, delta_stability, is_closed, is_key, is_passkey, is_proper_premise, is_pseudo_intent


  |   description_id | description |   support | is_key   |
  |-----------------:|:------------|----------:|:---------|
  |                0 | set()       |         5 | True     |
  |                1 | {cartoon}   |         2 | True     |
  |                2 | {real}      |         3 | True     |




  Caspailleur package does not support concept lattice visualisation (this task deserves its own package).
  For a basic concept lattice visualisation, one can produce a `mermaid` diagram code.
  Mermaid diagrams can be visualised via https://mermaid.live/ service or can be embedded in GitHub flavored markdown.

  ```python
  concepts_df = csp.mine_concepts(df, min_support=2)
  node_labels = concepts_df['intent'].map(', '.join) + '<br><br>'+concepts_df['extent'].map(', '.join)
  diagram_code = csp.io.to_mermaid_diagram(node_labels, concepts_df['previous_concepts'])
  print(diagram_code)
  ```

  ```mermaid
  flowchart TD
  A["<br><br>Snoopy, Greyfriar's Bobby, Garfield, Socks, Harriet"];
  B["real<br><br>Greyfriar's Bobby, Socks, Harriet"];
  C["mammal<br><br>Greyfriar's Bobby, Garfield, Socks, Snoopy"];
  D["mammal, cartoon<br><br>Garfield, Snoopy"];
  E["mammal, real<br><br>Greyfriar's Bobby, Socks"];
  F["mammal, dog<br><br>Greyfriar's Bobby, Snoopy"];
  G["cat, mammal<br><br>Garfield, Socks"];
  A --- B;
  A --- C;
  B --- E;
  C --- D;
  C --- E;
  C --- F;
  C --- G;
  ```
  _If, above, you see the source of the diagram, visit the [GitHub version](https://github.com/EgorDudyrev/caspailleur)
  of this ReadMe for the diagram itself.
  If, above, you see the diagram, go to the source code of the ReadMe for the diagram code._





  A formal context can be defined using many data types.

  Below is the list of context types and examples acceptable by high-level `caspailleur` functions:
  _<details><summary>Supported data types</summary>_
  <p>


  A binary Pandas dataframe.
  Can be obtained via `csp.io.to_pandas` function.

  Example:
  ```python
  print(csp.io.to_pandas(df))
  ```
  |                   |   cartoon |   real |   tortoise |   dog |   cat |   mammal |
  |:------------------|----------:|-------:|-----------:|------:|------:|---------:|
  | Garfield          |         True |      False |          False |     False |     True |        True |
  | Snoopy            |         True |      False |          False |     True |     False |        True |
  | Socks             |         False |      True |          False |     False |     True |        True |
  | Greyfriar's Bobby |         False |      True |          False |     True |     False |        True |
  | Harriet           |         False |      True |          True |     False |     False |        False |


  A list of sets of indices of True columns in the data.
  Can be obtained via `csp.io.to_itemsets` function.

  Example:
  ```python
  print(*csp.io.to_itemsets(df), sep='\n')
  ```
  > {0, 4, 5} <br>
  > {0, 3, 5} <br>
  > {1, 4, 5} <br>
  > {1, 3, 5} <br>
  > {1, 2}



  A triplet: (_ItemsetContextType_, object names, attribute names).
  Can be obtained via `csp.io.to_named_itemsets` function.

  Example:
  ```python
  print(*csp.io.to_named_itemsets(df), sep='\n')
  ```
  > [{0, 4, 5}, {0, 3, 5}, {1, 4, 5}, {1, 3, 5}, {1, 2}] <br>
  > ['Garfield', 'Snoopy', 'Socks', "Greyfriar's Bobby", 'Harriet'] <br>
  > ['cartoon', 'real', 'tortoise', 'dog', 'cat', 'mammal']



  A list of bitarrays where every bitarray represents "active" attributes in object's description
  Can be obtained via `csp.io.to_bitarrays` function;

  Example:
  ```python
  print(*csp.io.to_bitarrays(df), sep='\n')
  ```
  > bitarray('100011') <br>
  > bitarray('100101') <br>
  > bitarray('010011') <br>
  > bitarray('010101') <br>
  > bitarray('011000')


  A triplet: (_BitarrayContextType_, object names, attribute names).
  Can be obtained via `csp.io.to_named_bitarrays` function;

  Example:
  ```python
  print(*csp.io.to_named_bitarrays(df), sep='\n')
  ```
  > [bitarray('100011'), bitarray('100101'), bitarray('010011'), bitarray('010101'), bitarray('011000')] <br>
  > ['Garfield', 'Snoopy', 'Socks', "Greyfriar's Bobby", 'Harriet'] <br>
  > ['cartoon', 'real', 'tortoise', 'dog', 'cat', 'mammal']


  A list of object's descriptions where every description is a list of bool values.
  Can be obtained via `csp.io.to_bools` function;

  Example:
  ```python
  print(*csp.io.to_bools(df), sep='\n')
  ```
  > [True, False, False, False, True, True] <br>
  > [True, False, False, True, False, True] <br>
  > [False, True, False, False, True, True] <br>
  > [False, True, False, True, False, True] <br>
  > [False, True, True, False, False, False]




  A triplet: (_BoolContextType_, object names, attribute names).
  Can be obtained via `csp.io.to_named_bools` function;

  Example:
  ```python
  print(*csp.io.to_named_bools(df), sep='\n')
  ```
  > [[True, False, False, False, True, True], [True, False, False, True, False, True], [False, True, False, False, True, True], [False, True, False, True, False, True], [False, True, True, False, False, False]]<br>
  > ['Garfield', 'Snoopy', 'Socks', "Greyfriar's Bobby", 'Harriet']<br>
  > ['cartoon', 'real', 'tortoise', 'dog', 'cat', 'mammal']


  A dictionary where every key is an object's name and every value if object's description represented with sets of names of attributes.
  Can be obtained via `csp.io.to_dictionary` function.

  Example:
  ```python
  print(csp.io.to_dictionary(df))
  ```
  > {'Garfield': {'cartoon', 'mammal', 'cat'},<br>
  > 'Snoopy': {'dog', 'cartoon', 'mammal'}, <br>
  > 'Socks': {'real', 'mammal', 'cat'}, <br>
  > "Greyfriar's Bobby": {'real', 'mammal', 'dog'},<br>
  > 'Harriet': {'real', 'tortoise'}<br>
  > }

  </p></details>



  A formal context can also be saved to and loaded from a .cxt formatted file or a string:
  ```python
  with open('context.cxt', 'w') as file:
      csp.io.write_cxt(df, file)

  with open('context.cxt', 'r') as file:
      df_loaded = csp.io.read_cxt(file)

  assert (df == df_loaded).all(None)
  ```



  Caspailleur does three things to fasten up the computations:
  1. It exploits the connections between characterisic attribute sets.\
  E.g. a function to compute proper premises takes intents and keys as inputs, and not the original binary data.
  2. The set of intents is computed by LCM algorithm\
  well-implemented in scikit-mine package: https://pypi.org/project/scikit-mine/;
  3. All intrinsic computations are performed with bitwise operations\
  provided by bitarray package: https://pypi.org/project/bitarray/


  The diagram below presents dependencies between the characteristic attribute sets. For example, the arrow "intents -> keys" means that the set of intents is required to compute the set of keys.
  ```mermaid
    graph TD;
        S["<b>itemsets</b><br><small><tt>csp.np2bas(...)</tt></small>"];
        A["<b>intents</b><br><small><tt>csp.list_intents_via_LCM(...)</tt></small>"];
        B["<b>keys</b><br><small><tt>csp.list_keys(...)</tt></small>"];
        C["<b>passkeys</b><br><small><tt>csp.list_passkeys(...)</tt></small>"];
        D["<b>intents ordering</b><br><small><tt>csp.sort_intents_inclusion(...)</tt></small>"];
        E["<b>pseudo-intents</b><br><small><tt>csp.list_pseudo_intents_via_keys(...)</tt></small>"];
        F["<b>proper premises</b><br><small><tt>csp.iter_proper_premises_via_keys(...)</tt></small>"];
        G["<b>linearity index</b><br><small><tt>csp.linearity_index(...)</tt></small>"];
        H["<b>distributivity index</b><br><small><tt>csp.distributivity_index(...)</tt></small>"];

        S --> A
        A --> B;
        A --> C;
        A --> D;
        A --> E;
        B --> E;
        B --> F; A --> F;
        A --> G; D --> G;
        D --> H; A --> H;
  ```

  _In case the diagram is not compiling, visit the GitHub version of README: https://github.com/EgorDudyrev/caspailleur_


  > [!NOTE]
  > Although `caspailleur` package implements many optimisations to fasten up the computations, we do not state that it is the fastest FCA package ever existed.
  > For example, our algorithm for computing pseudo-intent basis is far from the state-of-art.
  > Knowing that, we find `caspailleur` fast enough for comfortable everyday use.



  There are no papers written about caspailleur (yet). So you can cite the package itself.

  ```bibtex
  @misc{caspailleur,
    title={caspailleur},
    author={Dudyrev, Egor},
    year={2023},
    howpublished={\url{https://www.smartfca.org/software}},
  }
  ```



  The package development is supported by ANR project SmartFCA [(ANR-21-CE23-0023)](https://anr.fr/Projet-ANR-21-CE23-0023).

  SmartFCA ([https://www.smartfca.org/](https://www.smartfca.org/)) is a big platform that will contain many extensions
  of Formal Concept Analysis including pattern structures, Relational Concept Analysis, Graph-FCA and others.
  While caspailleur is a small python package that covers only the basic notions of FCA.

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


