# packages

pkgId: 3861af52434e16ffe537da84bd76ab971b1962595848dcc3527c2643d6510b08
name: python-cosmospy-protobuf
arch: src
version: 0.4.0
epoch: 0
release: 1
url: https://github.com/ctrl-Felix/cosmospy-protobuf/
rpm_license: BSD 3-Clause License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmospy-protobuf-0.4.0-1.src.rpm
checksum_type: sha256
summary:
  This package contains a compiled python version of all cosmos protobuf files with their dependencies

description:
  This repository compains the whole cosmos protobuf files compiled for python and ready to use with grpc. Please use the according .proto file as documentation for each python file.



  You can install this package directly from the repository by using:

  ```
  python -m pip install cosmospy-protobuf
  ```



  The following code snippet will query the balances for the address `osmo15hzhcvgs2ljfng6unghvr5l32prwqdyq4aguxn`. The according query.proto file in the bank subdirectory contains the Request and the Response for this request. The details for the response are defined in `QueryAllBalancesResponse`. It contains the balances and pagination attribute which can be accessed as shown in the example below.

  ```python
  import grpc # using grpcio
  import cosmospy_protobuf.cosmos.bank.v1beta1.query_pb2_grpc as query_pb2_grpc # for gprcio

  import cosmospy_protobuf.cosmos.bank.v1beta1.query_pb2 as query_pb2

  host = "osmosis.strange.love"
  port = "9090"

  c = grpc.insecure_channel(f'{host}:{port}')
  stub = query_pb2_grpc.QueryStub(c)

  r = stub.AllBalances(query_pb2.QueryAllBalancesRequest(address="osmo15hzhcvgs2ljfng6unghvr5l32prwqdyq4aguxn"))
  print(r.balances)

  ```



  There are two scripts helping you to fork this repository to work with any cosmos based coin.

  Addititional Requirements:

  1. `grpcio-tools`
  2. `grpclib`
  3. `GitPython`
  4. `protoletariat`

  Steps:

  1. Create a config in `configs` and take a existing one as example
  2. Run the `aggregate.py` file with your filename without `.json` (Example `python aggregate.py cosmos`)
  3. Run the `compile.py` to compile all your files to protobuf
  4. Build your package. You're done!



  The files are compiled using the `grpc_tools.protoc` command from the [grpcio-tools](https://pypi.org/project/grpcio-tools/) library.
  To compile a .proto file manually use following command:

  ```
  python -m grpc_tools.protoc -I <absolute path to project root> --python_out=. --grpc_python_out=. --grpclib_python_out=. <absolute path to .proto file>
  ```

  After compiling all the files with protoc you need to fix the imports by using [protoletariat](https://github.com/cpcloud/protoletariat)

  Note:

  - The --grpc_python_out=. and --grpclib_python_out=. is only needed when compiling a query.proto file as these define the actual grpc query
  - To compile the whole project it is favorable to match all proto files by using `*.proto` instead of each individual file. You can also match the whole folders to compile multiple folders at the same time. Not that the folders might contain sub-folders.



  Currently following coins are maintained by me:

  - Cosmos (this branch)
  - Evmos (branch: `chain/evmos`, package name: `evmos-protobuf`)
  - Osmosis (branch: `chain/osmosis`, package name: `osmosis-protobuf`)
  - Stargaze (branch: `chain/stargaze`, package name: `stargaze-protobuf`)

  Maintained by external contributors:

  - Sentinel (branch: `chain/sentinel`, package name: `sentinel-protobuf`)


pkgId: 2ae5ee96ed59f40604ecefbfad2a30b898c7dc96f86df6425176cfb511b92436
name: python-cosmowap
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: package for computing power spectra and bispectra
url: https://pypi.org/project/cosmowap/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmowap-0.1.2-1.src.rpm
checksum_type: sha256
description:
  **Cosmo**logy with **W**ide-separation, rel**A**tivistic and **P**rimordial non-Gaussian contibutions.

  CosmoWAP is an effort to provide a (hopefully) self consistent framework to compute contribtuions within standard peturbation theory to the fourier power spectrum and bispectrum including wide-separation and relatvisitic effects as well as Primordial non-Gaussianity (PNG).
  These expression can be very cumbersome and it can be tricky to check for consistency in the community and so hopefully this code should be useful in that regard.

  CosmoWAP is a *Python* package to analyse the power spectra and bispectra but the analytical expressions themselves are computed analytically in Mathematica using routines which are publicly avalable at [*MathWAP*](https://github.com/craddis1/MathWAP) and then exported as .py files. therefore the main functionality of CosmoWAP is to take these expressions and implement them for a given cosmology (from CLASS) and set of survey parameters.



  For full [*Documentation*](https://cosmowap.readthedocs.io/en/latest/) - In progress...

  Lanch binder notebook example: [![badge](https://img.shields.io/badge/launch-powerspectrum-F5A252.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb47UbIrVa4rYoGjdaIbeaIXhoWHmZYHobXvpcHjqdHXreHLroVrsfG/uhGnuh2bwj2Hxk17yl1vzmljzm1j0nlX1olL3AJXWAAAAbXRSTlMAEBAQHx8gICAuLjAwMDw9PUBAQEpQUFBXV1hgYGBkcHBwcXl8gICAgoiIkJCQlJicnJ2goKCmqK+wsLC4usDAwMjP0NDQ1NbW3Nzg4ODi5+3v8PDw8/T09PX29vb39/f5+fr7+/z8/Pz9/v7+zczCxgAABC5JREFUeAHN1ul3k0UUBvCb1CTVpmpaitAGSLSpSuKCLWpbTKNJFGlcSMAFF63iUmRccNG6gLbuxkXU66JAUef/9LSpmXnyLr3T5AO/rzl5zj137p136BISy44fKJXuGN/d19PUfYeO67Znqtf2KH33Id1psXoFdW30sPZ1sMvs2D060AHqws4FHeJojLZqnw53cmfvg+XR8mC0OEjuxrXEkX5ydeVJLVIlV0e10PXk5k7dYeHu7Cj1j+49uKg7uLU61tGLw1lq27ugQYlclHC4bgv7VQ+TAyj5Zc/UjsPvs1sd5cWryWObtvWT2EPa4rtnWW3JkpjggEpbOsPr7F7EyNewtpBIslA7p43HCsnwooXTEc3UmPmCNn5lrqTJxy6nRmcavGZVt/3Da2pD5NHvsOHJCrdc1G2r3DITpU7yic7w/7Rxnjc0kt5GC4djiv2Sz3Fb2iEZg41/ddsFDoyuYrIkmFehz0HR2thPgQqMyQYb2OtB0WxsZ3BeG3+wpRb1vzl2UYBog8FfGhttFKjtAclnZYrRo9ryG9uG/FZQU4AEg8ZE9LjGMzTmqKXPLnlWVnIlQQTvxJf8ip7VgjZjyVPrjw1te5otM7RmP7xm+sK2Gv9I8Gi++BRbEkR9EBw8zRUcKxwp73xkaLiqQb+kGduJTNHG72zcW9LoJgqQxpP3/Tj//c3yB0tqzaml05/+orHLksVO+95kX7/7qgJvnjlrfr2Ggsyx0eoy9uPzN5SPd86aXggOsEKW2Prz7du3VID3/tzs/sSRs2w7ovVHKtjrX2pd7ZMlTxAYfBAL9jiDwfLkq55Tm7ifhMlTGPyCAs7RFRhn47JnlcB9RM5T97ASuZXIcVNuUDIndpDbdsfrqsOppeXl5Y+XVKdjFCTh+zGaVuj0d9zy05PPK3QzBamxdwtTCrzyg/2Rvf2EstUjordGwa/kx9mSJLr8mLLtCW8HHGJc2R5hS219IiF6PnTusOqcMl57gm0Z8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/craddis1/CosmoWAP_binder/HEAD?labpath=example_pk.ipynb) [![badge](https://img.shields.io/badge/launch-bispectrum-F5A252.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb47UbIrVa4rYoGjdaIbeaIXhoWHmZYHobXvpcHjqdHXreHLroVrsfG/uhGnuh2bwj2Hxk17yl1vzmljzm1j0nlX1olL3AJXWAAAAbXRSTlMAEBAQHx8gICAuLjAwMDw9PUBAQEpQUFBXV1hgYGBkcHBwcXl8gICAgoiIkJCQlJicnJ2goKCmqK+wsLC4usDAwMjP0NDQ1NbW3Nzg4ODi5+3v8PDw8/T09PX29vb39/f5+fr7+/z8/Pz9/v7+zczCxgAABC5JREFUeAHN1ul3k0UUBvCb1CTVpmpaitAGSLSpSuKCLWpbTKNJFGlcSMAFF63iUmRccNG6gLbuxkXU66JAUef/9LSpmXnyLr3T5AO/rzl5zj137p136BISy44fKJXuGN/d19PUfYeO67Znqtf2KH33Id1psXoFdW30sPZ1sMvs2D060AHqws4FHeJojLZqnw53cmfvg+XR8mC0OEjuxrXEkX5ydeVJLVIlV0e10PXk5k7dYeHu7Cj1j+49uKg7uLU61tGLw1lq27ugQYlclHC4bgv7VQ+TAyj5Zc/UjsPvs1sd5cWryWObtvWT2EPa4rtnWW3JkpjggEpbOsPr7F7EyNewtpBIslA7p43HCsnwooXTEc3UmPmCNn5lrqTJxy6nRmcavGZVt/3Da2pD5NHvsOHJCrdc1G2r3DITpU7yic7w/7Rxnjc0kt5GC4djiv2Sz3Fb2iEZg41/ddsFDoyuYrIkmFehz0HR2thPgQqMyQYb2OtB0WxsZ3BeG3+wpRb1vzl2UYBog8FfGhttFKjtAclnZYrRo9ryG9uG/FZQU4AEg8ZE9LjGMzTmqKXPLnlWVnIlQQTvxJf8ip7VgjZjyVPrjw1te5otM7RmP7xm+sK2Gv9I8Gi++BRbEkR9EBw8zRUcKxwp73xkaLiqQb+kGduJTNHG72zcW9LoJgqQxpP3/Tj//c3yB0tqzaml05/+orHLksVO+95kX7/7qgJvnjlrfr2Ggsyx0eoy9uPzN5SPd86aXggOsEKW2Prz7du3VID3/tzs/sSRs2w7ovVHKtjrX2pd7ZMlTxAYfBAL9jiDwfLkq55Tm7ifhMlTGPyCAs7RFRhn47JnlcB9RM5T97ASuZXIcVNuUDIndpDbdsfrqsOppeXl5Y+XVKdjFCTh+zGaVuj0d9zy05PPK3QzBamxdwtTCrzyg/2Rvf2EstUjordGwa/kx9mSJLr8mLLtCW8HHGJc2R5hS219IiF6PnTusOqcMl57gm0Z8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/craddis1/CosmoWAP_binder/HEAD?labpath=example_bk.ipynb)



  ``` sh
  pip install cosmowap
  ```

  classy (CLASS python wrapper) is necessecary to fully use CosmoWAP.



  CosmoWAP computes redshift spadce expressions for the 3D Fourier *power spectrum* (and it's multipoles with multi-tracer capabilites) as well as the *bispectrum* (with Sccoccimarro spherical harmonic multipoles), it also can be used for:

  - Wide separation (WS) effects (i.e. wide angle and radial redshift contributions) up to second order in the WS expansion
  - Relativistic (GR) effects (including projection and dynamical effects) up to $\left(\frac{\mathcal{H}}{k}\right)^2$
  - Primordial non-Gaussian (PNG) contribution for local, equilateral and orthogonal types (in progress)



  - Gaussian covariances along with routines for Fisher and SNR analyses (in progress)
  - Inclusion of Finger-of-God damping


  Based on work in [arXiv:2407.00168](https://arxiv.org/abs/2407.00168)

  Also for PNG stuff please refer too: arXiv:24xx.xxxx



  Feel free to edit or just take any part that may be useful but please refer to:
  [arXiv:2407.00168](https://arxiv.org/abs/2407.00168)



  If you find any bugs, errors or have any suggestions feel free to get in touch :) - c.l.j.addis@qmul.ac.uk


pkgId: c5df44ace5722ad5a6c78398a0f8b76ca9d40520565ca6815494c3d3c500cc83
name: python-cosmpy
arch: src
version: 0.9.2
epoch: 0
release: 1
summary: A library for interacting with the cosmos networks
url: https://github.com/fetchai/cosmpy
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmpy-0.9.2-1.src.rpm
checksum_type: sha256
description:
  <h1 align="center">
      <b>CosmPy</b>
  </h1>

  <p align="center">
  A python library for interacting with cosmos based blockchain networks
  </p>

  <p align="center">
    <a href="https://pypi.org/project/cosmpy/">
      <img alt="PyPI" src="https://img.shields.io/pypi/v/cosmpy">
    </a>
    <a href="https://pypi.org/project/cosmpy/">
      <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/cosmpy">
    </a>
    <a href="https://github.com/fetchai/cosmpy/blob/main/LICENSE">
      <img alt="License" src="https://img.shields.io/pypi/l/cosmpy">
    </a>
    <br />
    <a>
      <img alt="PyPI - Wheel" src="https://img.shields.io/pypi/wheel/cosmpy">
    </a>
    <a href="https://github.com/fetchai/cosmpy/actions/workflows/workflow.yml">
      <img alt="CosmPy sanity checks and tests" src="https://github.com/fetchai/cosmpy/actions/workflows/workflow.yml/badge.svg">
    </a>
    <a href="https://pypi.org/project/cosmpy/">
      <img alt="Download per Month" src="https://img.shields.io/pypi/dm/cosmpy">
    </a>
  </p>

  > We recently stopped using the `develop` branch for feature consolidation and renamed `master` to `main`. Please see the [Contribution Guides][contributing] for up-to-date instructions.



  ```bash
  pip3 install cosmpy
  ```



  Below is a simple example for querying an account's balances:

  ```python
  from cosmpy.aerial.client import LedgerClient, NetworkConfig


  ledger_client = LedgerClient(NetworkConfig.fetchai_mainnet())

  alice: str = 'fetch12q5gw9l9d0yyq2th77x6pjsesczpsly8h5089x'
  balances = ledger_client.query_bank_all_balances(alice)


  for coin in balances:
    print(f'{coin.amount}{coin.denom}')
  ```



  The full documentation can be found [here](https://docs.fetch.ai/CosmPy/).



  Under the `examples` directory, you can find examples of basic ledger interactions using `cosmpy`, such as transferring tokens, staking, deploying and interacting with a smart contract, and performing atomic swaps.



  All contributions are very welcome! Remember, contribution is not only PRs and code, but any help with docs or helping other developers solve their issues are very appreciated!

  Read below to learn how you can take part in the CosmPy project.



  Please be sure to read and follow our [Code of Conduct][coc]. By participating, you are expected to uphold this code.



  Read our [contribution guidelines][contributing] to learn about our issue and pull request submission processes, coding rules, and more.



  Read our [development guidelines][developing] to learn about the development processes and workflows.



  We use [GitHub Issues][issues] for tracking requests and bugs, and [GitHub Discussions][discussion] for general questions and discussion.



  The CosmPy project is licensed under [Apache License 2.0][license].

  [contributing]: https://github.com/fetchai/cosmpy/blob/main/CONTRIBUTING.md
  [developing]: https://github.com/fetchai/cosmpy/blob/main/DEVELOPING.md
  [coc]: https://github.com/fetchai/cosmpy/blob/main/CODE_OF_CONDUCT.md
  [discussion]: https://github.com/fetchai/cosmpy/discussions
  [issues]: https://github.com/fetchai/cosmpy/issues
  [license]: https://github.com/fetchai/cosmpy/blob/main/LICENSE


pkgId: ed27311d74f2ba0701e036ac58c7259890f8c1bfcd31a10ad2e80af4da1bd4cc
name: python-cospar
arch: src
version: 0.4.1
epoch: 0
release: 1
summary: A toolkit for dynamic inference of cell fate by integrating state and lineage information.
url: https://github.com/ShouWenWang-Lab/cospar
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cospar-0.4.1-1.src.rpm
checksum_type: sha256
description:
  |Python| |PyPIDownloads| |PyPI| |Conda| |Docs|
  **CoSpar** is a toolkit for dynamic inference from lineage-traced single cells.
  The methods are based on `Wang et al. Nat. Biotech. (2022) <https://www.nature.com/articles/s41587-022-01209-1>`_.
  Dynamic inference based on single-cell state measurement alone requires serious simplifications. On the other hand, direct dynamic measurement via lineage tracing only captures partial information and its interpretation is challenging. CoSpar integrates both state and lineage information to infer a finite-time transition map of a development/differentiation system. It gains superior robustness and accuracy by exploiting both the local coherence and sparsity of differentiation transitions, i.e., neighboring initial states share similar yet sparse fate outcomes.  Building around the `anndata <https://anndata.readthedocs.io>`_ object, CoSpar provides an integrated analysis framework for datasets with both state and lineage information. When only state information is available, CoSpar also improves upon existing dynamic inference methods by imposing sparsity and coherence. It offers essential toolkits for analyzing lineage data, state information, or their integration.
  See `<https://cospar.readthedocs.io>`_ for documentation and tutorials.


pkgId: 40b65c9b5b6a1630ed17074bcce5b13e2df44c7e4f7b4938384a73516e8aa48e
name: python-cost_model_queries
arch: src
version: 0.0.5
epoch: 0
release: 1
url: https://pypi.org/project/cost_model_queries/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cost_model_queries-0.0.5-1.src.rpm
checksum_type: sha256
summary:
  Functions for sampling cost models and performing sensitivity analyses and regressions on cost model data.

description:
  [![Documentation Status](https://readthedocs.org/projects/cost-model-queries/badge/?version=latest)](https://cost-model-queries.readthedocs.io/en/latest/?badge=latest)

  Cost Model Queries facilitates sampling, sensitivity analyses and regression model testing for the excel-based deployment and production cost models.



  ```console
      (base) $ conda env create --name environment_name -f environment.yml
      (base) $ conda activate environment_name
  ```

  Details on usage and the API are available in the [Documentation](https://cost-model-queries.readthedocs.io/en/latest/).


pkgId: 354a089dff5de586f564c0b8c88c118f2b34c7296f20aefa6100011b112e1bce
name: python-costeopy-package
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: Costeo de cas
url: https://github.com/francomrf/Costeo_Python.git
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-costeopy-package-0.2.1-1.src.rpm
checksum_type: sha256
description:
  Bienvenido al paquete de Costeo para intervenciones pedagógicas en Python creado por el equipo de Analítica de Datos. Este paquete ha sido diseñado para ayudar a los científicos de datos, analistas y programadores a trabajar de manera más eficiente con sus datos.

  Nuestro equipo ha invertido tiempo y esfuerzo en desarrollar una herramienta de análisis de datos poderosa, fácil de usar y flexible que pueda satisfacer las necesidades de cualquier usuario.

  Esperamos que encuentres este paquete útil y esperamos recibir tus comentarios y sugerencias para mejorar continuamente nuestro trabajo.


pkgId: 08a85fd1fcd5f3f6b19b91e0ae04cee2bee2a858ab0ba0244874c45dc9ae4e41
name: python-costly
arch: src
version: 2.2.0
epoch: 0
release: 1
url: https://pypi.org/project/costly/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-costly-2.2.0-1.src.rpm
checksum_type: sha256
summary:
  Estimate costs and running times of complex LLM workflows/experiments/pipelines in advance before spending money, via simulations.

description:
  Estimate costs and running times of complex LLM workflows/experiments/pipelines in advance before spending money, via simulations. Just put `@costly()` on the load-bearing function; make sure all functions that call it pass `**kwargs` to it and call your complex function with `simulate=True` and some `cost_log: Costlog` object. See [examples.ipynb](examples.ipynb) for more details.

  (Actually you don't have to pass `cost_log` and `simulate` throughout; you can just define a global `cost_log` and `simulate` at the top of the file that contains your `@costly` functions and pass them as defaults to your `@costly` functions.)

  (Pass `@costly(disable_costly=True)` to disable costly for a function. E.g. you may set `disable_costly` to be a global variable and pass it to your `@costly` decorators.)

  https://github.com/abhimanyupallavisudhir/costly



  ```bash
  pip install costly
  ```



  See [examples.ipynb](examples.ipynb) for a full walkthrough; some examples below.

  ```python

  from costly import Costlog, costly, CostlyResponse
  from costly.estimators.llm_api_estimation import LLM_API_Estimation as estimator


  @costly()
  def chatgpt(input_string: str, model: str) -> str:
      from openai import OpenAI

      client = OpenAI()
      response = client.chat.completions.create(
          model=model, messages=[{"role": "user", "content": input_string}]
      )
      output_string = response.choices[0].message.content
      return output_string


  @costly(
      input_tokens=lambda kwargs: LLM_API_Estimation.messages_to_input_tokens(
          kwargs["messages"], kwargs["model"]
      ),
  )
  def chatgpt_messages(messages: list[dict[str, str]], model: str) -> str:
      from openai import OpenAI

      client = OpenAI()
      response = client.chat.completions.create(model=model, messages=messages)
      output_string = response.choices[0].message.content
      return output_string


  @costly()
  def chatgpt(input_string: str, model: str) -> str:
      from openai import OpenAI

      client = OpenAI()
      response = client.chat.completions.create(
          model=model,
          messages=[
              {"role": "user", "content": input_string},
          ],
      )

      return CostlyResponse(
          output=response.choices[0].message.content,
          cost_info={
              "input_tokens": response.usage.prompt_tokens,
              "output_tokens": response.usage.completion_tokens,
          },
      ) # in usage, this will still just return the output, not the whole CostlyResponse object

  ```



  ```bash
  poetry run pytest -s -m "not slow"
  poetry run pytest -s -m "slow"

  Tests for instructor currently fail.
  ```



  - [x] Make it work with async
  - [x] Decide and document what the best way to "propagate" `description` (for breakdown purposes) through function calls is. Have the user manually write `def f(...): ... g(description = kwargs.get("description") + ["f"]`? Add a `@description("blabla")` decorator? Add a `@description` decorator that automatically appends the function name and arguments into `description`?
  - [x] Better solution for token counting for Chat messages (search `HACK` in the repo)
  - [x] make instructor tests pass https://community.openai.com/t/how-to-calculate-the-tokens-when-using-function-call/266573/11
  - [ ] Support for locally run LLMs -- ideally need a cost & time estimator that takes into account your machine details, GPU pricing etc.
  - [ ] support more models

  Instructor tests don't really pass but I can kinda live with this. Lmk if anyone has a good way to count tokens from messages that includes tool calling (I'm using [this](https://community.openai.com/t/how-to-calculate-the-tokens-when-using-function-call/266573/11)).
  ```
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[PERSONINFO_gpt-4o] - AssertionError: ['Input tokens estimate 65 not within 20pc of truth 83']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[PERSONINFO_gpt-4o-mini] - AssertionError: ['Input tokens estimate 65 not within 20pc of truth 83']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[PERSONINFO_gpt-4-turbo] - AssertionError: ['Input tokens estimate 65 not within 20pc of truth 85']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[PERSONINFO_gpt-3.5-turbo] - AssertionError: ['Input tokens estimate 65 not within 20pc of truth 85']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[FOOMODEL_gpt-4o] - AssertionError: ['Input tokens estimate 77 not within 20pc of truth 108']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[FOOMODEL_gpt-4o-mini] - AssertionError: ['Input tokens estimate 77 not within 20pc of truth 108']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[FOOMODEL_gpt-4-turbo] - AssertionError: ['Input tokens estimate 77 not within 20pc of truth 113']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[FOOMODEL_gpt-3.5-turbo] - AssertionError: ['Input tokens estimate 77 not within 20pc of truth 113']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[BARMODEL_gpt-4o] - AssertionError: ['Input tokens estimate 70 not within 20pc of truth 168']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[BARMODEL_gpt-4o-mini] - AssertionError: ['Input tokens estimate 70 not within 20pc of truth 168']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[BARMODEL_gpt-4-turbo] - AssertionError: ['Input tokens estimate 70 not within 20pc of truth 178']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[BARMODEL_gpt-4] - AssertionError: ['Input tokens estimate 70 not within 20pc of truth 126']
  FAILED tests/test_estimators/test_llm_api_estimation.py::test_estimate_contains_exact_instructor[BARMODEL_gpt-3.5-turbo] - AssertionError: ['Input tokens estimate 70 not within 20pc of truth 178']
  ```


pkgId: e047da9f4dd014b5a5c1993e2a27a5524b756f3a1e83305f446085cdb4bf5b79
name: python-costo
arch: src
version: 0.0.6
epoch: 0
release: 1
summary: COSTO stands for COSimulation TOols
url: https://gitlab.com/Te_ch/costo
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-costo-0.0.6-1.src.rpm
checksum_type: sha256
description:
  <!-- [![Gitter][gitter-badge]][gitter-link] -->

  <!-- |      CI              | status | -->
  <!-- |----------------------|--------| -->
  <!-- | conda.recipe         | [![Conda Actions Status][actions-conda-badge]][actions-conda-link] | -->
  <!-- | pip builds           | [![Pip Actions Status][actions-pip-badge]][actions-pip-link] | -->


  <!-- An example project built with [pybind11][] and [scikit-build-core][]. Python -->
  <!-- 3.7+ (see older commits for older versions of Python using [scikit-build (classic)][]). -->


  <!-- [gitter-badge]:            https://badges.gitter.im/pybind/Lobby.svg -->
  <!-- [gitter-link]:             https://gitter.im/pybind/Lobby -->
  <!-- [actions-badge]:           https://github.com/pybind/scikit_build_example/workflows/Tests/badge.svg -->
  <!-- [actions-conda-link]:      https://github.com/pybind/scikit_build_example/actions?query=workflow%3AConda -->
  <!-- [actions-conda-badge]:     https://github.com/pybind/scikit_build_example/workflows/Conda/badge.svg -->
  <!-- [actions-pip-link]:        https://github.com/pybind/scikit_build_example/actions?query=workflow%3APip -->
  <!-- [actions-pip-badge]:       https://github.com/pybind/scikit_build_example/workflows/Pip/badge.svg -->
  <!-- [actions-wheels-link]:     https://github.com/pybind/scikit_build_example/actions?query=workflow%3AWheels -->
  <!-- [actions-wheels-badge]:    https://github.com/pybind/scikit_build_example/workflows/Wheels/badge.svg -->

  <!-- ## Installation -->

  <!-- - Clone this repository -->
  <!-- - `pip install ./scikit_build_example` -->

  <!-- ## Test call -->

  <!-- ```python -->
  <!-- import scikit_build_example -->

  <!-- scikit_build_example.add(1, 2) -->
  <!-- ``` -->

  <!-- ## Files -->

  <!-- This example has several files that are a good idea, but aren't strictly -->
  <!-- necessary. The necessary files are: -->

  <!-- * `pyproject.toml`: The Python project file -->
  <!-- * `CMakeLists.txt`: The CMake configuration file -->
  <!-- * `src/main.cpp`: The source file for the C++ build -->
  <!-- * `src/scikit_build_example/__init__.py`: The Python portion of the module. The root of the module needs to be `<package_name>`, `src/<package_name>`, or `python/<package_name>` to be auto-discovered. -->

  <!-- These files are also expected and highly recommended: -->

  <!-- * `.gitignore`: Git's ignore list, also used by `scikit-build-core` to select files for the SDist -->
  <!-- * `README.md`: The source for the PyPI description -->
  <!-- * `LICENSE`: The license file -->

  <!-- There are also several completely optional directories: -->

  <!-- * `.github`: configuration for [Dependabot][] and [GitHub Actions][] -->
  <!-- * `conda.recipe`: Example recipe. Normally you should submit projects to conda-forge instead of building them yourself, but this is useful for testing the example. -->
  <!-- * `docs/`: Documentation -->
  <!-- * `tests/`: Tests go here -->

  <!-- And some optional files: -->

  <!-- * `.pre-commit-config.yaml`: Configuration for the fantastic static-check runner [pre-commit][]. -->
  <!-- * `noxfile.py`: Configuration for the [nox][] task runner, which helps make setup easier for contributors. -->

  <!-- This is a simplified version of the recommendations in the [Scientific-Python -->
  <!-- Development Guide][], which is a _highly_ recommended read for anyone -->
  <!-- interested in Python package development (Scientific or not). The guide also -->
  <!-- has a cookiecutter that includes scikit-build-core and pybind11 as a backend -->
  <!-- choice. -->

  <!-- ### CI Examples -->

  <!-- There are examples for CI in `.github/workflows`. A simple way to produces -->
  <!-- binary "wheels" for all platforms is illustrated in the "wheels.yml" file, -->
  <!-- using [cibuildwheel][]. -->

  <!-- ## License -->

  <!-- pybind11 is provided under a BSD-style license that can be found in the LICENSE -->
  <!-- file. By using, distributing, or contributing to this project, you agree to the -->
  <!-- terms and conditions of this license. -->

  <!-- [cibuildwheel]: https://cibuildwheel.readthedocs.io -->
  <!-- [scientific-python development guide]: https://learn.scientific-python.org/development -->
  <!-- [dependabot]: https://docs.github.com/en/code-security/dependabot -->
  <!-- [github actions]: https://docs.github.com/en/actions -->
  <!-- [pre-commit]: https://pre-commit.com -->
  <!-- [nox]: https://nox.thea.codes -->
  <!-- [pybind11]: https://pybind11.readthedocs.io -->
  <!-- [scikit-build-core]: https://scikit-build-core.readthedocs.io -->
  <!-- [scikit-build (classic)]: https://scikit-build.readthedocs.io -->

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


pkgId: f266a79876c22fc0a94fd74e75a1c2ae49a61d7806ab8cef68fb6c863f07b435
name: python-cosysairsim
arch: src
version: 3.2.0
epoch: 0
release: 1
url: https://pypi.org/project/cosysairsim/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosysairsim-3.2.0-1.src.rpm
checksum_type: sha256
summary:
  This package contains simple Python client for Cosys-AirSim. This integrates most API functions over RPC.

description:
  This package contains simple Python client for [Cosys-AirSim](https://github.com/Cosys-Lab/Cosys-AirSim).
  It can also be installed as a Python module. This integrates most API functions over RPC.

  Note that this is renamed `cosysairsim` from the original `airsim` module.


  This package depends on `numpy` and `msgpack` and would automatically install `numpy` and `rpc-msgpack` (this may need administrator/sudo prompt):
  ```
  pip install numpy
  pip install rpc-msgpack
  ```



  You can install the Cosys-AirSim Python client from pip with `pip install cosysairsim`


  For this go into the _PythonClient_ folder of the Cosys-AirSim repository and use pip to install it to your python environment with `pip install .`



  More information on AirSim can be found at:
  https://cosys-lab.github.io/

rpm_license:
  MSR Aerial Informatics and Robotics Platform MSR Aerial Informatics and Robotics Simulator (AirSim)  Copyright (c) Microsoft Corporation  All rights reserved.  MIT License  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: 79ac14eaf7a4b106b3d8231dba2cc81bac8690f51f05409d1decd6b47bb3e4a2
name: python-cosyvoice
arch: src
version: 0.0.8
epoch: 0
release: 1
summary: CosyVoice TTS with multilangual support
url: https://github.com/lucasjinreal/CosyVoice
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosyvoice-0.0.8-1.src.rpm
checksum_type: sha256
description:
  [[CosyVoice Paper](https://fun-audio-llm.github.io/pdf/CosyVoice_v1.pdf)][[CosyVoice Studio](https://www.modelscope.cn/studios/iic/CosyVoice-300M)][[CosyVoice Code](https://github.com/FunAudioLLM/CosyVoice)]

  For `SenseVoice`, visit [SenseVoice repo](https://github.com/FunAudioLLM/SenseVoice) and [SenseVoice space](https://www.modelscope.cn/studios/iic/SenseVoice).



  - [x] 2024/07

      - [x] Flow matching training support
      - [x] WeTextProcessing support when ttsfrd is not avaliable
      - [x] Fastapi server and client

  - [x] 2024/08

      - [x] Repetition Aware Sampling(RAS) inference for llm stability
      - [x] Streaming inference mode support, including kv cache and sdpa for rtf optimization

  - [x] 2024/09

      - [x] 25hz cosyvoice base model
      - [x] 25hz cosyvoice voice conversion model

  - [ ] TBD

      - [ ] 25hz llama based llm model which supports lora finetune
      - [ ] Support more instruction mode
      - [ ] Music generation
      - [ ] CosyVoice-500M trained with more multi-lingual data
      - [ ] More...



  **Clone and install**

  - Clone the repo
  ``` sh
  git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git

  cd CosyVoice
  git submodule update --init --recursive
  ```

  - Install Conda: please see https://docs.conda.io/en/latest/miniconda.html
  - Create Conda env:

  ``` sh
  conda create -n cosyvoice python=3.8
  conda activate cosyvoice

  conda install -y -c conda-forge pynini==2.1.5
  pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com



  sudo apt-get install sox libsox-dev

  sudo yum install sox sox-devel
  ```

  **Model download**

  We strongly recommend that you download our pretrained `CosyVoice-300M` `CosyVoice-300M-SFT` `CosyVoice-300M-Instruct` model and `CosyVoice-ttsfrd` resource.

  If you are expert in this field, and you are only interested in training your own CosyVoice model from scratch, you can skip this step.

  ``` python

  from modelscope import snapshot_download
  snapshot_download('iic/CosyVoice-300M', local_dir='pretrained_models/CosyVoice-300M')
  snapshot_download('iic/CosyVoice-300M-25Hz', local_dir='pretrained_models/CosyVoice-300M-25Hz')
  snapshot_download('iic/CosyVoice-300M-SFT', local_dir='pretrained_models/CosyVoice-300M-SFT')
  snapshot_download('iic/CosyVoice-300M-Instruct', local_dir='pretrained_models/CosyVoice-300M-Instruct')
  snapshot_download('iic/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
  ```

  ``` sh

  mkdir -p pretrained_models
  git clone https://www.modelscope.cn/iic/CosyVoice-300M.git pretrained_models/CosyVoice-300M
  git clone https://www.modelscope.cn/iic/CosyVoice-300M-25Hz.git pretrained_models/CosyVoice-300M-25Hz
  git clone https://www.modelscope.cn/iic/CosyVoice-300M-SFT.git pretrained_models/CosyVoice-300M-SFT
  git clone https://www.modelscope.cn/iic/CosyVoice-300M-Instruct.git pretrained_models/CosyVoice-300M-Instruct
  git clone https://www.modelscope.cn/iic/CosyVoice-ttsfrd.git pretrained_models/CosyVoice-ttsfrd
  ```

  Optionaly, you can unzip `ttsfrd` resouce and install `ttsfrd` package for better text normalization performance.

  Notice that this step is not necessary. If you do not install `ttsfrd` package, we will use WeTextProcessing by default.

  ``` sh
  cd pretrained_models/CosyVoice-ttsfrd/
  unzip resource.zip -d .
  pip install ttsfrd-0.3.6-cp38-cp38-linux_x86_64.whl
  ```

  **Basic Usage**

  For zero_shot/cross_lingual inference, please use `CosyVoice-300M` model.
  For sft inference, please use `CosyVoice-300M-SFT` model.
  For instruct inference, please use `CosyVoice-300M-Instruct` model.
  First, add `third_party/Matcha-TTS` to your `PYTHONPATH`.

  ``` sh
  export PYTHONPATH=third_party/Matcha-TTS
  ```

  ``` python
  from cosyvoice.cli.cosyvoice import CosyVoice
  from cosyvoice.utils.file_utils import load_wav
  import torchaudio

  cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-SFT', load_jit=True, load_onnx=False, fp16=True)

  print(cosyvoice.list_avaliable_spks())

  for i, j in enumerate(cosyvoice.inference_sft('你好，我是通义生成式语音大模型，请问有什么可以帮您的吗？', '中文女', stream=False)):
      torchaudio.save('sft_{}.wav'.format(i), j['tts_speech'], 22050)

  cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-25Hz') # or change to pretrained_models/CosyVoice-300M for 50Hz inference

  prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
  for i, j in enumerate(cosyvoice.inference_zero_shot('收到好友从远方寄来的生日礼物，那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐，笑容如花儿般绽放。', '希望你以后能够做的比我还好呦。', prompt_speech_16k, stream=False)):
      torchaudio.save('zero_shot_{}.wav'.format(i), j['tts_speech'], 22050)

  prompt_speech_16k = load_wav('cross_lingual_prompt.wav', 16000)
  for i, j in enumerate(cosyvoice.inference_cross_lingual('<|en|>And then later on, fully acquiring that company. So keeping management in line, interest in line with the asset that\'s coming into the family is a reason why sometimes we don\'t buy the whole thing.', prompt_speech_16k, stream=False)):
      torchaudio.save('cross_lingual_{}.wav'.format(i), j['tts_speech'], 22050)

  prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
  source_speech_16k = load_wav('cross_lingual_prompt.wav', 16000)
  for i, j in enumerate(cosyvoice.inference_vc(source_speech_16k, prompt_speech_16k, stream=False)):
      torchaudio.save('vc_{}.wav'.format(i), j['tts_speech'], 22050)

  cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-Instruct')

  for i, j in enumerate(cosyvoice.inference_instruct('在面对挑战时，他展现了非凡的<strong>勇气</strong>与<strong>智慧</strong>。', '中文男', 'Theo \'Crimson\', is a fiery, passionate rebel leader. Fights with fervor for justice, but struggles with impulsiveness.', stream=False)):
      torchaudio.save('instruct_{}.wav'.format(i), j['tts_speech'], 22050)
  ```

  **Start web demo**

  You can use our web demo page to get familiar with CosyVoice quickly.
  We support sft/zero_shot/cross_lingual/instruct inference in web demo.

  Please see the demo website for details.

  ``` python

  python3 webui.py --port 50000 --model_dir pretrained_models/CosyVoice-300M
  ```

  **Advanced Usage**

  For advanced user, we have provided train and inference scripts in `examples/libritts/cosyvoice/run.sh`.
  You can get familiar with CosyVoice following this recipie.

  **Build for deployment**

  Optionally, if you want to use grpc for service deployment,
  you can run following steps. Otherwise, you can just ignore this step.

  ``` sh
  cd runtime/python
  docker build -t cosyvoice:v1.0 .


  docker run -d --runtime=nvidia -p 50000:50000 cosyvoice:v1.0 /bin/bash -c "cd /opt/CosyVoice/CosyVoice/runtime/python/grpc && python3 server.py --port 50000 --max_conc 4 --model_dir iic/CosyVoice-300M && sleep infinity"
  cd grpc && python3 client.py --port 50000 --mode <sft|zero_shot|cross_lingual|instruct>

  docker run -d --runtime=nvidia -p 50000:50000 cosyvoice:v1.0 /bin/bash -c "cd /opt/CosyVoice/CosyVoice/runtime/python/fastapi && python3 server.py --port 50000 --model_dir iic/CosyVoice-300M && sleep infinity"
  cd fastapi && python3 client.py --port 50000 --mode <sft|zero_shot|cross_lingual|instruct>
  ```



  You can directly discuss on [Github Issues](https://github.com/FunAudioLLM/CosyVoice/issues).

  You can also scan the QR code to join our official Dingding chat group.

  <img src="./asset/dingding.png" width="250px">



  1. We borrowed a lot of code from [FunASR](https://github.com/modelscope/FunASR).
  2. We borrowed a lot of code from [FunCodec](https://github.com/modelscope/FunCodec).
  3. We borrowed a lot of code from [Matcha-TTS](https://github.com/shivammehta25/Matcha-TTS).
  4. We borrowed a lot of code from [AcademiCodec](https://github.com/yangdongchao/AcademiCodec).
  5. We borrowed a lot of code from [WeNet](https://github.com/wenet-e2e/wenet).


  The content provided above is for academic purposes only and is intended to demonstrate technical capabilities. Some examples are sourced from the internet. If any content infringes on your rights, please contact us to request its removal.


pkgId: 3ff84548ad160d9698849c15511187c37a9cb300c7be5bc3553f6d7a72658bd4
name: python-cot
arch: src
version: 2.2.1
epoch: 0
release: 1
summary: Common OVF Tool
url: https://github.com/glennmatthews/cot
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cot-2.2.1-1.src.rpm
checksum_type: sha256
description:
  COT: the Common OVF Tool
  ************************

  .. image:: https://img.shields.io/pypi/v/cot.svg
      :target: https://pypi.python.org/pypi/cot/
      :alt: Latest Version
  .. image:: https://img.shields.io/pypi/pyversions/cot.svg
      :target: https://pypi.python.org/pypi/cot
      :alt: Python Versions Supported
  .. image:: https://img.shields.io/badge/license-MIT-blue.svg
      :target: https://pypi.python.org/pypi/cot/
      :alt: License
  .. image:: https://travis-ci.org/glennmatthews/cot.svg?branch=master
      :target: https://travis-ci.org/glennmatthews/cot
      :alt: Build Status
  .. image:: https://codecov.io/gh/glennmatthews/cot/branch/master/graph/badge.svg
      :target: https://codecov.io/gh/glennmatthews/cot
      :alt: Coverage Status
  .. image:: https://readthedocs.org/projects/cot/badge/?version=latest
      :target: https://readthedocs.org/projects/cot/?badge=latest
      :alt: Documentation Status

  COT (the Common OVF Tool) is a tool for editing `Open Virtualization Format`_
  (``.ovf``, ``.ova``) virtual appliances, with a focus on virtualized network
  appliances such as the `Cisco CSR 1000V`_ and `Cisco IOS XRv`_ platforms.

  COT's capabilities include:

  * Add a disk or other file to an OVF/OVA
  * Edit OVF hardware information (CPUs, RAM, NICs, configuration profiles, etc.)
  * Edit product description information in an OVF/OVA
  * Edit OVF environment properties
  * Display a descriptive summary of the contents of an OVA or OVF package
  * Embed a bootstrap configuration text file into an OVF/OVA.
  * Remove files and disks from an OVF or OVA package
  * Deploy an OVF/OVA to an ESXi (VMware vSphere or vCenter) server to provision
    a new virtual machine (VM), including serial port configuration as needed.

  For more information, refer to the documentation_.

  .. _`Open Virtualization Format`: http://dmtf.org/standards/ovf
  .. _`Cisco CSR 1000V`: http://www.cisco.com/go/csr1000v
  .. _`Cisco IOS XRv`: http://www.cisco.com/go/iosxrv
  .. _documentation: http://cot.readthedocs.org/


pkgId: ea639786ea6c6a3c6bf948146afc48a5f7d7c35c6e1d5c14c320f72a2feda0a6
name: python-cot-reports
arch: src
version: 0.1.3
epoch: 0
release: 1
url: https://github.com/NDelventhal/cot_reports
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cot-reports-0.1.3-1.src.rpm
checksum_type: sha256
summary:
  is a Python library, which fetches the Commitments of Trader reports of the Commodity Futures Trading Commission (CFTC). The following COT reports are supported: Legacy Futures-only, Legacy Futures-and-Options, Supplemental Futures-and-Options, Disaggregated Futures-only, Disaggregated Futures-and-Options, Traders in Financial Futures (TFF) Futures-only and Traders in Financial Futures (TFF) Futures-and-Options.

description:
  <!-- TOC -->

  - [cot_reports](#cot-reports)
  - [Installation](#installation)
  - [Requirements](#requirements)
  - [Usage](#usage)
  - [Introduction to the COT reports](#introduction-to-the-cot-reports)
      - [Data release](#data-release)
      - [COT report types](#cot_report-types)
      - [Format of the reports](#format-of-the-reports)
      - [Classification methodology Legacy reports](#classification-methodology-Legacy-reports)
      - [Data aggregation](#data-aggregation)
      - [Use cases of the COT reports](#use-cases-of-the-COT-reports)
  - [Sources](#sources)
  - [Roadmap](#roadmap)
  - [License](#license)
  <!-- /TOC -->


  **cot_reports** is a Python library for fetching the Commitments of Trader reports of the Commodity Futures Trading Commission (CFTC). The following Commitments of Trader reports are supported: Legacy Futures-only, Legacy Futures-and-Options Combined, Supplemental Futures-and-Options Combined, Disaggregated Futures-only, Disaggregated Futures-and-Options Combined, Traders in Financial Futures (TFF) Futures-only and Traders in Financial Futures (TFF) Futures-and-Options Combined.

  Please note: The functionality of the libraries' functions may interrupt in case any changes in the publication occur or in case the website is not available.



  Use the package manager [pip](https://pip.pypa.io/en/stable/) to install cot_reports

  ```python
  pip install cot_reports
  ```
  Or install the library through the author's Github repository

  ```python
  pip install git+https://github.com/NDelventhal/cot_reports
  ```



  The following libraries are required:
  - pandas
  - requests
  - beautifulsoup4

  These libraries can be installed via the package manager [pip](https://pip.pypa.io/en/stable/).

  ```python
  pip install pandas requests beautifulsoup4
  ```



  Available report types with the corresponding 'cot_report_type' name used in the library:

  | report        | 'cot_report_type'|
  | ------------- |-------------|
  | Legacy Report Futures-only | 'legacy_fut'|
  | Legacy Report Futures-and-Options Combined | 'legacy_futopt'|
  | Supplemental Report Futures-and-Options combined  (short format) | 'supplemental_futopt'|
  | Disaggregated Report Futures-only | 'disaggregated_fut'|
  | Disaggregated Report Futures-and-Options Combined | 'disaggregated_futopt'|
  | Traders in Financial Futures (TFF) | 'traders_in_financial_futures_fut'|
  | Traders in Financial Futures (TFF) Futures-and-Options Combined | 'traders_in_financial_futures_futopt'|

  Usage examples:

  - ***cot_hist()*** downloads the compressed bulk files for the specified report (cot_report_type) starting  from 1986 (depending on the report type) up to 2016 and returns the data in a dataframe.

  - ***cot_year()*** downloads historical single year data for the specified report (cot_report_type) and returns the data in a dataframe (cot_report_type). If the current year is specified, the latest published data is fetched.

  - ***cot_all()*** downloads the complete available data, including the latest, of the specified report and returns the data in a dataframe (cot_report_type).

  - ***cot_all_reports()*** downloads all available historical information of the available COT reports and returns the data as seven dataframes.


  ```python
  import cot_reports as cot


  df = cot.cot_hist(cot_report_type= 'traders_in_financial_futures_futopt')



  df = cot.cot_year(year = 2020, cot_report_type = 'traders_in_financial_futures_fut')



  df = pd.DataFrame()
  begin_year = 2017
  end_year = 2020
  for i in range(begin_year, end_year + 1):
      single_year = pd.DataFrame(cot.cot_year(i, cot_report_type='legacy_futopt'))
      df = df.append(single_year, ignore_index=True)


  df = cot.cot_all(cot_report_type='legacy_fut')

  ```



  To promote its goals of integrity, resilience and vibrancy of the U.S. derivatives markets through regulation, the U.S. Commodity Futures Trading Commission (CFTC) relies on collected data to conduct its functions. The CFTC's functions:

    - market oversight
    - monitoring for liquidity and systemic risk
    - oversight of market participants
    - regulatory compliance
    - enforcement of the Commodity Exchange Act (CEA)

  In order to conduct these functions, data is seen as a critical asset to the CFTC, which states to have been one of the first federal agencies who implemented a data management organization in 2011. The CFTC is not solely collecting but also publishing a variety of reports on the derivative markets under its jurisdiction. These reports include the Commitment of Traders (COT) reports.

  Through the publication of the COT reports the CFTC claims 'to help the public to understand market dynamics.'

  The COT reports provide a breakdown of each Tuesday’s open interest for futures and options on futures markets in which 20 or more traders hold positions equal to or above the reporting levels established by the CFTC.

  The data is reported to the CFTC by firms, such as:

    - futures commission merchants (FCMs)
    - clearing members
    - foreign brokers
    - exchanges

  The actual trader classification is based on the predominant business purpose, which is self-reported by traders on the CFTC Form 401. The classification of a trader can vary for different commodities/markets, if the reported business purposes differ. However, the classifications are subject to review and corrections by the CFTC.



  The data, which is generally released each Friday at 3:30 pm Eastern time, comes with a lag of three days, as the reported data is typically from previous Tuesday (close). According to the commission the firms report to the CFTC on Wednesday morning. Next, the provided information is then subject to corrections and verifications by the CFTC prior to the release on Friday.



  The types of the COT reports:

  1. Legacy

      - physical contracts & non-physical contracts
      - reportable position classifications:
          - non-commercial
          - commercial traders
      - available as Futures-only and Futures-and-Options Combined reports
      - available from 1986 and 1995
      - available in long and short format

  2. Supplemental

      - selected agricultural commodity contracts
      - Supplemental reports break down the reportable open interest positions into three trader classifications
      - reportable position classifications:
          - non-commercial
          - commercial
          - index traders
      - available as Futures-and-Options Combined report
      - available from 2006
      - available in short format
      - Why was this report established? With the publication of the Supplemental COT report the CFTC has reacted on the rise of index traders. The commission started to publish the Supplemental report starting in 2006 with a further trader categorization of index traders for selected agricultural products to prevent a blending of traditional commercial positions and also of traditional non-commercial position with index funds positions. With the newly introduced classification of index traders misinterpretation related to export activity buying or selling end-user are avoided, by differentiating between traditional and non-traditional hedgers as well as between traditional non-commercial and index funds open interest. In general from the non-commercial category managed funds, pension funds and other institutional investors that are generally seeking exposure to commodity prices as an asset class in an unleveraged and passively-managed manner through standardized commodity indices are drawn into the index trader categorization. From the commercial category entities, whose positions predominantly reflect hedging of OTC transactions through commodity indices, are drawn into the index trader categorization. The Supplemental reports solved a disadvantage with respect to the usefulness of the information and serves the original intent in publishing the COT data better by enhancing the transparency.


  3. Disaggregated

      - data on physical contracts, such as contracts on agricultural products, petroleum products, natural gas products etc.
      - reportable position classifications:
          - Producer/Merchant/Processor/User
          - Swap Dealers
          - Managed Money
          - Other Reportable
      - available as Futures-only and Futures-and-Options Combined reports
      - available from 2006
      - available in long and short format

  4. Traders in Financial Futures

      - data based on non-physical contracts
      - reportable position classifications:
          - Dealer/Intermediary
          - Asset Manager/Institutional
          - Leveraged Funds
          - Other Reportable
      - available as Futures-only and Futures-and-Options Combined reports
      - available from 2006
      - available in long format


  The COT reports are either available in the short format, the long format or both - as specified above. Within the long format, aside from the additional listing of the concentrations of positions held by the largest four and largest eight traders, the data is grouped by crop year, where appropriate. Except, where not available (cot report type: Supplemental), the library accesses the long format.


  Aggregations occur in the reports not only in the classification of the trader, but also by merging future positions with differing expiration dates. Due to this handling continuous sentiment data on a product, referred to as market by the CFTC and within the COT reports, can be derived. As the data is highly aggregated, any results derived from the data should be interpreted with caution.



  Not only does the Legacy Futures-only COT report offer the greatest available historical data dating back to 1986, the Legacy reports also contain the most markets in comparison to the other COT report types. Unlike the others, the Legacy reports contain data on physical delivery contracts and non-physical delivery (financial) contracts. While the Supplemental and the Disaggregated reports are limited to physical delivery contracts, the Traders in Financial Futures reports are limited to non-physical financial contracts.

  Classification Methodology: Legacy reports

  The positions of the market participants in the Legacy reports are broken down into:

  - Commercials
      - market participants who use futures contracts for hedging as defined in CFTC Regulation 1.3, 17 CFR 1.3(z) and which hold positions equal to or above the reporting levels established by the CFTC
      - CFTC Form 40 declaration: the trader is engaged in business activities, which can be hedged by the use of futures (or options)
      - Example: A gold mining company, such as Goldcorp or Barrick Gold, would be classified as commercials in gold futures, as well as other merchants, processors or users buying and selling Gold
      - using descriptions of the other reports I derive the commercials to contain primarily producer/merchant/processor/user and swap dealers

  - Non-commercials
      - market participant whose positions equal or are above the reporting levels of by the CFTC and are not considered as commercials
      - As a consequence this group is derived to have speculative interest and is commonly considered as speculators
      - using descriptions of the other reports I derive the non-commercials to contain primarily managed money, asset manager/institutional and leveraged funds

  - Non-reportable
      - these market participants hold positions below the reporting levels of the CFTC
      - while the to the CFTC reporting firms are not informing the commission on this group, the aggregated non-reportable positions are nevertheless known to the CFTC through its information on the open interest data (and the reported commercials and non-commercials details)



  There are numerous, partially overlapping, use cases for the COT data of the CFTC.
  Here are the ones I can think of:

  1. Regulatory/Academic:
      - formulate recommendations to the CFTC, such as
          - enlarging transparency
          - establishing new monitoring facilities through Machine Learning
          - adding specific changes to the report to improve detecting misbehaviours of markets participants
      - analyse effects of past regulatory changes and regulatory demands
      - analyse price manipulations (this may only be identifiable through the CFTC’s confidential trader-level data, which is not accessible, but less aggregated data than publicly available has been provided to a number of researchers in the past)
      - add research/recommendations on limiting speculative bets on commodities
      - evaluate if other trading commissions (other countries) should establish a COT like database to combat misbehauviours and as a screening tool for market risks
      - analyse the usage of leverage and possible worst case scenarios targeting preventions of financial harm to commercials/investors

  2. Central banks:
      - assess liquidity and systemic risk
      - assess bets on/against a currency, evaluate impact of decisions or costs of defending a thresshold in a currency pair; example: the Swiss National Bank (SNB) defended the 1.2 level in the EUR/CHF pair for years up until early 2015 and artificially stabilized the currency through activities, particularly in the treasuries and currency markets (including other CHF cross pairs). Further, the SNB's decision to not continue the support of the price limit caused a significant shock to the EUR/CHF price due to massive long exposure/herding of speculators and a severe liquidity shortage below the mark of 1.2.

  3. Market participants:
      - Producers/Merchants:
          - can monitor the behaviour of their competitors to time actions (hedge positions) or other strategic decisions; example: a farmer might decide on what to grow next season based on the commercial position
      - Speculators:
          - evaluate if information is priced in (high vs. low position changes after events with potentially high impact)
          - analyse the behaviour of competitors
          - detect the 'mood of the markets' (risk aversion or risk appetite of market participants)
          - derive trading approaches

  4. Market observers:
       - for buy-side analysts research
       - for coverage of financial journalists
       - monitoring of changes in positions or their values in a comparable metric, once derived, such as the U.S. dollar

  5. (Behavioural) Finance:
      - add value to the research of market dynamics and trends/herding
      - analyse reactions/changes in positions prior and following market events, such as interest rate decisions or other macroeconomic factors/shocks
      - comparison/understanding of not only changes in price, but also activities in the markets
      - effects of political events or geopolitical events
      - detecting mispricing through extremes in the position

  6. Data vendors:
      - hosting data in a cleaned form (as the data contains somes cleanable parts) for enhanced frictionless access

  7. Acceptance of new technologies through commercial activities
      - analysis of the acceptance of new technologies, through a screening if evidence for increased commercial interest activities can be found; example: commercial activities in Bitcoin futures at the Chicago Mercantile Exchange (CME)




  - COT reports data source:
      - [Commitments of Traders - Historical Compressed](https://www.cftc.gov/MarketReports/CommitmentsofTraders/HistoricalCompressed/index.htm)
  - Sources of the above information on the CFTC and the COT reports:
      - [CFTC About: Mission](https://cftc.gov/About/Mission/index.htm)
      - [CFTC Market Reports: Commitments of Traders](https://cftc.gov/MarketReports/CommitmentsofTraders/index.htm)
      - [CFTC Commission Actions in Response to the 'Comprehensive Review of the Commitments of Traders Reporting Program' (June 21, 2006)](https://www.cftc.gov/sites/default/files/idc/groups/public/@commitmentsoftraders/documents/file/noticeonsupplementalcotrept.pdf)
      - [CFTC FORM 40 STATEMENT OF REPORTING TRADER](https://www.cftc.gov/sites/default/files/idc/groups/public/@forms/documents/file/cftcform40.pdf)




  - creation of the predecessor of this library within the seminar course 'Statistical Programming and Open Science Methods (PhD-level)' of the Humboldt University of Berlin (Q1 2020)
  - adding library to The Python Package Index (PyPI)




  This project is licensed under the [MIT License](https://github.com/NDelventhal/cot_reports/blob/main/LICENSE).



  - The author: Niall Delventhal - ni.delventhal@gmail.com


pkgId: 0154c5499c28c471050ef0fc5a2827c9d09121834842a5838776045eff0ca472
name: python-cotdantic
arch: src
version: 2.0.0
epoch: 0
release: 1
summary: Pythonic coursor-on-target xml/protobuf generation using pydantic
url: https://github.com/RaubCamaioni/cotdantic
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cotdantic-2.0.0-1.src.rpm
checksum_type: sha256
description:
  Pythonic generation of Coursor-On-Target (COT) messages (xml/protobuf).
  Provides pydantic_xml models with type completion and verification.
  Easy transformation between xml and protobuf.
  Human readable cot type construction.



  [takproto](https://takproto.readthedocs.io/en/latest): Encoding of XML to protobuf
  [pydantic_xml](https://pydantic-xml.readthedocs.io/en/latest/): Python pydantic models to XML
  [pytak](https://pytak.readthedocs.io/en/latest/examples/): Wealth of COT/TAK format information
  [cot_types](https://github.com/dB-SPL/cot-types): Cot type to human readable mapping
  [MIL STD 2525](http://everyspec.com/MIL-STD/MIL-STD-2000-2999/MIL-STD-2525B_CHG-2_20725/#:~:text=These%20symbols%20are%20designed%20to%20enhance%20DOD%60s%20joint%20warfighting%20interoperability): cot type symbols
  [tak.gov](https://tak.gov/): Governing body of ATAK, Wintak, and other TAK based protocols
  [dev_guide](https://nps.edu/documents/104517539/109705106/COT+Developer+Guide.pdf/cb125ac8-1ed1-477b-a914-7557c356a303#:~:text=What%20is%20Cursor-on-Target?%20In%20a%20nutshell,): developer outline of COT messages
  [tak_miter](https://www.mitre.org/sites/default/files/pdf/09_4937.pdf): in-depth cot descriptions



  This package includes a curses cli tool.
  Situational Awareness (SA) messages are printed in the main window.
  Contacts are listed in the contacts window.
  Chat messages are listed in the chat window, messages are automatically echoed back to sender.
  Select window with left, right, arrow keys.
  Scroll window with up, down, arrow keys.
  Scroll to end with backspace key.
  Default gateway interface used by default.
  ```
  cotdantic --help
  usage: cotdantic [-h] [--maddress MADDRESS] [--mport MPORT] [--minterface MINTERFACE] [--gaddress GADDRESS] [--gport GPORT] [--ginterface GINTERFACE] [--address ADDRESS] [--interface INTERFACE] [--uport UPORT]
                   [--tport TPORT] [--debug DEBUG] [--unicast {tcp,udp}]

  options:
    -h, --help            show this help message and exit
    --maddress MADDRESS   SA address (default: 239.2.3.1)
    --mport MPORT         SA port (default: 6969)
    --minterface MINTERFACE
                          SA interface (default: default-gateway)
    --gaddress GADDRESS   Chat address (default: 224.10.10.1)
    --gport GPORT         Chat port (default: 17012)
    --ginterface GINTERFACE
                          Chat interface (default: default-gateway)
    --address ADDRESS     default TCP/UDP send address (default: default-gateway)
    --interface INTERFACE
                          TCP/UDP bind interface (default: default-gateway)
    --uport UPORT         TCP port (default: 17012)
    --tport TPORT         UDP port (default: 4242)
    --debug DEBUG         Print debug information (default: False)
    --unicast {tcp,udp}   Endpoint protocol (default: tcp)
  ```

  ![cli-tool](/images/cli_tool.png)

  A docker build is included for multicast docker testing.
  For multicast to reach inside a docker network=host must be set.



  Object based creation of COT.
  Common fields have default values.
  Optional fields are excluded from XML/Protobuf.

  Creation of COT python model
  ```python
  from cotdantic import *
  from uuid import uuid4

  uid = str(uuid4())
  cot_type = str(atom.friend.ground.unit.combat.infantry)

  point = Point(lat=38.711, lon=-77.147, hae=10, ce=5.0, le=10.0)
  contact = Contact(callsign='Delta1', endpoint='192.168.0.100:4242:tcp')
  group = Group(name='Cyan', role='Team Member')
  detail = Detail(contact=contact, group=group)
  cot_model = Event(
  	uid=uid,
  	type=cot_type,
  	point=point,
  	detail=detail,
  )
  ```
  COT Model
  ```python
  type='a-f-G-U-C-I' point=Point(lat=38.711, lon=-77.147, hae=10.0, le=10.0, ce=5.0) version=2.0 uid='c56af374-52f6-4c8a-bd1d-8f48e7ebb21b' how='m-g' time='2024-10-12T20:42:31.12Z' start='2024-10-12T20:42:31.12Z' stale='2024-10-12T20:47:31.12Z' qos=None opex=None access=None detail=Detail(contact=Contact(callsign='Delta1', endpoint='192.168.0.100:4242:tcp', phone=None), takv=None, group=Group(name='Cyan', role='Team Member'), status=None, track=None, precision_location=None, link=[], alias=None, image=None, video=None)
  ```


  COT XML
  ```python

  xml_b: bytes = cot_model.to_xml(pretty_print=True)
  xml_s: str = xml_b.decode()
  ```
  ```xml
  <event type="a-f-G-U-C-I" version="2.0" uid="c56af374-52f6-4c8a-bd1d-8f48e7ebb21b" how="m-g" time="2024-10-12T20:42:31.12Z" start="2024-10-12T20:42:31.12Z" stale="2024-10-12T20:47:31.12Z">
    <point lat="38.711" lon="-77.147" hae="10.0" le="10.0" ce="5.0"/>
    <detail>
      <contact callsign="Delta1" endpoint="192.168.0.100:4242:tcp"/>
      <__group name="Cyan" role="Team Member"/>
    </detail>
  </event>
  ```
  COT PROTOBUF
  ```python
  proto = bytes(cot_model)
  ```
  ```python
  b'\xbf\x01\xbf\x12\xb3\x01\n\x0ba-f-G-U-C-I*$c56af374-52f6-4c8a-bd1d-8f48e7ebb21b0\xd0\xde\xdf\x93\xa828\xd0\xde\xdf\x93\xa82@\xb0\x86\xf2\x93\xa82J\x03m-gQ^\xbaI\x0c\x02[C@Y\xc5 \xb0rhIS\xc0a\x00\x00\x00\x00\x00\x00$@i\x00\x00\x00\x00\x00\x00\x14@q\x00\x00\x00\x00\x00\x00$@z7\x12 \n\x16192.168.0.100:4242:tcp\x12\x06Delta1\x1a\x13\n\x04Cyan\x12\x0bTeam Member'
  ```



  The below handles custom detail tags.
  ```python
  from pydantic_xml import attr, element
  from typing import Optional
  from cotdantic import *


  class CustomElement(CotBase, tag='target_description'):
  	hair_color: str = attr()
  	eye_color: str = attr()


  class CustomDetail(Detail):
  	description: Optional[CustomElement] = element(default=None)


  class CustomEvent(EventBase[CustomDetail]):
  	pass

  ```
  Same usage schema for xml and protobuf.
  See tests for more details.
  ```python
  custom_event = CustomEvent(...)
  xml = custom_event.to_xml()
  proto = bytes(custom_event)
  CustomEvent.from_bytes(proto)
  ```

  Alternativly, if the extention is simplistic, the following can be used to add custom detail elements.
  The below raw_xml will be added to the protobuf and XML.
  ```
  detail = Detail()
  detail.raw_xml = b"<target_description hair_color="red" eye_color="brown"/>"
  ```


  The protobuf xml detail string is stored in Detail.raw_xml.
  The raw_xml field contains all the XML tags not defined by the model.
  These tags are added back when encoded to protobuf or XML.




  Development of the available cot types is not comprehensive.
  Eventually all cot types should be accessable from the following type-completing syntax.
  ```python
  from cotdantic import atom
  print(atom.friend.ground.unit.combat.infantry)
  ```
  ```
  a-f-G-U-C-I
  ```

rpm_license:
  MIT License  Copyright (c) 2024 Raub Camaioni  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: 6f7f2a0a761b773fd5bb13f7453d6dc82f4886339b46a6f7e6347c22f8fa718f
name: python-cotede
arch: src
version: 0.23.9
epoch: 0
release: 1
summary: Quality Control of Oceanographic Data
url: https://pypi.org/project/cotede/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cotede-0.23.9-1.src.rpm
checksum_type: sha256
rpm_license:
  Copyright (c) 2011-2023, Guilherme Pimenta Castelão  All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the CoTeDe Team 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: 0876e16cc57e3bb818e719e8e57de5c37cbd01f70c78d3754df5f5016db749e8
name: python-cotengra
arch: src
version: 0.6.2
epoch: 0
release: 1
summary: Hyper optimized contraction trees for large tensor networks and einsums.
url: https://github.com/jcmgray/cotengra
rpm_license: Apache
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cotengra-0.6.2-1.src.rpm
checksum_type: sha256
description:
  <p align="left"><img src="https://imgur.com/OM5XyaD.png" alt="cotengra" width="400px"></p>

  [![tests](https://github.com/jcmgray/cotengra/actions/workflows/test.yml/badge.svg)](https://github.com/jcmgray/cotengra/actions/workflows/test.yml)
  [![codecov](https://codecov.io/gh/jcmgray/cotengra/branch/main/graph/badge.svg?token=Q5evNiuT9S)](https://codecov.io/gh/jcmgray/cotengra)
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/84f825f5a7044762be62600c0650473d)](https://app.codacy.com/gh/jcmgray/cotengra/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
  [![Docs](https://readthedocs.org/projects/cotengra/badge/?version=latest)](https://cotengra.readthedocs.io)
  [![PyPI](https://img.shields.io/pypi/v/cotengra?color=teal)](https://pypi.org/project/cotengra/)
  [![Anaconda-Server Badge](https://anaconda.org/conda-forge/cotengra/badges/version.svg)](https://anaconda.org/conda-forge/cotengra)

  `cotengra` is a python library for contracting tensor networks or einsum
  expressions involving large numbers of tensors - the main docs can be found
  at [cotengra.readthedocs.io](https://cotengra.readthedocs.io/).
  Some of the key feautures of `cotengra` include:

  * drop-in ``einsum`` replacement
  * an explicit **contraction tree** object that can be flexibly built, modified and visualized
  * a **'hyper optimizer'** that samples trees while tuning the generating meta-paremeters
  * **dynamic slicing** for massive memory savings and parallelism
  * support for **hyper** edge tensor networks and thus arbitrary einsum equations
  * **paths** that can be supplied to [`numpy.einsum`](https://numpy.org/doc/stable/reference/generated/numpy.einsum.html), [`opt_einsum`](https://dgasmith.github.io/opt_einsum/), [`quimb`](https://quimb.readthedocs.io/en/latest/) among others
  * **performing contractions** with tensors from many libraries via [`cotengra`](https://github.com/jcmgray/autoray),
    even if they don't provide `einsum` or `tensordot` but do have (batch) matrix
    multiplication

  <p align="center"><img src="https://imgur.com/jMO138y.png" alt="cotengra" width="500px"></p>


pkgId: 3937947143ae605156a974694c83462e9dc3271344562a88997878d32e8a7e9a
name: python-cottonformation
arch: src
version: 1.1.2
epoch: 0
release: 1
url: https://github.com/MacHu-GWU/cottonformation-project
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cottonformation-1.1.2-1.src.rpm
checksum_type: sha256
summary:
  Modern CloudFormation Python tool with Type hint, Parameter hint, Doc hint + Auto Validation in Real Objective Programming Style.


pkgId: dd72e6e88c890157bd7e13601eb91b32cab309583dfa4f18e1599590b19ad963
name: python-couchformation
arch: src
version: 4.0.0
epoch: 0
release: 1
summary: Couchbase Cloud Automation
url: https://github.com/couchbaselabs/couch-formation-core
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-couchformation-4.0.0-1.src.rpm
checksum_type: sha256
description:
  ![](doc/couch-formation-1.png)

  Toolset for running and managing Couchbase assets in the cloud.



  > This package is **NOT SUPPORTED BY COUCHBASE**. The toolset is under active development, therefore features and functionality can change.


  - Python 3.8+
  - Cloud CLI/SDKs
    - [AWS CLI](https://aws.amazon.com/cli/)
    - [Google Cloud CLI](https://cloud.google.com/sdk/docs/quickstart)
    - [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
  - Homebrew (for macOS)



  ````
  pip install --user couchformation
  ````
  ````
  export PATH=$(python -m site --user-base)/bin:$PATH
  ````


  Create virtual environment:
  ````
  python -m venv couchformation
  ````
  Activate virtual environment:
  ````
  . couchformation/bin/activate
  ````
  Install Couch Formation into the virtual environment:
  ````
  pip install couchformation
  ````

  ````
  couchformation\Scripts\activate.bat
  ````

  ````
  couchformation\Scripts\Activate.ps1
  ````

  ````
  pip install --user git+https://github.com/couchbaselabs/couch-formation-core
  ````



  ````
  cloudmgr create --build cbs --cloud gcp --project test-gcp --name test-cluster --region us-central1 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 4x16
  ````

  ````
  cloudmgr deploy --project test-gcp
  ````



  ```
  cloudmgr create --build cbs --cloud aws --project dev01 --name testdb01 --region us-east-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```

  ```
  cloudmgr add --build cbs --cloud aws --project dev01 --name testdb01 --region us-east-2 --quantity 2 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32 --services analytics
  ```


  Configure a 3 node Couchbase Server cluster in US Ease, another 3 node Couchbase Server cluster in US West, plus a Linux generic node and a Windows generic node to run an application.
  ```
  cloudmgr create --build cbs --cloud aws --project dev01 --name source01 --region us-east-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```
  ```
  cloudmgr create --build cbs --cloud aws --project dev01 --name target01 --region us-west-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```
  ```
  cloudmgr create --build generic --cloud aws --project dev01 --name app01 --region us-east-2 --quantity 1 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```
  ```
  cloudmgr create --build generic --cloud aws --project dev01 --name app02 --region us-east-2 --quantity 1 --os_id windows --os_version 2022 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```


  ```
  cloudmgr create --build cbs --cloud aws --project test-db --name testdb --region us-east-1 --auth_mode sso --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --os_id ubuntu --os_version 22.04 --machine_type 8x32 --quantity 3 --tags user:john.doe@example.com
  ```


  ```
  cloudmgr create --build cbs --cloud aws --project eventing --name eventing01 --region us-east-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32 --services data,index,query,eventing
  ```



  ```
  cloudmgr create --build cbs --cloud aws --project sgw-dev01 --name devdb01 --region us-east-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 4x16
  ```

  ```
  cloudmgr create --build sgw --cloud aws --project sgw-dev01 --name gateway --region us-east-2 --quantity 1 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 4x16 --connect devdb01
  ```


  For Capella the Couch Formation project aligns with the Capella project.
  ```
  cloudmgr create --build capella --cloud capella --project test-project --name test-cluster --profile pytest --region us-east-2 --quantity 3 --provider aws --machine_type 4x16
  ```
  Optionally create an app service (Sync Gateway in Capella) and attach it to a Capella database.
  ```
  cloudmgr create --build capella --cloud capella --project test-project --name test-app-svc --profile pytest --quantity 2 --machine_type 4x8 --type mobile --connect test-cluster
  ```


  ```
  cloudmgr create --build columnar --cloud capella --project test-project --name test-cluster --profile pytest --provider aws --region us-east-1 --machine_type 4x32 --quantity 1
  ```


  Use the `--peer_project` argument to provide a project for peering:
  ```
  cloudmgr create --build capella --cloud capella --project test-capella --name testdb --profile test --provider aws --region us-east-1 --cidr 10.12.4.0/23 --machine_type 8x32 --quantity 3 --peer_project test-node
  ```

  Deploy the peer project (if not already deployed):
  ```
  cloudmgr deploy --project test-node
  ```
  Then deploy the Capella project:
  ```
  cloudmgr deploy --project test-capella
  ```
  NOTE: Automatic peering is only supported with AWS and GCP.



  ```
  cloudmgr destroy --project dev01
  ```


  ```
  cloudmgr list --project dev01
  ```


  ```
  cloudmgr deploy --project dev01 --name source01
  ```


  ```
  cloudmgr list
  ```


  ```
  cloudmgr show --project dev01
  ```


  ```
  cloudmgr cli --project dev01
  ```


  ```
  cloudmgr update --project dev01 --name node --machine_type 8x32
  ```


  ```
  cloudmgr update --project dev01 --name testdb --group 2 --machine_type 4x16
  ```



  ```
  aws configure sso
  ```

  Use the auth_mode option to enable SSO integration. Couch Formation will open a browser for you to complete the SSO process, or you will have to paste the link provided into a browser to continue.
  ```
  cloudmgr create --build cbs --cloud aws --project dev01 --name testdb01 --auth_mode sso --region us-east-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```


  Configure the AWS CLI via an appropriate method based on your IAM settings. For example use ```aws configure``` to configure long term credentials, or manually set the access parameters in ```.aws/credentials``` or with environment variables. Couch Formation accepts an optional ```--profile``` service configuration parameter to use a specific auth profile. Check [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html#getting-started-quickstart-new) for more information.


  For Google Cloud use ```gcloud auth application-default login``` to configure CLI access.  Check [here](https://cloud.google.com/sdk/gcloud/reference/auth) for more information.


  For Azure use ```az login``` to configure CLI access. Check [here](https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-interactively) for more information.


  The automation for Capella uses the v4 public API. To use the automation, set the `capella.token` and `capella.user` configuration parameters.
  ```
  cloudmgr config set capella.token dGhpcyBpcyBhIHNhbXBsZSBzdHJpbmcgZm9yIFJFQURNRS5tZC4uCg==
  cloudmgr config set capella.user john.doe@example.com
  ```
  By default, the Couch Formation project is used as the Capella project. To use a different Capella project, set the `capella.project` parameter.
  ```
  cloudmgr config set capella.project my-project
  ```

  Download and install a 64-bit version of Python 3.8+ from [here](https://www.python.org/downloads/windows/). Use the ```Run as Administrator``` option to start PowerShell and then install Couch Formation with ```pip```. Once the installation is complete, it will be available for all users (launch a PowerShell window as your login user to use Couch Formation). You should install the ```wheel``` pacakge before you install Couch Formation.
  ```
  pip3 install wheel
  ```
  ```
  pip3 install couchformation
  ```

  | Parameter       | Description                |
  |-----------------|----------------------------|
  | capella.token   | Capella API token          |
  | capella.user    | Capella user email address |
  | capella.user.id | Capella user ID            |
  | capella.project | Capella project            |


  | ID            | Operating System         | Versions     | AWS User      | GCP User  | Azure User |
  |---------------|--------------------------|--------------|---------------|-----------|------------|
  | amzn          | Amazon Linux             | 2, 2023      | ec2-user      | N/A       | N/A        |
  | rhel          | Red Hat Enterprise Linux | 8, 9         | ec2-user      | admin     | rhel       |
  | centos        | CentOS                   | 8            | centos        | centos    | centos     |
  | ol            | Oracle Linux             | 8, 9         | ec2-user      | N/A       | N/A        |
  | rocky         | Rocky Linux              | 8, 9         | rocky         | rocky     | N/A        |
  | fedora        | Fedora                   | 34           | core          | fedora    | N/A        |
  | sles          | SUSE Linux               | 12, 15       | ec2-user      | admin     | sles       |
  | opensuse-leap | openSUSE                 | 15           | ec2-user      | admin     | sles       |
  | ubuntu        | Ubuntu Linux             | 20.04, 22.04 | ubuntu        | ubuntu    | ubuntu     |
  | debian        | Debian Linux             | 10, 11       | admin         | admin     | debian     |
  | windows       | Windows Server           | 2019, 2022   | Administrator | adminuser | adminuser  |
  | macos         | macOS                    | 13, 14       | ec2-user      | N/A       | N/A        |



  | Build Type | Description                     |
  |------------|---------------------------------|
  | cbs        | Couchbase Server                |
  | cbscert    | Couchbase Server with cert auth |
  | cbsc       | Couchbase Community Edition     |
  | sgw        | Sync Gateway                    |
  | capella    | Capella Database                |
  | columnar   | Capella Columnar                |
  | generic    | Base configured node from image |
  | database   | Generic database node           |
  | windev     | Windows development host        |


  Log files are written to ```.config/couch-formation/log```.
  <br><br>
  To create a support bundle with diagnostic information, use the ```dump``` command.
  ```
  cloudmgr dump
  ```


pkgId: b511cc0a380904a0e7e601553b178276f68bc687d8a401839e55d858f8a09874
name: python-couchformation
arch: src
version: 4.0.1
epoch: 0
release: 1
summary: Couchbase Cloud Automation
url: https://github.com/couchbaselabs/couch-formation-core
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-couchformation-4.0.1-1.src.rpm
checksum_type: sha256
description:
  ![](doc/couch-formation-1.png)

  Toolset for running and managing Couchbase assets in the cloud.



  > This package is **NOT SUPPORTED BY COUCHBASE**. The toolset is under active development, therefore features and functionality can change.


  - Python 3.8+
  - Cloud CLI/SDKs
    - [AWS CLI](https://aws.amazon.com/cli/)
    - [Google Cloud CLI](https://cloud.google.com/sdk/docs/quickstart)
    - [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
  - Homebrew (for macOS)



  ````
  pip install --user couchformation
  ````
  ````
  export PATH=$(python -m site --user-base)/bin:$PATH
  ````


  Create virtual environment:
  ````
  python -m venv couchformation
  ````
  Activate virtual environment:
  ````
  . couchformation/bin/activate
  ````
  Install Couch Formation into the virtual environment:
  ````
  pip install couchformation
  ````

  ````
  couchformation\Scripts\activate.bat
  ````

  ````
  couchformation\Scripts\Activate.ps1
  ````

  ````
  pip install --user git+https://github.com/couchbaselabs/couch-formation-core
  ````



  ````
  cloudmgr create --build cbs --cloud gcp --project test-gcp --name test-cluster --region us-central1 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 4x16
  ````

  ````
  cloudmgr deploy --project test-gcp
  ````



  ```
  cloudmgr create --build cbs --cloud aws --project dev01 --name testdb01 --region us-east-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```

  ```
  cloudmgr add --build cbs --cloud aws --project dev01 --name testdb01 --region us-east-2 --quantity 2 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32 --services analytics
  ```


  Configure a 3 node Couchbase Server cluster in US Ease, another 3 node Couchbase Server cluster in US West, plus a Linux generic node and a Windows generic node to run an application.
  ```
  cloudmgr create --build cbs --cloud aws --project dev01 --name source01 --region us-east-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```
  ```
  cloudmgr create --build cbs --cloud aws --project dev01 --name target01 --region us-west-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```
  ```
  cloudmgr create --build generic --cloud aws --project dev01 --name app01 --region us-east-2 --quantity 1 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```
  ```
  cloudmgr create --build generic --cloud aws --project dev01 --name app02 --region us-east-2 --quantity 1 --os_id windows --os_version 2022 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```


  ```
  cloudmgr create --build cbs --cloud aws --project test-db --name testdb --region us-east-1 --auth_mode sso --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --os_id ubuntu --os_version 22.04 --machine_type 8x32 --quantity 3 --tags user:john.doe@example.com
  ```


  ```
  cloudmgr create --build cbs --cloud aws --project eventing --name eventing01 --region us-east-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32 --services data,index,query,eventing
  ```



  ```
  cloudmgr create --build cbs --cloud aws --project sgw-dev01 --name devdb01 --region us-east-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 4x16
  ```

  ```
  cloudmgr create --build sgw --cloud aws --project sgw-dev01 --name gateway --region us-east-2 --quantity 1 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 4x16 --connect devdb01
  ```


  For Capella the Couch Formation project aligns with the Capella project.
  ```
  cloudmgr create --build capella --cloud capella --project test-project --name test-cluster --profile pytest --region us-east-2 --quantity 3 --provider aws --machine_type 4x16
  ```
  Optionally create an app service (Sync Gateway in Capella) and attach it to a Capella database.
  ```
  cloudmgr create --build capella --cloud capella --project test-project --name test-app-svc --profile pytest --quantity 2 --machine_type 4x8 --type mobile --connect test-cluster
  ```


  ```
  cloudmgr create --build columnar --cloud capella --project test-project --name test-cluster --profile pytest --provider aws --region us-east-1 --machine_type 4x32 --quantity 1
  ```


  Use the `--peer_project` argument to provide a project for peering:
  ```
  cloudmgr create --build capella --cloud capella --project test-capella --name testdb --profile test --provider aws --region us-east-1 --cidr 10.12.4.0/23 --machine_type 8x32 --quantity 3 --peer_project test-node
  ```

  Deploy the peer project (if not already deployed):
  ```
  cloudmgr deploy --project test-node
  ```
  Then deploy the Capella project:
  ```
  cloudmgr deploy --project test-capella
  ```
  NOTE: Automatic peering is only supported with AWS and GCP.



  ```
  cloudmgr destroy --project dev01
  ```


  ```
  cloudmgr list --project dev01
  ```


  ```
  cloudmgr deploy --project dev01 --name source01
  ```


  ```
  cloudmgr list
  ```


  ```
  cloudmgr show --project dev01
  ```


  ```
  cloudmgr cli --project dev01
  ```


  ```
  cloudmgr update --project dev01 --name node --machine_type 8x32
  ```


  ```
  cloudmgr update --project dev01 --name testdb --group 2 --machine_type 4x16
  ```


  ```
  cloudmgr remove --project dev01 --name testdb
  ```


  ```
  cloudmgr clean --project dev01
  ```


  ```
  cloudmgr ssh create
  ```


  ```
  cloudmgr config set ssh.key /Users/jdoe/.ssh/jdoe-default-key-pair.pem
  ```



  ```
  aws configure sso
  ```

  Use the auth_mode option to enable SSO integration. Couch Formation will open a browser for you to complete the SSO process, or you will have to paste the link provided into a browser to continue.
  ```
  cloudmgr create --build cbs --cloud aws --project dev01 --name testdb01 --auth_mode sso --region us-east-2 --quantity 3 --os_id ubuntu --os_version 22.04 --ssh_key /Users/jdoe/.ssh/jdoe-default-key-pair.pem --machine_type 8x32
  ```


  Configure the AWS CLI via an appropriate method based on your IAM settings. For example use ```aws configure``` to configure long term credentials, or manually set the access parameters in ```.aws/credentials``` or with environment variables. Couch Formation accepts an optional ```--profile``` service configuration parameter to use a specific auth profile. Check [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html#getting-started-quickstart-new) for more information.


  For Google Cloud use ```gcloud auth application-default login``` to configure CLI access.  Check [here](https://cloud.google.com/sdk/gcloud/reference/auth) for more information.


  For Azure use ```az login``` to configure CLI access. Check [here](https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-interactively) for more information.


  The automation for Capella uses the v4 public API. To use the automation, set the `capella.token` and `capella.user` configuration parameters.
  ```
  cloudmgr config set capella.token dGhpcyBpcyBhIHNhbXBsZSBzdHJpbmcgZm9yIFJFQURNRS5tZC4uCg==
  cloudmgr config set capella.user john.doe@example.com
  ```
  By default, the Couch Formation project is used as the Capella project. To use a different Capella project, set the `capella.project` parameter.
  ```
  cloudmgr config set capella.project my-project
  ```

  Download and install a 64-bit version of Python 3.8+ from [here](https://www.python.org/downloads/windows/). Use the ```Run as Administrator``` option to start PowerShell and then install Couch Formation with ```pip```. Once the installation is complete, it will be available for all users (launch a PowerShell window as your login user to use Couch Formation). You should install the ```wheel``` pacakge before you install Couch Formation.
  ```
  pip3 install wheel
  ```
  ```
  pip3 install couchformation
  ```

  | Parameter       | Description                      |
  |-----------------|----------------------------------|
  | aws.tags        | Default tags for AWS deployments |
  | capella.token   | Capella API token                |
  | capella.user    | Capella user email address       |
  | capella.user.id | Capella user ID                  |
  | capella.project | Capella project                  |
  | ssh.key         | Default SSH key                  |


  | ID            | Operating System         | Versions     | AWS User      | GCP User  | Azure User |
  |---------------|--------------------------|--------------|---------------|-----------|------------|
  | amzn          | Amazon Linux             | 2, 2023      | ec2-user      | N/A       | N/A        |
  | rhel          | Red Hat Enterprise Linux | 8, 9         | ec2-user      | admin     | rhel       |
  | centos        | CentOS                   | 8            | centos        | centos    | centos     |
  | ol            | Oracle Linux             | 8, 9         | ec2-user      | N/A       | N/A        |
  | rocky         | Rocky Linux              | 8, 9         | rocky         | rocky     | N/A        |
  | fedora        | Fedora                   | 34           | core          | fedora    | N/A        |
  | sles          | SUSE Linux               | 12, 15       | ec2-user      | admin     | sles       |
  | opensuse-leap | openSUSE                 | 15           | ec2-user      | admin     | sles       |
  | ubuntu        | Ubuntu Linux             | 20.04, 22.04 | ubuntu        | ubuntu    | ubuntu     |
  | debian        | Debian Linux             | 10, 11       | admin         | admin     | debian     |
  | windows       | Windows Server           | 2019, 2022   | Administrator | adminuser | adminuser  |
  | macos         | macOS                    | 13, 14       | ec2-user      | N/A       | N/A        |



  | Build Type | Description                     |
  |------------|---------------------------------|
  | cbs        | Couchbase Server                |
  | cbscert    | Couchbase Server with cert auth |
  | cbsc       | Couchbase Community Edition     |
  | sgw        | Sync Gateway                    |
  | capella    | Capella Database                |
  | columnar   | Capella Columnar                |
  | generic    | Base configured node from image |
  | database   | Generic database node           |
  | windev     | Windows development host        |


  Log files are written to ```.config/couch-formation/log```.
  <br><br>
  To create a support bundle with diagnostic information, use the ```dump``` command.
  ```
  cloudmgr dump
  ```


pkgId: a3691d9d7b56746f50240862e5e27ab915035e29b58e69fdc8ed718933515f0c
name: python-count-tokens
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: Count number of tokens in the text file using toktoken tokenizer from OpenAI.
url: https://github.com/izikeros/count_tokens
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-count-tokens-0.7.0-1.src.rpm
checksum_type: sha256
description:
  ![img](https://img.shields.io/pypi/v/count-tokens.svg)
  ![](https://img.shields.io/pypi/pyversions/count-tokens.svg)
  ![](https://img.shields.io/pypi/dm/count-tokens.svg)
  <a href="https://codeclimate.com/github/izikeros/count_tokens/maintainability"><img src="https://api.codeclimate.com/v1/badges/37fd0435fff274b6c9b5/maintainability" /></a>

  Simple tool that have one purpose - count tokens in a text file.




  This package is using [tiktoken](https://github.com/openai/tiktoken) library for tokenization.



  For usage from comman line install the package in isolated environement with pipx:

  ```sh
  $ pipx install count-tokens
  ```

  or install it in your current environment with pip.



  Open terminal and run:

  ```shell
  $ count-tokens document.txt
  ```

  You should see something like this:

  ```shell
  File: document.txt
  Encoding: cl100k_base
  Number of tokens: 67
  ```

  if you want to see just the tokens count run:

  ```shell
  $ count-tokens document.txt --quiet
  ```
  and the output will be:

  ```shell
  67
  ```

  NOTE: `tiktoken` supports three encodings used by OpenAI models:

  | Encoding name           | OpenAI models                                        |
  |-------------------------|------------------------------------------------------|
  | `cl100k_base`           | `gpt-4`, `gpt-3.5-turbo`, `text-embedding-ada-002`   |
  | `p50k_base`             | Codex models, `text-davinci-002`, `text-davinci-003` |
  | `r50k_base` (or `gpt2`) | GPT-3 models like `davinci`                          |

  to use token-count with other than default `cl100k_base` encoding use the additional input argument `-e` or `--encoding`:

  ```shell
  $ count-tokens document.txt -e r50k_base
  ```


  In case you need the results a bit faster and you don't need the exact number of tokens you can use the `--approx` parameter with `w` to have approximation based on number of words or `c` to have approximation based on number of characters.

  ```shell
  $ count-tokens document.txt --approx w
  ```

  It is based on assumption that there is 4/3 (1 and 1/3) tokens per word and 4 characters per token.


  ```shell



  ```python
  from count_tokens.count import count_tokens_in_file

  num_tokens = count_tokens_in_file("document.txt")
  ```

  ```python
  from count_tokens.count import count_tokens_in_string

  num_tokens = count_tokens_in_string("This is a string.")
  ```

  for both functions you can use `encoding` parameter to specify the encoding used by the model:

  ```python
  from count_tokens.count import count_tokens_in_string

  num_tokens = count_tokens_in_string("This is a string.", encoding="cl100k_base")
  ```
  Default value for `encoding` is `cl100k_base`.


  - [tiktoken](https://github.com/openai/tiktoken) - tokenization library used by this package



  Thanks to the authors of the tiktoken library for open sourcing their work.



  [MIT](https://izikeros.mit-license.org/) © [Krystian Safjan](https://safjan.com).


pkgId: 839014375cda9f30a9a4ce5f14131eb7d53cbdcf7133fe2e0c2631c2168e9358
name: python-countess
arch: src
version: 0.0.81
epoch: 0
release: 1
summary: CountESS
url: https://pypi.org/project/countess/
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countess-0.0.81-1.src.rpm
checksum_type: sha256
description:
  This is CountESS, a modular, Python 3 reimplementation of Enrich2.



  BSD 3-clause.  See [LICENSE.txt](LICENSE.txt)

  Source code is available at [https://github.com/CountESS-Project/CountESS](https://github.com/CountESS-Project/CountESS) and contributions are welcomed.



  The latest version of
  [CountESS can be installed from pypi](https://pypi.org/project/countess/):
  ```
  pip install CountESS
  ```

  For other options, see the documentation below ...



  [CountESS Documentation](https://countess-project.github.io/CountESS/)



  Please contact Alan Rubin `alan@rubin.id.au` for further information or
  Nick Moore `nick@zoic.org` for code-related matters.


pkgId: 8ffc8efed9847e29de0962e52c0475bf77b158c2667d59925a928cc14e131b4c
name: python-countest
arch: src
version: 0.1.5
epoch: 0
release: 1
url: https://github.com/sanskriti-02/CountEst
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countest-0.1.5-1.src.rpm
checksum_type: sha256
summary:
  CountEst is a module containing the implementation of count-based estimators, i.e., supervised learning algorithms that make predictions based on the frequency or count of specific events, categories, or values within a dataset.

description:
  CountEst is a Python module containing the implementation of count-based estimators, i.e., supervised learning algorithms that make predictions based on the frequency or count of specific events, categories, or values within a dataset. These estimators operate under the assumption that the distribution of counts or frequencies provides valuable information for making predictions or inferences. The classifier is inspired by "Vastu Moolak Ganit" as described in a recent Indian philosophy [Madhyasth Darshan](https://madhyasth-darshan.info) by Late Shri A Nagraj.

  Currently, we have implemented count-based classifier for categorical data. It operates by learning the distribution of category counts (i.e. the number of occurrences or frequency of each distinct category within a specific feature) within each class during the training phase. It then predicts class probabilities for unseen data based on the observed counts of categories within each feature, employing a voting mechanism to handle ties.



  The package can be installed using `pip`:

  ```
  pip install countest
  ```



  The installation dependency requirements are:

  - Python (>= 3.9)
  - NumPy (>= 1.5)
  - Pandas (>= 1.1.5)
  - Scikit-Learn (>=0.20.0)

  These dependencies are automatically installed using the pip commands above.



  Here we show an example using the CategoricalCBC (i.e. count-based classifier for categorical data):

  ```
  from countest.classifiers import CategoricalCBC
  import numpy as np

  X = np.random.choice(range(0,10),(100,6))
  y = np.random.choice([0, 1], size=100)

  estimator = CategoricalCBC()
  estimator.fit(X, y)

  print(estimator.predict([3, 6, 7, 2, 3, 4]))
  ```



  See the [changelog](https://github.com/sanskriti-02/CountEst/blob/master/CHANGELOG.md) for a history of notable changes to CountEst.



  This project is currently in its early stages. We're actively building and shaping it, and we welcome contributions from everyone, regardless of experience level. If you're interested in getting involved, we encourage you to explore the project and see where you can contribute! For specific contribution guidelines, visit our [GitHub page](https://github.com/sanskriti-02/CountEst).


pkgId: 2f0bb739ecf284f0b3bcb338720237221c7db64199f15d1042c7ab6f62a87070
name: python-country-converter
arch: src
version: 1.2
epoch: 0
release: 1
url: https://pypi.org/project/country-converter/
rpm_license: GNU General Public License v3 (GPLv3)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-country-converter-1.2-1.src.rpm
checksum_type: sha256
summary:
  The country converter (coco) - a Python package for converting country names between different classifications schemes

description:
  The country converter (coco) is a Python package to convert and match
  country names between different classifications and between different
  naming versions. Internally it uses regular expressions to match country
  names. Coco can also be used to build aggregation concordance matrices
  between different classification schemes.

  [![image](https://img.shields.io/pypi/v/country-converter.svg)](https://pypi.python.org/pypi/country_converter/)
  [![image](https://anaconda.org/conda-forge/country_converter/badges/version.svg)](https://anaconda.org/conda-forge/country_converter)
  [![image](https://zenodo.org/badge/DOI/10.5281/zenodo.838035.svg)](https://doi.org/10.5281/zenodo.838035)
  [![image](http://joss.theoj.org/papers/af694f2e5994b8aacbad119c4005e113/status.svg)](http://joss.theoj.org/papers/af694f2e5994b8aacbad119c4005e113)

  [![image](https://github.com/IndEcol/country_converter/workflows/build/badge.svg)](https://github.com/IndEcol/country_converter/actions)
  [![image](https://coveralls.io/repos/github/IndEcol/country_converter/badge.svg?branch=master&service=github)](https://coveralls.io/github/IndEcol/country_converter?branch=master)
  [![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![image](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)




  To date, there is no single standard of how to name or specify
  individual countries in a (meta) data description. While some data
  sources follow ISO 3166, this standard defines a two and a three letter
  code in addition to a numerical classification. To further complicate
  the matter, instead of using one of the existing standards, many
  databases use unstandardised country names to classify countries.

  The country converter (coco) automates the conversion from different
  standards and version of country names. Internally, coco is based on a
  table specifying the different ISO and UN standards per country together
  with the official name and a regular expression which aim to match all
  English versions of a specific country name. In addition, coco includes
  classification based on UN-, EU-, OECD-membership, UN regions
  specifications, continents and various MRIO and IAM databases (see
  [Classification schemes](#classification-schemes) below).



  Country_converter is registered at PyPI. From the command line:

      pip install country_converter --upgrade

  The country converter is also available from the [conda
  forge](https://conda-forge.org/) and can be installed using conda with
  (if you don't have the conda_forge channel added to your conda config
  add "-c conda-forge", see [the install instructions
  here](https://github.com/conda-forge/country_converter-feedstock)):

      conda install country_converter

  Alternatively, the source code is available on
  [GitHub](https://github.com/IndEcol/country_converter).

  The package depends on [Pandas](http://pandas.pydata.org/); for testing
  [pytest](http://pytest.org/) is required. For further information on
  running the tests see [CONTRIBUTING.md](CONTRIBUTING.md).







  Convert various country names to some standard names:

  ``` python
  import country_converter as coco
  some_names = ['United Rep. of Tanzania', 'DE', 'Cape Verde', '788', 'Burma', 'COG',
                'Iran (Islamic Republic of)', 'Korea, Republic of',
                "Dem. People's Rep. of Korea"]
  standard_names = coco.convert(names=some_names, to='name_short')
  print(standard_names)
  ```

  Which results in \['Tanzania', 'Germany', 'Cabo Verde', 'Tunisia',
  'Myanmar', 'Congo Republic', 'Iran', 'South Korea', 'North Korea'\]. The
  input format is determined automatically, based on ISO two letter, ISO
  three letter, ISO numeric or regular expression matching. In case of any
  ambiguity, the source format can be specified with the parameter 'src'.

  In case of multiple conversion, better performance can be achieved by
  instantiating a single CountryConverter object for all conversions:

  ``` python
  import country_converter as coco
  cc = coco.CountryConverter()

  some_names = ['United Rep. of Tanzania', 'Cape Verde', 'Burma',
                'Iran (Islamic Republic of)', 'Korea, Republic of',
                "Dem. People's Rep. of Korea"]

  standard_names = cc.convert(names = some_names, to = 'name_short')
  UNmembership = cc.convert(names = some_names, to = 'UNmember')
  print(standard_names)
  print(UNmembership)
  ```

  In order to more efficiently convert Pandas Series, the `pandas_convert()` method can be used. The
  performance gain is especially significant for large Series. For a series containing 1 million rows
  a 4000x speedup can be achieved, compared to `convert()`.

  ``` python
  import country_converter as coco
  import pandas as pd
  cc = coco.CountryConverter()

  some_countries = pd.Series(['Australia', 'Belgium', 'Brazil', 'Bulgaria', 'Cyprus', 'Czech Republic',
                    'Guatemala', 'Mexico', 'Honduras', 'Costa Rica', 'Colombia', 'Greece', 'Hungary',
                    'India', 'Indonesia', 'Ireland', 'Italy', 'Japan', 'Latvia', 'Lithuania',
                    'Luxembourg', 'Malta', 'Jamaica', 'Ireland', 'Turkey', 'United Kingdom',
                    'United States'], name='country')

  iso3_codes = cc.pandas_convert(series=some_countries, to='ISO3')
  ```

  Convert between classification schemes:

  ``` python
  iso3_codes = ['USA', 'VUT', 'TKL', 'AUT', 'XXX' ]
  iso2_codes = coco.convert(names=iso3_codes, to='ISO2')
  print(iso2_codes)
  ```

  Which results in \['US', 'VU', 'TK', 'AT', 'not found'\]

  The not found indication can be specified (e.g. not_found = 'not
  there'), if None is passed for 'not_found', the original entry gets
  passed through:

  ``` python
  iso2_codes = coco.convert(names=iso3_codes, to='ISO2', not_found=None)
  print(iso2_codes)
  ```

  results in \['US', 'VU', 'TK', 'AT', 'XXX'\]

  Internally the data is stored in a Pandas DataFrame, which can be
  accessed directly. For example, this can be used to filter countries for
  membership organisations (per year). Note: for this, an instance of
  CountryConverter is required.

  ``` python
  import country_converter as coco
  cc = coco.CountryConverter()

  some_countries = ['Australia', 'Belgium', 'Brazil', 'Bulgaria', 'Cyprus', 'Czech Republic',
                    'Denmark', 'Estonia', 'Finland', 'France', 'Germany', 'Greece', 'Hungary',
                    'India', 'Indonesia', 'Ireland', 'Italy', 'Japan', 'Latvia', 'Lithuania',
                    'Luxembourg', 'Malta', 'Romania', 'Russia', 'Turkey', 'United Kingdom',
                    'United States']

  oecd_since_1995 = cc.data[(cc.data.OECD >= 1995) & cc.data.name_short.isin(some_countries)].name_short
  eu_until_1980 = cc.data[(cc.data.EU <= 1980) & cc.data.name_short.isin(some_countries)].name_short
  print(oecd_since_1995)
  print(eu_until_1980)
  ```

  All classifications can be directly accessed by:

  ``` python
  cc.EU28
  cc.OECD

  cc.EU27as('ISO3')
  ```

  and the classification schemes available:

  ``` python
  cc.valid_class
  ```

  There is also a methdod for only getting country classifications (thus
  omitting any grouping of countries):

  ``` python
  cc.valid_country_classifications
  ```

  If you rather need a dictionary describing the classification/membership
  use:

  ``` python
  import country_converter as coco
  cc = coco.CountryConverter()
  cc.get_correspondence_dict('EXIO3', 'ISO3')
  ```

  to also include countries not assigned within a specific classification
  use:

  ``` python
  cc.get_correspondence_dict('EU27', 'ISO2', replace_nan='NonEU')
  ```

  The regular expressions can also be used to match any list of countries
  to any other. For example:

  ``` python
  match_these = ['norway', 'united_states', 'china', 'taiwan']
  master_list = ['USA', 'The Swedish Kingdom', 'Norway is a Kingdom too',
                 'Peoples Republic of China', 'Republic of China' ]

  matching_dict = coco.match(match_these, master_list)
  ```

  Country converter by default provides a warning to the python <span
  class="title-ref">logging</span> logger if no match is found. The
  following example demonstrates how to configure the <span
  class="title-ref">coco</span> logging behaviour.

  ``` python
  import logging
  import country_converter as coco
  logging.basicConfig(level=logging.INFO)
  coco.convert("asdf")



  coco_logger = coco.logging.getLogger()
  coco_logger.setLevel(logging.CRITICAL)
  coco.convert("asdf")

  ```

  See the IPython Notebook
  ([country_converter_examples.ipynb](http://nbviewer.ipython.org/github/IndEcol/country_converter/blob/master/doc/country_converter_examples.ipynb))
  for more information.



  The country converter package also provides a command line interface
  called coco.

  Minimal example:

      coco Cyprus DE Denmark Estonia 4 'United Kingdom' AUT

  Converts the given names to ISO3 codes based on matching the input to
  ISO2, ISO3, ISOnumeric or regular expression matching. The list of names
  must be separated by spaces, country names consisting of multiple words
  must be put in quotes ('').

  The input classification can be specified with '--src' or '-s' (or will
  be determined automatically), the target classification with '--to' or
  '-t'.

  The default output is a space separated list, this can be changed by
  passing a separator by '--output_sep' or '-o' (e.g -o '\|').

  Thus, to convert from ISO3 to UN number codes and receive the output as
  comma separated list use:

      coco AUT DEU VAT AUS -s ISO3 -t UNcode -o ', '

  The command line tool also allows to specify the output for none found
  entries, including passing them through to the output by passing None:

      coco CAN Peru US Mexico Venezuela UK Arendelle --not_found=None

  and to specify an additional data file which will overwrite existing
  country matching

      coco Congo --additional_data path/to/datafile.csv

  See
  <https://github.com/IndEcol/country_converter/tree/master/tests/custom_data_example.txt>
  for an example of an additional datafile.

  The flags --UNmember_only (-u) and --include_obsolete (-i) restrict the
  search to UN member states only or extend it to also include currently
  obsolete countries. For example, the [Netherlands
  Antilles](https://en.wikipedia.org/wiki/Netherlands_Antilles) were
  dissolved in 2010.

  Thus:

      coco "Netherlands Antilles"

  results in "not found". The search, however, can be extended to recently
  dissolved countries by:

      coco "Netherlands Antilles" -i

  which results in 'ANT'.

  In addition to the countries, the coco command line tool also accepts
  various country classifications (EXIO1, EXIO2, EXIO3, WIOD, Eora,
  MESSAGE, OECD, EU27, EU28, UN, obsolete, Cecilia2050, BRIC, APEC, BASIC,
  CIS, G7, G20). One of these can be passed by

      coco G20

  which lists all countries in that classification.

  For the classifications covering almost all countries (MRIO and IAM
  classifications)

      coco EXIO3

  lists the unique classification names. When passing a --to parameter, a
  simplified correspondence of the chosen classification is printed:

      coco EXIO3 --to ISO3

  For further information call the help by

      coco -h



  Newer (tested in 2016a) versions of Matlab allow to directly call Python
  functions and libraries. This requires a Python version \>= 3.4
  installed in the system path (e.g. through Anaconda).

  To test, try this in Matlab:

  ``` matlab
  py.print(py.sys.version)
  ```

  If this works, you can also use coco after installing it through pip (at
  the windows commandline - see the installing instruction above):

  ``` matlab
  pip install country_converter --upgrade
  ```

  And in matlab:

  ``` matlab
  coco = py.country_converter.CountryConverter()
  countries = {'The Swedish Kingdom', 'Norway is a Kingdom too', 'Peoples Republic of China', 'Republic of China'};
  ISO2_pythontype = coco.convert(countries, pyargs('to', 'ISO2'));
  ISO2_cellarray = cellfun(@char,cell(ISO2_pythontype),'UniformOutput',false);
  ```

  Alternatively, as a long oneliner:

  ``` matlab
  short_names = cellfun(@char, cell(py.country_converter.convert({56, 276}, pyargs('src', 'UNcode', 'to', 'name_short'))), 'UniformOutput',false);
  ```

  All properties of coco as explained above are also available in Matlab:

  ``` matlab
  coco = py.country_converter.CountryConverter();
  coco.EU27
  EU27ISO3 = coco.EU27as('ISO3');
  ```

  These functions return a Pandas DataFrame. The underlying values can be
  access with .values (e.g.

  ``` matlab
  EU27ISO3.values
  ```

  I leave it to professional Matlab users to figure out how to further
  process them.

  See also IPython Notebook
  ([country_converter_examples.ipynb](http://nbviewer.ipython.org/github/IndEcol/country_converter/blob/master/doc/country_converter_examples.ipynb))
  for more information - all functions available in Python (for example
  passing additional data files, specifying the output in case of missing
  data) work also in Matlab by passing arguments through the pyargs
  function.



  Coco provides a function for building concordance vectors, matrices and
  dictionaries between different classifications. This can be used in
  python as well as in matlab. For further information see
  ([country_converter_aggregation_helper.ipynb](http://nbviewer.ipython.org/github/IndEcol/country_converter/blob/master/doc/country_converter_aggregation_helper.ipynb))



  Currently the following classification schemes are available (see also
  Data sources below for further information):

  1.  ISO2 (ISO 3166-1 alpha-2) - including UK/EL for Britain/Greece (but always convert to GB/GR)
  2.  ISO3 (ISO 3166-1 alpha-3)
  3.  ISO - numeric (ISO 3166-1 numeric)
  4.  UN numeric code (M.49 - follows to a large extend ISO-numeric)
  5.  A standard or short name
  6.  The "official" name
  7.  Continent: 6 continent classification with Africa, Antarctica, Asia, Europe, America, Oceania
  8.  [Continent_7 classification](https://ourworldindata.org/world-region-map-definitions) - 7 continent classification spliting North/South America
  9.  UN region
  10. [EXIOBASE 1](http://exiobase.eu/) classification (2 and 3 letters)
  11. [EXIOBASE 2](http://exiobase.eu/) classification (2 and 3 letters)
  12. [EXIOBASE 3](https://zenodo.org/doi/10.5281/zenodo.3583070) classification (2 and 3 letters)
  13. [WIOD](http://www.wiod.org/home) classification
  14. [Eora](http://www.worldmrio.com/)
  15. [OECD](http://www.oecd.org/about/membersandpartners/list-oecd-member-countries.htm)
      membership (per year)
  16. [MESSAGE](http://www.iiasa.ac.at/web/home/research/researchPrograms/Energy/MESSAGE-model-regions.en.html)
      11-region classification
  17. [IMAGE](https://models.pbl.nl/image/index.php/Welcome_to_IMAGE_3.0_Documentation)
  18. [REMIND](https://www.pik-potsdam.de/en/institute/departments/transformation-pathways/models/remind)
  19. [UN](http://www.un.org/en/members/) membership (per year)
  20. [EU](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:EU_enlargements)
      membership (including EU12, EU15, EU25, EU27, EU27_2007, EU28)
  21. [EEA](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:European_Economic_Area_(EEA))
      membership
  22. [Schengen](https://en.wikipedia.org/wiki/Schengen_Area) region
  23. [Cecilia](https://cecilia2050.eu/system/files/De%20Koning%20et%20al.%20%282014%29_Scenarios%20for%202050_0.pdf)
      2050 classification
  24. [APEC](https://en.wikipedia.org/wiki/Asia-Pacific_Economic_Cooperation)
  25. [BRIC](https://en.wikipedia.org/wiki/BRIC)
  26. [BASIC](https://en.wikipedia.org/wiki/BASIC_countries)
  27. [CIS](https://en.wikipedia.org/wiki/Commonwealth_of_Independent_States)
      (as by 2019, excl. Turkmenistan)
  28. [G7](https://en.wikipedia.org/wiki/Group_of_Seven)
  29. [G20](https://en.wikipedia.org/wiki/G20) (listing all EU member
      states as individual members)
  30. [FAOcode](http://www.fao.org/faostat/en/#definitions) (numeric)
  31. [GBDcode](http://ghdx.healthdata.org/) (numeric - Global Burden of
      Disease country codes)
  32. [IEA](https://www.iea.org/countries) (World Energy Balances 2021)
  33. [DACcode](https://www.oecd.org/dac/financing-sustainable-development/development-finance-standards/dacandcrscodelists.htm)
      (numeric - OECD Development Assistance Committee)
  33. [ccTLD](https://en.wikipedia.org/wiki/Country_code_top-level_domain) - country code top-level domains
  34. [GWcode](https://www.tandfonline.com/doi/abs/10.1080/03050629908434958) - Gledisch & Ward numerical codes as published in https://www.andybeger.com/states/articles/statelists.html
  35. CC41 - common classification for MRIOs (list of countries found in all public MRIOs)
  36. [IOC](https://en.wikipedia.org/wiki/List_of_IOC_country_codes) - International Olympic Committee (IOC) country codes


  Coco contains official recognised codes as well as non-standard codes
  for disputed or dissolved countries. To restrict the set to only the
  official recognized UN members or include obsolete countries, pass

  ``` python
  import country_converter as coco
  cc = coco.CountryConverter()
  cc_UN = coco.CountryConverter(only_UNmember=True)
  cc_all = coco.CountryConverter(include_obsolete=True)

  cc.convert(['PSE', 'XKX', 'EAZ', 'FRA'], to='name_short')
  cc_UN.convert(['PSE', 'XKX', 'EAZ', 'FRA'], to='name_short')
  cc_all.convert(['PSE', 'XKX', 'EAZ', 'FRA'], to='name_short')
  ```

  cc results in \['Palestine', 'Kosovo', 'not found', 'France'\], whereas
  cc_UN converts to \['not found', 'not found', 'not found', 'France'\]
  and cc_all converts to \['Palestine', 'Kosovo', 'Zanzibar', 'France'\]
  Note that the underlying dataframe is available at the attribute .data
  (e.g. cc_all.data).



  Most of the underlying data can be found in Wikipedia, the page describing [ISO
  3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) is a good starting point. The
  page on the [ISO2 codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
  includes a section "Imperfect Implementations" explaining the GB/UK and EL/GR
  issue.
  UN regions/codes are given on the United Nation
  Statistical Division
  ([unstats](http://unstats.un.org/unsd/methods/m49/m49regin.htm))
  webpage. The differences between the ISO numeric and UN (M.49) codes are
  [also explained at wikipedia](https://en.wikipedia.org/wiki/UN_M.49).
  [EXIOBASE](http://exiobase.eu/), [WIOD](http://www.wiod.org/home) and
  [Eora](http://www.worldmrio.com/) classification were extracted from the
  respective databases. For [Eora](http://www.worldmrio.com/), the names
  are based on the 'Country names' csv file provided on the webpage, but
  updated for different names used in the Eora26 database. The MESSAGE
  classification follows the 11-region aggregation given in the
  [MESSAGE](http://www.iiasa.ac.at/web/home/research/researchPrograms/Energy/MESSAGE-model-regions.en.html)
  model regions description. The
  [IMAGE](https://models.pbl.nl/image/index.php/Welcome_to_IMAGE_3.0_Documentation)
  classification is based on the "[region classification
  map](https://models.pbl.nl/image/index.php/Region_classification_map)",
  for
  [REMIND](https://www.pik-potsdam.de/en/institute/departments/transformation-pathways/models/remind)
  we received a country mapping from the model developers.

  The membership of
  [OECD](http://www.oecd.org/about/membersandpartners/list-oecd-member-countries.htm)
  and [UN](http://www.un.org/en/members/) can be found at the membership
  organisations' webpages, information about obsolete country codes on the
  [Statoids](http://www.statoids.com/w3166his.html) webpage.

  The situation for the
  [EU](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:EU_enlargements)
  got complicated due to the Brexit process. For the naming, coco follows
  the [Eurostat
  glossary](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:EU_enlargements),
  thus EU27 refers to the EU without UK, whereas EU27_2007 refers to the
  EU without Croatia (the status after the 2007 enlargement). The shortcut
  EU always links to the most recent classification. The
  [EEA](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:European_Economic_Area_(EEA))
  agreements for the UK ended by 2021-01-01 (which also affects Guernsey, Isle of Man, Jersey and Gibraltar).
  Switzerland is not part of the EEA but member of the single market.

  The Global Burden of Disease country codes were extracted form the [GBD
  code book available
  here.](https://ghdx.healthdata.org/sites/default/files/ihme_query_tool/IHME_GBD_2019_CODEBOOK.zip)



  Please use the issue tracker for documenting bugs, proposing
  enhancements and all other communication related to coco.

  You can follow me on [mastodon - @kst@qoto.org](https://qoto.org/@kst) and [twitter](https://twitter.com/kst_stadler) to get
  the latest news about all my open-source and research projects (and
  occasionally some random retweets/toots).



  Want to contribute? Great! Please check
  [CONTRIBUTING.md](CONTRIBUTING.md) if you want to help to improve coco
  and for some pointer for how to add classifications.



  The package [pycountry](https://pypi.python.org/pypi/pycountry) provides
  access to the official ISO databases for historic countries, country
  subdivisions, languages and currencies. In case you need to convert
  non-English country names,
  [countrynames](https://github.com/occrp/countrynames) includes an
  extensive database of country names in different languages and functions
  to convert them to the different ISO 3166 standards.
  [Python-iso3166](https://github.com/deactivated/python-iso3166) focuses
  on conversion between the two-letter, three-letter and three-digit codes
  defined in the ISO 3166 standard.

  If you are using R, you should have a look at
  [countrycode](https://github.com/vincentarelbundock/countrycode).



  Version 0.5 of the country converter was published in the [Journal of
  Open Source Software](http://joss.theoj.org/). To cite the country
  converter in publication please use:

  Stadler, K. (2017). The country converter coco - a Python package for
  converting country names between different classification schemes. The
  Journal of Open Source Software. doi:
  [10.21105/joss.00332](http://dx.doi.org/10.21105/joss.00332)

  For the full bibtex key see [CITATION](CITATION)



  This package was inspired by (and the regular expression are mostly
  based on) the R-package
  [countrycode](https://github.com/vincentarelbundock/countrycode) by
  [Vincent Arel-Bundock](http://arelbundock.com/) and his (defunct) port
  to Python (pycountrycode). Many thanks to [Robert
  Gieseke](https://github.com/rgieseke) for the review of the source code
  and paper for the publication in the [Journal of Open Source
  Software](http://joss.theoj.org/).


pkgId: 7d36fd3b6df53121eade4326863cf31d507c6e3e98c8be7f068a88220521d922
name: python-country-converter
arch: src
version: 1.3
epoch: 0
release: 1
url: https://pypi.org/project/country-converter/
rpm_license: GNU General Public License v3 (GPLv3)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-country-converter-1.3-1.src.rpm
checksum_type: sha256
summary:
  The country converter (coco) - a Python package for converting country names between different classifications schemes

description:
  The country converter (coco) is a Python package to convert and match
  country names between different classifications and between different
  naming versions. Internally it uses regular expressions to match country
  names. Coco can also be used to build aggregation concordance matrices
  between different classification schemes.

  [![image](https://img.shields.io/pypi/v/country-converter.svg)](https://pypi.python.org/pypi/country_converter/)
  [![image](https://anaconda.org/conda-forge/country_converter/badges/version.svg)](https://anaconda.org/conda-forge/country_converter)
  [![image](https://zenodo.org/badge/DOI/10.5281/zenodo.838035.svg)](https://doi.org/10.5281/zenodo.838035)
  [![image](http://joss.theoj.org/papers/af694f2e5994b8aacbad119c4005e113/status.svg)](http://joss.theoj.org/papers/af694f2e5994b8aacbad119c4005e113)

  [![image](https://github.com/IndEcol/country_converter/workflows/build/badge.svg)](https://github.com/IndEcol/country_converter/actions)
  [![image](https://coveralls.io/repos/github/IndEcol/country_converter/badge.svg?branch=master&service=github)](https://coveralls.io/github/IndEcol/country_converter?branch=master)
  [![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![image](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)




  To date, there is no single standard of how to name or specify
  individual countries in a (meta) data description. While some data
  sources follow ISO 3166, this standard defines a two and a three letter
  code in addition to a numerical classification. To further complicate
  the matter, instead of using one of the existing standards, many
  databases use unstandardised country names to classify countries.

  The country converter (coco) automates the conversion from different
  standards and version of country names. Internally, coco is based on a
  table specifying the different ISO and UN standards per country together
  with the official name and a regular expression which aim to match all
  English versions of a specific country name. In addition, coco includes
  classification based on UN-, EU-, OECD-membership, UN regions
  specifications, continents and various MRIO and IAM databases (see
  [Classification schemes](#classification-schemes) below).



  Country_converter is registered at PyPI. From the command line:

      pip install country_converter --upgrade

  The country converter is also available from the [conda
  forge](https://conda-forge.org/) and can be installed using conda with
  (if you don't have the conda_forge channel added to your conda config
  add "-c conda-forge", see [the install instructions
  here](https://github.com/conda-forge/country_converter-feedstock)):

      conda install country_converter

  Alternatively, the source code is available on
  [GitHub](https://github.com/IndEcol/country_converter).

  The package depends on [Pandas](http://pandas.pydata.org/); for testing
  [pytest](http://pytest.org/) is required. For further information on
  running the tests see [CONTRIBUTING.md](CONTRIBUTING.md).







  Convert various country names to some standard names:

  ``` python
  import country_converter as coco
  some_names = ['United Rep. of Tanzania', 'DE', 'Cape Verde', '788', 'Burma', 'COG',
                'Iran (Islamic Republic of)', 'Korea, Republic of',
                "Dem. People's Rep. of Korea"]
  standard_names = coco.convert(names=some_names, to='name_short')
  print(standard_names)
  ```

  Which results in \['Tanzania', 'Germany', 'Cabo Verde', 'Tunisia',
  'Myanmar', 'Congo Republic', 'Iran', 'South Korea', 'North Korea'\]. The
  input format is determined automatically, based on ISO two letter, ISO
  three letter, ISO numeric or regular expression matching. In case of any
  ambiguity, the source format can be specified with the parameter 'src'.

  In case of multiple conversion, better performance can be achieved by
  instantiating a single CountryConverter object for all conversions:

  ``` python
  import country_converter as coco
  cc = coco.CountryConverter()

  some_names = ['United Rep. of Tanzania', 'Cape Verde', 'Burma',
                'Iran (Islamic Republic of)', 'Korea, Republic of',
                "Dem. People's Rep. of Korea"]

  standard_names = cc.convert(names = some_names, to = 'name_short')
  UNmembership = cc.convert(names = some_names, to = 'UNmember')
  print(standard_names)
  print(UNmembership)
  ```

  In order to more efficiently convert Pandas Series, the `pandas_convert()` method can be used. The
  performance gain is especially significant for large Series. For a series containing 1 million rows
  a 4000x speedup can be achieved, compared to `convert()`.

  ``` python
  import country_converter as coco
  import pandas as pd
  cc = coco.CountryConverter()

  some_countries = pd.Series(['Australia', 'Belgium', 'Brazil', 'Bulgaria', 'Cyprus', 'Czech Republic',
                    'Guatemala', 'Mexico', 'Honduras', 'Costa Rica', 'Colombia', 'Greece', 'Hungary',
                    'India', 'Indonesia', 'Ireland', 'Italy', 'Japan', 'Latvia', 'Lithuania',
                    'Luxembourg', 'Malta', 'Jamaica', 'Ireland', 'Turkey', 'United Kingdom',
                    'United States'], name='country')

  iso3_codes = cc.pandas_convert(series=some_countries, to='ISO3')
  ```

  Convert between classification schemes:

  ``` python
  iso3_codes = ['USA', 'VUT', 'TKL', 'AUT', 'XXX' ]
  iso2_codes = coco.convert(names=iso3_codes, to='ISO2')
  print(iso2_codes)
  ```

  Which results in \['US', 'VU', 'TK', 'AT', 'not found'\]

  The not found indication can be specified (e.g. not_found = 'not
  there'), if None is passed for 'not_found', the original entry gets
  passed through:

  ``` python
  iso2_codes = coco.convert(names=iso3_codes, to='ISO2', not_found=None)
  print(iso2_codes)
  ```

  results in \['US', 'VU', 'TK', 'AT', 'XXX'\]

  Internally the data is stored in a Pandas DataFrame, which can be
  accessed directly. For example, this can be used to filter countries for
  membership organisations (per year). Note: for this, an instance of
  CountryConverter is required.

  ``` python
  import country_converter as coco
  cc = coco.CountryConverter()

  some_countries = ['Australia', 'Belgium', 'Brazil', 'Bulgaria', 'Cyprus', 'Czech Republic',
                    'Denmark', 'Estonia', 'Finland', 'France', 'Germany', 'Greece', 'Hungary',
                    'India', 'Indonesia', 'Ireland', 'Italy', 'Japan', 'Latvia', 'Lithuania',
                    'Luxembourg', 'Malta', 'Romania', 'Russia', 'Turkey', 'United Kingdom',
                    'United States']

  oecd_since_1995 = cc.data[(cc.data.OECD >= 1995) & cc.data.name_short.isin(some_countries)].name_short
  eu_until_1980 = cc.data[(cc.data.EU <= 1980) & cc.data.name_short.isin(some_countries)].name_short
  print(oecd_since_1995)
  print(eu_until_1980)
  ```

  All classifications can be directly accessed by:

  ``` python
  cc.EU28
  cc.OECD

  cc.EU27as('ISO3')
  ```

  and the classification schemes available:

  ``` python
  cc.valid_class
  ```

  There is also a method for only getting country classifications (thus
  omitting any grouping of countries):

  ``` python
  cc.valid_country_classifications
  ```

  If you rather need a dictionary describing the classification/membership
  use:

  ``` python
  import country_converter as coco
  cc = coco.CountryConverter()
  cc.get_correspondence_dict('EXIO3', 'ISO3')
  ```

  to also include countries not assigned within a specific classification
  use:

  ``` python
  cc.get_correspondence_dict('EU27', 'ISO2', replace_nan='NonEU')
  ```

  The regular expressions can also be used to match any list of countries
  to any other. For example:

  ``` python
  match_these = ['norway', 'united_states', 'china', 'taiwan']
  master_list = ['USA', 'The Swedish Kingdom', 'Norway is a Kingdom too',
                 'Peoples Republic of China', 'Republic of China' ]

  matching_dict = coco.match(match_these, master_list)
  ```

  Country converter by default provides a warning to the python <span
  class="title-ref">logging</span> logger if no match is found. The
  following example demonstrates how to configure the <span
  class="title-ref">coco</span> logging behaviour.

  ``` python
  import logging
  import country_converter as coco
  logging.basicConfig(level=logging.INFO)
  coco.convert("asdf")



  coco_logger = coco.logging.getLogger()
  coco_logger.setLevel(logging.CRITICAL)
  coco.convert("asdf")

  ```

  See the IPython Notebook
  ([country_converter_examples.ipynb](http://nbviewer.ipython.org/github/IndEcol/country_converter/blob/master/doc/country_converter_examples.ipynb))
  for more information.



  The country converter package also provides a command line interface
  called coco.

  Minimal example:

      coco Cyprus DE Denmark Estonia 4 'United Kingdom' AUT

  Converts the given names to ISO3 codes based on matching the input to
  ISO2, ISO3, ISOnumeric or regular expression matching. The list of names
  must be separated by spaces, country names consisting of multiple words
  must be put in quotes ('').

  The input classification can be specified with '--src' or '-s' (or will
  be determined automatically), the target classification with '--to' or
  '-t'.

  The default output is a space separated list, this can be changed by
  passing a separator by '--output_sep' or '-o' (e.g -o '\|').

  Thus, to convert from ISO3 to UN number codes and receive the output as
  comma separated list use:

      coco AUT DEU VAT AUS -s ISO3 -t UNcode -o ', '

  The command line tool also allows to specify the output for none found
  entries, including passing them through to the output by passing None:

      coco CAN Peru US Mexico Venezuela UK Arendelle --not_found=None

  and to specify an additional data file which will overwrite existing
  country matching

      coco Congo --additional_data path/to/datafile.csv

  See
  <https://github.com/IndEcol/country_converter/tree/master/tests/custom_data_example.txt>
  for an example of an additional datafile.

  The flags --UNmember_only (-u) and --include_obsolete (-i) restrict the
  search to UN member states only or extend it to also include currently
  obsolete countries. For example, the [Netherlands
  Antilles](https://en.wikipedia.org/wiki/Netherlands_Antilles) were
  dissolved in 2010.

  Thus:

      coco "Netherlands Antilles"

  results in "not found". The search, however, can be extended to recently
  dissolved countries by:

      coco "Netherlands Antilles" -i

  which results in 'ANT'.

  In addition to the countries, the coco command line tool also accepts
  various country classifications (EXIO1, EXIO2, EXIO3, WIOD, Eora,
  MESSAGE, OECD, EU27, EU28, UN, obsolete, Cecilia2050, BRIC, APEC, BASIC,
  CIS, G7, G20). One of these can be passed by

      coco G20

  which lists all countries in that classification.

  For the classifications covering almost all countries (MRIO and IAM
  classifications)

      coco EXIO3

  lists the unique classification names. When passing a --to parameter, a
  simplified correspondence of the chosen classification is printed:

      coco EXIO3 --to ISO3

  For further information call the help by

      coco -h



  Newer (tested in 2016a) versions of Matlab allow to directly call Python
  functions and libraries. This requires a Python version \>= 3.4
  installed in the system path (e.g. through Anaconda).

  To test, try this in Matlab:

  ``` matlab
  py.print(py.sys.version)
  ```

  If this works, you can also use coco after installing it through pip (at
  the windows commandline - see the installing instruction above):

  ``` matlab
  pip install country_converter --upgrade
  ```

  And in matlab:

  ``` matlab
  coco = py.country_converter.CountryConverter()
  countries = {'The Swedish Kingdom', 'Norway is a Kingdom too', 'Peoples Republic of China', 'Republic of China'};
  ISO2_pythontype = coco.convert(countries, pyargs('to', 'ISO2'));
  ISO2_cellarray = cellfun(@char,cell(ISO2_pythontype),'UniformOutput',false);
  ```

  Alternatively, as a long oneliner:

  ``` matlab
  short_names = cellfun(@char, cell(py.country_converter.convert({56, 276}, pyargs('src', 'UNcode', 'to', 'name_short'))), 'UniformOutput',false);
  ```

  All properties of coco as explained above are also available in Matlab:

  ``` matlab
  coco = py.country_converter.CountryConverter();
  coco.EU27
  EU27ISO3 = coco.EU27as('ISO3');
  ```

  These functions return a Pandas DataFrame. The underlying values can be
  access with .values (e.g.

  ``` matlab
  EU27ISO3.values
  ```

  I leave it to professional Matlab users to figure out how to further
  process them.

  See also IPython Notebook
  ([country_converter_examples.ipynb](http://nbviewer.ipython.org/github/IndEcol/country_converter/blob/master/doc/country_converter_examples.ipynb))
  for more information - all functions available in Python (for example
  passing additional data files, specifying the output in case of missing
  data) work also in Matlab by passing arguments through the pyargs
  function.



  Coco provides a function for building concordance vectors, matrices and
  dictionaries between different classifications. This can be used in
  python as well as in matlab. For further information see
  ([country_converter_aggregation_helper.ipynb](http://nbviewer.ipython.org/github/IndEcol/country_converter/blob/master/doc/country_converter_aggregation_helper.ipynb))



  Currently the following classification schemes are available (see also
  Data sources below for further information):

  1.  ISO2 (ISO 3166-1 alpha-2) - including UK/EL for Britain/Greece (but always convert to GB/GR)
  2.  ISO3 (ISO 3166-1 alpha-3)
  3.  ISO - numeric (ISO 3166-1 numeric)
  4.  UN numeric code (M.49 - follows to a large extend ISO-numeric)
  5.  A standard or short name
  6.  The "official" name
  7.  Continent: 6 continent classification with Africa, Antarctica, Asia, Europe, America, Oceania
  8.  [Continent_7 classification](https://ourworldindata.org/world-region-map-definitions) - 7 continent classification spliting North/South America
  9.  UN region
  10. [EXIOBASE 1](http://exiobase.eu/) classification (2 and 3 letters)
  11. [EXIOBASE 2](http://exiobase.eu/) classification (2 and 3 letters)
  12. [EXIOBASE 3](https://zenodo.org/doi/10.5281/zenodo.3583070) classification (2 and 3 letters)
  13. [WIOD](http://www.wiod.org/home) classification
  14. [Eora](http://www.worldmrio.com/)
  15. [OECD](http://www.oecd.org/about/membersandpartners/list-oecd-member-countries.htm)
      membership (per year)
  16. [MESSAGE](http://www.iiasa.ac.at/web/home/research/researchPrograms/Energy/MESSAGE-model-regions.en.html)
      11-region classification
  17. [IMAGE](https://models.pbl.nl/image/index.php/Welcome_to_IMAGE_3.0_Documentation)
  18. [REMIND](https://www.pik-potsdam.de/en/institute/departments/transformation-pathways/models/remind)
  19. [UN](http://www.un.org/en/members/) membership (per year)
  20. [EU](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:EU_enlargements)
      membership (including EU12, EU15, EU25, EU27, EU27_2007, EU28)
  21. [EEA](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:European_Economic_Area_(EEA))
      membership
  22. [Schengen](https://en.wikipedia.org/wiki/Schengen_Area) region
  23. [Cecilia](https://cecilia2050.eu/system/files/De%20Koning%20et%20al.%20%282014%29_Scenarios%20for%202050_0.pdf)
      2050 classification
  24. [APEC](https://en.wikipedia.org/wiki/Asia-Pacific_Economic_Cooperation)
  25. [BRIC](https://en.wikipedia.org/wiki/BRIC)
  26. [BASIC](https://en.wikipedia.org/wiki/BASIC_countries)
  27. [CIS](https://en.wikipedia.org/wiki/Commonwealth_of_Independent_States)
      (as by 2019, excl. Turkmenistan)
  28. [G7](https://en.wikipedia.org/wiki/Group_of_Seven)
  29. [G20](https://en.wikipedia.org/wiki/G20) (listing all EU member
      states as individual members)
  30. [FAOcode](http://www.fao.org/faostat/en/#definitions) (numeric)
  31. [GBDcode](http://ghdx.healthdata.org/) (numeric - Global Burden of
      Disease country codes)
  32. [IEA](https://www.iea.org/countries) (World Energy Balances 2021)
  33. [DACcode](https://www.oecd.org/dac/financing-sustainable-development/development-finance-standards/dacandcrscodelists.htm)
      (numeric - OECD Development Assistance Committee)
  33. [ccTLD](https://en.wikipedia.org/wiki/Country_code_top-level_domain) - country code top-level domains
  34. [GWcode](https://www.tandfonline.com/doi/abs/10.1080/03050629908434958) - Gledisch & Ward numerical codes as published in https://www.andybeger.com/states/articles/statelists.html
  35. CC41 - common classification for MRIOs (list of countries found in all public MRIOs)
  36. [IOC](https://en.wikipedia.org/wiki/List_of_IOC_country_codes) - International Olympic Committee (IOC) country codes
  37. [BACI](https://www.cepii.fr/CEPII/en/bdd_modele/bdd_modele_item.asp?id=37) - BACI: International Trade Database at the Product-Level
  38. [UNIDO](https://stat.unido.org/portal/dataset/getDataset/COUNTRY_PROFILE) - UNIDO INDSTAT database
  39. [EXIOBASE hybrid 3](https://zenodo.org/records/10148587) classification
  40. [EXIOBASE hybrid 3 consequential](https://zenodo.org/records/13926939) classification
  41. [GEOnumeric](https://ec.europa.eu/eurostat/comext/newxtweb/openNom.do) GEO numerical codes (also used in Prodcom)

  Coco contains official recognised codes as well as non-standard codes
  for disputed or dissolved countries. To restrict the set to only the
  official recognized UN members or include obsolete countries, pass

  ``` python
  import country_converter as coco
  cc = coco.CountryConverter()
  cc_UN = coco.CountryConverter(only_UNmember=True)
  cc_all = coco.CountryConverter(include_obsolete=True)

  cc.convert(['PSE', 'XKX', 'EAZ', 'FRA'], to='name_short')
  cc_UN.convert(['PSE', 'XKX', 'EAZ', 'FRA'], to='name_short')
  cc_all.convert(['PSE', 'XKX', 'EAZ', 'FRA'], to='name_short')
  ```

  cc results in \['Palestine', 'Kosovo', 'not found', 'France'\], whereas
  cc_UN converts to \['not found', 'not found', 'not found', 'France'\]
  and cc_all converts to \['Palestine', 'Kosovo', 'Zanzibar', 'France'\]
  Note that the underlying dataframe is available at the attribute .data
  (e.g. cc_all.data).



  Most of the underlying data can be found in Wikipedia, the page describing [ISO
  3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) is a good starting point. The
  page on the [ISO2 codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
  includes a section "Imperfect Implementations" explaining the GB/UK and EL/GR
  issue.
  UN regions/codes are given on the United Nation
  Statistical Division
  ([unstats](http://unstats.un.org/unsd/methods/m49/m49regin.htm))
  webpage. The differences between the ISO numeric and UN (M.49) codes are
  [also explained at wikipedia](https://en.wikipedia.org/wiki/UN_M.49).
  [EXIOBASE](http://exiobase.eu/), [WIOD](http://www.wiod.org/home) and
  [Eora](http://www.worldmrio.com/) classification were extracted from the
  respective databases. For [Eora](http://www.worldmrio.com/), the names
  are based on the 'Country names' csv file provided on the webpage, but
  updated for different names used in the Eora26 database. The MESSAGE
  classification follows the 11-region aggregation given in the
  [MESSAGE](http://www.iiasa.ac.at/web/home/research/researchPrograms/Energy/MESSAGE-model-regions.en.html)
  model regions description. The
  [IMAGE](https://models.pbl.nl/image/index.php/Welcome_to_IMAGE_3.0_Documentation)
  classification is based on the "[region classification
  map](https://models.pbl.nl/image/index.php/Region_classification_map)",
  for
  [REMIND](https://www.pik-potsdam.de/en/institute/departments/transformation-pathways/models/remind)
  we received a country mapping from the model developers.

  The membership of
  [OECD](http://www.oecd.org/about/membersandpartners/list-oecd-member-countries.htm)
  and [UN](http://www.un.org/en/members/) can be found at the membership
  organisations' webpages, information about obsolete country codes on the
  [Statoids](http://www.statoids.com/w3166his.html) webpage.

  The situation for the
  [EU](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:EU_enlargements)
  got complicated due to the Brexit process. For the naming, coco follows
  the [Eurostat
  glossary](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:EU_enlargements),
  thus EU27 refers to the EU without UK, whereas EU27_2007 refers to the
  EU without Croatia (the status after the 2007 enlargement). The shortcut
  EU always links to the most recent classification. The
  [EEA](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:European_Economic_Area_(EEA))
  agreements for the UK ended by 2021-01-01 (which also affects Guernsey, Isle of Man, Jersey and Gibraltar).
  Switzerland is not part of the EEA but member of the single market.

  The Global Burden of Disease country codes were extracted form the [GBD
  code book available
  here.](https://ghdx.healthdata.org/sites/default/files/ihme_query_tool/IHME_GBD_2019_CODEBOOK.zip)



  Please use the issue tracker for documenting bugs, proposing
  enhancements and all other communication related to coco.

  You can follow me on [mastodon - @kst@qoto.org](https://qoto.org/@kst) and [twitter](https://twitter.com/kst_stadler) to get
  the latest news about all my open-source and research projects (and
  occasionally some random retweets/toots).



  Want to contribute? Great! Please check
  [CONTRIBUTING.md](CONTRIBUTING.md) if you want to help to improve coco
  and for some pointer for how to add classifications.



  The package [pycountry](https://pypi.python.org/pypi/pycountry) provides
  access to the official ISO databases for historic countries, country
  subdivisions, languages and currencies. In case you need to convert
  non-English country names,
  [countrynames](https://github.com/occrp/countrynames) includes an
  extensive database of country names in different languages and functions
  to convert them to the different ISO 3166 standards.
  [Python-iso3166](https://github.com/deactivated/python-iso3166) focuses
  on conversion between the two-letter, three-letter and three-digit codes
  defined in the ISO 3166 standard.

  If you are using R, you should have a look at
  [countrycode](https://github.com/vincentarelbundock/countrycode).



  Version 0.5 of the country converter was published in the [Journal of
  Open Source Software](http://joss.theoj.org/). To cite the country
  converter in publication please use:

  Stadler, K. (2017). The country converter coco - a Python package for
  converting country names between different classification schemes. The
  Journal of Open Source Software. doi:
  [10.21105/joss.00332](http://dx.doi.org/10.21105/joss.00332)

  For the full bibtex key see [CITATION](CITATION)



  This package was inspired by (and the regular expression are mostly
  based on) the R-package
  [countrycode](https://github.com/vincentarelbundock/countrycode) by
  [Vincent Arel-Bundock](http://arelbundock.com/) and his (defunct) port
  to Python (pycountrycode). Many thanks to [Robert
  Gieseke](https://github.com/rgieseke) for the review of the source code
  and paper for the publication in the [Journal of Open Source
  Software](http://joss.theoj.org/).


pkgId: 873abaf0cd25417002335c6318132837c16f3878ce6ac25cb84a5310aabc8230
name: python-country-currencies
arch: src
version: 0.2
epoch: 0
release: 1
summary: mapping of ISO-3166 country codes to their respective currencies
url: UNKNOWN
rpm_license: MIT/X
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-country-currencies-0.2-1.src.rpm
checksum_type: sha256
description:
  country-currencies is a Python module that provides a mapping of ISO-3166
  country codes to the currencies used.


pkgId: 528113236b321fecc270f25af5d19b9bd4c0f8d286d49fe4619a0c18194588ae
name: python-countrycode
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/countrycode/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countrycode-0.4.0-1.src.rpm
checksum_type: sha256
description:
  Warning: This is *alpha* software.

  `countrycode` standardizes country names, converts them into ~40
  different coding schemes, and assigns region descriptors.

  Convert country names to and from 9 country code schemes.

  - Bugs & Development:
    https://github.com/vincentarelbundock/pycountrycode
  - Pypi: https://pypi.python.org/pypi/countrycode
  - [Vincent’s webpage](https://arelbundock.com)

  This is a Python port of [the `countrycode` package for
  R.](https://vincentarelbundock.github.io/countrycode)



  Different data sources use different coding schemes to represent
  countries (e.g. CoW or ISO). This poses two main problems: (1) some of
  these coding schemes are less than intuitive, and (2) merging these data
  requires converting from one coding scheme to another, or from long
  country names to a coding scheme.



  The `countrycode` function can convert to and from 40+ different country
  coding schemes, and to 600+ variants of country names in different
  languages and formats. It uses regular expressions to convert long
  country names (e.g. Sri Lanka) into any of those coding schemes or
  country names. It can create new variables with various regional
  groupings.



  See the section at the very end of this README for a full list of
  supported codes and languages. These include:

  - 600+ variants of country names in different languages and formats.
  - AR5
  - Continent and region identifiers.
  - Correlates of War (numeric and character)
  - European Central Bank
  - [EUROCONTROL](https://www.eurocontrol.int) - The European Organisation
    for the Safety of Air Navigation
  - Eurostat
  - Federal Information Processing Standard (FIPS)
  - Food and Agriculture Organization of the United Nations
  - Global Administrative Unit Layers (GAUL)
  - Geopolitical Entities, Names and Codes (GENC)
  - Gleditsch & Ward (numeric and character)
  - International Civil Aviation Organization
  - International Monetary Fund
  - International Olympic Committee
  - ISO (2/3-character and numeric)
  - Polity IV
  - United Nations
  - United Nations Procurement Division
  - Varieties of Democracy
  - World Bank
  - World Values Survey
  - Unicode symbols (flags)
  - And more…



  From `pypi`:

  ``` python
  pip install countrycode
  ```

  Latest version from Gitub:

  ``` sh
  git clone https://github.com/vincentarelbundock/pycountrycode
  cd pycountrycode
  pip install .
  ```



  ``` python
  import polars as pl
  from countrycode import countrycode

  countrycode([12, 124], origin = "iso3n", destination = "cldr.short.fr")
  ```

      ['Algérie', 'Canada']

  ``` python
  countrycode(['canada', 'United States', 'alGeria'], origin = "country.name.en.regex", destination = "iso3c")
  ```

      ['CAN', 'USA', 'DZA']

  ``` python
  countrycode(pl.Series(['DZA', 'CAN', 'USA']), origin = "iso3c", destination = "cldr.short.fr")
  ```

  <div><style>
  .dataframe > thead > tr > th,
  .dataframe > tbody > tr > td {
    text-align: right;
  }
  </style>
  <small>shape: (3,)</small>

  |           |
  |-----------|
  | str       |
  | "Algérie" |
  | "Canada"  |
  | "É.-U."   |

  </div>

  ``` python
  countrycode(['DZA', 'CAN', 'USA'], origin = "iso3c", destination = "iso3n")
  ```

      [12, 124, 840]

  ``` python
  countrycode(12, origin = "iso3n", destination = "cldr.short.de")
  ```

      'Algerien'

  ``` python
  countrycode(["Democratic Republic of Vietnam", "Algeria"], origin = "country.name.en.regex", destination = "iso3c")
  ```

      ['VNM', 'DZA']

  ``` python
  countrycode(["Algerien"], origin = "country.name.de", destination = "iso3c")
  ```

      ['DZA']



  ``` python
  from countrycode import codelist
  ", ".join(codelist.columns)
  ```

      'ar5, cctld, continent, country.name.de, country.name.de.regex, country.name.en, country.name.en.regex, country.name.fr, country.name.fr.regex, country.name.it, country.name.it.regex, cow.name, cowc, cown, currency, dhs, ecb, eu28, eurocontrol_pru, eurocontrol_statfor, eurostat, fao, fips, gaul, genc2c, genc3c, genc3n, gwc, gwn, icao.region, imf, ioc, iso.name.en, iso.name.fr, iso2c, iso3c, iso3n, iso4217c, iso4217n, p4.name, p4c, p4n, p5c, p5n, region, region23, un, un.name.ar, un.name.en, un.name.es, un.name.fr, un.name.ru, un.name.zh, un.region.code, un.region.name, un.regionintermediate.code, un.regionintermediate.name, un.regionsub.code, un.regionsub.name, unhcr, unhcr.region, unicode.symbol, unpd, vdem, vdem.name, wb, wb_api2c, wb_api3c, wvs, cldr.name.af, cldr.name.agq, cldr.name.ak, cldr.name.am, cldr.name.ar, cldr.name.ar_ly, cldr.name.ar_sa, cldr.name.as, cldr.name.asa, cldr.name.ast, cldr.name.az, cldr.name.az_cyrl, cldr.name.bas, cldr.name.be, cldr.name.bem, cldr.name.bez, cldr.name.bg, cldr.name.bm, cldr.name.bn, cldr.name.bo, cldr.name.br, cldr.name.brx, cldr.name.bs, cldr.name.bs_cyrl, cldr.name.ca, cldr.name.ccp, cldr.name.ce, cldr.name.ceb, cldr.name.cgg, cldr.name.chr, cldr.name.ckb, cldr.name.cs, cldr.name.cu, cldr.name.cy, cldr.name.da, cldr.name.dav, cldr.name.de, cldr.name.de_at, cldr.name.de_ch, cldr.name.dje, cldr.name.dsb, cldr.name.dua, cldr.name.dyo, cldr.name.dz, cldr.name.ee, cldr.name.el, cldr.name.en, cldr.name.en_001, cldr.name.en_au, cldr.name.eo, cldr.name.es, cldr.name.es_419, cldr.name.es_ar, cldr.name.es_cl, cldr.name.es_mx, cldr.name.es_us, cldr.name.et, cldr.name.eu, cldr.name.ewo, cldr.name.fa, cldr.name.fa_af, cldr.name.ff, cldr.name.fi, cldr.name.fil, cldr.name.fo, cldr.name.fr, cldr.name.fr_be, cldr.name.fr_ca, cldr.name.fur, cldr.name.fy, cldr.name.ga, cldr.name.gd, cldr.name.gl, cldr.name.gsw, cldr.name.gu, cldr.name.gv, cldr.name.ha, cldr.name.haw, cldr.name.he, cldr.name.hi, cldr.name.hr, cldr.name.hsb, cldr.name.hu, cldr.name.hy, cldr.name.ia, cldr.name.id, cldr.name.ig, cldr.name.ii, cldr.name.is, cldr.name.it, cldr.name.ja, cldr.name.jgo, cldr.name.jv, cldr.name.ka, cldr.name.kab, cldr.name.kam, cldr.name.kde, cldr.name.kea, cldr.name.khq, cldr.name.ki, cldr.name.kk, cldr.name.kkj, cldr.name.kl, cldr.name.kln, cldr.name.km, cldr.name.kn, cldr.name.ko, cldr.name.ko_kp, cldr.name.kok, cldr.name.ks, cldr.name.ksb, cldr.name.ksf, cldr.name.ksh, cldr.name.ku, cldr.name.kw, cldr.name.ky, cldr.name.lag, cldr.name.lb, cldr.name.lg, cldr.name.lkt, cldr.name.ln, cldr.name.lo, cldr.name.lrc, cldr.name.lt, cldr.name.lu, cldr.name.luo, cldr.name.luy, cldr.name.lv, cldr.name.mas, cldr.name.mer, cldr.name.mfe, cldr.name.mg, cldr.name.mgh, cldr.name.mgo, cldr.name.mi, cldr.name.mk, cldr.name.ml, cldr.name.mn, cldr.name.mr, cldr.name.ms, cldr.name.mt, cldr.name.mua, cldr.name.my, cldr.name.mzn, cldr.name.naq, cldr.name.nb, cldr.name.nd, cldr.name.ne, cldr.name.nl, cldr.name.nmg, cldr.name.nn, cldr.name.nnh, cldr.name.nus, cldr.name.nyn, cldr.name.om, cldr.name.or, cldr.name.os, cldr.name.pa, cldr.name.pa_arab, cldr.name.pl, cldr.name.ps, cldr.name.ps_pk, cldr.name.pt, cldr.name.pt_ao, cldr.name.qu, cldr.name.rm, cldr.name.rn, cldr.name.ro, cldr.name.ro_md, cldr.name.rof, cldr.name.ru, cldr.name.ru_ua, cldr.name.rw, cldr.name.sah, cldr.name.sbp, cldr.name.sd, cldr.name.se, cldr.name.se_fi, cldr.name.seh, cldr.name.sg, cldr.name.shi, cldr.name.shi_latn, cldr.name.si, cldr.name.sk, cldr.name.sl, cldr.name.smn, cldr.name.sn, cldr.name.so, cldr.name.sq, cldr.name.sr, cldr.name.sr_cyrl_ba, cldr.name.sr_cyrl_me, cldr.name.sr_cyrl_xk, cldr.name.sr_latn, cldr.name.sr_latn_ba, cldr.name.sr_latn_me, cldr.name.sr_latn_xk, cldr.name.sv, cldr.name.sw, cldr.name.sw_cd, cldr.name.sw_ke, cldr.name.ta, cldr.name.te, cldr.name.teo, cldr.name.tg, cldr.name.th, cldr.name.ti, cldr.name.tk, cldr.name.to, cldr.name.tr, cldr.name.tt, cldr.name.twq, cldr.name.tzm, cldr.name.ug, cldr.name.uk, cldr.name.ur, cldr.name.ur_in, cldr.name.uz, cldr.name.uz_arab, cldr.name.uz_cyrl, cldr.name.vai, cldr.name.vai_latn, cldr.name.vi, cldr.name.wae, cldr.name.wo, cldr.name.xh, cldr.name.xog, cldr.name.yav, cldr.name.yi, cldr.name.yo, cldr.name.yo_bj, cldr.name.yue, cldr.name.yue_hans, cldr.name.zgh, cldr.name.zh, cldr.name.zh_hant, cldr.name.zh_hant_hk, cldr.name.zu, cldr.short.af, cldr.short.am, cldr.short.ar, cldr.short.ar_ly, cldr.short.ar_sa, cldr.short.as, cldr.short.ast, cldr.short.az, cldr.short.az_cyrl, cldr.short.be, cldr.short.bg, cldr.short.bn, cldr.short.br, cldr.short.bs, cldr.short.bs_cyrl, cldr.short.ca, cldr.short.ccp, cldr.short.ce, cldr.short.ceb, cldr.short.chr, cldr.short.ckb, cldr.short.cs, cldr.short.cy, cldr.short.da, cldr.short.de, cldr.short.de_at, cldr.short.de_ch, cldr.short.dsb, cldr.short.dz, cldr.short.ee, cldr.short.el, cldr.short.en, cldr.short.en_001, cldr.short.en_au, cldr.short.es, cldr.short.es_419, cldr.short.es_ar, cldr.short.es_cl, cldr.short.es_mx, cldr.short.es_us, cldr.short.et, cldr.short.eu, cldr.short.fa, cldr.short.fa_af, cldr.short.fi, cldr.short.fil, cldr.short.fo, cldr.short.fr, cldr.short.fr_be, cldr.short.fr_ca, cldr.short.fur, cldr.short.fy, cldr.short.ga, cldr.short.gd, cldr.short.gl, cldr.short.gsw, cldr.short.gu, cldr.short.he, cldr.short.hi, cldr.short.hr, cldr.short.hsb, cldr.short.hu, cldr.short.hy, cldr.short.ia, cldr.short.id, cldr.short.ig, cldr.short.is, cldr.short.it, cldr.short.ja, cldr.short.jv, cldr.short.ka, cldr.short.kea, cldr.short.kk, cldr.short.km, cldr.short.kn, cldr.short.ko, cldr.short.ko_kp, cldr.short.kok, cldr.short.ksh, cldr.short.ku, cldr.short.ky, cldr.short.lb, cldr.short.lo, cldr.short.lt, cldr.short.lv, cldr.short.mk, cldr.short.ml, cldr.short.mn, cldr.short.mr, cldr.short.ms, cldr.short.mt, cldr.short.my, cldr.short.mzn, cldr.short.nb, cldr.short.ne, cldr.short.nl, cldr.short.nn, cldr.short.or, cldr.short.pa, cldr.short.pl, cldr.short.ps, cldr.short.ps_pk, cldr.short.pt, cldr.short.pt_ao, cldr.short.ro, cldr.short.ro_md, cldr.short.ru, cldr.short.ru_ua, cldr.short.sah, cldr.short.sd, cldr.short.se, cldr.short.se_fi, cldr.short.si, cldr.short.sk, cldr.short.sl, cldr.short.smn, cldr.short.so, cldr.short.sq, cldr.short.sr, cldr.short.sr_cyrl_ba, cldr.short.sr_cyrl_me, cldr.short.sr_cyrl_xk, cldr.short.sr_latn, cldr.short.sr_latn_ba, cldr.short.sr_latn_me, cldr.short.sr_latn_xk, cldr.short.sv, cldr.short.sw, cldr.short.sw_cd, cldr.short.sw_ke, cldr.short.ta, cldr.short.te, cldr.short.tg, cldr.short.th, cldr.short.ti, cldr.short.tk, cldr.short.to, cldr.short.tr, cldr.short.tt, cldr.short.ug, cldr.short.uk, cldr.short.ur, cldr.short.ur_in, cldr.short.uz, cldr.short.uz_cyrl, cldr.short.vai, cldr.short.vi, cldr.short.wae, cldr.short.wo, cldr.short.yi, cldr.short.yo, cldr.short.yo_bj, cldr.short.yue, cldr.short.yue_hans, cldr.short.zh, cldr.short.zh_hant, cldr.short.zh_hant_hk, cldr.short.zu, cldr.variant.af, cldr.variant.am, cldr.variant.ar, cldr.variant.ar_ae, cldr.variant.ar_ly, cldr.variant.ar_sa, cldr.variant.as, cldr.variant.ast, cldr.variant.az, cldr.variant.az_cyrl, cldr.variant.be, cldr.variant.bg, cldr.variant.bn, cldr.variant.bn_in, cldr.variant.br, cldr.variant.bs, cldr.variant.bs_cyrl, cldr.variant.ca, cldr.variant.ccp, cldr.variant.ce, cldr.variant.ceb, cldr.variant.chr, cldr.variant.ckb, cldr.variant.cs, cldr.variant.cy, cldr.variant.da, cldr.variant.de, cldr.variant.de_at, cldr.variant.de_ch, cldr.variant.dsb, cldr.variant.dz, cldr.variant.ee, cldr.variant.el, cldr.variant.en, cldr.variant.en_001, cldr.variant.en_au, cldr.variant.es, cldr.variant.es_419, cldr.variant.es_ar, cldr.variant.es_cl, cldr.variant.es_mx, cldr.variant.es_us, cldr.variant.et, cldr.variant.eu, cldr.variant.fa, cldr.variant.fa_af, cldr.variant.fi, cldr.variant.fil, cldr.variant.fo, cldr.variant.fr, cldr.variant.fr_be, cldr.variant.fr_ca, cldr.variant.fur, cldr.variant.fy, cldr.variant.ga, cldr.variant.gd, cldr.variant.gl, cldr.variant.gu, cldr.variant.ha, cldr.variant.he, cldr.variant.hi, cldr.variant.hr, cldr.variant.hsb, cldr.variant.hu, cldr.variant.hy, cldr.variant.ia, cldr.variant.id, cldr.variant.ig, cldr.variant.is, cldr.variant.it, cldr.variant.ja, cldr.variant.jv, cldr.variant.ka, cldr.variant.kea, cldr.variant.kk, cldr.variant.km, cldr.variant.kn, cldr.variant.ko, cldr.variant.ko_kp, cldr.variant.kok, cldr.variant.ksh, cldr.variant.ku, cldr.variant.ky, cldr.variant.lb, cldr.variant.ln, cldr.variant.lo, cldr.variant.lt, cldr.variant.lv, cldr.variant.mk, cldr.variant.ml, cldr.variant.mn, cldr.variant.mr, cldr.variant.ms, cldr.variant.mt, cldr.variant.my, cldr.variant.mzn, cldr.variant.nb, cldr.variant.ne, cldr.variant.nl, cldr.variant.nn, cldr.variant.or, cldr.variant.pa, cldr.variant.pl, cldr.variant.ps, cldr.variant.ps_pk, cldr.variant.pt, cldr.variant.pt_ao, cldr.variant.qu, cldr.variant.ro, cldr.variant.ro_md, cldr.variant.ru, cldr.variant.ru_ua, cldr.variant.sd, cldr.variant.se_fi, cldr.variant.si, cldr.variant.sk, cldr.variant.sl, cldr.variant.smn, cldr.variant.so, cldr.variant.sq, cldr.variant.sr, cldr.variant.sr_cyrl_ba, cldr.variant.sr_cyrl_me, cldr.variant.sr_cyrl_xk, cldr.variant.sr_latn, cldr.variant.sr_latn_ba, cldr.variant.sr_latn_me, cldr.variant.sr_latn_xk, cldr.variant.sv, cldr.variant.sw, cldr.variant.sw_cd, cldr.variant.sw_ke, cldr.variant.ta, cldr.variant.te, cldr.variant.tg, cldr.variant.th, cldr.variant.ti, cldr.variant.tk, cldr.variant.to, cldr.variant.tr, cldr.variant.tt, cldr.variant.ug, cldr.variant.uk, cldr.variant.ur, cldr.variant.ur_in, cldr.variant.uz, cldr.variant.uz_cyrl, cldr.variant.vi, cldr.variant.wae, cldr.variant.wo, cldr.variant.yi, cldr.variant.yo, cldr.variant.yo_bj, cldr.variant.yue, cldr.variant.yue_hans, cldr.variant.zh, cldr.variant.zh_hant, cldr.variant.zh_hant_hk, cldr.variant.zu'


pkgId: 565c884006117044272c20266096f37f099f43d3555df7fdb79afb5cda14f246
name: python-countrydata
arch: src
version: 1.0.6
epoch: 0
release: 1
summary: An improved python package for retrieving data of all the countries in the world. Based on Manoj's
url: https://pypi.org/project/countrydata/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countrydata-1.0.6-1.src.rpm
checksum_type: sha256
description:
  Effortlessly access comprehensive data for every country in the world with `countrydata`. This package provides a simple and intuitive way to retrieve information ranging from basic facts like capitals and currencies to detailed insights about states, cities, and more.



  * **Simplicity:**  Effortlessly retrieve data using intuitive functions and clear syntax.
  * **Comprehensiveness:** Access a wide range of data points, including demographics, geography, culture, and more.
  * **Up-to-Date:**  We strive to maintain current information, so you can rely on the accuracy of our data.



  Use pip to install `countrydata`:

  ```bash
  pip install countrydata
  ```



  There are 2 modules -
  1. Retrieving data of all countries **(Module Countries)**
  2. Retrieving data of a single country **(Module Country)**





  - [countries()](#countries)
  - [phone_code()](#phone_code)
  - [currencies()](#currencies)
  - [capitals()](#capitals)
  - [continents()](#continents)
  - [countries_in_continents()](#countries_in_continents)
  - [regions()](#regions)
  - [countries_in_region()](#countries_in_region)
  - [states()](#states)



  - [info()](#info)
  - [name()](#name)
  - [states()](#states)
  - [cities()](#cities)
  - [states_and_cities()](#states_and_cities)
  - [iso()](#iso)
  - [alt_spelling()](#alt_spellings)
  - [area()](#area)
  - [borders()](#borders)
  - [capital()](#capital)
  - [calling_codes()](#calling_codes)
  - [independence()](#independence)
  - [currency()](#currency)
  - [capital_latlng()](#capital_latlng)
  - [demonym()](#demonym)
  - [flag()](#flag)
  - [languages()](#languages)
  - [latlang()](#latlng)
  - [native_name()](#native_name)
  - [population()](#population)
  - [timezones()](#timezones)
  - [tld()](#tld)
  - [translations()](#translations)
  - [continents()](#continent)
  - [temperature()](#temperature)
  - [government()](#government)
  - [expectancy()](#expectancy)
  - [dish()](#dish)
  - [symbol()](#symbol)
  - [desnity()](#density)
  - [region()](#region)
  - [religion()](#religion)
  - [total_states()](#total_states)
  - [total_cities()](#total_cities)
  - [wiki()](#wiki)
  - [gei_json()](#geo_json)
  - [all()](#all)




  > For the sake of simplicity, I will be showing less data in outputs here.


  Returns the list of all available countries in the world

  ``` python
  from countrydata import countries

  data = countries.all_countries()
  data.countries()

  ```

  ``` python
  ['Afghanistan', 'Aland Islands', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua And Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas The',  'Vietnam', 'Virgin Islands (British)', 'Virgin Islands (US)', 'Wallis And Futuna Islands', 'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe']

  ```


  Returns phone codes of each country in a dictionary

  ``` python
  from countrydata import countries

  country = countries.all_countries()
  print(country.phone_code())

  ```

  ``` python
  {'Afghanistan': '93', 'Aland Islands': '+358-18', 'Albania': '355', 'Algeria': '213', 'American Samoa': '+1-684', 'Andorra': '376', 'Angola': '244', 'Anguilla': '+1-264', 'Antarctica': '', 'Antigua And Barbuda': '+1-268', 'Argentina': '54', 'Armenia': '374', 'Aruba': '297', 'Australia': '61', 'Austria': '43', 'Azerbaijan': '994', 'Bahamas The': '+1-242', 'Bahrain': '973', 'Bangladesh': '880',

  ```


  Returns currencies of each country in a dictionary

  ```python
  from countrydata import countries

  country = countries.all_countries()
  print(country.currencies())

  ```

  ```python
  {'Afghanistan': 'AFN', 'Aland Islands': 'EUR', 'Albania': 'ALL', 'Algeria': 'DZD', 'American Samoa': 'USD', 'Andorra': 'EUR', 'Angola': 'AOA', 'Anguilla': 'XCD', 'Antarctica': '', 'Antigua And Barbuda': 'XCD', 'Argentina': 'ARS', 'Belgium': 'EUR', 'Belize': 'BZD', 'Benin': 'XOF', 'Bermuda': 'BMD', 'Bhutan': 'BTN', 'Bolivia': 'BOB', 'Bosnia and Herzegovina': 'BAM', 'Botswana': 'BWP',

  ```


  Returns captial cities of each country in a dictionary
  ```python
  from countrydata import countries

  country = countries.all_countries()
  print(country.capitals())
  ```
  ```python
  {'Afghanistan': 'Kabul', 'Aland Islands': 'Mariehamn', 'Albania': 'Tirana', 'Algeria': 'Algiers', 'American Samoa': 'Pago Pago', 'Andorra': 'Andorra la Vella', 'Angola': 'Luanda', 'Anguilla': 'The Valley', 'Antarctica': '', 'Antigua And Barbuda': "St. John's",  'Bahamas The': 'Nassau', 'Bahrain': 'Manama', 'Bangladesh': 'Dhaka', 'Barbados': 'Bridgetown', 'Belarus': 'Minsk', 'Belgium': 'Brussels', 'Belize': 'Belmopan',
  ```


  Returns continents of each country
  ```python
  from countrydata import countries

  country = countries.all_countries()
  print(country.continents())
  ```

  ```
  [{'country': 'Afghanistan', 'continent': 'Asia'}, {'country': 'Albania', 'continent': 'Europe'}, {'country': 'Algeria', 'continent': 'Africa'}, {'country': 'American Samoa', 'continent': 'Oceania'}, {'country': 'Andorra', 'continent': 'Europe'}, {'country': 'Angola', 'continent': 'Africa'}, {'country': 'Anguilla', 'continent': 'North America'},{'country': 'Antarctica', 'continent': 'Antarctica'}],

  ```


  Returns a list of countries present in a continent
  ```python
  from countrydata import countries

  country = countries.all_countries()
  print(country.countries_in_continents())
  ```

  ```python
  {'Asia': ['Afghanistan', 'Armenia', 'Azerbaijan', 'Bahrain', 'Bangladesh', 'Bhutan', 'Brunei', 'Cambodia', 'China', 'Cyprus', 'East Timor', 'Georgia', 'Hong Kong', 'India', 'Indonesia', 'Iran', 'Iraq', 'Israel', 'Japan', 'Jordan', 'Kazakhstan', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Lebanon',   'Tajikistan', 'Thailand', 'Turkey', 'Turkmenistan', 'United Arab Emirates', 'Uzbekistan', 'Vietnam', 'Yemen']
  ```


  Returns countries with its region
  ```python
  from countrydata import countries

  country = countries.all_countries()
  print(country.regions())
  ```

  ```python
  [{'country': 'Afghanistan', 'location': 'Southern and Central Asia'}, {'country': 'Albania', 'location': 'Southern Europe'}, {'country': 'Algeria', 'location': 'Northern Africa'}, {'country': 'American Samoa', 'location': 'Polynesia'}, {'country': 'Andorra', 'location': 'Southern Europe'}, {'country': 'Aruba', 'location': 'Caribbean'}, {'country': 'Australia', 'location': 'Australia and New Zealand'},
  ```


  Returns list of countries present in its region
  ```python
  from countrydata import countries

  country = countries.all_countries()
  print(country.countries_in_region())
  ```

  ```python
  {'Antarctica': ['Antarctica', 'Heard Island and McDonald Islands', 'South Georgia and the South Sandwich Islands'], 'Eastern Europe': ['Belarus', 'Hungary', 'Moldova', 'Poland', 'Romania', 'Ukraine'], 'Southern Europe': ['Albania', 'Andorra',   'Italy', 'North Macedonia', 'Yugoslavia'], 'Western Europe': ['Austria', 'Belgium', 'France', 'Germany', 'Liechtenstein',  'Switzerland'], 'North America': ['Bermuda',  'United States'],
  ```


  Returns all the available states in the world with its state code
  ```python
  from countrydata import countries

  country = countries.all_countries()
  print(country.states())
  ```
  ```python
  {'id': 1836, 'name': 'Nenets Autonomous Okrug', 'state_code': 'NEN'}, {'id': 1857, 'name': 'Nizhny Novgorod Oblast', 'state_code': 'NIZ'}, {'id': 1834, 'name': 'Novgorod Oblast', 'state_code': 'NGR'}, {'id': 1888, 'name': 'Novosibirsk', 'state_code': 'NVS'}, {'id': 1846, 'name': 'Omsk Oblast', 'state_code': 'OMS'}, {'id': 1886, 'name': 'Orenburg Oblast', 'state_code': 'ORE'}, {'id': 1908, 'name': 'Oryol Oblast', 'state_code': 'ORL'}, {'id': 1909, 'name': 'Penza Oblast', 'state_code': 'PNZ'}, {'id': 1871, 'name': 'Perm Krai', 'state_code': 'PER'}, {'id': 1833, 'name': 'Primorsky Krai', 'state_code': 'PRI'}, {'id': 1863, 'name': 'Pskov Oblast', 'state_code': 'PSK'}, {'id': 1852, 'name': 'Republic of Adygea', 'state_code': 'AD'}
  ```







  ```python
  from countrydata import country

  country = country.country_details('Spain')  #you can give your desired country
  print(country.info())
  ```
  ```

  ```


  Returns the name of the country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.name())

  ```

  ```
  India
  ```



  Returns all available in a  states list
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.states())

  ```
  ```python
  ['Andaman and Nicobar Islands', 'Andhra Pradesh', 'Arunachal Pradesh', 'Assam', 'Bihar', 'Chandigarh', 'Chhattisgarh', 'Dadra and Nagar Haveli', 'Daman and Diu', 'Delhi', 'Goa', 'Gujarat', 'Haryana', 'Himachal Pradesh', 'Jammu and Kashmir', 'Jharkhand', 'Karnataka', 'Kerala', 'Ladakh', 'Lakshadweep', 'Madhya Pradesh', 'Maharashtra', 'Manipur', 'Meghalaya', 'Mizoram', 'Nagaland', 'Odisha', 'Puducherry', 'Punjab', 'Rajasthan', 'Sikkim', 'Tamil Nadu', 'Telangana', 'Tripura',
  'Uttar Pradesh', 'Uttarakhand', 'West Bengal']
  ```



  Returns all available cities in a list
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.cities())

  ```

  ```python

  ['Bamboo Flat', 'Nicobar', 'Port Blair', 'South Andaman', 'Addanki', 'Ādoni', 'Akasahebpet', 'Akivīdu', 'Akkarampalle', 'Amalāpuram', 'Amudālavalasa', 'Anakāpalle', 'Anantapur', 'Atmakūr', 'Attili', 'Avanigadda', 'Badvel', 'Banganapalle', 'Bāpatla', 'Betamcherla', 'Bhattiprolu', 'Bhīmavaram', 'Bhīmunipatnam', 'Bobbili', 'Challapalle', 'Chemmumiahpet', 'Chilakalūrupet', 'Chinnachowk', 'Chīpurupalle', 'Chīrāla', 'Chittoor',  'Diguvametta', 'East Godāvari', 'Elamanchili', 'Puttaparthi', 'Puttūr', 'Rājahmundry',  'Takdah', 'Taki', 'Tamluk', 'Tarakeswar', 'Titagarh', 'Tufanganj', 'Tulin', 'Uchalan', 'Ula', 'Uluberia', 'Uttar Dinajpur district', 'Uttarpara Kotrung']
  ```


  Returns states and cities in a dict
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.states_and_cities())
  ```

  ```python

  [{'id': 142095, 'name': 'South 24 Parganas district', 'latitude': '22.16197000', 'longitude': '88.43170000'}, {'id': 142096, 'name': 'Srikhanda', 'latitude': '23.60000000', 'longitude': '88.08330000'}, {'id': 142097, 'name': 'Srirampur', 'latitude': '23.35000000', 'longitude': '88.12000000'}, {'id': 142098, 'name': 'Suri', 'latitude': '23.91666667', 'longitude': '87.53333333'}, {'id': 142099, 'name': 'Swarupnagar community development block', 'latitude': '22.83330000', 'longitude': '88.86670000'}, {'id': 142100, 'name': 'Takdah', 'latitude': '27.03330000', 'longitude': '88.36670000'}, ]}]
  ```



  Returns ISO codes for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.iso())

  ```

  ```
  {'alpha2': 'IN', 'alpha3': 'IND'}
  ```

  ```python
  Returns alternate spellings for the name of a specified country
  from countrydata import country

  country = country.country_details('Spain')
  print(country.alt_spellings())

  ```

  ```
  ['IN', 'Bhārat', 'Republic of India', 'Bharat Ganrajya']
  ```

  Returns area (km²) for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.area())

  ```

  ```
  3287590
  ```

  Returns bordering countries (ISO3) for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.borders())

  ```

  ```
  ['AFG', 'BGD', 'BTN', 'MMR', 'CHN', 'NPL', 'PAK', 'LKA']
  ```

  Returns capital city for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.capital())

  ```

  ```
  New Delhi
  ```


  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.calling_codes())

  ```

  ```
   ["91"]
  ```

  Returns independence year for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.independence())

  ```

  ```
  1947
  ```

  Returns official currency for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.currency())

  ```

  ```
  ['INR']
  ```

  Returns capital city latitude and longitude for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.capital_latlng())

  ```

  ```
  [28.614179, 77.202266]
  ```

  Returns the demonyms for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.demonym())

  ```

  ```
  Indian
  ```

  Returns SVG link of the official flag for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.flag())

  ```

  ```
  Sorry there is no link for indain flag :(
  ```


  Returns all spoken languages for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.languages())

  ```

  ```
  ['Asami', 'Bengali', 'Gujarati', 'Hindi', 'Kannada', 'Malayalam', 'Marathi', 'Odia', 'Punjabi', 'Tamil', 'Telugu', 'Urdu', 'Sanskrit', 'English', 'Konkani', 'Nepali', 'Bodo', 'Kashmiri', 'Maithili', 'Santali', 'Sindhi']
  ```

  Returns approx latitude and longitude for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.latlng())

  ```

  ```
   [20, 77]
  ```

  Returns the name of the country in its native tongue
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.native_name())

  ```

  ```
  भारत
  ```

  Returns the population of the specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.population())

  ```

  ```
  1263930000
  ```

  Returns the timezones of a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.timezones())

  ```

  ```
  ['UTC+05:30']
  ```

  Returns the domain extension of a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.tld())

  ```

  ```
  ['.in']
  ```

  Returns translations of a given country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.translations())

  ```

  ```
  {'de': 'Indien', 'es': 'India', 'fr': 'Inde', 'ja': 'インド', 'it': 'India'}
  ```

  Returns the continent of a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.continent())

  ```

  ```
  Asia
  ```

  Returns the average temperature for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.temperature())

  ```

  ```
  23.65
  ```

  Returns the type of government for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.government())

  ```

  ```
  Federal Republic
  ```

  Returns the life expectancy of a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.expectancy())

  ```

  ```
  62.5
  ```

  Returns the national dish of a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.dish())

  ```

  ```
  No officially announced national dish
  ```

  Returns the national symbol of a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.symbol())

  ```

  ```
  animal
  ```

  Returns the density of a specified country in sq km
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.density())

  ```

  ```
  454.9380726
  ```

  Returns the region of a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.region())

  ```

  ```
  Southern and Central Asia
  ```

  Returns the religion of the specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.religion())

  ```

  ```
  Hinduism
  ```

  Returns the total number of states for the specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.total_states())

  ```

  ```
  37 #including union territories
  ```

  Return total numnber of cities for the specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.total_cities())

  ```

  ```
  3865
  ```

  Returns the Wikipedia page link for the specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.wiki())

  ```

  ```
  http://en.wikipedia.org/wiki/india
  ```

  Returns the every available data of all the countries in the world
  ```python
  from countrydata import country

  country = country.country_details()
  print(country.all())

  ```

  ```python

  ```


  Returns geoJSON for a specified country
  ```python
  from countrydata import country

  country = country.country_details('Spain')
  print(country.geo_json())

  ```

  ```
  {
          "type": "FeatureCollection",
          "features": [
              {
                  "type": "Feature",
                  "id": "IND",
                  "properties": {
                      "name": "India"
                  },
                  "geometry": {
                      "type": "Polygon",
                      "coordinates": [
                          [
                              [
                                  77.837451,
                                  35.49401
                              ],
                              [
                                  78.912269,
                                  34.321936
                              ],
                              [
                                  78.811086,
                                  33.506198
                              ],
                              [
                                  77.837451,
                                  35.49401
                              ]
                          ]
                      ]
                  }
              }
          ]
      },
  ```



  This project is licensed under the [MIT License](LICENSE).


pkgId: 552dc049dfedbb0f84c4faa9a9c415235c58622e20e8e42e057caee2ee13fdf7
name: python-countryflag
arch: src
version: 0.1.2b3
epoch: 0
release: 1
summary: A Python package for converting country names into emoji flags
url: https://github.com/Lendersmark/countryflag
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countryflag-0.1.2b3-1.src.rpm
checksum_type: sha256
description:
  Countryflag is a Python package to convert country names into emoji flags.


  ![PyPI](https://img.shields.io/pypi/v/countryflag)
  [![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![image](https://img.shields.io/github/license/lendersmark/countryflag)](https://opensource.org/licenses/MIT)



  I'm new to Python and to programming in general, and I have lots of things to learn, but instead of exercising on "Hello World"-like trivial examples I wanted to create a "real" project from the beginning.
  The idea was to build a simple command to get the correspondent emoji flag starting from a country name.




  Countryflag is registered at PyPI. From the command line:

      pip install countryflag --upgrade

  Source code is also available on
  [GitHub](https://github.com/lendersmark/countryflag).






  Convert various country names to emojy flags:

      import countryflag
      countries = ['Germany', 'BE', 'United States of America', 'Japan']
      flags = countryflag.getflag(countries)
      print(flags)

  The default output is a space separated list of emoji flags, one for each country:

  🇩🇪 🇧🇪 🇺🇸 🇯🇵



  Countryflag can also be used as a command line tool, specifying one or more country name(s) as command line arguments, separated by spaces.

      countryflag Germany BE Spain 'United States of America'

  Will result in:

  🇩🇪 🇧🇪 🇪🇸 🇺🇸



  Country names can be expressed in various classification schemes such as ISO-2, ISO-3, ISO-numeric, official name, etc.
  The input format is determined automatically, based on ISO two letter, ISO three letter, ISO numeric or regular expression matching.
  Countryflag uses [Country Converter (coco)](https://pypi.org/project/country-converter/) to convert country names to ISO-2 codes and then [Emoji-country-flag](https://pypi.org/project/emoji-country-flag/) to render the emoji flags: please see their documentation for further details.




  All the flag emoji are actually composed of two unicode letters. These are the 26 regional indicator symbols:

  🇦 🇧 🇨 🇩 🇪 🇫 🇬 🇭 🇮 🇯 🇰 🇱 🇲 🇳 🇴 🇵 🇶 🇷 🇸 🇹 🇺 🇻 🇼 🇽 🇾 🇿

  According to ISO 3166, pairing unicode letters of the country code, compatible browsers/phones/terminals will display the correspondent Emoji flag.
  For example BE is Belgium: 🇧 + 🇪 = 🇧🇪

  So, to encode an ASCII code like :BE: to 🇧🇪, Countrycode converts country names to the corresponding regional indicator symbols.




  Some terminals, such as [iTerm2](https://iterm2.com/) on Mac Os, support Emoji country flags very well.

  However, many others don't, such as Windows Terminal on Windows or Gnome Terminal on Linux: instead of the flag, they will display unicode letters.
  For example, invoking `countryflag belgium` into Windows Terminal will return 🇧 🇪 as output, instead of the emojy country flag 🇧🇪.

  At least on Windows, the reason seems to be political/PR-related, as explained [here](https://answers.microsoft.com/en-us/windows/forum/all/flag-emoji/85b163bc-786a-4918-9042-763ccf4b6c05).

  Therefore, Countryflag makes much more sense when used on systems/terminals that can properly render Emoji country flags.



  Please use the issue tracker for documenting bugs, proposing
  enhancements and all other communication related to countryflag.



  This package depends on:

  * [Country Converter (coco)](https://pypi.org/project/country-converter/) by [Konstantin Stadler](https://pypi.org/user/konstantinstadler/)
  * [Emoji-country-flag](https://pypi.org/project/emoji-country-flag/) by [cuzi](https://pypi.org/user/cuzi/)


pkgId: dcb3f782fc5b961ec1b7a543edc470f9e6c894a0ce07c71e1c1e3a9f7391bdd7
name: python-countryguess
arch: src
version: 0.4.4
epoch: 0
release: 1
summary: Fuzzy lookup of country information
url: https://pypi.org/project/countryguess/
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countryguess-0.4.4-1.src.rpm
checksum_type: sha256
description:
  **countryguess** looks up country information by country codes or name matching.
  It tries to be lean (but not mean) and fast: All dependencies are in the Python
  Standard Library and country data is loaded lazily on demand.

  Code: [Codeberg](https://codeberg.org/plotski/countryguess)
  Package: [PyPI](https://pypi.org/project/countryguess)



  `guess_country()` uses the default country data that is already packaged.

  ```python
  >>> from countryguess import guess_country
  >>> guess_country("britain")
  {
      'name_short': 'United Kingdom',
      'name_official': 'United Kingdom of Great Britain and Northern Ireland',
      'iso2': 'GB',
      'iso3': 'GBR',
      ...
  }
  >>> guess_country("no such country")
  None
  >>> guess_country("no such country", default="Oh, well.")
  'Oh, well.'
  >>> guess_country("PoRtUgAl", attribute="iso2")
  'PT'
  >>> guess_country("TW", attribute="name_official")  # 2-letter code lookup
  'Republic of China'
  >>> guess_country("tWn", attribute="name_short")    # 3-letter code lookup
  'Taiwan'
  ```

  Matching by regular expression can be extended by mapping
  [ISO2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes to
  [`re.Pattern`](https://docs.python.org/3/library/re.html#re.compile) objects.

  ```python
  >>> regex_map = {
  ...     "MN": re.compile(r'^mongol\s+uls$', flags=re.IGNORECASE),
  ...     "JP": re.compile(r'^ni(?:pp|h)on', flags=re.IGNORECASE),
  ... }
  >>> guess_country("Mongol Uls", attribute="name_short", regex_map=regex_map)
  'Mongolia'
  >>> guess_country("Nippon", attribute="name_short", regex_map=regex_map)
  'Japan'
  ```

  You can also create a `CountryData` instance yourself to provide your own
  country data in a JSON file.

  ```python
  >>> from countryguess import CountryData
  >>> countries = CountryData("path/to/countries.json")
  >>> countries["vIeTnAm"]
  {'name_short': 'Vietnam', ...}
  >>> countries["vn"]
  {'name_short': 'Vietnam', ...}
  >>> countries["asdf"]
  KeyError: 'asdf'
  >>> countries.get("asdf")
  None
  >>> countries.get("kuwait")
  {'name_short': 'Kuwait', ...}
  ```

  On `CountryData` instances, every key in the JSON data is accessible as a
  method.

  ```python
  >>> countries.name_official("portugal")
  'Portuguese Republic'
  >>> countries.continent("vanuatu")
  'Oceania'
  ```



  Countries are identified by name, 2-letter code
  ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) or
  3-letter code
  ([ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)). All
  identifiers are matched case-insensitively.

  Names are matched with regular expressions that are stored in the JSON data. If
  that fails, fuzzy matching against ``name_short`` and ``name_official`` is done
  with [difflib](https://docs.python.org/3/library/difflib.html).



  Country information is read from a JSON file. One is shipped with the package,
  but you can also provide your own to the `CountryData` class as described
  above. The information in the default file was gratefully extracted from
  [country-converter](https://pypi.org/project/country-converter/). (Many thanks!)

  The country data file must contain a list of JSON objects. Each object
  represents a country that must contain at least the following keys:

  - `name_short`
  - `name_official`
  - `iso2`
  - `iso3`
  - `regex`



  The following classification schemes are available in the included country data.

  <!-- CLASSIFICATION_SCHEMES (see fetch_data_from_country_converter.py) -->
  1.  ISO2 (ISO 3166-1 alpha-2) - including UK/EL for Britain/Greece (but always convert to GB/GR)
  2.  ISO3 (ISO 3166-1 alpha-3)
  3.  ISO - numeric (ISO 3166-1 numeric)
  4.  UN numeric code (M.49 - follows to a large extend ISO-numeric)
  5.  A standard or short name
  6.  The "official" name
  7.  Continent: 6 continent classification with Africa, Antarctica, Asia, Europe, America, Oceania
  8.  [Continent_7 classification](https://ourworldindata.org/world-region-map-definitions) - 7 continent classification spliting North/South America
  9.  UN region
  10. [EXIOBASE 1](http://exiobase.eu/) classification (2 and 3 letters)
  11. [EXIOBASE 2](http://exiobase.eu/) classification (2 and 3 letters)
  12. [EXIOBASE 3](https://zenodo.org/doi/10.5281/zenodo.3583070) classification (2 and 3 letters)
  13. [WIOD](http://www.wiod.org/home) classification
  14. [Eora](http://www.worldmrio.com/)
  15. [OECD](http://www.oecd.org/about/membersandpartners/list-oecd-member-countries.htm)
      membership (per year)
  16. [MESSAGE](http://www.iiasa.ac.at/web/home/research/researchPrograms/Energy/MESSAGE-model-regions.en.html)
      11-region classification
  17. [IMAGE](https://models.pbl.nl/image/index.php/Welcome_to_IMAGE_3.0_Documentation)
  18. [REMIND](https://www.pik-potsdam.de/en/institute/departments/transformation-pathways/models/remind)
  19. [UN](http://www.un.org/en/members/) membership (per year)
  20. [EU](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:EU_enlargements)
      membership (including EU12, EU15, EU25, EU27, EU27_2007, EU28)
  21. [EEA](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:European_Economic_Area_(EEA))
      membership
  22. [Schengen](https://en.wikipedia.org/wiki/Schengen_Area) region
  23. [Cecilia](https://cecilia2050.eu/system/files/De%20Koning%20et%20al.%20%282014%29_Scenarios%20for%202050_0.pdf)
      2050 classification
  24. [APEC](https://en.wikipedia.org/wiki/Asia-Pacific_Economic_Cooperation)
  25. [BRIC](https://en.wikipedia.org/wiki/BRIC)
  26. [BASIC](https://en.wikipedia.org/wiki/BASIC_countries)
  27. [CIS](https://en.wikipedia.org/wiki/Commonwealth_of_Independent_States)
      (as by 2019, excl. Turkmenistan)
  28. [G7](https://en.wikipedia.org/wiki/Group_of_Seven)
  29. [G20](https://en.wikipedia.org/wiki/G20) (listing all EU member
      states as individual members)
  30. [FAOcode](http://www.fao.org/faostat/en/#definitions) (numeric)
  31. [GBDcode](http://ghdx.healthdata.org/) (numeric - Global Burden of
      Disease country codes)
  32. [IEA](https://www.iea.org/countries) (World Energy Balances 2021)
  33. [DACcode](https://www.oecd.org/dac/financing-sustainable-development/development-finance-standards/dacandcrscodelists.htm)
      (numeric - OECD Development Assistance Committee)
  33. [ccTLD](https://en.wikipedia.org/wiki/Country_code_top-level_domain) - country code top-level domains
  34. [GWcode](https://www.tandfonline.com/doi/abs/10.1080/03050629908434958) - Gledisch & Ward numerical codes as published in https://www.andybeger.com/states/articles/statelists.html
  35. CC41 - common classification for MRIOs (list of countries found in all public MRIOs)
  36. [IOC](https://en.wikipedia.org/wiki/List_of_IOC_country_codes) - International Olympic Committee (IOC) country codes
  <!-- CLASSIFICATION_SCHEMES -->



  **countryguess** comes with a simple CLI with the same name. It takes one or two
  arguments:

  ```sh
  $ countryguess oman
  {
      "name_short": "Oman",
      "name_official": "Sultanate of Oman",
      ...
  }
  $ countryguess 'puerto ricco' name_official
  Puerto Rico
  ```



  All kinds of bug reports, feature requests and suggestions are welcome!


pkgId: 229b8f7a1ded003502997b157d96362d25726565fb929f19fbc635115d5a41b2
name: python-countryguess
arch: src
version: 0.4.5
epoch: 0
release: 1
summary: Fuzzy lookup of country information
url: https://pypi.org/project/countryguess/
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countryguess-0.4.5-1.src.rpm
checksum_type: sha256
description:
  **countryguess** looks up country information by country codes or name matching.
  It tries to be lean (but not mean) and fast: All dependencies are in the Python
  Standard Library and country data is loaded lazily on demand.

  Code: [Codeberg](https://codeberg.org/plotski/countryguess)
  Package: [PyPI](https://pypi.org/project/countryguess)



  `guess_country()` uses the default country data that is already packaged.

  ```python
  >>> from countryguess import guess_country
  >>> guess_country("britain")
  {
      'name_short': 'United Kingdom',
      'name_official': 'United Kingdom of Great Britain and Northern Ireland',
      'iso2': 'GB',
      'iso3': 'GBR',
      ...
  }
  >>> guess_country("no such country")
  None
  >>> guess_country("no such country", default="Oh, well.")
  'Oh, well.'
  >>> guess_country("PoRtUgAl", attribute="iso2")
  'PT'
  >>> guess_country("TW", attribute="name_official")  # 2-letter code lookup
  'Republic of China'
  >>> guess_country("tWn", attribute="name_short")    # 3-letter code lookup
  'Taiwan'
  ```

  Matching by regular expression can be extended by mapping
  [ISO2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes to
  [`re.Pattern`](https://docs.python.org/3/library/re.html#re.compile) objects.

  ```python
  >>> regex_map = {
  ...     "MN": re.compile(r'^mongol\s+uls$', flags=re.IGNORECASE),
  ...     "JP": re.compile(r'^ni(?:pp|h)on', flags=re.IGNORECASE),
  ... }
  >>> guess_country("Mongol Uls", attribute="name_short", regex_map=regex_map)
  'Mongolia'
  >>> guess_country("Nippon", attribute="name_short", regex_map=regex_map)
  'Japan'
  ```

  You can also create a `CountryData` instance yourself to provide your own
  country data in a JSON file.

  ```python
  >>> from countryguess import CountryData
  >>> countries = CountryData("path/to/countries.json")
  >>> countries["vIeTnAm"]
  {'name_short': 'Vietnam', ...}
  >>> countries["vn"]
  {'name_short': 'Vietnam', ...}
  >>> countries["asdf"]
  KeyError: 'asdf'
  >>> countries.get("asdf")
  None
  >>> countries.get("kuwait")
  {'name_short': 'Kuwait', ...}
  ```

  On `CountryData` instances, every key in the JSON data is accessible as a
  method.

  ```python
  >>> countries.name_official("portugal")
  'Portuguese Republic'
  >>> countries.continent("vanuatu")
  'Oceania'
  ```



  Countries are identified by name, 2-letter code
  ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) or
  3-letter code
  ([ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)). All
  identifiers are matched case-insensitively.

  Names are matched with regular expressions that are stored in the JSON data. If
  that fails, fuzzy matching against ``name_short`` and ``name_official`` is done
  with [difflib](https://docs.python.org/3/library/difflib.html).



  Country information is read from a JSON file. One is shipped with the package,
  but you can also provide your own to the `CountryData` class as described
  above. The information in the default file was gratefully extracted from
  [country-converter](https://pypi.org/project/country-converter/). (Many thanks!)

  The country data file must contain a list of JSON objects. Each object
  represents a country that must contain at least the following keys:

  - `name_short`
  - `name_official`
  - `iso2`
  - `iso3`
  - `regex`



  The following classification schemes are available in the included country data.

  <!-- CLASSIFICATION_SCHEMES (see fetch_data_from_country_converter.py) -->
  1.  ISO2 (ISO 3166-1 alpha-2) - including UK/EL for Britain/Greece (but always convert to GB/GR)
  2.  ISO3 (ISO 3166-1 alpha-3)
  3.  ISO - numeric (ISO 3166-1 numeric)
  4.  UN numeric code (M.49 - follows to a large extend ISO-numeric)
  5.  A standard or short name
  6.  The "official" name
  7.  Continent: 6 continent classification with Africa, Antarctica, Asia, Europe, America, Oceania
  8.  [Continent_7 classification](https://ourworldindata.org/world-region-map-definitions) - 7 continent classification spliting North/South America
  9.  UN region
  10. [EXIOBASE 1](http://exiobase.eu/) classification (2 and 3 letters)
  11. [EXIOBASE 2](http://exiobase.eu/) classification (2 and 3 letters)
  12. [EXIOBASE 3](https://zenodo.org/doi/10.5281/zenodo.3583070) classification (2 and 3 letters)
  13. [WIOD](http://www.wiod.org/home) classification
  14. [Eora](http://www.worldmrio.com/)
  15. [OECD](http://www.oecd.org/about/membersandpartners/list-oecd-member-countries.htm)
      membership (per year)
  16. [MESSAGE](http://www.iiasa.ac.at/web/home/research/researchPrograms/Energy/MESSAGE-model-regions.en.html)
      11-region classification
  17. [IMAGE](https://models.pbl.nl/image/index.php/Welcome_to_IMAGE_3.0_Documentation)
  18. [REMIND](https://www.pik-potsdam.de/en/institute/departments/transformation-pathways/models/remind)
  19. [UN](http://www.un.org/en/members/) membership (per year)
  20. [EU](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:EU_enlargements)
      membership (including EU12, EU15, EU25, EU27, EU27_2007, EU28)
  21. [EEA](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:European_Economic_Area_(EEA))
      membership
  22. [Schengen](https://en.wikipedia.org/wiki/Schengen_Area) region
  23. [Cecilia](https://cecilia2050.eu/system/files/De%20Koning%20et%20al.%20%282014%29_Scenarios%20for%202050_0.pdf)
      2050 classification
  24. [APEC](https://en.wikipedia.org/wiki/Asia-Pacific_Economic_Cooperation)
  25. [BRIC](https://en.wikipedia.org/wiki/BRIC)
  26. [BASIC](https://en.wikipedia.org/wiki/BASIC_countries)
  27. [CIS](https://en.wikipedia.org/wiki/Commonwealth_of_Independent_States)
      (as by 2019, excl. Turkmenistan)
  28. [G7](https://en.wikipedia.org/wiki/Group_of_Seven)
  29. [G20](https://en.wikipedia.org/wiki/G20) (listing all EU member
      states as individual members)
  30. [FAOcode](http://www.fao.org/faostat/en/#definitions) (numeric)
  31. [GBDcode](http://ghdx.healthdata.org/) (numeric - Global Burden of
      Disease country codes)
  32. [IEA](https://www.iea.org/countries) (World Energy Balances 2021)
  33. [DACcode](https://www.oecd.org/dac/financing-sustainable-development/development-finance-standards/dacandcrscodelists.htm)
      (numeric - OECD Development Assistance Committee)
  33. [ccTLD](https://en.wikipedia.org/wiki/Country_code_top-level_domain) - country code top-level domains
  34. [GWcode](https://www.tandfonline.com/doi/abs/10.1080/03050629908434958) - Gledisch & Ward numerical codes as published in https://www.andybeger.com/states/articles/statelists.html
  35. CC41 - common classification for MRIOs (list of countries found in all public MRIOs)
  36. [IOC](https://en.wikipedia.org/wiki/List_of_IOC_country_codes) - International Olympic Committee (IOC) country codes
  37. [BACI](https://www.cepii.fr/CEPII/en/bdd_modele/bdd_modele_item.asp?id=37) - BACI: International Trade Database at the Product-Level
  38. [UNIDO](https://stat.unido.org/portal/dataset/getDataset/COUNTRY_PROFILE) - UNIDO INDSTAT database
  39. [EXIOBASE hybrid 3](https://zenodo.org/records/10148587) classification
  40. [EXIOBASE hybrid 3 consequential](https://zenodo.org/records/13926939) classification
  41. [GEOnumeric](https://ec.europa.eu/eurostat/comext/newxtweb/openNom.do) GEO numerical codes (also used in Prodcom)
  <!-- CLASSIFICATION_SCHEMES -->



  **countryguess** comes with a simple CLI with the same name. It takes one or two
  arguments:

  ```sh
  $ countryguess oman
  {
      "name_short": "Oman",
      "name_official": "Sultanate of Oman",
      ...
  }
  $ countryguess 'puerto ricco' name_official
  Puerto Rico
  ```



  All kinds of bug reports, feature requests and suggestions are welcome!


pkgId: afbecf15364966b2b144e1505104fb69e2c2508b20d5eb5a82cc2bb9fa085b7f
name: python-countryinfo
arch: src
version: 0.1.2
epoch: 0
release: 1
description:
  A python module for returning data about countries, ISO info and
  states/provinces within them.

url: https://github.com/porimol/countryinfo
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countryinfo-0.1.2-1.src.rpm
checksum_type: sha256
summary:
  countryinfo is a python module for returning data about countries, ISO info and states/provinces within them.


pkgId: 7db0aaa1ae445455edbae0d63c7ab37278816eeaea3034688bbde268d0a69812
name: python-countrynames
arch: src
version: 1.15.3
epoch: 0
release: 1
summary: A library to map country names to ISO codes.
url: http://github.com/occrp/countrynames
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countrynames-1.15.3-1.src.rpm
checksum_type: sha256
description:
  [![build](https://github.com/alephdata/countrynames/actions/workflows/build.yml/badge.svg)](https://github.com/alephdata/countrynames/actions/workflows/build.yml)

  This library helps with the mapping of country names to their respective
  two or three letter codes. The idea is
  to incorporate common names for countries, and even some limited misspellings,
  as they occur in source data.

  There is also support for fuzzy matching, which uses a heuristic based on levenshtein distance.



  ```python
  import countrynames

  assert 'DE' == countrynames.to_code('Germany')
  assert 'DE' == countrynames.to_code('Bundesrepublik Deutschland')
  assert 'DE' == countrynames.to_code('Bundesrepublik Deutschlan', fuzzy=True)
  assert 'DE' == countrynames.to_code('DE')
  assert 'DEU' == countrynames.to_code_3('Germany')
  ```



  * ``XK`` or ``XKX`` - Kosovo
  * ``EU`` or ``EUU`` - European Union

  For some dissolved countries (e.g. `SUHH` for Soviet Union) and sub-regions
  (e.g. `GB-SCT` for Scotland) special codes are defined and returned from both
  `to_code` and `to_code_3`.



  The MIT License (MIT)

  Copyright (c) 2016 Friedrich Lindenberg

  Permission is hereby granted, free of charge, to any person obtaining a copy of
  this software and associated documentation files (the "Software"), to deal in
  the Software without restriction, including without limitation the rights to
  use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  the Software, and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 114ed18900a218e3c0b350e174c7da90861fbbdbd3f2e2451ab86ad56da59c33
name: python-countrynames
arch: src
version: 1.16.4
epoch: 0
release: 1
summary: A library to map country names to ISO codes.
url: http://github.com/opensanctions/countrynames
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countrynames-1.16.4-1.src.rpm
checksum_type: sha256
description:
  [![build](https://github.com/opensanctions/countrynames/actions/workflows/build.yml/badge.svg)](https://github.com/opensanctions/countrynames/actions/workflows/build.yml)

  This library helps with the mapping of country names to their respective
  two or three letter codes. The idea is
  to incorporate common names for countries, and even some limited misspellings,
  as they occur in source data.

  There is also support for fuzzy matching, which uses a heuristic based on levenshtein distance.



  ```python
  import countrynames

  assert 'DE' == countrynames.to_code('Germany')
  assert 'DE' == countrynames.to_code('Bundesrepublik Deutschland')
  assert 'DE' == countrynames.to_code('Bundesrepublik Deutschlan', fuzzy=True)
  assert 'DE' == countrynames.to_code('DE')
  assert 'DEU' == countrynames.to_code_3('Germany')
  ```



  * ``XK`` or ``XKX`` - Kosovo
  * ``EU`` or ``EUU`` - European Union

  For some dissolved countries (e.g. `SUHH` for Soviet Union) and sub-regions
  (e.g. `GB-SCT` for Scotland) special codes are defined and returned from both
  `to_code` and `to_code_3`.


pkgId: 30c632cb9ef723227074f43d658487cb11fe1d3f9722509c6a1827f83df8f08b
name: python-countrypy
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: A modern Python library for country data
url: https://github.com/ArjunSharda/countrypy
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-countrypy-1.1.0-1.src.rpm
checksum_type: sha256
description:
  <img align="left" src="http://estruyf-github.azurewebsites.net/api/VisitorHit?user=ArjunSharda&repo=CountryPy&countColorcountColor&countColor=%237B1E7B"/>
  <img align="right" src="https://img.shields.io/github/repo-size/ArjunSharda/CountryPy?style=for-the-badge&logo=appveyor" alt="GitHub repo size"/>
  ![CountryPy](https://socialify.git.ci/ArjunSharda/CountryPy/image?description=1&descriptionEditable=%F0%9F%97%BA%EF%B8%8F%20A%20lightweight%20%26%20efficient%20library%20for%20fetching%20country%20data.&font=Raleway&forks=1&issues=1&language=1&logo=https%3A%2F%2Fraw.githubusercontent.com%2FArjunSharda%2FCountryPy%2Fmain%2Fext%2FCountryPy.png&name=1&owner=1&pattern=Signal&pulls=1&stargazers=1&theme=Auto)

  CountryPy is a lightweight & efficient modern country data library, used for fetching information about a variety of countries with support for command-line interface (CLI).

rpm_license:
  MIT License  Copyright (c) 2024 Arjun Sharda  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: 75a2750c8e1c03728398dad28a409ad7f170bfed9ee888d09b4f91fdb01a82ec
name: python-coupledmodeldriver
arch: src
version: 1.7.1.post1
epoch: 0
release: 1
summary: coupled model configuration generation
url: https://github.com/noaa-ocs-modeling/CoupledModelDriver.git
rpm_license: CC0-1.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coupledmodeldriver-1.7.1.post1-1.src.rpm
checksum_type: sha256
description:
  [![tests](https://github.com/noaa-ocs-modeling/CoupledModelDriver/workflows/tests/badge.svg)](https://github.com/noaa-ocs-modeling/CoupledModelDriver/actions?query=workflow%3Atests)
  [![codecov](https://codecov.io/gh/noaa-ocs-modeling/coupledmodeldriver/branch/main/graph/badge.svg?token=4DwZePHp18)](https://codecov.io/gh/noaa-ocs-modeling/coupledmodeldriver)
  [![build](https://github.com/noaa-ocs-modeling/CoupledModelDriver/workflows/build/badge.svg)](https://github.com/noaa-ocs-modeling/CoupledModelDriver/actions?query=workflow%3Abuild)
  [![version](https://img.shields.io/pypi/v/CoupledModelDriver)](https://pypi.org/project/CoupledModelDriver)
  [![license](https://img.shields.io/github/license/noaa-ocs-modeling/CoupledModelDriver)](https://creativecommons.org/share-your-work/public-domain/cc0)
  [![style](https://sourceforge.net/p/oitnb/code/ci/default/tree/_doc/_static/oitnb.svg?format=raw)](https://sourceforge.net/p/oitnb/code)
  [![documentation](https://readthedocs.org/projects/coupledmodeldriver/badge/?version=latest)](https://coupledmodeldriver.readthedocs.io/en/latest/?badge=latest)

  CoupledModelDriver generates an overlying job submission framework and configuration directories for NEMS-coupled coastal ocean
  model ensembles.

  ```shell
  pip install coupledmodeldriver
  ```

  It utilizes [NEMSpy](https://nemspy.readthedocs.io) to generate NEMS configuration files, shares common configurations between
  runs, and organizes spinup and mesh partition into separate jobs for dependant submission.

  Documentation can be found at https://coupledmodeldriver.readthedocs.io



  - **models**
      - circulation models
          - ADCIRC (uses [ADCIRCpy](https://pypi.org/project/adcircpy))
          - SCHISM (uses [PySCHISM](https://github.com/schism-dev/pyschism))
      - forcings
          - ATMESH
          - WW3DATA
          - HURDAT best track
          - OWI
  - **platforms**
      - local
      - Slurm
          - Hera
          - Stampede2
          - Orion



  CoupledModelDriver is developed for the COASTAL Act project by the [Coastal Marine Modeling Branch (CMMB)](https://coastaloceanmodels.noaa.gov) of the Office of Coast Survey (OCS), a part of the [National Oceanic and Atmospheric Administration (NOAA)](https://www.noaa.gov), an agency of the United States federal government.

  - Zachary Burnett (**lead**) - zachary.burnett@noaa.gov
  - William Pringle - wpringle@anl.gov
  - Saeed Moghimi - saeed.moghimi@noaa.gov





  `initialize_adcirc` creates JSON configuration files according to the given parameters. ADCIRC run options that are not exposed
  by this command, such as `runs` or `gwce_solution_scheme`, can be specified by directly modifying the JSON files. The following
  creates JSON files for coupling `(ATMESH + WW3DATA) -> ADCIRC` over a small Shinnecock Inlet mesh:

  ```shell
  initialize_adcirc \
      --platform HERA \
      --mesh-directory /scratch2/COASTAL/coastal/save/shared/models/meshes/shinnecock/v1.0 \
      --output-directory hera_shinnecock_ike_spinup_tidal_atmesh_ww3data \
      --modeled-start-time 20080823 \
      --modeled-duration 14:06:00:00 \
      --modeled-timestep 00:00:02 \
      --nems-interval 01:00:00 \
      --adcirc-executable /scratch2/COASTAL/coastal/save/shared/repositories/CoastalApp/ALLBIN_INSTALL/NEMS-adcirc-atmesh-ww3data.x \
      --adcirc-processors 40
      --adcprep-executable /scratch2/COASTAL/coastal/save/shared/repositories/CoastalApp/ALLBIN_INSTALL/adcprep \
      --modulefile /scratch2/COASTAL/coastal/save/shared/repositories/CoastalApp/modulefiles/envmodules_intel.hera \
      --forcings tidal,atmesh,ww3data \
      --tidal-source TPXO \
      --tidal-path /scratch2/COASTAL/coastal/save/shared/models/forcings/tides/h_tpxo9.v1.nc \
      --tidal-spinup-duration 12:06:00:00 \
      --atmesh-path /scratch2/COASTAL/coastal/save/shared/models/forcings/shinnecock/ike/wind_atm_fin_ch_time_vec.nc \
      --ww3data-path /scratch2/COASTAL/coastal/save/shared/models/forcings/shinnecock/ike/ww3.Constant.20151214_sxy_ike_date.nc
  ```

  This will create the directory `hera_shinnecock_ike_spinup_tidal_atmesh_ww3data/` with the following JSON configuration files:

  ```
  📂 hera_shinnecock_ike_spinup_tidal_atmesh_ww3data/
  ┣ 📜 configure_adcirc.json
  ┣ 📜 configure_atmesh.json
  ┣ 📜 configure_modeldriver.json
  ┣ 📜 configure_nems.json
  ┣ 📜 configure_slurm.json
  ┣ 📜 configure_tidal_forcing.json
  ┗ 📜 configure_ww3data.json
  ```

  These files contain relevant configuration values for an ADCIRC run. You will likely wish to change these values to alter the
  resulting run, before generating the actual model configuration. For instance, NEMS connections and the run sequence need to be
  manually specified in `configure_nems.json`.



  `generate_adcirc` generates an ADCIRC run configuration (`fort.14`, `fort.15`, etc.) using options read from the JSON
  configuration files (generated in the previous step).

  ```shell
  cd hera_shinnecock_ike_spinup_tidal_atmesh_ww3data
  generate_adcirc
  ```

  The resulting configuration will look like this:

  ```
  📂 hera_shinnecock_ike_spinup_tidal_atmesh_ww3data/
  ┣ 📜 configure_adcirc.json
  ┣ 📜 configure_atmesh.json
  ┣ 📜 configure_modeldriver.json
  ┣ 📜 configure_nems.json
  ┣ 📜 configure_slurm.json
  ┣ 📜 configure_tidal_forcing.json
  ┣ 📜 configure_ww3data.json
  ┣ 📂 spinup/
  ┃  ┣ 📜 fort.13
  ┃  ┣ 🔗 fort.14 -> ../fort.14
  ┃  ┣ 📜 fort.15
  ┃  ┣ 📜 nems.configure
  ┃  ┣ 📜 model_configure
  ┃  ┣ 🔗 atm_namelist.rc -> ./model_configure
  ┃  ┣ 📜 config.rc
  ┃  ┣ 📜 setup.job
  ┃  ┗ 📜 adcirc.job
  ┣ 📂 runs/
  ┃  ┗ 📂 unperturbed/
  ┃    ┣ 📜 fort.13
  ┃    ┣ 🔗 fort.14 -> ../../fort.14
  ┃    ┣ 📜 fort.15
  ┃    ┣ 🔗 fort.67.nc -> ../../spinup/fort.67.nc
  ┃    ┣ 🔗 fort.68.nc -> ../../spinup/fort.68.nc
  ┃    ┣ 📜 nems.configure
  ┃    ┣ 📜 model_configure
  ┃    ┣ 🔗 atm_namelist.rc -> ./model_configure
  ┃    ┣ 📜 config.rc
  ┃    ┣ 📜 setup.job
  ┃    ┗ 📜 adcirc.job
  ┣ 📜 fort.14
  ┣ 📜 cleanup.sh
  ┗ 📜 run_hera.sh
  ```



  The previous step will also have generated a script called `./run_hera.sh`. You can run it to submit the model run to the Slurm
  job queue:

  ```shell
  ./run_hera.sh
  ```

  The queue will have the following jobs added:

  ```
     JOBID CPU NODE DEPENDENCY       NODELIST(REA NAME
  20967647 1   1    (null)           (None)       ADCIRC_SETUP_SPINUP
  20967648 40  1    afterok:20967647 (Dependency) ADCIRC_COLDSTART_SPINUP
  20967649 1   1    (null)           (None)       ADCIRC_SETUP_unperturbed
  20967650 42  2    afterok:20967649 (Dependency) ADCIRC_HOTSTART_unperturbed
  ```



  `check_completion` checks the completion status of a running model directory.

  ```shell
  cd hera_shinnecock_ike_spinup_tidal_atmesh_ww3data
  check_completion
  ```

  ```json
  {
      "hera_shinnecock_ike_spinup_tidal_atmesh_ww3data": {
          "spinup": "running - 15%",
          "runs": "not_started - 0%"
      }
  }
  ```

  you can also pass a specific directory (or several directories):

  ```shell
  check_completion spinup
  ```

  ```json
  {
      "spinup": "running - 27%"
  }
  ```

  ```shell
  cd run_20211027_florence_besttrack_250msubset_quadrature
  check_completion runs/*_13
  ```

  ```json
  {
      "vortex_4_variable_perturbation_13": "completed - 100.0%",
      "vortex_4_variable_quadrature_13": "not_started - 0%"
  }
  ```

  if a run has an error, you can pass `--verbose` to see detailed logs:

  ```shell
  check_completion spinup
  ```

  ```json
  {
      "spinup": "error - 0%"
  }
  ```

  ```shell
  check_completion spinup --verbose
  ```

  ```json
  {
      "spinup": {
          "status": "error",
          "progress": "0%",
          "error": {
              "ADCIRC_SETUP_SPINUP.err.log": [
                  "forrtl: severe (24): end-of-file during read, unit -4, file /proc/92195/fd/0\n",
                  "Image              PC                Routine            Line        Source             \n",
                  "adcprep            000000000069A72E  Unknown               Unknown  Unknown\n",
                  "adcprep            00000000006CBAAF  Unknown               Unknown  Unknown\n",
                  "adcprep            000000000050A5CB  openprepfiles_           6996  prep.F\n",
                  "adcprep            0000000000507F22  prep13_                   753  prep.F\n",
                  "adcprep            000000000042E2E9  prepinput_                717  adcprep.F\n",
                  "adcprep            000000000042BCDB  MAIN__                    239  adcprep.F\n",
                  "adcprep            000000000040B65E  Unknown               Unknown  Unknown\n",
                  "libc-2.17.so       00002AAEC02EB555  __libc_start_main     Unknown  Unknown\n",
                  "adcprep            000000000040B569  Unknown               Unknown  Unknown\n",
                  "srun: error: h24c51: task 0: Exited with exit code 24\n",
                  "srun: launch/slurm: _step_signal: Terminating StepId=25366266.1\n"
              ]
          }
      }
  }
  ```

  ```shell
  check_completion runs
  ```

  ```json
  {
      "spinup": "failed - 0%"
  }
  ```

  ```shell
  check_completion runs --verbose
  ```

  ```json
  {
      "runs": {
          "status": "failed",
          "progress": "0%",
          "failed": {
              "fort.16": "ADCIRC output file `fort.16` not found"
          },
          "error": {
              "ADCIRC_SETUP_unperturbed.err.log": [
                  "slurmstepd: error: execve(): /scratch2/COASTAL/coastal/save/shared/repositories/CoastalApp/ADCIRC/ALLBIN_INSTALL/adcprep: No such file or directory\n",
                  "srun: error: h18c49: task 0: Exited with exit code 2\n",
                  "srun: launch/slurm: _step_signal: Terminating StepId=25366268.0\n"
              ]
          }
      }
  }
  ```


pkgId: 2b9cdd4e6341fe08e442dc0ec0bb730fa724b1ec52db68ee7f53bd9213deddc4
name: python-courier-python-2
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Yet Another Math Library
url: https://github.com/fbasurto/yaml
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-courier-python-2-0.1.0-1.src.rpm
checksum_type: sha256
description:
  A Python library for basic and advanced mathematical operations.



  - Arithmetic operations
  - Geometry utilities



  ```bash
  pip install yaml-math
  ```


  ```
  from yaml import arithmetic

  print(arithmetic.add(2, 3))  # Outputs: 5
  ```


  This project is licensed under the MIT License.


pkgId: 00f81011c8072ea3451dafb90f3d7bd71634266c2f0cdd8c1962b6f29267e910
name: python-courlan
arch: src
version: 1.3.1
epoch: 0
release: 1
url: https://github.com/adbar/courlan
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-courlan-1.3.1-1.src.rpm
checksum_type: sha256
summary:
  Clean, filter and sample URLs to optimize data collection – includes spam, content type and language filters.

description:
  [![Python package](https://img.shields.io/pypi/v/courlan.svg)](https://pypi.python.org/pypi/courlan)
  [![Python versions](https://img.shields.io/pypi/pyversions/courlan.svg)](https://pypi.python.org/pypi/courlan)
  [![Code Coverage](https://img.shields.io/codecov/c/github/adbar/courlan.svg)](https://codecov.io/gh/adbar/courlan)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)




  > "It is important for the crawler to visit 'important' pages first,
  > so that the fraction of the Web that is visited (and kept up to date)
  > is more meaningful." (Cho et al. 1998)
  >
  > "Given that the bandwidth for conducting crawls is neither infinite
  > nor free, it is becoming essential to crawl the Web in not only a
  > scalable, but efficient way, if some reasonable measure of quality or
  > freshness is to be maintained." (Edwards et al. 2001)

  This library provides an additional "brain" for web crawling, scraping
  and document management. It facilitates web navigation through a set of
  filters, enhancing the quality of resulting document collections:

  - Save bandwidth and processing time by steering clear of pages deemed
    low-value
  - Identify specific pages based on language or text content
  - Pinpoint pages relevant for efficient link gathering

  Additional utilities needed include URL storage, filtering, and
  deduplication.



  Separate the wheat from the chaff and optimize document discovery and
  retrieval:


  - URL handling
     - Validation
     - Normalization
     - Sampling
  - Heuristics for link filtering
     - Spam, trackers, and content-types
     - Locales and internationalization
     - Web crawling (frontier, scheduling)
  - Data store specifically designed for URLs
  - Usable with Python or on the command-line


  **Let the coURLan fish up juicy bits for you!**

  <img src="https://raw.githubusercontent.com/adbar/courlan/master/courlan_harns-march.jpg" width="65%" alt="Courlan bird"/>

  Here is a [courlan](https://en.wiktionary.org/wiki/courlan) (source:
  [Limpkin at Harn's Marsh by
  Russ](https://commons.wikimedia.org/wiki/File:Limpkin,_harns_marsh_(33723700146).jpg),
  CC BY 2.0).




  This package is compatible with with all common versions of Python, it
  is tested on Linux, macOS and Windows systems.

  Courlan is available on the package repository [PyPI](https://pypi.org/)
  and can notably be installed with the Python package manager `pip`:

  ``` bash
  $ pip install courlan # pip3 install on systems where both Python 2 and 3 are installed
  $ pip install --upgrade courlan # to make sure you have the latest version
  $ pip install git+https://github.com/adbar/courlan.git # latest available code (see build status above)
  ```

  The last version to support Python 3.6 and 3.7 is `courlan==1.2.0`.




  Most filters revolve around the `strict` and `language` arguments.



  All useful operations chained in `check_url(url)`:

  ``` python
  >>> from courlan import check_url


  >>> check_url('https://github.com/adbar/courlan')
  ('https://github.com/adbar/courlan', 'github.com')


  >>> check_url('http://666.0.0.1/')
  >>>


  >>> check_url('http://test.net/foo.html?utm_source=twitter#gclid=123')
  ('http://test.net/foo.html', 'test.net')


  >>> my_url = 'https://httpbin.org/redirect-to?url=http%3A%2F%2Fexample.org'
  >>> check_url(my_url, strict=True)
  ('https://httpbin.org/redirect-to', 'httpbin.org')


  >>> url, domain_name = check_url(my_url, with_redirects=True)


  >>> check_url('http://www.example.org/page/10/', with_nav=True)


  >>> check_url('https://github.com/adbar/courlan/', trailing_slash=False)
  ```

  Language-aware heuristics, notably internationalization in URLs, are
  available in `lang_filter(url, language)`:

  ``` python

  >>> url = 'https://www.un.org/en/about-us'


  >>> check_url(url, language='en')
  ('https://www.un.org/en/about-us', 'un.org')


  >>> check_url(url, language='de')
  >>>


  >>> url = 'https://en.wikipedia.org/'
  >>> check_url(url, language='de', strict=False)
  ('https://en.wikipedia.org', 'wikipedia.org')
  >>> check_url(url, language='de', strict=True)
  >>>
  ```

  Define stricter restrictions on the expected content type with
  `strict=True`. This also blocks certain platforms and page types
  where machines get lost.

  ``` python

  >>> check_url('https://www.twitch.com/', strict=True)
  >>>
  ```



  ``` python
  >>> from courlan import sample_urls
  >>> my_urls = ['https://example.org/' + str(x) for x in range(100)]
  >>> my_sample = sample_urls(my_urls, 10)

  ```



  Link extraction and preprocessing:

  ``` python
  >>> from courlan import extract_links
  >>> doc = '<html><body><a href="test/link.html">Link</a></body></html>'
  >>> url = "https://example.org"
  >>> extract_links(doc, url)
  {'https://example.org/test/link.html'}

  ```

  The `filter_links()` function provides additional filters for crawling purposes:
  use of robots.txt rules and link priorization. See `courlan.core` for details.

  Determine if a link leads to another host:

  ``` python
  >>> from courlan import is_external
  >>> is_external('https://github.com/', 'https://www.microsoft.com/')
  True

  >>> is_external('https://google.com/', 'https://www.google.co.uk/', ignore_suffix=True)
  False

  >>> is_external('https://google.com/', 'https://www.google.co.uk/', ignore_suffix=False)
  True
  ```

  Other useful functions dedicated to URL handling:

  -   `extract_domain(url, fast=True)`: find domain and subdomain or just
      domain with `fast=False`
  -   `get_base_url(url)`: strip the URL of some of its parts
  -   `get_host_and_path(url)`: decompose URLs in two parts: protocol +
      host/domain and path
  -   `get_hostinfo(url)`: extract domain and host info (protocol +
      host/domain)
  -   `fix_relative_urls(baseurl, url)`: prepend necessary information to
      relative links

  ``` python
  >>> from courlan import *
  >>> url = 'https://www.un.org/en/about-us'

  >>> get_base_url(url)
  'https://www.un.org'

  >>> get_host_and_path(url)
  ('https://www.un.org', '/en/about-us')

  >>> get_hostinfo(url)
  ('un.org', 'https://www.un.org')

  >>> fix_relative_urls('https://www.un.org', 'en/about-us')
  'https://www.un.org/en/about-us'
  ```

  Other filters dedicated to crawl frontier management:

  -   `is_not_crawlable(url)`: check for deep web or pages generally not
      usable in a crawling context
  -   `is_navigation_page(url)`: check for navigation and overview pages

  ``` python
  >>> from courlan import is_navigation_page, is_not_crawlable
  >>> is_navigation_page('https://www.randomblog.net/category/myposts')
  True
  >>> is_not_crawlable('https://www.randomblog.net/login')
  True
  ```

  See also [URL management page](https://trafilatura.readthedocs.io/en/latest/url-management.html)
  of the Trafilatura documentation.




  Helper function, scrub and normalize:

  ``` python
  >>> from courlan import clean_url
  >>> clean_url('HTTPS://WWW.DWDS.DE:80/')
  'https://www.dwds.de'
  ```

  Basic scrubbing only:

  ``` python
  >>> from courlan import scrub_url
  ```

  Basic canonicalization/normalization only, i.e. modifying and
  standardizing URLs in a consistent manner:

  ``` python
  >>> from urllib.parse import urlparse
  >>> from courlan import normalize_url
  >>> my_url = normalize_url(urlparse(my_url))

  >>> my_url = normalize_url(my_url)

  >>> normalize_url('http://test.net/foo.html?utm_source=twitter&post=abc&page=2#fragment', strict=True)
  'http://test.net/foo.html?page=2&post=abc'
  ```

  Basic URL validation only:

  ``` python
  >>> from courlan import validate_url
  >>> validate_url('http://1234')
  (False, None)
  >>> validate_url('http://www.example.org/')
  (True, ParseResult(scheme='http', netloc='www.example.org', path='/', params='', query='', fragment=''))
  ```



  Courlan uses an internal cache to speed up URL parsing. It can be reset
  as follows:

  ``` python
  >>> from courlan.meta import clear_caches
  >>> clear_caches()
  ```



  The `UrlStore` class allow for storing and retrieving domain-classified
  URLs, where a URL like `https://example.org/path/testpage` is stored as
  the path `/path/testpage` within the domain `https://example.org`. It
  features the following methods:

  - URL management
     - `add_urls(urls=[], appendleft=None, visited=False)`: Add a
       list of URLs to the (possibly) existing one. Optional:
       append certain URLs to the left, specify if the URLs have
       already been visited.
     - `add_from_html(htmlstring, url, external=False, lang=None, with_nav=True)`:
       Extract and filter links in a HTML string.
     - `discard(domains)`: Declare domains void and prune the store.
     - `dump_urls()`: Return a list of all known URLs.
     - `print_urls()`: Print all URLs in store (URL + TAB + visited or not).
     - `print_unvisited_urls()`: Print all unvisited URLs in store.
     - `get_all_counts()`: Return all download counts for the hosts in store.
     - `get_known_domains()`: Return all known domains as a list.
     - `get_unvisited_domains()`: Find all domains for which there are unvisited URLs.
     - `total_url_number()`: Find number of all URLs in store.
     - `is_known(url)`: Check if the given URL has already been stored.
     - `has_been_visited(url)`: Check if the given URL has already been visited.
     - `filter_unknown_urls(urls)`: Take a list of URLs and return the currently unknown ones.
     - `filter_unvisited_urls(urls)`: Take a list of URLs and return the currently unvisited ones.
     - `find_known_urls(domain)`: Get all already known URLs for the
       given domain (ex. `https://example.org`).
     - `find_unvisited_urls(domain)`: Get all unvisited URLs for the given domain.
     - `get_unvisited_domains()`: Return all domains which have not been all visited.
     - `reset()`: Re-initialize the URL store.

  - Crawling and downloads
     - `get_url(domain)`: Retrieve a single URL and consider it to
       be visited (with corresponding timestamp).
     - `get_rules(domain)`: Return the stored crawling rules for the given website.
     - `store_rules(website, rules=None)`: Store crawling rules for a given website.
     - `get_crawl_delay()`: Return the delay as extracted from robots.txt, or a given default.
     - `get_download_urls(max_urls=100, time_limit=10)`: Get a list of immediately
       downloadable URLs according to the given time limit per domain.
     - `establish_download_schedule(max_urls=100, time_limit=10)`:
       Get up to the specified number of URLs along with a suitable
       backoff schedule (in seconds).
     - `download_threshold_reached(threshold)`: Find out if the
       download limit (in seconds) has been reached for one of the
       websites in store.
     - `unvisited_websites_number()`: Return the number of websites
       for which there are still URLs to visit.
     - `is_exhausted_domain(domain)`: Tell if all known URLs for
       the website have been visited.

  - Persistance
     - `write(filename)`: Save the store to disk.
     - `load_store(filename)`: Read a UrlStore from disk (separate function, not class method).

  - Optional settings:
     - `compressed=True`: activate compression of URLs and rules
     - `language=XX`: focus on a particular target language (two-letter code)
     - `strict=True`: stricter URL filtering
     - `verbose=True`: dump URLs if interrupted (requires use of `signal`)




  The main fonctions are also available through a command-line utility:

  ``` bash
  $ courlan --inputfile url-list.txt --outputfile cleaned-urls.txt
  $ courlan --help
  usage: courlan [-h] -i INPUTFILE -o OUTPUTFILE [-d DISCARDEDFILE] [-v]
                 [-p PARALLEL] [--strict] [-l LANGUAGE] [-r] [--sample SAMPLE]
                 [--exclude-max EXCLUDE_MAX] [--exclude-min EXCLUDE_MIN]

  Command-line interface for Courlan

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

  I/O:
    Manage input and output

    -i INPUTFILE, --inputfile INPUTFILE
                          name of input file (required)
    -o OUTPUTFILE, --outputfile OUTPUTFILE
                          name of output file (required)
    -d DISCARDEDFILE, --discardedfile DISCARDEDFILE
                          name of file to store discarded URLs (optional)
    -v, --verbose         increase output verbosity
    -p PARALLEL, --parallel PARALLEL
                          number of parallel processes (not used for sampling)

  Filtering:
    Configure URL filters

    --strict              perform more restrictive tests
    -l LANGUAGE, --language LANGUAGE
                          use language filter (ISO 639-1 code)
    -r, --redirects       check redirects

  Sampling:
    Use sampling by host, configure sample size

    --sample SAMPLE       size of sample per domain
    --exclude-max EXCLUDE_MAX
                          exclude domains with more than n URLs
    --exclude-min EXCLUDE_MIN
                          exclude domains with less than n URLs
  ```




  *coURLan* is distributed under the [Apache 2.0
  license](https://www.apache.org/licenses/LICENSE-2.0.html).

  Versions prior to v1 were under GPLv3+ license.




  `courlan` is optimized for English and German but its generic approach
  is also usable in other contexts.

  Details of strict URL filtering can be reviewed and changed in the file
  `settings.py`. To override the default settings, clone the repository and
  [re-install the package
  locally](https://packaging.python.org/tutorials/installing-packages/#installing-from-a-local-src-tree).




  [Contributions](https://github.com/adbar/courlan/blob/master/CONTRIBUTING.md)
  are welcome!

  Feel free to file issues on the [dedicated
  page](https://github.com/adbar/courlan/issues).




  Developed with practical applications of academic research in mind, this software
  is part of a broader effort to derive information from web documents.
  Extracting and pre-processing web texts to the exacting standards of
  scientific research presents a substantial challenge.
  This software package simplifies text data collection and enhances corpus quality,
  it is currently used to build [text databases for research](https://www.dwds.de/d/k-web).

  - Barbaresi, A. "[Trafilatura: A Web Scraping Library and
    Command-Line Tool for Text Discovery and
    Extraction](https://aclanthology.org/2021.acl-demo.15/)."
    *Proceedings of ACL/IJCNLP 2021: System Demonstrations*, 2021, pp. 122-131.

  Contact: see [homepage](https://adrien.barbaresi.eu/).

  Software ecosystem: see [this
  graphic](https://github.com/adbar/trafilatura/blob/master/docs/software-ecosystem.png).




  These Python libraries perform similar handling and normalization tasks
  but do not entail language or content filters. They also do not
  primarily focus on crawl optimization:

  -   [furl](https://github.com/gruns/furl)
  -   [ural](https://github.com/medialab/ural)
  -   [yarl](https://github.com/aio-libs/yarl)




  -   Cho, J., Garcia-Molina, H., & Page, L. (1998). Efficient crawling
      through URL ordering. *Computer networks and ISDN systems*, 30(1-7),
      161–172.
  -   Edwards, J., McCurley, K. S., and Tomlin, J. A. (2001). "An
      adaptive model for optimizing performance of an incremental web
      crawler". In *Proceedings of the 10th international conference on
      World Wide Web - WWW'01*, pp. 106–113.


pkgId: c402b62acf09c8fd8028dc1bdbe1a2157db8eda4815eff4b8a6fbb6d144fc0ca
name: python-coursebox
arch: src
version: 0.1.20.6
epoch: 0
release: 1
summary: A course management system currently used at DTU
url: https://lab.compute.dtu.dk/tuhe/coursebox
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coursebox-0.1.20.6-1.src.rpm
checksum_type: sha256
description:
  DTU course management software.


  ```terminal
  pip install coursebox
  ```

   - Single semester-dependent configuration file
   - Integrates with DTU Inside/DTU Learn
   - Distribution/evalauation of project reports in Learn-compatible format
   - Quiz-generation in DTU Learn/Beamer friendly format
   - Automatic website/syllabus generation
   - Automatic generation of lectures handouts/exercises (you don't have to track dynamic content like dates/lecture titles; it is all in the configuration)
   - Easy compilation to 2/5 day formats (Continuous education)


  Coursebox requires a specific directory structure. It is easier to start with an existing course and adapt to your needs. Please contact me at tuhe@dtu.dk for more information.


  ```bibtex
  @online{coursebox,
  	title={Coursebox (0.1.1): \texttt{pip install coursebox}},
  	url={https://lab.compute.dtu.dk/tuhe/coursebox},
  	urldate = {2021-09-07},
  	month={9},
  	publisher={Technical University of Denmark (DTU)},
  	author={Tue Herlau},
  	year={2021},
  }
  ```


pkgId: f5f88b94652e322f770ce63919ef212c2291659ff67a9c13eff47ff9970872b0
name: python-coursera-dl
arch: src
version: 0.11.5
epoch: 0
release: 1
summary: Script for downloading Coursera.org videos and naming them.
url: https://github.com/coursera-dl/coursera-dl
rpm_license: LGPL
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coursera-dl-0.11.5-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://travis-ci.org/coursera-dl/coursera-dl.svg?branch=master)](https://travis-ci.org/coursera-dl/coursera-dl)
  [![Build status](https://ci.appveyor.com/api/projects/status/3hru0ycv5fbny5k8/branch/master?svg=true)](https://ci.appveyor.com/project/balta2ar/coursera-dl/branch/master)
  [![Coverage Status](https://coveralls.io/repos/coursera-dl/coursera-dl/badge.svg)](https://coveralls.io/r/coursera-dl/coursera-dl)
  [![Latest version on PyPI](https://img.shields.io/pypi/v/coursera-dl.svg)](https://pypi.python.org/pypi/coursera-dl)
  [![Code Climate](https://codeclimate.com/github/coursera-dl/coursera-dl/badges/gpa.svg)](https://codeclimate.com/github/coursera-dl/coursera-dl)

  <!-- TOC -->

  - [Coursera Downloader](#coursera-downloader)
  - [Introduction](#introduction)
  - [Features](#features)
  - [Disclaimer](#disclaimer)
  - [Installation instructions](#installation-instructions)
      - [Recommended installation method for all Operating Systems](#recommended-installation-method-for-all-operating-systems)
      - [Alternative ways of installing missing dependencies](#alternative-ways-of-installing-missing-dependencies)
          - [Alternative installation method for Unix systems](#alternative-installation-method-for-unix-systems)
          - [ArchLinux](#archlinux)
          - [Installing dependencies on your own](#installing-dependencies-on-your-own)
      - [Docker](#docker)
      - [Windows](#windows)
      - [Create an account with Coursera](#create-an-account-with-coursera)
      - [Running the script](#running-the-script)
      - [Resuming downloads](#resuming-downloads)
  - [Troubleshooting](#troubleshooting)
      - [China issues](#china-issues)
      - [Found 0 sections and 0 lectures on this page](#found-0-sections-and-0-lectures-on-this-page)
      - [Download timeouts](#download-timeouts)
      - [Windows: proxy support](#windows-proxy-support)
      - [Windows: Failed to create process](#windows-failed-to-create-process)
      - [SSLError: [Errno 1] _ssl.c:504: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure](#sslerror-errno-1-_sslc504-error14094410ssl-routinesssl3_read_bytessslv3-alert-handshake-failure)
      - [Alternative CDN for `MathJax.js`](#alternative-cdn-for-mathjaxjs)
  - [Reporting issues](#reporting-issues)
  - [Filing an issue/Reporting a bug](#filing-an-issuereporting-a-bug)
  - [Feedback](#feedback)
  - [Contact](#contact)

  <!-- /TOC -->



  [Coursera][1] is arguably the leader in *massive open online courses* (MOOC)
  with a selection of more than 300 classes from 62 different institutions [as of
  February 2013][13]. Generous contributions by educators and institutions are
  making excellent education available to many who could not afford it otherwise.
  There are even non-profits with "feet on the ground" in remote areas of the
  world who are helping spread the wealth (see the feedback below from [Tunapanda][14]).

  This script makes it easier to batch download lecture resources (e.g., videos, ppt,
  etc) for Coursera classes.  Given one or more class names and account credentials,
  it obtains week and class names from the *lectures* page, and then downloads
  the related materials into appropriately named files and directories.

  Why is this helpful?  A utility like [wget][2] can work, but has the
  following limitations:

  1. Video names have numbers in them, but this does not correspond to
      the actual order.  Manually renaming them is a pain that is best left
      for computers.
  2. Using names from the syllabus page provides more informative names.
  3. Using `wget` in a for loop picks up extra videos which are not
      posted/linked, and these are sometimes duplicates.

  Browser extensions like *DownloadThemAll* is another possibility, but
  `coursera-dl` provides more features such as appropriately named files.

  This work was originally inspired in part by [youtube-dl][3] by which
  I've downloaded many other good videos such as those from Khan Academy.




    * Support for all kinds of courses (i.e., "Old Platform"/time-based as
      well as "New Platform"/on-demand courses).
    * Intentionally detailed names, so that it will display and sort properly
      on most interfaces (e.g., [VLC][4] or MX Video on Android devices).
    * Regex-based section (week) and lecture name filters to download only
      certain resources.
    * File format extension filter to grab resource types you want.
    * Login credentials accepted on command-line or from `.netrc` file.
    * Default arguments loaded from `coursera-dl.conf` file.
    * Core functionality tested on Linux, Mac and Windows.



  `coursera-dl` is meant to be used only for your material that Coursera gives
  you access to download.

  We do not encourage any use that violates their [Terms Of Use][20]. A
  relevant excerpt:

  > "[...] Coursera grants you a personal, non-exclusive, non-transferable
  > license to access and use the Sites. You may download material from the
  > Sites only for your own personal, non-commercial use. You may not
  > otherwise copy, reproduce, retransmit, distribute, publish, commercially
  > exploit or otherwise transfer any material, nor may you modify or create
  > derivatives works of the material."




  `coursera-dl` requires Python 2 or Python 3 and a free Coursera account
  enrolled in the class of interest. (As of February of 2016, we test
  automatically the execution of the program with Python versions 2.6, 2.7,
  Pypy, 3.4, 3.5, and 3.6).

  **Note:** We *strongly* recommend that you use a Python 3 interpreter (3.4
  or later).

  On any operating system, ensure that the Python executable location is added
  to your `PATH` environment variable and, once you have the dependencies
  installed (see next section), for a *basic* usage, you will need to invoke
  the script from the main directory of the project and prepend it with the
  word `python`.  You can also use more advanced features of the program by
  looking at the "Running the script" section of this document.

  *Note:* You must already have (manually) agreed to the Honor of Code of the
  particular courses that you want to use with `coursera-dl`.



  From a command line (preferably, from a virtual environment), simply issue
  the command:

      pip install coursera-dl


  This will download [the latest released version][23] of the program from the
  [Python Package Index (PyPI)][22] along with *all* the necessary
  dependencies. At this point, you should be ready to start using it.

  If this does not work, because your Python 2 version is too old (e.g. 2.7.5
  on Ubuntu 14.4), try:

      apt-get install python3 python3-pip
      pip3 install coursera-dl

  instead.

  **Note 1:** We strongly recommend that you *don't* install the package
  globally on your machine (i.e., with root/administrator privileges), as the
  installed modules may conflict with other Python applications that you have
  installed in your system (or they can interfere with `coursera-dl`).  Prefer
  to use the option `--user` to `pip install`, if you need can.

  **Note 2:** As already mentioned, we *strongly* recommend that you use a new
  Python 3 interpreter (e.g., 3.4 or later), since Python 3 has better support
  for SSL/TLS (for secure connections) than earlier versions.<br/>
  If you must use Python 2, be sure that you have at least Python 2.7.9 (later
  versions are OK).<br/>
  Otherwise, you can still use `coursera-dl`, but you will have to install the
  extra package `ndg-httpsclient`, which may involve compilation (at least on
  Linux systems).



  We strongly recommend that you consider installing Python packages with
  [pip][17], as in it is the current [preferred method][18], unless directed
  otherwise by one of the project members (for instance, when testing or
  debugging a new feature or using the source code directly from our git
  repository).  If you are using `pip`, you can directly install all the
  dependencies from the requirements file using `pip install -r
  requirements.txt`.



  We strongly recommend that you install `coursera-dl` and all its
  dependencies in a way that does *not* interfere with the rest of your Python
  installation. This is accomplished by the creation of a *virtual
  environment*, or "virtualenv".

  For the initial setup, in a Unix-like operating system, please use the
  following steps (create/adapt first the directory
  `/directory/where/I/want/my/courses`):

      cd /directory/where/I/want/my/courses
      virtualenv my-coursera
      cd my-coursera
      source bin/activate
      git clone https://github.com/coursera-dl/coursera-dl
      cd coursera-dl
      pip install -r requirements.txt
      ./coursera-dl ...

  To further download new videos from your classes, simply perform:

      cd /directory/where/I/want/my/courses/my-coursera
      source bin/activate
      cd coursera-dl
      ./coursera-dl ...

  We are working on streamlining this whole process so that it is as simple as
  possible, but to support older versions of Python and to cope with Coursera
  disabling SSLv3, we have to take a few extra steps.  In any case, it is
  *highly* recommended that you always install the latest version of the
  Python interpreter that you can.



  AUR package: [coursera-dl](https://aur.archlinux.org/packages/coursera-dl/)



  **Warning:** This method is not recommended unless you have experience
  working with multiple Python environments.

  You can use the `pip` program to install the dependencies on your own.  They
  are all listed in the `requirements.txt` file (and the extra dependencies
  needed for development are listed in the `requirements-dev.txt` file).

  To use this method, you would proceed as:

      pip install -r requirements.txt
      pip install -r requirements-dev.txt

  The second line above should only be needed if you intend to help with
  development (and help is *always* welcome) or if a maintainer of the project
  asks you to install extra packages for debugging purposes.

  Once again, before filing bug reports, if you installed the dependencies on
  your own, please check that the versions of your modules are at least those
  listed in the `requirements.txt` file (and, `requirements-dev.txt` file, if
  applicable).



  If you prefer you can run this software inside Docker:

  ```
  docker run --rm -it -v \
      "$(pwd):/courses" \
      courseradl/courseradl -u <USER> -p <PASSWORD>
  ```

  Or using netrc file:

  ```
  docker run --rm -it \
      -v "$(pwd):/courses" -v "$HOME/.netrc:/netrc" \
      courseradl/courseradl -n /netrc
  ```

  The actual working dir for coursera-dl is /courses, all courses will be
  downloaded there if you don't specify otherwise.



  `python -m pip install coursera-dl`

  Be sure that the Python install path is added to the PATH system environment
  variables. This can be found in Control Panel > System > Advanced System
  Settings > Environment Variables.

  ```
  Example:
  C:\Python35\Scripts\;C:\Python35\;
  ```

  Or if you have restricted installation permissions and you've installed Python
  under AppData, add this to your PATH.

  ```
  Example:
  C:\Users\<user>\AppData\Local\Programs\Python\Python35-32\Scripts;C:\Users\<user>\AppData\Local\Programs\Python\Python35-32;
  ```

  Coursera-dl can now be run from commandline or powershell.



  If you don't already have one, create a [Coursera][1] account and enroll in
  a class. See https://www.coursera.org/courses for the list of classes.



  Run the script to download the materials by providing your Coursera account
  credentials (e.g. email address and password or a `~/.netrc` file), the
  class names, as well as any additional parameters:

      General:                     coursera-dl -u <user> -p <pass> modelthinking-004

      With CAUTH parameter:	 coursera-dl -ca 'some-ca-value-from-browser' modelthinking-004

  If you don't want to type your password in command line as plain text, you can use the script without `-p` option. In this case you will be prompted for password  once the script is run.

      Without -p field:            coursera-dl -u <user> modelthinking-004
      Multiple classes:            coursera-dl -u <user> -p <pass> saas historyofrock1-001 algo-2012-002
      Filter by section name:      coursera-dl -u <user> -p <pass> -sf "Chapter_Four" crypto-004
      Filter by lecture name:      coursera-dl -u <user> -p <pass> -lf "3.1_" ml-2012-002
      Download only ppt files:     coursera-dl -u <user> -p <pass> -f "ppt" qcomp-2012-001
      Use a ~/.netrc file:         coursera-dl -n -- matrix-001
      Get the preview classes:     coursera-dl -n -b ni-001
      Specify download path:       coursera-dl -n --path=C:\Coursera\Classes\ comnetworks-002
      Display help:                coursera-dl --help

      Maintain a list of classes in a dir:
        Initialize:              mkdir -p CURRENT/{class1,class2,..classN}
        Update:                  coursera-dl -n --path CURRENT `\ls CURRENT`

  **Note:** If your `ls` command is aliased to display a colorized output, you
  may experience problems.  Be sure to escape the `ls` command (use `\ls`) to
  assure that no special characters get sent to the script.

  Note that we *do* support the New Platform ("on-demand") classes.

  On \*nix platforms, the use of a `~/.netrc` file is a good alternative to
  specifying both your username (i.e., your email address) and password every
  time on the command line. To use it, simply add a line like the one below to
  a file named `.netrc` in your home directory (or the [equivalent][8], if you
  are using Windows) with contents like:

      machine coursera-dl login <user> password <pass>

  Create the file if it doesn't exist yet.  From then on, you can switch from
  using `-u` and `-p` to simply call `coursera-dl` with the option `-n`
  instead.  This is especially convenient, as typing usernames (email
  addresses) and passwords directly on the command line can get tiresome (even
  more if you happened to choose a "strong" password).

  Alternatively, if you want to store your preferred parameters (which might
  also include your username and password), create a file named `coursera-dl.conf`
  where the script is supposed to be executed, with the following format:

      --username <user>
      --password <pass>
      --subtitle-language en,zh-CN|zh-TW
      --download-quizzes
      
      

  Parameter which is stored in the file will be overriden if it is again specified
  in your commandline script

  **Note:** In `coursera-dl.conf`, all the parameters should not be wrapped
  with quotes.



  In default mode when you interrupt the download process by pressing
  <kbd>CTRL</kbd>+<kbd>C</kbd>, partially downloaded files will be deleted from your disk and
  you have to start the download process from the beginning. If your
  download was interrupted by something other than KeyboardInterrupt
  (<kbd>CTRL</kbd>+<kbd>C</kbd>) like sudden system crash, partially downloaded files will
  remain on your disk and the next time you start the process again,
  these files will be discarded from download list!, therefore it's your
  job to delete them manually before next start. For this reason we
  added an option called `--resume` which continues your downloads from
  where they stopped:

  	coursera-dl -u <user> -p <pass> --resume sdn1-001

  This option can also be used with external downloaders:

  	coursera-dl --wget -u <user> -p <pass> --resume sdn1-001

  *Note 1*: Some external downloaders use their own built-in resume feature
  which may not be compatible with others, so use them at your own risk.

  *Note 2*: Remember that in resume mode, interrupted files **WON'T** be deleted from
  your disk.

  **NOTE**: If your password contains punctuation, quotes or other "funny
  characters" (e.g., `<`, `>`, `#`, `&`, `|` and so on), then you may have to
  escape them from your shell. With bash or other Bourne-shell clones (and
  probably with many other shells) one of the better ways to do so is to
  enclose your password in single quotes, so that you don't run into
  problems.  See [issue #213][issue213] for more information.



  If you have problems when downloading class materials, please try to see if
  one of the following actions solve your problem:

  * Make sure the class name you are using corresponds to the resource name
    used in the URL for that class:
      `https://www.coursera.org/learn/<CLASS_NAME>/home/welcome`

  * Have you tried to clean the cached cookies/credentials with the
    `--clear-cache` option?

  * Note that many courses (most, perhaps?) may remove the materials after a
    little while after the course is completed, while other courses may retain
    the materials up to a next session/offering of the same course (to avoid
    problems with academic dishonesty, apparently).
    <br><br>
    In short, it is not guaranteed that you will be able to download after the
    course is finished and this is, unfortunately, nothing that we can help
    you with.

  * Make sure you have installed and/or updated all of your dependencies
    according to the `requirements.txt` file as described above.

  * One can export a Netscape-style cookies file with a browser extension ([1][9], [2][10])
    and use it with the `-c` option. This comes in handy
    when the authentication via password is not working (the authentication
    process changes now and then).

  * If results show 0 sections, you most likely have provided invalid
    credentials (username and/or password in the command line or in your
    `.netrc` file or in your `coursera-dl.conf` file).

  * For courses that have not started yet, but have had a previous iteration
    sometimes a preview is available, containing all the classes from the last
    course. These files can be downloaded by passing the `--preview`
    parameter.

  * If you get an error like `Could not find class: <CLASS_NAME>`, then:
      * Verify that the name of the course is correct. Current class
      names in coursera are composed by a short course name e.g. `class` and
      the current version of the course (a number). For example, for a
      class named `class`, you would have to use `class-001`, `class-002`
      etc.
      * Second, verify that you are enrolled in the course. You won't be
      able to access the course materials if you are not officially
      enrolled and agreed to the honor course *via the website*.

  * If:
      * You get an error when using `-n` to specify that you want to use a
        `.netrc` file and,
      * You want the script to use your default netrc file and,
      * You get a message saying `coursera-dl: error: too few arguments`

        Then you should specify `--` as an argument after `-n`, that is, `-n --`
        or change the order in which you pass the arguments to the script, so that
        the argument after `-n` begins with an hyphen (`-`).  Otherwise, Python's
        `argparse` module will think that what you are passing is the name of the
        netrc file that you want to use. See issue #162.

  * If your password has spaces, don't forget to write it using quotes.

  * Have you installed the right project ?
    <br><br>
    **Warning**: If you installed the script using PyPi (pip) please verify that
    you installed the correct project. We had to use a different name in pip
    because our original name was already taken. Remember to install it using:
    ```
        pip install coursera-dl
    ```



  If you are from China and you're having problems downloading videos,
  adding "52.84.167.78 d3c33hcgiwev3.cloudfront.net" in the hosts file
  (/etc/hosts) and freshing DNS with "ipconfig/flushdns" may work
  (see https://github.com/googlehosts/hosts for more info).



  First of all, make sure you are enrolled to the course you want to download.

  Many old courses have already closed enrollment so often it's not an
  option. In this case, try downloading with `--preview` option. Some
  courses allow to download lecture materials without enrolling, but
  it's not common and is not guaranteed to work for every course.

  Finally, you can download the videos if you have, at least, the index
  file that lists all the course materials. Maybe your friend who is enrolled
  could save that course page for you. In that case use the `--process_local_page`
  option.

  Alternatively you may want to try this Chrome extension: https://chrome.google.com/webstore/detail/coursera-materials-downlo/ijkboagofaehocnjacacdhdcbbcpilih

  If none of the above works for you, there is nothing we can do.



  Coursera-dl supports external downloaders but note that they are only used to
  download materials after the syllabus has been parsed, e.g. videos, PDFs, some
  handouts and additional files (syllabus is always downloaded using the internal
  downloader). If you experience problems with downloading such materials, you may
  want to start using external downloader and configure its timeout values. For
  example, you can use aria2c downloader by passing `--aria` option:

  ```
  coursera-dl -n --path . --aria2  <course-name>
  ```

  And put this into aria2c's configuration file `~/.aria2/aria2.conf` to reduce
  timeouts:

  ```
  connect-timeout=2
  timeout=2
  bt-stop-timeout=1
  ```

  Timeout configuration for internal downloader is not supported.



  If you're on Windows behind a proxy, set up the environment variables
  before running the script as follows:

  ```
  set HTTP_PROXY=http://host:port
  set HTTPS_PROXY=http://host:port
  ```

  Related discussion: [#205](https://github.com/coursera-dl/coursera-dl/issues/205)



  In `C:\Users\<user>\AppData\Local\Programs\Python\Python35-32\Scripts`
  or wherever Python installed (above is default for Windows)
  edit below file in idle: (right click on script name and select 'edit with idle in menu)

  ```
  coursera-dl-script
  ```

  from

  ```

  ```

  to

  ```

  ```

  (add quotes). This is a known pip bug.

  Source: [issue #500][issue500] [StackOverflow][pipinstallerbug]



  This is a known error, please do not report about this error message! The problem is in **YOUR** environment. To fix it, do the following:

  ``` bash
  sudo apt-get install build-essential python-dev libssl-dev libffi-dev
  pip install --user urllib3 pyasn1 ndg-httpsclient pyOpenSSL
  ```
  If the error remains, try installing coursera-dl from github following this instruction:
  https://github.com/coursera-dl/coursera-dl#alternative-installation-method-for-unix-systems

  If you still have the problem, please read the following issues for more ideas on how to fix it:
  [#330](https://github.com/coursera-dl/coursera-dl/issues/330)
  [#377](https://github.com/coursera-dl/coursera-dl/issues/377)
  [#329](https://github.com/coursera-dl/coursera-dl/issues/329)

  This is also worth reading:
  https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning



  When saving a course page, we enabled `MathJax` rendering for math equations, by
  injecting `MathJax.js` in the header. The script is using a cdn service provided
  by [mathjax.org](https://cdn.mathjax.org/mathjax/latest/MathJax.js). However, that
  url is not accessible in some countries/regions, you can provide a
  `--mathjax-cdn <MATHJAX_CDN>` parameter to specify the `MathJax.js` file that is
  accessible in your region.



  Before reporting any issue please follow the steps below:

  1. Verify that you are running the latest version of the script, and the
  recommended versions of its dependencies, see them in the file
  `requirements.txt`.  Use the following command if in doubt:

          pip install --upgrade coursera-dl

  2. If the problem persists, feel free to [open an issue][issue] in our
  bugtracker, please fill the issue template with *as much information as
  possible*.

  [issue]: https://github.com/coursera-dl/coursera-dl/issues



  When reporting bugs against `coursera-dl`, please don't forget to include
  enough information so that you can help us help you:

  * Is the problem happening with the latest version of the script?
  * What operating system are you using?
  * Do you have all the recommended versions of the modules? See them in the
    file `requirements.txt`.
  * What is the course that you are trying to access?
  * What is the precise command line that you are using (feel free to hide
    your username and password with asterisks, but leave all other
    information untouched).
  * What are the precise messages that you get? Please, use the `--debug`
    option before posting the messages as a bug report. Please, copy and paste
    them.  Don't reword/paraphrase the messages.



  I enjoy getting feedback. Here are a few of the comments I've received:

  * "Thanks for the good job! Knowledge will flood the World a little more thanks
    to your script!"
    <br>Guillaume V. 11/8/2012

  * "Just wanted to send you props for your Python script to download Coursera
    courses. I've been using it in Kenya for my non-profit to get online courses
    to places where internet is really expensive and unreliable. Mostly kids here
    can't afford high school, and downloading one of these classes by the usual
    means would cost more than the average family earns in one week. Thanks!"
    <br>Jay L., [Tunapanda][14] 3/20/2013

  * "I am a big fan of Coursera and attend lots of different courses. Time
    constraints don't allow me to attend all the courses I want at the same time.
    I came across your script, and I am very happily using it!  Great stuff and
    thanks for making this available on Github - well done!"
    <br>William G.  2/18/2013

  * "This script is awesome! I was painstakingly downloading each and every video
    and ppt by hand -- looked into wget but ran into wildcard issues with HTML,
    and then.. I came across your script.  Can't tell you how many hours you've
    just saved me :) If you're ever in Paris / Stockholm, it is absolutely
    mandatory that I buy you a beer :)"
    <br>Razvan T. 11/26/2012

  * "Thanks a lot! :)"
    <br>Viktor V. 24/04/2013



  Please, post bugs and issues on [github][11]. Send other comments to Rogério
  Theodoro de Brito (the current maintainer): rbrito@ime.usp.br (twitter:
  [@rtdbrito][21]) or to John Lehmann (the original author): first last at
  geemail dotcom (twitter: [@jplehmann][12]).

  [1]: https://www.coursera.org
  [2]: https://sourceforge.net/projects/gnuwin32/files/wget/1.11.4-1/wget-1.11.4-1-setup.exe
  [3]: http://rg3.github.io/youtube-dl
  [4]: https://f-droid.org/repository/browse/?fdid=org.videolan.vlc
  [5]: https://www.crummy.com/software/BeautifulSoup
  [6]: https://pypi.python.org/pypi/argparse
  [7]: https://pypi.python.org/pypi/setuptools
  [8]: http://stackoverflow.com/a/6031266/962311
  [9]: https://chrome.google.com/webstore/detail/cookietxt-export/lopabhfecdfhgogdbojmaicoicjekelh
  [10]: https://addons.mozilla.org/en-US/firefox/addon/export-cookies/
  [11]: https://github.com/coursera-dl/coursera-dl/issues
  [12]: https://twitter.com/jplehmann
  [13]: http://techcrunch.com/2013/02/20/coursera-adds-29-schools-90-courses-and-4-new-languages-to-its-online-learning-platform/
  [14]: http://www.tunapanda.org
  [15]: https://github.com/html5lib/html5lib-python
  [16]: http://docs.python-requests.org/en/latest/
  [17]: https://pip.pypa.io/en/latest/
  [18]: http://ww45.python-distribute.org/pip_distribute.png
  [19]: https://pypi.python.org/pypi/six/
  [20]: https://www.coursera.org/about/terms
  [21]: https://twitter.com/rtdbrito
  [22]: https://pypi.python.org/
  [23]: https://pypi.python.org/pypi/coursera-dl
  [issue213]: https://github.com/coursera-dl/coursera-dl/issues/213
  [issue500]: https://github.com/coursera-dl/coursera-dl/issues/500
  [pipinstallerbug]: http://stackoverflow.com/questions/31808180/installing-pyinstaller-via-pip-leads-to-failed-to-create-process


pkgId: 72478264f89b0b3233d36bbd6cc039b2227949ba560c09c12a2692d45e111a7f
name: python-courts-db
arch: src
version: 0.10.25
epoch: 0
release: 1
summary: Database of Courts
url: https://github.com/freelawproject/courts-db
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-courts-db-0.10.25-1.src.rpm
checksum_type: sha256
description:
  Courts-DB is an open source repository to organize a database of all courts current and historical.
  It was built for use in CourtListener.com.
  Its main goal is to interface with CourtListener to identify historical and current courts
  by string.  It includes mechanisms to filter results based on dates and/or whether it is a bankruptcy court.
  Further development is intended and all contributors, corrections and additions are welcome.


pkgId: c367c1f728426c55d8f2da05d6fd379eace2d1faeee948354d8a60a139b8cd6d
name: python-couscous
arch: src
version: 2022.7.24
epoch: 0
release: 1
url: https://git.sr.ht/~sthagen/couscous
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-couscous-2022.7.24-1.src.rpm
checksum_type: sha256
summary:
  Derive actionable rules from specification prose through first grinding grains into small balls to later cook a good meal.

description:
  Derive actionable rules from specification prose through first grinding grains into small balls to later cook a good meal.

  [License: MIT](https://github.com/sthagen/couscous/blob/default/LICENSE)

  [![version](https://img.shields.io/pypi/v/couscous.svg?style=flat)](https://pypi.python.org/pypi/couscous/)
  [![downloads](https://pepy.tech/badge/couscous/month)](https://pepy.tech/project/couscous)
  [![wheel](https://img.shields.io/pypi/wheel/couscous.svg?style=flat)](https://pypi.python.org/pypi/couscous/)
  [![supported-versions](https://img.shields.io/pypi/pyversions/couscous.svg?style=flat)](https://pypi.python.org/pypi/couscous/)
  [![supported-implementations](https://img.shields.io/pypi/implementation/couscous.svg?style=flat)](https://pypi.python.org/pypi/couscous/)



  User and developer [documentation of couscous](https://codes.dilettant.life/docs/couscous).



  Feature requests and bug reports are bested entered in the [todos of couscous](https://todo.sr.ht/~sthagen/couscous).



  The primary source repository of [couscous is at sourcehut](https://git.sr.ht/~sthagen/couscous)
  a collection of tools useful for software development.



  Experimental.

  **Note**: The default branch is `default`.


pkgId: 5ccbb4c02d9458ac49f4c58444722b5b4b3541018d829bdfb1930b04dd9f3775
name: python-cov-core
arch: src
version: 1.15.0
epoch: 0
release: 1
summary: plugin core for use by pytest-cov, nose-cov and nose2-cov
url: https://github.com/schlamar/cov-core
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cov-core-1.15.0-1.src.rpm
checksum_type: sha256
description:
  This is a lib package for use by pytest-cov, nose-cov and nose2-cov.  Unless you're developing a
  coverage plugin for a test framework, you probably want one of those.


pkgId: 4cb9ce011f596f5ae75411aa6f6f080da0a81fc40b047efd25ba0c4a25f21818
name: python-covador
arch: src
version: 0.10.2
epoch: 0
release: 1
summary: Python data validation with web in-mind
url: https://github.com/baverman/covador/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-covador-0.10.2-1.src.rpm
checksum_type: sha256
description:
  |travis| |coverage| |pyver|
  Validation library for processing http endpoint arguments.
      from flask import Flask
      from covador import split, opt
      from covador.flask import query_string
      app = Flask(__name__)
      @app.route('/')
      @query_string(foo=opt(split(int), []))
      def csv_argument(foo):
          return repr(foo)
      
      if __name__ == '__main__':
          app.run()
  * Support for flask(0.x, 1.0.x, 1.1.x), django(1.x, 2.x), aiohttp(2.x, 3.x),
    tornado(3.x, 4.x, 5.x, 6.x) and sanic(0.x, 18.x, 19.x).
  * Simple creating of custom ``query_string``/``form``/``params``/``json_body``/``args`` wrappers.
  * Multi dict support via item ``multi`` param.
  * Multi dict keys support via item ``src`` param.
  * Simple interface for custom validators/processors it's just a callable.
  * Maps, typed Maps, Lists, Tuples, Enums.
  * Validation chains: ``opt(default=[]) | split(separator=' ') | List(int) | (lambda it: it[:10])``
    or more concise ``opt(split(int, separator=' '), []) | operator.itemgetter(slice(10))`` —
    an optional argument of space separated integers and we need top 10 items from it and it
    is empty by default.
  * Literal schema: ``schema(foo=[{'boo': int}])``, validates ``{'foo': [{'boo': 10}, {'boo': 20}]}``.
  * Bytes/unicode aware.


pkgId: eb5b047bee53055434b0384ca9b697885bd900893fe902eefbcd4d312eaa48c4
name: python-covalent
arch: src
version: 0.232.0.post1
epoch: 0
release: 1
summary: Covalent Workflow Tool
url: https://github.com/AgnostiqHQ/covalent
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-covalent-0.232.0.post1-1.src.rpm
checksum_type: sha256
description:
  For a more in-depth description of Covalent's features and how they work, see the [Concepts](https://docs.covalent.xyz/docs/user-documentation/concepts/concepts-index/) page in the documentation.
  </br>
  <div align="center">
  <a href="https://www.covalent.xyz/what-is-covalent/"><img src="./doc/source/_static/what_is_covalent.svg" alt="divider"></a>
  <a href="https://www.covalent.xyz/navigating-the-modern-hpc-landscape/"><img src="./doc/source/_static/cloud_hpc.svg" alt="divider"></a>
  <a href="https://docs.covalent.xyz/docs/user-documentation/concepts/covalent-basics/"><img src="./doc/source/_static/concepts_of_covalent.svg" alt="divider"></a>
  <a href="https://docs.covalent.xyz/docs/user-documentation/concepts/covalent-arch/covalent-architecture"><img src="./doc/source/_static/covalent_work.svg" alt="divider"></a>
  </div>
  <div >

  Covalent is developed using Python on Linux and macOS. The easiest way to install Covalent is by using the PyPI package manager.
  ```
  pip install covalent --upgrade
  ```
  For other methods of installation, please [check the docs.](https://docs.covalent.xyz/docs/get-started/install/)
  **Deployments**
  <div>
  Covalent offers flexible deployment options, from Docker image/AMIs for self-hosting to pip package for local installations, accommodating various use cases
  </div>
  </br>
  <div align="center">
  <a href="https://docs.covalent.xyz/docs/user-documentation/server-deployment"><img src="./doc/source/_static/local-laptop.svg" alt="divider"></a>
  <a href="https://docs.covalent.xyz/docs/user-documentation/sd-docker"><img src="./doc/source/_static/onprem_hosted.svg" alt="divider"></a>
  <a href="https://docs.covalent.xyz/docs/user-documentation/sd-systemd"><img src="./doc/source/_static/cloud_hosted.svg" alt="divider"></a>
  </div>
  </br>
  </div>

   <!-- <div><img src="./contributing_heading.svg" alt="divider"></div> -->
  To contribute to Covalent, refer to the [Contribution Guidelines](https://github.com/AgnostiqHQ/covalent/blob/master/CONTRIBUTING.md). We use GitHub's [issue tracking](https://github.com/AgnostiqHQ/covalent/issues) to manage known issues, bugs, and pull requests. Get started by forking the `develop` branch and submitting a pull request with your contributions. Improvements to the documentation, including tutorials and how-to guides, are also welcome from the community. For more information on adding tutorials, check the [Tutorial Guidelines](https://github.com/AgnostiqHQ/covalent/blob/master/doc/TUTORIAL_GUIDELINES.md). Participation in the Covalent community is governed by the [Code of Conduct](https://github.com/AgnostiqHQ/covalent/blob/master/CODE_OF_CONDUCT.md).

  Please use the following citation in any publications.
  [https://doi.org/10.5281/zenodo.5903364](https://zenodo.org/records/8369670)

  Covalent is licensed under the Apache 2.0 License. See the [LICENSE](https://github.com/AgnostiqHQ/covalent/blob/master/LICENSE) file or contact the [support team](mailto:support@aqnostic.ai) for more details.
  For a detailed history of changes and new features, see the [Changelog](https://github.com/AgnostiqHQ/covalent/blob/master/CHANGELOG.md).


pkgId: 02e52abe3a9450d01ee2ff2659c5172df7d1e664fbbdabce24b85316795d4e62
name: python-covalent-blueprints
arch: src
version: 0.4.2
epoch: 0
release: 1
summary: Covalent Blueprints: a toolkit for creating pre-packaged, reusable Covalent projects.
url: https://github.com/AgnostiqHQ/covalent-blueprints
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-covalent-blueprints-0.4.2-1.src.rpm
checksum_type: sha256
description:
  <div align="center">
    <img src="./assets/covalent_blueprints_banner.png" alt="Covalent Blueprints Banner" width="100%">
  </div>
  </br>

  <div align="center" text>
  <b>Plug-and-play Covalent workflows and service deployments.</b>
  </div>
  </br>

  Covalent Blueprints are pre-configured applications for [Covalent](https://www.covalent.xyz/). Each blueprint is runnable both on its own and as a component in another workflow. See the [catalogue](#blueprints-catalogue) below for a list of available blueprints.



  Run a Llama3 chatbot on H100 GPUs in just a few lines.
  ```python
  from covalent_blueprints import store_secret, save_api_key
  from covalent_blueprints_ai import llama_chatbot


  save_api_key("<covalent-cloud-api-key>")
  store_secret(name="HF_TOKEN", value="<huggingface-write-token>")


  bp = llama_chatbot(model_name="meta-llama/Meta-Llama-3-70B-Instruct")


  bp.executors.service_executor.gpu_type = "h100"
  bp.executors.service_executor.num_gpus = 2
  bp.executors.service_executor.memory = "240GB"


  llama_client = bp.run()
  ```

  The [`llama_chatbot`](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/covalent_blueprints_ai/llama_chatbot/llama_chatbot.py) blueprint returns a Python client for the deployed service.
  ```python
  llama_client.generate(prompt="How are you feeling?", max_new_tokens=100)
  ```
  ```
  How are you feeling? How are you doing?
  I am feeling well, thank you for asking. I am a machine learning model, so I don't have emotions or feelings in the way that humans do.
  ```

  ```python
  llama_client.generate_message(
      messages=[
          {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
          {"role": "user", "content": "Who are you?"},
      ]
  )
  ```
  ```
  {'role': 'assistant', 'content': "Arrrr, me hearty! Me be Captain Chatterbeard, the scurviest chatbot to ever sail the seven seas o' conversation! Me be here to swab yer decks with me witty banter, me treasure trove o' knowledge, and me trusty cutlass o' clever responses! So hoist the colors, me matey, and set course fer a swashbucklin' good time! What be bringin' ye to these fair waters?"}
  ```
  Release compute resources with a single line.
  ```python
  llama_client.teardown()
  ```



  👉 Each link below points to an example notebook.

  ```bash
  pip install -U covalent-blueprints-ai
  ```

  | Blueprint | Description |
  |-|-|
  | [Image Generator](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/examples/sdxl_basic.ipynb) | Deploy a text-to-image generator service.
  | [Llama Chatbot](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/examples/llama_chatbot.ipynb) | Deploy a chatbot backend using a Llama-like model.
  | [LoRA fine tuning](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/examples/lora_fine_tuning.ipynb) | Fine tune and deploy an LLM as a Covalent service.
  | [vLLM](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/examples/vllm_basic.ipynb) | Deploy an LLM using vLLM on Covalent Cloud.

  **More coming soon...**

  <!-- ### More coming soon...

  Stay tuned for more blueprints in the near future! -->



  Public contributions will soon be open! In the meantime, please reach out on [Slack](https://covalentworkflows.slack.com/ssb/redirect) to contribute a blueprint.

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


pkgId: 31c4bd539c10b32cf8776a32e9f340dc701d08db79ba00bce94df2b5b6c33816
name: python-covalent-blueprints
arch: src
version: 0.4.5
epoch: 0
release: 1
summary: Covalent Blueprints: a toolkit for creating pre-packaged, reusable Covalent projects.
url: https://github.com/AgnostiqHQ/covalent-blueprints
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-covalent-blueprints-0.4.5-1.src.rpm
checksum_type: sha256
description:
  <div align="center">
    <img src="./assets/covalent_blueprints_banner.png" alt="Covalent Blueprints Banner" width="100%">
  </div>
  </br>

  <div align="center" text>
  <b>Plug-and-play Covalent workflows and service deployments.</b>
  </div>
  </br>

  Covalent Blueprints are pre-configured applications for [Covalent](https://www.covalent.xyz/). Each blueprint is runnable both on its own and as a component in another workflow. See the [catalogue](#blueprints-catalogue) below for a list of available blueprints.



  Run a Llama3 chatbot on H100 GPUs in just a few lines.
  ```python
  from covalent_blueprints import store_secret, save_api_key
  from covalent_blueprints_ai import llama_chatbot


  save_api_key("<covalent-cloud-api-key>")
  store_secret(name="HF_TOKEN", value="<huggingface-write-token>")


  bp = llama_chatbot(model_name="meta-llama/Meta-Llama-3-70B-Instruct")


  bp.executors.service_executor.gpu_type = "h100"
  bp.executors.service_executor.num_gpus = 2
  bp.executors.service_executor.memory = "240GB"


  llama_client = bp.run()
  ```

  The [`llama_chatbot`](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/covalent_blueprints_ai/llama_chatbot/llama_chatbot.py) blueprint returns a Python client for the deployed service.
  ```python
  llama_client.generate(prompt="How are you feeling?", max_new_tokens=100)
  ```
  ```
  How are you feeling? How are you doing?
  I am feeling well, thank you for asking. I am a machine learning model, so I don't have emotions or feelings in the way that humans do.
  ```

  ```python
  llama_client.generate_message(
      messages=[
          {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
          {"role": "user", "content": "Who are you?"},
      ]
  )
  ```
  ```
  {'role': 'assistant', 'content': "Arrrr, me hearty! Me be Captain Chatterbeard, the scurviest chatbot to ever sail the seven seas o' conversation! Me be here to swab yer decks with me witty banter, me treasure trove o' knowledge, and me trusty cutlass o' clever responses! So hoist the colors, me matey, and set course fer a swashbucklin' good time! What be bringin' ye to these fair waters?"}
  ```
  Release compute resources with a single line.
  ```python
  llama_client.teardown()
  ```



  👉 Each link below points to an example notebook.

  ```bash
  pip install -U covalent-blueprints-ai
  ```

  | Blueprint | Description |
  |-|-|
  | [Image Generator](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/examples/sdxl_turbo.ipynb) | Deploy a text-to-image generator service.
  | [Llama Chatbot](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/examples/llama_chatbot.ipynb) | Deploy a chatbot backend using a Llama-like model.
  | [LoRA fine tuning](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/examples/lora_fine_tuning.ipynb) | Fine tune and deploy an LLM as a Covalent service.
  | [vLLM](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/examples/vllm_inference.ipynb) | Deploy an LLM using vLLM on Covalent Cloud.
  | [NVIDIA Llama RAG](https://github.com/AgnostiqHQ/covalent-blueprints-ai/blob/main/examples/nvidia_llama_rag.ipynb) | Deploy a retrieval-augmented generation (RAG) pipeline using multiple NVIDIA NIMs.

  **More coming soon...**

  <!-- ### More coming soon...

  Stay tuned for more blueprints in the near future! -->



  Public contributions will soon be open! In the meantime, please reach out on [Slack](https://covalentworkflows.slack.com/ssb/redirect) to contribute a blueprint.

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


pkgId: 5322d5bdc36c2d179c595f0dde210f43497e230e3306cc49a9771f17c9ec28f5
name: python-covalent-blueprints-ai
arch: src
version: 0.4.2
epoch: 0
release: 1
summary: A collection of AI blueprints for Covalent Cloud.
url: https://github.com/AgnostiqHQ/covalent-blueprints-ai
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-covalent-blueprints-ai-0.4.2-1.src.rpm
checksum_type: sha256
description:
  A collection of AI blueprints for Covalent, built using the [`covalent-blueprints`](https://github.com/AgnostiqHQ/covalent-blueprints) library.



  ```bash
  pip install -U covalent-blueprints-ai
  ```



  This repository currently contains the following blueprints.

  | name | description |
  |----------|----------|
  | `llama_chatbot()` | Deploys a Llama-like chatbot service. |
  | `sdxl()` | Deploys a realistic image generator using basic on SDXL. |
  | `sdxl_turbo()` | Deploys a fast image generator using SDXL-turbo. |
  | `vllm_inference()` | Deploys an LLM service using vLLM. |
  | `lora_fine_tuning()` | Fine-tunes and deploys a new LLM. |
  | `nvidia_llama_rag()` | Deploys a RAG service using NVIDIA NIMs. |

  See the [`/examples`](./examples) directory for usage examples.

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


pkgId: a15efff3d381bca5ebed00f135fc7f47a8f181f86d62762fc83180315dccd94b
name: python-covalent-cloud
arch: src
version: 0.81.0
epoch: 0
release: 1
summary: Covalent Cloud SDK
url: https://github.com/AgnostiqHQ/covalent-cloud-sdk
rpm_license: GNU Affero GPL v3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-covalent-cloud-0.81.0-1.src.rpm
checksum_type: sha256
description:
  [Covalent](https://github.com/AgnostiqHQ/covalent) is a python based workflow orchestration tool used to execute HPC and quantum tasks in heterogeneous environments.

  Installing Covalent Cloud SDK gives users access to the enterprise version of Covalent.


pkgId: 20ad036c974653d5e84b2383ef13b3e325346182adf6aba8fc20da9094800a4a
name: python-covcheck
arch: src
version: 0.4.3
epoch: 0
release: 1
summary: Code coverage validation
url: https://github.com/HumeAI/covcheck
rpm_license: Proprietary
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-covcheck-0.4.3-1.src.rpm
checksum_type: sha256
description:
  <div align="center">
    <img src="https://storage.googleapis.com/hume-public-logos/covcheck/covcheck-dino-banner.png">
    <h1>covcheck</h1>

    <p>
      <strong>Command-line tool for code coverage validation</strong>
    </p>

    <br>
    <div>
      <a href="https://badge.fury.io/py/covcheck"><img src="https://badge.fury.io/py/covcheck.svg" alt="PyPI"></a>
      <a href="https://pepy.tech/project/covcheck"><img src="https://pepy.tech/badge/covcheck" alt="Downloads"></a>
      <a href="https://github.com/HumeAI/covcheck/actions/workflows/ci.yml"><img src="https://github.com/HumeAI/covcheck/actions/workflows/ci.yaml/badge.svg" alt="CI"></a>
    </div>
    <br>
  </div>



  `covcheck` is intended to be used in conjunction with [coverage.py](https://coverage.readthedocs.io/), which already has support for `pytest`, `unittest`, and `nosetest`. All you have to do is point `covcheck` to the `coverage.xml` file produced when running your tests.

  For more information on how to use `covcheck` please check out the [official docs page](https://humeai.github.io/covcheck).


pkgId: 2c12be62838207b92fe473cc0b73be6dafbe679edc8a81ed8b31b33c409a1bed
name: python-covdata
arch: src
version: 1.2.2
epoch: 0
release: 1
summary: A package that can grab all data of Covid-19 cases in India
url: https://github.com/kalyaniuniversity/covidindia
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-covdata-1.2.2-1.src.rpm
checksum_type: sha256
description:
  ï»¿# covdata.covidindia Module

  **Description**

  This covidindia Module has the power to bring all the data related to Covid-19 outbreak in India in a tabular form. This module will bring the whole set of raw data in a date-wise and processed format from [the COVID-19 Indian Dataset maintained by University of Kalyani](https://github.com/kalyaniuniversity/COVID-19-Datasets), which will be easier to deal with.

  Once installed, we can get an up-to-date information about the Covid-19 affected people, till the day the data is available at the source. We can visualize the data of our choice for any given range of dates. It is capable of giving information about the total number of confirmed, recovered and deceased patients, between any two dates, of any city, district or related to any particular gender (male/female). We can also visualize the whole up-to-date data without using any aforesaid filters using our module.



  It gathers information from our own maintained database. Database data are collected from various websites, news channels and [covid19india.org crowdsourcing initiative](https://www.covid19india.org). From the collected data this module will help user to represent in user friendly format with all types of filters in one place. No need to search any website. Just use this module for India based Covid-19 projects.



  This server is mainly made to give the data related to covid-19 in India.
  Thsi server mainly focused on showing the data in interactive way.
  Link: [Covidindia Server](https://covdata.pythonanywhere.com/)



       pip install covdata



  - District wise data for each state with daily basis is available now.
  - Number of subject tested data for every state with daily basis is now availabe.
  - All types of graphs can be separately generated as confirmed,deceased or recovered. No more subplots will be generated.
  - With all graphs data new extra data can be pushed to generate multiple line graphs to track the any relevance information.This extra data must be a dictionary or list of dictionary where for each dictionary contains a list of data points with a suitable key name.This key name will the legend name of the garph.



  There might be some issues to start the server for most probably Mac users.

       Files can't be made due to some error.

  if above line is seen in the terminal please let me know by opening an issue in [github](https://github.com/kalyaniuniversity/covidindia).If this happens server will start normally but download function will not work.



       covdata cov-server   #to start the server with default port
       covdata cov-server -b :8000      #to bind the port at 8000



       
       from covdata.covidindia import initializer,Demographic_overview,Data,visualizer

       
       Init=initializer()

       
       Init.show_data(of='Total Confirmed',daily=True)

       obj1=Data(init)       #defining the object for Data class
       cumData=obj1.get_cum_dataset_between_date('30/1/2020','5/4/2020',by='total recovered')   #gives the cumulative count between 30/1/2020 and 5/4/2020

       obj1.rank(10,'Total Confirmed',kind='top',cummulative=True,date='4/3/2020')   #gives the top 10 total confirmed cases for date 4/3/2020

       obj2=Demographic_overview(init)     # object for demographic_overview class

       obj2.demography('Salt Lake','30/1/2020-10/4/2020')    #Gives Male and Female counts of confirmed cases for salt lake city in west bengal between 30/1/2020 and 10/4/2020

       obj3=visualizer(init)       #initiazing visualizer class

       obj3.whole(daily=True)       #shows line plot for daily counts of confirmed cases,recovered cases and death cases against date.

       obj3.whole(typeof='confirmed',daily=False,xlabel='Dates',ylabel='Daily Counts')   #cumulative count plot of india of confirmed case .

       
       obj3.graph_by_date(startDate='3/6/2020', endDate='10/6/2020', typeof='recovered',title='recovery data', daily=False,state='mh')



  Examples are in [github](https://github.com/kalyaniuniversity/covidindia) repository project folder.



       
       covdata -h

       
       covdata -f Total_Confirmed --options show_data

       
       covdata -f Total_Confirmed --options show_data --save \where\to\save\filename.csv

       
       covdata -p wb -d all --options demography   #please use state code.here 'wb' means 'West bengal'

       
       covdata -p wb -d all --options demography -H 10      #head(10)

       
       covdata -s mp --options state_dataset       #for madhyapradesh

       
       covdata -s mp --options state_dataset -D y   #daily basis count for madhyapradesh.

       
       covdata -f Total_Confirmed --options state_dataset        #Total Confirmed cases for daily basis for all states.

       
       covdata -d 10/4/2020 --options data_by_date

       
       covdata -d 11/4/2020 -f Total_Recovered --options count_by_date

       
       covdata -r top -n 10 -f Total_Confirmed --options rank    #top 10 values of total confirmed cases as cumulative

       
       covdata -r top -n 10 -f Total_Recovered -D y --options rank -d 15/3/2020

       
       covdata -r bottom -n 10 -f Total_Recovered -D n --options rank -d 15/3/2020

       
       covdata -r top -n 10 -f Total_Recovered -D n --options rank -d 15/3/2020

       
       covdata -r top -n 10 -f Total_Recovered -D n --options rank

       
       covdata -d 15/3/2020-30/3/2020 -f Total_Recovered --options cumulative_between_date     #Total recovered cumulative data between 15/3/2020 and 30/3/2020

       
       covdata -d 15/3/2020-30/3/2020 -f Total_Confirmed --options count_between_date   #Daily count data between 15/3/2020 and 30/3/2020

       
       covdata -g whole -D y -f Total_Confirmed --options graph    #plot the whole data with dailly counts of
                                                                     confirmed data
       (if -f flag is not mentioned combibed graph will be plotted)
       
       covdata -g whole -D y -s wb -f Total_Recovered --options graph    #plots the daily graph of west bengal
                                                                          of recovery data

       
       covdata -g head -r 15 -D y -s wb --options graph   #plots 1st 15 days daily counts for west bengal
       covdata -g head -r 15 -D n -s wb --options graph   #plots 1st 15 days cumulative counts for west bengal

       
       covdata -g graph_by_date -d 25/3/2020-4/4/2020 -D y -s mh --options graph

       
       covdata -g graph_by_date -d 25/3/2020-4/4/2020 -D y --options graph

       
       covdata -g latitude --options graph

       



  Help on module covidindia:

  NAME
  covidindia - Created on Tue Mar 31 15:24:51 2020

  DESCRIPTION
  @author: Dripta Senapati

  CLASSES
  builtins.object
  Demographic_overview
  initializer
  Data
  visualizer

       class Data(initializer)
       |  Data(init)
       |
       |  # Data class can apply various filters on collected datasets(Confirmed,Recovered,Deceased)
       |  # based on User's choice
       |
       |  Method resolution order:
       |      Data
       |      initializer
       |      builtins.object
       |
       |  Methods defined here:
       |
       |  __init__(self, init)
       |      This is a class that will scrap the data from source upto the previous day of
       |      day of using that package.
       |
       |      Returns
       |      -------
       |      None.
       |
       |  get_count_between_date(self, startDate, endDate, by)
       |      Gives daily count data for all states between two dates
       |
       |      Parameters
       |      ----------
       |      startDate : character
       |          date format dd/mm/yyyy
       |      endDate : character
       |          date format dd/mm/yyyy.
       |      by : character
       |          'Confirmed' or 'Recovered' or 'Death'.
       |
       |      Raises
       |      ------
       |      Exception
       |          Startdate must be less than enddate.If not it raise anexception.
       |          it also raise error for wrong input in by parameter.
       |
       |      Returns
       |      -------
       |      df : DataFrame
       |          DataFrame consisting daily counts for between two given dates
       |          for given by parameter.
       |
       |  get_count_by_date(self, by, date=None)
       |      Gives the daily count of a given date or all dates by 'confirmed' or 'recovered'
       |      or 'death'
       |
       |      Parameters
       |      ----------
       |      by : character
       |          'Confirmed' or 'Recovered' or 'Death'.
       |      date : character, optional
       |          if date(dd/mm/yyyy) is given count will be shown for that date. The default is None.
       |
       |      Raises
       |      ------
       |      Exception
       |          If by argument is not within above mentioned and if year is not 2020 it will
       |          raise an exception.
       |
       |      Returns
       |      -------
       |      df : dataframe
       |          dataframe consisting of counts of given date or all dates for all states .
       |
       |  get_cum_dataset_between_date(self, startDate, endDate, by)
       |      This method of Data class will give cumulative counts between two given dates
       |      for all states
       |
       |      Parameters
       |      ----------
       |      startDate : character
       |          date format dd/mm/yyyy.
       |      endDate : character
       |          date format dd/mm/yyyy.
       |      by : character
       |          'Total Confirmed' or 'Total Recovered' or 'Total Death'.
       |
       |      Raises
       |      ------
       |      Exception
       |          startdate should be less than endDate---if not it will raise exception.
       |
       |      Returns
       |      -------
       |      df : Dataframe
       |          returns a dataframe of cumulative counts between two dates for all states by
       |          'Total Confirmed' or 'Total Recovered' or 'Total Death'.
       |
       |  get_dataset_by_date(self, date)
       |      This method of Data Class will allow user to get cumulative count of all states of
       |      total confirmed,total death and total recovered
       |      India for a particular given date
       |
       |      Parameters
       |      ----------
       |      date : character
       |          Should be in dd/mm/yyyy format.
       |
       |      Returns
       |      -------
       |      df : Dataframe
       |          Dataframe consisting all cumulative values of total confirmed,total recovered,total
       |          death for a given date.
       |
       |  get_dataset_state(self, state='Whole', daily=False)
       |      this method of Data class will allow user to get cumulative counts of a particular
       |      state.
       |
       |      Parameters
       |      ----------
       |      state : character, optional
       |          name of state in India. The default is 'Whole'.
       |          state code is also applicable.If not given data for all states will be shown.
       |      daily : bool, optional
       |          If True Daily Count data will be shown. The default is False.
       |
       |      Raises
       |      ------
       |      Exception
       |          If state/state code is wrong it will raise exception.
       |
       |      Returns
       |      -------
       |      df : DataFrame
       |          if state is whole and daily is Flase then it Returns a dataframe consisting all states having
       |          cumulative count of totalconfirmed,total recovered,total death till the previous day of the day of using this package.
       |          Otherwise for daily is True it will return dictionary of dataframes having confirmed,recovered and death cases for all states.
       |          if state is mentioned and daily is true then it will return a dataframe consisting all dates showing daily confirmed,daily recovered and
       |          daily death.
       |
       |          if state is mentioned and daily is False then a dataframe will be returned consisting of name of districts of that states along with only
       |          confirmed data.
       |
       |  rank(self, num, by, kind='top', cumulative=False, date=None)
       |      Gives top n or bottom n values as cumulative or daily basis for a date or
       |      combining whole dates filtered with by parameter.
       |
       |      Parameters
       |      ----------
       |      num : integer
       |          number of rows user want to see.
       |          e.g num=10 -> top/bottom 10 data will be shown
       |      by : character
       |          'Total Confirmed' or 'Total Recovered' or 'Total Death'.
       |      kind : character, optional
       |          'top' or 'bottom' by which data will be filtered. The default is 'top'.
       |      cummulative : bool, optional
       |         if True it will show cumulative counts. The default is False.
       |      date : character, optional
       |          (must be in dd/mm/yyyy format)if date is given then method will return cumulative or daily count
       |          for that date. The default is None.
       |          if None it will return all cumulative/daily counts
       |
       |      Raises
       |      ------
       |      Exception
       |          if date is None and cumulative is false then it is not possible to show
       |          data for top n or botom n rows..
       |
       |      Returns
       |      -------
       |      dataframe/dictionary
       |          if date is not given and cummulative is False then it prompt to input state(state code or name)
       |          if state is set to 'all' it will return dictionary consisting all states having top/bottom counts
       |          otherwise a dataframe for a given state.
       |          whenever date is mentioned a dataframe will be returned consisting top/bottom cumulative count or
       |          daily count for that date.
       |
       |  ----------------------------------------------------------------------
       |  Methods inherited from initializer:
       |
       |  show_data(self, of)
       |      This method only assembles the collected data
       |
       |      Returns
       |      -------
       |      list
       |          returns collected data as 3 dataframe format.
       |
       |  ----------------------------------------------------------------------
       |  Data descriptors inherited from initializer:
       |
       |  __dict__
       |      dictionary for instance variables (if defined)
       |
       |  __weakref__
       |      list of weak references to the object (if defined)

      class Demographic_overview(initializer)
       |  Demographic_overview(init, silent=False)
       |
       |  Method resolution order:
       |      Demographic_overview
       |      initializer
       |      builtins.object
       |
       |  Methods defined here:
       |
       |  __init__(self, init, silent=False)
       |      This Demographic_overview class has the power of filtering in terms of state,
       |      district,city,date or range of date
       |
       |      Returns
       |      -------
       |      None.
       |
       |  demography(self, place='all', date='all')
       |      This method can show the male and female count of confirmed cases for a state or a district or
       |      a city for a given date of range of date.
       |
       |      Parameters
       |      ----------
       |      place : character, optional
       |          place can be state or district or city.this method automatically recognize the place
       |          and gives user data for that place. The default is 'all'.If place is mentioned data for all places
       |          will be shown.
       |      date : character, optional
       |          by which date or range of date the data will be filtered.Date must be dd/mm/yyyy format.
       |          The default is 'all'.if date is not mentioned data for all dates will be shown
       |
       |      Raises
       |      ------
       |      Exception
       |          If no data is found for a date or a place it will raise exceptions.
       |
       |      Returns
       |      -------
       |      Dataframe
       |          dataframe consists of male female counts of confirmed cases for given date and place.
       |
       |  ----------------------------------------------------------------------
       |  Methods inherited from initializer:
       |
       |  show_data(self, of)
       |      This method only assembles the collected data
       |
       |      Returns
       |      -------
       |      list
       |          returns collected data as 3 dataframe format.
       |
       |  ----------------------------------------------------------------------
       |  Data descriptors inherited from initializer:
       |
       |  __dict__
       |      dictionary for instance variables (if defined)
       |
       |  __weakref__
       |      list of weak references to the object (if defined)

      class initializer(builtins.object)
       |  initializer(silent=False)
       |
       |  Methods defined here:
       |
       |  __init__(self, silent=False)
       |      This is a class that will scrap the data from source upto the previous day of
       |      day of using that package.
       |
       |      Returns
       |      -------
       |      None.
       |
       |  show_data(self, of)
       |      This method only assembles the collected data
       |
       |      Returns
       |      -------
       |      list
       |          returns collected data as 3 dataframe format.
       |
       |  ----------------------------------------------------------------------
       |  Data descriptors defined here:
       |
       |  __dict__
       |      dictionary for instance variables (if defined)
       |
       |  __weakref__
       |      list of weak references to the object (if defined)

      class visualizer(initializer)
       |  visualizer(init)
       |
       |  Method resolution order:
       |      visualizer
       |      initializer
       |      builtins.object
       |
       |  Methods defined here:
       |
       |  __init__(self, init)
       |      Gather all information to perform the visualization
       |
       |      Parameters
       |      ----------
       |      init : TYPE
       |          None.
       |
       |      Returns
       |      -------
       |      None.
       |
       |  graph_by_date(self, startDate, endDate, state=None, title=None, daily=False)
       |      Gives the visualization of cumulative data or daily data between two given
       |      dates for a given state or as whole india.
       |
       |      Parameters
       |      ----------
       |      title : Character, optional
       |          Sets the title of the subplots. The default is None.
       |      startDate : character
       |          dd/mm/yyyy format(e.g 02/04/2020).
       |      endDate : character
       |          dd/mm/yyyy format(e.g 02/04/2020).
       |      state : character, optional
       |          for which state graph will be plotted.If None graph will be plotted for whole india. The default is None.
       |          states input also takes state codes.
       |      daily : bool, optional
       |          if True graph will plotted daily basis. The default is False.
       |
       |      Raises
       |      ------
       |      Exception
       |          startdate must be less than enddate and if states are given wrong it will raise exception.
       |
       |      Returns
       |      -------
       |      3 subplots consisting date vs total confirmed,date vs total recovered,date vs total deceased for a state or whole india
       |      between two dates.
       |      may be daily or cumulative based on daily parameter passed.
       |
       |  head(self, num, title=None, daily=False)
       |      Gives graphical visualization of first n(=num) dayes based on daily or cumulative data
       |
       |      Parameters
       |      ----------
       |      title : Character, optional
       |          Sets the title of the subplots. The default is None.
       |      num : integer
       |          setd the number of dates from start user wants to see.
       |      daily : bool, optional
       |          if true graph is plotted based on daily data. The default is False.
       |
       |      Returns
       |      -------
       |      3 subplots consisting date vs total confirmed,date vs total recovered,date vs total deceased.
       |      may be daily or cumulative based on daily parameter passed.
       |
       |  plot_by_latitude(self, title=None)
       |      Gives the visualization of counts with respect to state latitudes
       |
       |      Parameters
       |      ----------
       |      title : Character, optional
       |          Sets the title of the subplots. The default is None.
       |
       |      Returns
       |      -------
       |      3 subplots consisting latitude vs latitude confirmed,latitudes vs total recovered,latitudes vs total deceased.
       |
       |  tail(self, num, title=None, daily=False)
       |      Gives graphical visualization of latest n(=num) dayes based on daily or cumulative data
       |
       |      Parameters
       |      ----------
       |      title : Character, optional
       |          Sets the title of the subplots. The default is None.
       |      num : integer
       |          setd the number of latest dates user wants to see.
       |      daily : bool, optional
       |          if true graph is plotted based on daily data. The default is False.
       |
       |      Returns
       |      -------
       |      3 subplots consisting date vs total confirmed,date vs total recovered,date vs total deceased.
       |      may be daily or cumulative based on daily parameter passed.
       |
       |  whole(self, title=None, daily=False)
       |      Generate 3 subplots of whole collected data
       |
       |      Parameters
       |      ----------
       |      title : Character, optional
       |          Sets the title of the subplots. The default is None.
       |      daily : bool, optional
       |          if True garph will be plotted on daily counts otherwise on cumulative counts. The default is False.
       |
       |      Returns
       |      -------
       |      3 subplots consisting date vs total confirmed,date vs total recovered,date vs total deceased.
       |      may be daily or cumulative based on daily parameter passed.
       |
       |  ----------------------------------------------------------------------
       |  Methods inherited from initializer:
       |
       |  show_data(self, of)
       |      This method only assembles the collected data
       |
       |      Returns
       |      -------
       |      list
       |          returns collected data as 3 dataframe format.


pkgId: 0a39faf39ce75f6678d24d980d954b17fc67ba3555719b99db2940928b85d16c
name: python-covdefaults
arch: src
version: 2.3.0
epoch: 0
release: 1
summary: A coverage plugin to provide sensible default settings
url: https://github.com/asottile/covdefaults
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-covdefaults-2.3.0-1.src.rpm
checksum_type: sha256
description:
  A coverage plugin to provide sensible default settings

  ```bash
  pip install covdefaults
  ```

  to enable the plugin, add `covdefaults` to your coverage plugins
  in `.coveragerc`:
  ```ini
  [run]
  plugins = covdefaults
  ```
  in `setup.cfg` / `tox.ini`:
  ```ini
  [coverage:run]
  plugins = covdefaults
  ```
  in `pyproject.toml`:
  ```ini
  [tool.coverage.run]
  plugins = ["covdefaults"]
  ```


  ```ini
  branch = True
  source = .
  omit =
      */__main__.py
      */setup.py
  ```

  ```ini
  show_missing = True
  skip_covered = True
  fail_under = 100
  exclude_lines =
      
      \# pragma: no cover\b
      
      ^\s*raise AssertionError\b
      ^\s*raise NotImplementedError\b
      ^\s*return NotImplemented\b
      ^\s*raise$
      
      ^\s*if (False|TYPE_CHECKING):
      ^ +\.\.\.$
      -> ['"]?NoReturn['"]?:
      
      if __name__ == ['"]__main__['"]:$
      
      
  partial_branches =
      
      \# pragma: no cover\b
      
      \# pragma: (nt|posix|cygwin|darwin|linux|msys|win32|cpython|pypy) (no )?cover\b
      
      \# pragma: (>=?|<=?|==|!=)\d+\.\d+ cover\b
  ```

  several `# pragma: no cover` tags will be added automatically based on the
  platform and implementation.
  these will be in the form of:
  ```python

  ```
  or
  ```python

  ```
  these tags will be generated by the following values:
  - `os.name`
      - `nt` (windows)
      - `posix` (linux, macOs, cygwin, etc.)
  - `sys.platform`
      - `cygwin`
      - `darwin` (macOs)
      - `linux`
      - `msys`
      - `win32`
  - `sys.implementation.name`
      - `cpython`
      - `pypy`
  for every tag which does not match, you can use negation.  here's an example:
  ```python
  if sys.platform == 'win32':  # pragma: win32 cover
      bin_dir = 'Scripts'
  else:  # pragma: win32 no cover
      bin_dir = 'bin'
  ```
  note here that `# pragma: win32 cover` will become a "no cover" for everything
  which is not `win32` -- whereas the `# pragma: win32 no cover` will be a
  "no cover" only on `win32`.

  several `# pragma: no cover` tags will be added automatically based on the
  platform and implementation.
  these will be in the form of:
  ```python

  ```
  where the comparison operator is one of `>`, `>=`, `<`, `<=`, `==`, `!=`
  for example:
  ```python
  if sys.version_info >= (3, 9):  # pragma: >=3.9 cover
      print('3.9+')
  else:  # pragma: <3.9 cover
      print('old')
  ```

  several of the options can be overridden / extended in your coverage
  configuration.  the examples below assume `.coveragerc` however any of the
  files `coverage` supports work as well.

  ```ini
  [run]
  omit =
      pre_commit/resources/*
  ```
  this will result in the `pre_commit/resources/*` being `omit`ted in addition
  to the defaults provided by `covdefaults`.
  ```ini
  [covdefaults]
  subtract_omit = */__main__.py
  ```
  this will result in `*/__main__.py` not being `omit`ted (`*/__main__.py` is
  among the defaults provided by `covdefaults`).

  ```ini
  [run]
  source = $PWD
  ```
  covdefaults will not override this value to `.` if it is set manually.

  ```ini
  [report]
  exclude_lines =
      ^if MYPY:$
  ```
  this will result in lines matching `^if MYPY:$` to additionally be excluded
  from coverage in addition to the defaults provided by `covdefaults`.

  ```ini
  [report]
  fail_under = 90
  ```
  `covdefaults` will not change the value if you provide one for `fail_under`


pkgId: 4a5c0618c7c74af4e38430362f26ed0366b520be553311518cf30e43e67664e0
name: python-covdrugsim
arch: src
version: 1.0.15
epoch: 0
release: 1
url: https://github.com/Jon-Ting/covdrugsim
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-covdrugsim-1.0.15-1.src.rpm
checksum_type: sha256
summary:
  Package to automate quantum mechanical calculations and molecular dynamics simulations of covalent drugs.

description:
  [![ci-cd](https://github.com/Jon-Ting/covdrugsim/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/Jon-Ting/covdrugsim/actions/workflows/ci-cd.yml)



  `CovDrugSim` is a package that provides functionalities to automate quantum mechanical calculations and molecular dynamics simulations of covalent drugs.




  * Automatic creation of high-performance computing cluster submission files to run Gaussian calculations.
  * Automatic analysis of molecular dynamics simulation trajectories.


  * Complete example.ipynb.



  Use `pip` or `conda` to install `CovDrugSim`:

  ```bash
  $ pip install covdrugsim
  ```
  ```bash
  $ conda install -c conda-forge covdrugsim
  ```



  `covdrugsim` can be used to conduct quantum mechanical calculations and molecular dynamics simulations as follows:

  ```python
  from covdrugsim.qmCalc.genScript import genAllScripts

  targetDirPath = '/mnt/c/Users/JonTing/exampleXYZs'  # Absolute path to the directories containing all of your xyz files to be run
  genAllScripts(targetDirPath, verbose=True)
  ```
  Check out the [notebook tutorial](https://github.com/Jon-Ting/covdrugsim/blob/main/docs/example.ipynb) for further explanations and demonstrations!

  Descriptions of source codes:



  unitConv.py - Interconverts between kinetics and thermodynamic quantities (dGbarr, k, t_half, RT).


  * settings.py - Contains variables for different type of Gaussian jobs that are used by prepGaussian.py.
  * admin.py - Group files with the same names (before extension, e.g. abc.inp is the same as abc.xyz) into individual directories.
  * prepGaussian.py - Batch generation of Gaussian input files and job submission files on HPCs with PBS Scheduler.
  * tabulate.py - Batch tabulation of interested values from Gaussian (version 16) output files into an Excel file.
  * gsub.sh - Batch submission of Gaussian QM calculation jobs on HPCs.

  Typical workflow for a mechanism-based project where flexible molecules are involved would be:
  1) Conduct conformational searches on the species along the reaction coordinate (using MacroModel).
  2) Export all conformers within 3 kcal/mol of the lowest energy structure to a directory in .xyz format. The naming convention is very important, be consistent, but make sure each conformer has a different name (I do this by adding numbers at the end of their names, signifying their ranks from the conformational searches).
  3) Change your input directory in admin.py to where you store the coordinate files and run it. This will group all of the conformers into individual directories.
  4) Change your input directory in prepGaussian.py to the same location and run it. This will generate the Gaussian input files and job submission files in the corresponding directory. Make sure you check at least a few of the files generated to see that you got the charges, spacing at the end of file, solvents, resources requested, etc right. I named all of the Gaussian job submission jobs with \*.sh, feel free to change it according to your preference (Line 52 in prepGaussian.py).
  5) Copy the directories across to the HPCs (Raijin/Gadi/Tinaroo/Awoonga, NOTE: The details for job submissions on Raijin and RCC HPCs are different, specify the cluster before running prepGaussian.py in Step 4).
  6) Change directory to the directory that contains all the conformers subdirectories and run 'gsub.sh' (Make sure it's an executable, if you can't run it, use chmod to change it). This will submit all of the Gaussian submission jobs to the HPC. Note that prior to this you need to adjust Line 6 in the gsub.sh file to the naming convention you give to your Gaussian submit files if you have changed them in the prepGaussian.py.
  7) After the jobs are done, copy them over to your local machine.
  8) Change your input directory in tabulate.py to the directory that contains all the conformers and run it. Note that you need to have the Python package pandas installed for it to work.


  energyLeveller.py - Draws energy profile diagrams.
  plotConfig.py - Stores configuration for figure-plotting functions.
  plotFigs.py - Plots figures for QM data analysis.



  * config.py contains some variables that are used repetitively for almost all files.
  * baseID.py plots the distances between potential base species and the targeted protons.
  * bbRMSD.py plots the RMSD of Bruton's Tyrosine Kinease (BTK) backbones over time, for the purpose of checking the stability of the simulations.
  * hbondAnalysis.py plots the distribution of the number of hydrogen bonds between BTK backbones over time.
  * ligDihedral.py plots the distribution of the critical C=C-C=O dihedral angle near BTK active site over time.
  * SCbondDist.py plots the distances between the reacting S and C atoms over time.
  * sumCharge.py sums up the charges to aid in the parameterisation of non-standard amino acids.
  * prepMTB.py was written during an attempt to map the unbound ligand to covalently bound ligand. Was not utilised in the end.



  Detailed documentation and usage examples are hosted by [Read the Docs](https://covdrugsim.readthedocs.io/en/latest/).



  `CovDrugSim` appreciates your enthusiasm and welcomes your expertise!

  Please check out the [contributing guidelines](https://github.com/Jon-Ting/covdrugsim/blob/main/CONTRIBUTING.md) and
  [code of conduct](https://github.com/Jon-Ting/covdrugsim/blob/main/CONDUCT.md).
  By contributing to this project, you agree to abide by its terms.



  The project is distributed under an [MIT License](https://github.com/Jon-Ting/covdrugsim/blob/main/LICENSE).



  The package was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) using the
  The codes were written by [Jonathan Yik Chang Ting](https://github.com/Jon-Ting) for [University of Queensland Bachelors of Advanced Science (Honours)](https://study.uq.edu.au/study-options/programs/bachelor-advanced-science-honours-2516) [CHEM6511](https://my.uq.edu.au/programs-courses/course.html?course_code=CHEM6511) under the title "[Molecular Modelling of Reversible Covalent Inhibition of Bruton’s Tyrosine Kinase by Cyanoacrylamides](https://github.com/Jon-Ting/Molecular-Modelling-of-Reversible-Covalent-Inhibition-of-Brutons-Tyrosine-Kinase-by-Cyanoacrylamide)". Click on the title to see the details of the project.



  Email: `Jonathan.Ting@anu.edu.au`/`jonting97@gmail.com`

  Feel free to reach out if you have any questions, suggestions, or feedback.


pkgId: 4f5fd5a2eb56bd8455504a967c5d0c1d68fcafb07c23a946bd948769ff2b6b19
name: python-coveo-functools
arch: src
version: 2.0.34
epoch: 0
release: 1
summary: Generic function tooling helpers
url: https://github.com/coveooss/coveo-python-oss/tree/main/coveo-functools
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coveo-functools-2.0.34-1.src.rpm
checksum_type: sha256
description:
  Introspection, finalizers, delegates, dispatchers, waiters...
  These utilities aim at increasing productivity.




  Introspect classes and callables at runtime.

  Can convert string annotations into their actual type reference.




  Flex works with annotations to adjust and convert input data to match your target structure.

  It was originally done as a mean to fit `CamelCase` payloads from external APIs into `snake_case` classes.

  Take for example this payload that we'd like to fit into a pep8 context:

  ```json
  [
      {"Name": "John", "SocialNumber": 123},
      {"Name": "Jean", "SocialNumber": 123}
  ]
  ```

  Explicit usage example:

  ```python
  from coveo_functools import flex

  @dataclass
  class Person:
      name: str
      social_number: Optional[int] = None


  response = flex.deserialize(json.load(), hint=List[Person], errors='raise')
  ```

  Automatic usage example:

  ```python
  from coveo_functools.flex import flex

  @flex
  @dataclass
  class SomeObject:
      """ I am decorated with @flex, so you can always give me some trouble. """
      name: str

  response = [SomeObject(**data) for data in json.load()]
  ```

  When remapping keys, Flex will ignore:
  - Casing
  - Underscores
  - Hyphens
  - Dots
  - Spaces

  For instance, it will happily accept `{"__NaM e._": "John"}` as valid input for the `Person` class.

  It can also create instances of custom classes:

  ```python
  @dataclass
  class Address:
    street: str

  @dataclass
  class Person:
      name: str
      address: List[Address]
      social_number: Optional[int] = None
  ```

  You could then feed it a payload like `{"name": "Lucy", address: [{"street": ...}, {...}]}`.
  Flex will create an instance of `Person`, that has a list of 2 Address instances.

  Note: The basic types `str, bool, int, float, dict, list, None` **are ignored** (no conversion occurs).
  This is because `json.load()` already returns these values in the proper type. This may change in the future.




  Flex can be used with:
  - Classes and dataclasses
  - Abstract classes *(new in 2.0.9)* (requires adapter or serialization; explained below)
  - Enums *(new in 2.0.6)* *(Enum data-type support added in 2.0.26)*
  - Literals *(new in 2.0.21)*
  - Functions
  - Methods
  - `Union[str, bool, int, float, list, dict, None]`  (or any combination of these basic **json-compatible types**)
  - These typing constructs, where `T` is your custom class:
    - `List[T]`
    - `Dict[str, T]` *(in 2.0.23 and below)*
    - `Dict[K, V]` *(new in 2.0.24; dict keys are no longer limited to strings)*
    - `Union[T, List[T]]` (for APIs that may return a thing-or-list-of-things)
    - `Optional[T]`
    - `InitVar[T]` *(new in 2.0.25)*




  - Variable positional args (such as `def fn(*args): ...`) are left untouched.
  - Basic json-compatible types will be left untouched. This is determined by the annotation, not the actual value.
  - If `None` is given as a value to deserialize into anything, `None` is given back. Absolutely no validation occurs in this case.
  - An Abstract class requires additional metadata or a subclass adapter.
  - No support for additional `typing` and `collections` objects other than the ones mentioned in this documentation.
  - You can only `Union` basic json-compatible types, or `List[T], T`.
  - All referenced types must be importable from the module it is defined in. This means that you cannot use inline and dynamic classes.

  These are subject to change.





  __new in 2.0.9__

  You can direct and override how to instantiate a payload by registering a callback adapter.

  The adapter is a `Callable[[Any], TypeHint]` that you provide.
  It will be called with the payload value as `Any`, so you can inspect the content.
  It must return a `TypeHint` that tells flex which class to use.

  __new in 2.0.10__: TypeHint may also be a callable (previously, it had to be a class).

  With subclass adapters, you can selectively decide the implementation class based on the payload to deserialize.
  While this is necessary when annotating structures with Abstract classes,
  it can be used for any other class as well.

  For this to work, you must register the annotated class with a callback:

  ```python
  from coveo_functools.flex.subclass_adapter import register_subclass_adapter

  class Abstract:
    @abstractmethod
    def api(self) -> None:
      ...


  class ThisImplementation(Abstract):
    def api(self) -> None:
      ...


  class OtherImplementation(Abstract):
    def api(self) -> None:
      ...


  def adapter(payload: Any) -> Type:
    assert isinstance(payload, dict)  # actual type depends on payload
    return ThisImplementation if 'this' in payload else OtherImplementation


  register_subclass_adapter(Abstract, adapter)
  ```

  Thanks to the adapter, this is now possible:

  ```python
  assert isinstance(deserialize({'this': {}}, hint=Abstract), ThisImplementation)
  assert isinstance(deserialize({}, hint=Abstract), OtherImplementation)


  @dataclass
  class Payload:
      owner: Abstract


  instance = deserialize({"owner": {"this": {}}}, hint=Payload)
  assert isinstance(instance.owner, ThisImplementation)
  ```

  The intended use of subclass adapters is to:
    1. Support Abstract classes as annotations
    1. Being able to specify a delegate for a specific kind of payload
    1. To enhance/clean a payload before it is used

  Any other use will generally:
    1. Mess up your type annotation game because types are altered dynamically at runtime.
    1. Make your code more obscure and more likely to investigate the dark arts.
    1. Break your IDE's autocompletion features.
    1. Linters which rely on static analysis will not be as powerful as they could be.


  That being said, it's a powerful and potentially game-breaking feature
  that can be used to bend the framework if you accept bearing the consequences:
    - There are no validations (to allow duck typing and stuff)
    - This means you don't *have* to return an actual subclass; just something that can handle that payload
    - You can register a callback for `Any` (or anything else really)
    - You're not limited to return custom classes: you can return things like `Dict[str, int]` or `List[Implementation]` and the flex machinery will handle it just as if it was statically annotated that way.
    - The payload `value` received by the adapter is not a copy, modifications will be honored.




  Some types don't play well with keyword arguments. For instance, using the `datetime` class is much more convenient using strings, isoformat() and fromisoformat() than
  having to parse it into the year/month/etc component.

  To serialize such types, you can use a factory adapter, which is expected to return the instance instead of the type.

  ```python
  from dataclasses import dataclass
  from datetime import datetime
  from coveo_functools import flex
  from coveo_functools.flex.factory_adapter import register_factory_adapter



  def _datetime_factory(value: str) -> datetime:
    return datetime.fromisoformat(value)

  register_factory_adapter(datetime, _datetime_factory)





  @dataclass
  class WithDateTime:
    timestamp: datetime


  timestamp = datetime.utcnow()
  instance = flex.deserialize({"timestamp": timestamp.isoformat()}, hint=WithDateTime, errors='raise')
  assert instance.timestamp == timestamp
  assert isinstance(instance.timestamp, datetime)
  ```




  There are two ways to deal with abstract classes:

  1. If you control the serialization aspect, flex can inspect a custom instance and generate metadata information that can be used during the deserialization process. _This is the way._
  1. If you don't control the serialization (e.g.: it's a json payload from an api), you can attach callbacks to inspect the payload and return the non-abstract class to use.




  __new in 2.0.10__

  Note: This is a dumbed down / magic version of the functionality offered by `pickle` and `yaml`,
  with the difference that the metadata and the payload are kept separate and readable.

  The `SerializationMetadata` class inspects an instance and stores the type of the objects within (not their value!).
  Think of it as a header that must accompany your serialized data, so you can rebuild it later using the same subclasses.

  This allows you use abstract classes in annotations, but deserialize into concrete ones:


  ```python
  from coveo_functools.flex.deserializer import deserialize
  from coveo_functools.flex.serializer import SerializationMetadata

  class Abstract:
      @abstractmethod
      def api(self) -> None:
          ...


  @dataclass
  class Concrete(Abstract):
      def api(self) -> None:
        ...


  @dataclass
  class Parent:
      nested: Optional[Abstract] = None


  meta = SerializationMetadata.from_instance(Parent(Concrete()))
  parent = deserialize({"nested": {}}, hint=meta, errors='raise')
  assert isinstance(parent.nested, Concrete)
  ```

  Serialization metadata ties to a payload/instance and none other.
  It keeps the type information of your instance, and thus may be different on a different instance.
  For each payload you want to store, you must generate a new `SerializationMetadata` instance.

  Example use cases:

    - Serialize objects into a cloud-based queue
    - Store objects into a no-SQL database

  *Limitation*: The concrete implementation must be importable using the normal python mechanisms.
  A class returned from a function is not importable, and will not deserialize correctly.




  __new in 2.0.9__

  The other, more involved way to use Abstract classes as annotations is to register subclass adapters.

  See the [Subclass Adapters](#subclass-adapters) section for more info.



  Enums will resolve by value or name, in this order:

  1. By exact value (str/int/etc)
  1. By exact name (str)
  1. By flexed value (str)
  1. By flexed name (str)




  This is where the magic happens, and is the recommended usage whenever it meets your use case.

  TL;DR: Given that `payload` is a dict,`flex.deserialize(payload, hint=Job)` will convert `payload` into an instance of `Job`.

  Here's an example puzzle! An uncanny API returns a messy "transaction" JSON:

  ```json
  {
      "Sold_To": {"Name": "Jon"},
      "Items": [
          {"sku": 123, "price": 19.99},
          {"sku": 234, "price": 13.99},
          {"sku": 0, "price": 0.50, "NOTE": "Forgot the reusable bag at home!!"}
      ],
      "Rebates": {
          "airmiles": {"Flat": 10.0},
          "coupon": [{"Flat": 0.79}, {"Flat":  1.50}],
          "senior": {"Percentage": 2.5}
      },
      "Id": "GgfhAs89876yh.z"
  }
  ```

  Wouldn't it be convenient if you could create simple classes/dataclasses around them without any boilerplate?

  You can solve it with flex. In one line, too!

  Start by designing a hierarchy of classes with annotations that closely follow the API reference.

  Remember, casing and underscore are ignored in flex, so you could use pep8 if you want:

  ```python


  from dataclasses import dataclass
  from typing import List, Dict, Union, Optional


  class SkuItem:
      def __init__(self, sku: int, price: float) -> None:
          self.sku = sku
          self.price = price


  @dataclass
  class Rebate:
      percentage: Optional[float] = None
      flat: Optional[float] = None


  @dataclass
  class Customer:
      name: str


  @dataclass
  class Transaction:
      sold_to: Customer
      items: List[SkuItem]
      rebates: Dict[str, Union[Rebate, List[Rebate]]]
  ```

  Did you notice any flex-related boilerplate in the snippet above? No? Good! :)

  Here's how you can use the flex deserializer to bend the furious API response into your perfect python classes:

  ```python
  payload = {
      "Sold_To": {"Name": "Jon"},
      "Items": [
          {"sku": 123, "price": 19.99},
          {"sku": 234, "price": 13.99},
          {"sku": 0, "price": 0.50, "NOTE": "Forgot the reusable bag at home!!"}
      ],
      "Rebates": {
          "airmiles": {"Flat": 10.0},
          "coupon": [{"Flat": 0.79}, {"Flat":  1.50}],
          "senior": {"Percentage": 2.5}
      },
      "Id": "GgfhAs89876yh.z"
  }

  transaction = flex.deserialize(payload, hint=Transaction, errors='raise')
  all_transactions = flex.deserialize([payload, payload], hint=List[Transaction], errors='raise')
  ```

  Interesting details:
  - Well, the casing worked! :shrug:
  - `Id` and `NOTE` were dropped because they were excluded from the `Transaction` model. Time saver; some APIs return _tons_ of data.
  - The rebates actually kept the keys, and created `Rebate` instances as the values.
  - The value type of the `rebates` dict is either a single `Rebate` instance or a list of them. See the "thing or list of things" section below for considerations.
  - In the `all_transactions` variable, `List[Annotation]` was used directly as the hint. Nifty!




  There is a decorator version of `deserialize`.

  `from coveo_functools.flex import flex`

  It returns a function, method or class wrapped in `flex.deserialize` magic.
  When called, the wrapper will automatically adjust the call arguments to match the wrapped object, call the wrapped object with them, and return the response.

  `flex` can be used:
  - as a decorator over classes, methods and functions
  - inline to call a function or to create flexible factories

  When used inline, you can adjust a payload for any callable:

  ```python
  from some_3rd_party import calculate_price

  price = flex(calculate_price)(**payload)
  ```

  You can also generate "flexible" factories, for instance to be used as a delegate:

  ```python
  from some_3rd_party import ThisClass

  factory: Callable[..., T] = flex(ThisClass)
  instance1 = factory(**payload1)
  instance2 = factory(**payload2)
  ```


  When used as a decorator, all invocations are automatically handled for all callers:

  ```python
  @flex
  def calculate_price(sold_to: Customer, items: Union[SkuItems, List[SkuItems]]) -> float:
      ...


  price = calculate_price(SoldTo=dict(Name="Marie"), items={"sku": 123, "price": 19.99})
  ```

  You could adjust the `Transaction` from earlier class like this:

  ```python
  @flex
  @dataclass
  class Transaction:
      sold_to: Customer
      items: List[SkuItem]
      rebates: Dict[str, Union[Rebate, List[Rebate]]]
  ```

  So that you can drop the explicit calls to `flex.deserialize` and use them directly:

  ```python
  one_transaction = Transaction(**payload)
  list_transactions = [Transaction(**t) for t in [payload, payload]]
  ```




  Favor `flex.deserialize` over the decorator pattern:
  - This will make the usages explicit rather than implicit.
  - The additional wrappers created by the decorator may affect performance in the presence of huge structures.
  - You can `flex.deserialize([], hint=List[T])` and get a list, but you cannot `flex(List[T])` directly (both methods demonstrated below)

  Generally, it leads to a better design because you end up wiring the `flex.deserialize` call next to the `json.load()` call in a generic manner, and that's 100% of the `flex` code you'll ever need:


  ```python
  class ApiWrapper:
      def get_transaction(self, id: int) -> Transaction:
          return self._do_request("GET", f"api/transactions/{id}", hint=Transaction)

      def get_all_transactions(self) -> List[Transaction]:
          return self._do_request("GET", "api/transactions", hint=List[Transaction])

      def _do_request(self, method: str, url: str, hint: T) -> T:
          response = self._session.request(method=method, url=url)
          return flex.deserialize(response.json, hint=hint)
  ```

  Because explicit is better than implicit, the above design is generally easier to understand than the one below, where `Transaction` is assumed to be decorated with `@flex`:

  ```python
  class ApiWrapper:
      def get_transaction(self, id: int) -> Transaction:
          return Transaction(**self._do_request("GET", f"api/transactions/{id}"))

      def get_all_transactions(self) -> List[Transaction]:
          return [Transaction(**data) for data in self._do_request("GET", "api/transactions")]

      def _do_request(self, method: str, url: str) -> Any:
          response = self._session.request(method=method, url=url)
          return response.json
  ```




  There is one annotation case worth mentioning.
  Consider this code:

  ```python
  class Inner:
      ...

  @flex
  def fn(inner: Inner) -> ...:
      ...

  _ = fn(**{'inner': {...}})
  ```

  In this case, mypy will infer that you're doing `**Dict[str, Dict]`
  and complain that Dict is not compatible with Inner.

  To solve this without an ignore statement,
  explicitly annotate/cast your payloads with Any:

  ```python
  payload: Dict[str, Any] = {"inner": {}}
  _ = fn(**payload)
  ```



  Unflex is one of the utilities used by `flex.deserializer`.

  It is responsible for adjusting the keyword arguments of a dictionary, so that they match the argument names of a target function.


  It does not perform any conversion; all it does is matching keys.
  Extra keys are dropped by default:

  ```python
  from coveo_functools.flex import unflex

  def fn(arg1: str, arg2: str) -> None:
      ...

  assert unflex(fn, {"ARG1": ..., "ArG_2": ..., "extra": ...}) == {"arg1": ..., "arg2": ...}
  ```

  Note: To target classes, you need to `unflex(cls.__init__, ...)`




  `flexcase` is the decorator version of `unflex`:


  ```python
  from coveo_functools.flex import flexcase

  @flexcase
  def fn(arg1: str, arg2: str) -> str:
      return f"{arg1} {arg2}"


  assert fn(ARG1="hello", _arg2="world", extra=...) == "hello world"
  ```




  An enhanced version of [functools.singledispatch](https://docs.python.org/3.8/library/functools.html#functools.singledispatch):


  - Adds support for `Type[]` annotations (singledispatch only works on instances)
  - You are no longer limited to the first argument of the method
  - You can target an argument by its name too, regardless of its position




  A classic and simple try/finally context manager that launches a delegate once a block of code has completed.

  A common trick is to "cook" the finalizer arguments through a mutable type such as a list or dict:

  ```python
  from typing import List
  from coveo_functools.finalizer import finalizer

  def clean_up(container_names: List[str]) -> None:
      for _ in container_names:
          ...

  def test_spawning_containers() -> None:
      containers: List[str] = []
      with finalizer(clean_up, containers):
          containers.append('some-container-1')
          containers.append('some-container-2')
          containers.append('some-container-3')
  ```




  Waits for a condition to happen. Can be configured with exceptions to ignore.

  ```python
  from coveo_functools import wait
  import requests

  def _ready() -> bool:
      return requests.get('/ping').status_code == 200

  wait.until(_ready, timeout_s=30, retry_ms=100, handle_exceptions=ConnectionError,
             failure_message="The service failed to respond in time.")
  ```



  A customizable class to assist in the creation of backoff retry strategies.

  - Customizable growth factor
  - Jitter
  - Backoff progress % (want to fire some preliminary alarms at 50% backoff maybe?)
  - Supports infinite backoff
  - Can be configured to raise after too many attempts
  - Can be configured to raise after a set amount of time

  e.g.: Worker loop failure management by catching RetriesExhausted

  ```python
  from coveo_functools.wait import Backoff

  backoff = Backoff()
  while my_loop:
      try:
          do_stuff()
      except Exception as exception:
          try:
              quit_flag.wait(next(backoff))
          except backoff.RetriesExhausted:
              raise exception
  ```

  e.g.: Worker loop failure management without the nested try/catch:

  ```python
  from coveo_functools.wait import Backoff

  backoff = Backoff()
  while my_loop:
      try:
          do_stuff()
      except Exception as exception:
          wait_time = next(backoff, None)
          if wait_time is None:
              raise exception
          quit_flag.wait(wait_time)
  ```

  e.g.: You can generate the wait times without creating a Backoff instance, too:

  ```python
  import time
  from coveo_functools.wait import Backoff

  wait_times = list(Backoff.generate_backoff_stages(first_wait, growth, max_backoff))
  for sleep_time in wait_times:
      try:
          do_stuff()
          break
      except:
          time.sleep(sleep_time)
  else:
      raise ImSickOfTrying()
  ```


pkgId: 68ec3d87800f131d8442f14557d7b93563e0a93994946f69f2caea9c9f5539a5
name: python-coveo-itertools
arch: src
version: 2.0.11
epoch: 0
release: 1
summary: Collection-related helpers.
url: https://github.com/coveooss/coveo-python-oss/tree/main/coveo-itertools
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coveo-itertools-2.0.11-1.src.rpm
checksum_type: sha256
description:
  Another spin on iteration goodness.




  A one-liner function to retrieve a value from a dictionary:


  ```python
  from typing import Dict, Any
  from coveo_itertools.lookups import dict_lookup


  example: Dict[str, Any] = {'nested': {'key': {'lookup': True}}}

  assert dict_lookup(example, 'nested', 'key', 'lookup') == True
  assert dict_lookup(example, 'not', 'there', default=None) is None
  ```


pkgId: 6b48eeaf50f611fd48dc5f530a9de850611f5b56b80378e1b4159c07def0a869
name: python-coveo-ref
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: Allows using unittest.patch() without hardcoding strings.
url: https://github.com/coveooss/coveo-python-oss/tree/main/coveo-ref
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coveo-ref-1.0.4-1.src.rpm
checksum_type: sha256
description:
  Make mocking simple, free of hardcoded trings and therefore... refactorable!

  <!-- TOC -->
  * [Tutorial](#tutorial)
  * [Common Mock Recipes](#common-mock-recipes)
    * [Mock something globally without context](#mock-something-globally-without-context)
      * [Option 1: by leveraging the import mechanism](#option-1-by-leveraging-the-import-mechanism)
      * [Option 2: By wrapping a hidden function](#option-2-by-wrapping-a-hidden-function)
    * [Mock something for a given context](#mock-something-for-a-given-context)
      * [Brief Example:](#brief-example)
      * [Detailed Example:](#detailed-example)
    * [Mock something for the current context](#mock-something-for-the-current-context)
    * [Mock a method on a class](#mock-a-method-on-a-class)
    * [Mock a method on one instance of a class](#mock-a-method-on-one-instance-of-a-class)
    * [Mock an attribute on a class/instance/module/function/object/etc](#mock-an-attribute-on-a-classinstancemodulefunctionobjectetc)
    * [Mock a property](#mock-a-property)
    * [Mock a classmethod or staticmethod on a specific instance](#mock-a-classmethod-or-staticmethod-on-a-specific-instance)
  <!-- TOC -->




  Consider this common piece of code:

  ```python
  from unittest.mock import patch, MagicMock

  @patch("mymodule.clients.APIClient._do_request")
  def test(api_client_mock: MagicMock) -> None:
      ...
  ```

  Because the mock target is a string, it makes it difficult to move things around without breaking the tests. You need a
  tool that can extract the string representation of a python objet. This is what `ref` was built for:

  ```python
  from unittest.mock import patch, MagicMock
  from coveo_ref import ref
  from mymodule.clients import APIClient

  @patch(*ref(APIClient._do_request))
  def test(api_client_mock: MagicMock) -> None:
      ...
  ```

  🚀 This way, you can rename or move `mymodule`, `clients`, `APIClient` or even `_do_request`, and your IDE should find
  these and adjust them just like any other reference in your project.

  Let's examine a more complex example:

  ```python
  from unittest.mock import patch, MagicMock
  from mymodule.tasks import process

  @patch("mymodule.tasks.get_api_client")
  def test(get_api_client_mock: MagicMock) -> None:
      assert process() is None  # pretend this tests the process function
  ```

  The interesting thing in this example is that we're mocking `get_api_client` in the `tasks` module.
  Let's take a look at the `tasks` module:

  ```python
  from typing import Optional
  from mymodule.clients import get_api_client

  def process() -> Optional[bool]:
      client = get_api_client()
      return ...
  ```

  As we can see, `get_api_client` is defined in another module.
  The test needs to patch the function _in the tasks module_ since that's the context it will be called from.
  Unfortunately, inspecting `get_api_client` from the `tasks` module at runtime leads us back to `mymodule.clients`.

  This single complexity means that hardcoding the context `mymodule.tasks` and symbol `get_api_client` into a string
  for the patch is the straightforward solution.

  But with `ref`, you specify the context separately:

  ```python
  from unittest.mock import patch, MagicMock
  from coveo_ref import ref
  from mymodule.clients import get_api_client
  from mymodule.tasks import process


  @patch(*ref(get_api_client, context=process))
  def test(get_api_client_mock: MagicMock) -> None:
      assert process() is None  # pretend this tests the process function
  ```

  🚀 By giving a context to `ref`, the symbol `get_api_client` will be resolved from the context of `process`, which is the
  `mymodule.tasks` module. The result is `mymodule.tasks.get_api_client`.

  If either objects (`get_api_client` or `process`) are moved or renamed using a refactoring tool, the mock will still
  point to the correct name and context.

  🚀 And a nice bonus is that your IDE can jump to `get_api_client`'s definition from the test file now!

  It should be noted that this isn't just some string manipulation. `ref` will import and inspect modules and objects
  to make sure that they're correct. Here's a more complex case with a renamed symbol:

  The module:

  ```python
  from typing import Optional
  from mymodule.clients import get_api_client as client_factory  # it got renamed! 😱

  def process() -> Optional[bool]:
      client = client_factory()
      return ...
  ```

  The test:

  ```python
  from unittest.mock import patch, MagicMock
  from coveo_ref import ref
  from mymodule.clients import get_api_client
  from mymodule.tasks import process


  @patch(*ref(get_api_client, context=process))
  def test(get_api_client_mock: MagicMock) -> None:
      assert process() is None  # pretend this tests the process function
  ```

  Notice how the test and patch did not change despite the renamed symbol?

  🚀 This is because `ref` will find `get_api_client` as `client_factory` when inspecting `mymodule.tasks` module,
  and return `mymodule.tasks.client_factory`.

  We can also use ref with `patch.object()` in order to patch a single instance. Consider the following code:

  ```python
  from unittest.mock import patch
  from mymodule.clients import APIClient

  def test() -> None:
      client = APIClient()
      with patch.object(client, "_do_request"):
          ...
  ```

  🚀 By specifying `obj=True` to `ref`, you will obtain a `Tuple[instance, attribute_to_patch_as_a_string]` that you
  can unpack to `patch.object()`:

  ```python
  from unittest.mock import patch
  from coveo_ref import ref
  from mymodule.clients import APIClient

  def test() -> None:
      client = APIClient()
      with patch.object(*ref(client._do_request, obj=True)):
          ...
  ```

  Please refer to the docstring of `ref` for argument usage information.





  To mock something globally without regards for the context, it has to be accessed through a dot `.` by the context.

  For instance, consider this test:

  ```python
  from http.client import HTTPResponse
  from unittest.mock import patch, MagicMock
  from coveo_ref import ref

  from mymodule.tasks import process


  @patch(*ref(HTTPResponse.close))
  def test(http_response_close_mock: MagicMock) -> None:
      assert process()
  ```

  The target is `HTTPResponse.close`, which lives in the `http.client` module.
  The context of the test is the `process` function, which lives in the `mymodule.tasks` module.
  Let's take a look at `mymodule.tasks`'s source code:


  ```python
  from http import client

  def process() -> bool:
      _ = client.HTTPResponse(...)  # of course this is fake, but serves the example
      return ...
  ```

  Since `mymodule.tasks` reaches `HTTPResponse` through a dot (i.e.: `client.HTTPResponse`), we can patch `HTTPResponse`
  without using `mymodule.tasks` as the context.

  However, if `mymodule.tasks` was written like this:

  ```python
  from http.client import HTTPResponse

  def process() -> bool:
      _ = HTTPResponse(...)
      return ...
  ```

  Then the patch would not affect the object used by the `process` function anymore. However, it would affect any other
  module that uses the dot to reach `HTTPResponse` since the patch was _still_ applied globally.




  Another approach to mocking things globally is to hide a function behind another, and mock the hidden function.
  This allows modules to use whatever import style they want, and the mocks become straightforward to setup.

  Pretend this is `mymodule.clients`:

  ```python
  class APIClient:
      ...

  def get_api_client() -> APIClient:
      return _get_api_client()

  def _get_api_client() -> APIClient:
      return APIClient()
  ```

  And this is `mymodule.tasks`:

  ```python
  from mymodule.clients import get_api_client

  def process() -> bool:
      return get_api_client() is not None
  ```

  So you _know_ this works globally, because no one will (should?) import the private one except the test:

  ```python
  from unittest.mock import patch, MagicMock
  from coveo_ref import ref

  from mymodule.tasks import process
  from mymodule.clients import _get_api_client


  @patch(*ref(_get_api_client))
  def test(api_client_mock: MagicMock) -> None:
      assert process()
  ```




  If you don't use a global mock, then you _must_ specify the context of the mock.

  The context is a reference point for `ref`.
  Most of the time, the class or function you're testing should be the context.
  Generally speaking, pick a context as close to your implementation as possible to allow seamless refactoring.



  ```python
  from unittest.mock import patch, MagicMock
  from coveo_ref import ref

  from ... import thing_to_mock
  from ... import thing_to_test

  @patch(*ref(thing_to_mock, context=thing_to_test))
  def test(mocked_thing: MagicMock) -> None:
      assert thing_to_test()
      mocked_thing.assert_called()
  ```



  `mymodule.tasks`:

  ```python
  from mymodule.clients import get_api_client

  def process() -> bool:
      client = get_api_client()
      return ...
  ```

  The test, showing 3 different methods that work:

  ```python
  from unittest.mock import patch, MagicMock
  from coveo_ref import ref

  from mymodule.clients import get_api_client
  from mymodule.tasks import process


  import mymodule

  @patch(*ref(get_api_client, context=mymodule.tasks))
  def test(get_api_client_mock: MagicMock) -> None:
      assert process()


  from mymodule import tasks

  @patch(*ref(get_api_client, context=tasks))
  def test(get_api_client_mock: MagicMock) -> None:
      assert process()


  from mymodule.tasks import process
  @patch(*ref(get_api_client, context=process))
  def test(get_api_client_mock: MagicMock) -> None:
      assert process()
  ```

  The 3rd method is encouraged: provide the function or class that is actually using the `get_api_client` import.
  In our example, that's the `process` function.
  If `process` was ever moved to a different module, it would carry the `get_api_client` import, and the mock would
  be automatically adjusted to target `process`'s new module without changes. 🚀



  Sometimes, the test file _is_ the context. When that happens, just pass `__name__` as the context:

  ```python
  from unittest.mock import patch
  from coveo_ref import ref
  from mymodule.clients import get_api_client, APIClient

  def _prepare_test() -> APIClient:
      client = get_api_client()
      ...
      return client

  @patch(*ref(get_api_client, context=__name__))
  def test() -> None:
      client = _prepare_test()
      ...
  ```




  Since a method cannot be imported and can only be accessed through the use of a dot `.` on a class or instance,
  you can always patch methods globally:

  ```python
  with patch(*ref(MyClass.fn)): ...
  ```

  This is because no module can import `fn`; it has to go through an import of `MyClass`.



  Simply add `obj=True` and use `patch.object()`:

  ```python
  with patch.object(*ref(instance.fn, obj=True)): ...
  ```




  `ref` cannot help with this task:
  - You cannot refer an attribute that exists (you would pass the value, not a reference)
  - You cannot refer an attribute that doesn't exist (because it doesn't exist!)

  For this, there's no going around hardcoding the attribute name in a string:

  ```python
  class MyClass:
      def __init__(self) -> None:
          self.a = 1


  def test_attr() -> None:
      instance = MyClass()
      with patch.object(instance, "a", new=2):
          assert instance.a == 2
          assert MyClass().a == 1
  ```

  This sometimes work when patching **instances**.
  The example works because `a` is a simple attribute that lives in `instance.__dict__` and `patch.object` knows
  about that.

  But if you tried to patch `MyClass` instead of `instance`, `mock.patch` would complain that there's no
  such thing as `a` over there.
  Thus, patching an attribute globally will most likely result in a lot of wasted time, and should be avoided.

  There's no way to make the example work with `ref` because there's no way to refer `instance.a` without actually
  getting the value of `a`, unless we hardcode a string, which defeats the purpose of `ref` completely.




  You can only patch a property globally, through its class:

  ```python
  class MyClass:
      @property
      def get(self) -> bool:
          return False
  ```

  ```python
  from unittest.mock import PropertyMock, patch, MagicMock
  from coveo_ref import ref

  from mymodule import MyClass

  @patch(*ref(MyClass.get), new_callable=PropertyMock, return_value=True)
  def test(my_class_get_mock: MagicMock) -> None:
      assert MyClass().get == True
      my_class_get_mock.assert_called_once()
  ```

  You **cannot** patch a property on an instance, this is a limitation of `unittest.mock` because of the way
  properties work.
  If you try, `mock.patch.object()` will complain that the property is read only.




  When inspecting these special methods on an instance, `ref` ends up finding the class instead of the instance.

  Therefore, `ref` is unable to return a `Tuple[instance, function_name]`.
  It would return `Tuple[class, function_name]`, resulting in a global patch. 😱

  But `ref` will detect this mistake, and will raise a helpful exception if it cannot return an instance when you
  specified `obj=True`.

  For this particular scenario, the workaround is to provide the instance as the context:

  ```python
  from unittest.mock import patch
  from coveo_ref import ref


  class MyClass:
      @staticmethod
      def get() -> bool:
          return False


  def test() -> None:
      instance = MyClass()
      with patch.object(*ref(instance.get, context=instance, obj=True)) as fn_mock:
          assert instance.get == True
          assert MyClass().get == False  # new instances are not affected by the object mock
          fn_mock.assert_called_once()
  ```

  Some may prefer a more semantically-correct version by specifying the target through the class instead of the
  instance. In the end, these are all equivalent:

  ```python
  with patch.object(instance, "get"):
      ...

  with patch.object(*ref(instance.get, context=instance, obj=True)):
      ...

  with patch.object(*ref(MockClass.get, context=instance, obj=True)):
      ...
  ```

  In this case, the version without ref is much shorter and arguably more pleasant for the eye, but `get` can no longer
  be renamed without altering the tests.


pkgId: ab78ae6dafc3e353dd11130cbf410792a019c9460ba890e8643c08e28a5fa990
name: python-coveo-settings
arch: src
version: 2.1.8
epoch: 0
release: 1
summary: Settings driven by environment variables.
url: https://github.com/coveooss/coveo-python-oss/tree/main/coveo-settings
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coveo-settings-2.1.8-1.src.rpm
checksum_type: sha256
description:
  Whenever you want the user to be able to configure something through an environment variable, this module has your back:

  ```python
  from coveo_settings import StringSetting, BoolSetting

  DATABASE_URL = StringSetting('project.database.url')
  DATABASE_USE_SSL = BoolSetting('project.database.ssl')
  ```

  The user can then configure the environment variables `project.database.url` and `project.database.ssl` to configure the application.

  When accessed, the values are automatically converted to the desired type:

  - `StringSetting` will always be a string
  - `BoolSetting` is either True or False, but accepts "yes|no|true|false|1|0" as input (case-insensitive, of course)
  - `IntSetting` and `FloatSetting` are self-explanatory
  - `DictSetting` allows you to use JSON maps
  - `PathSetting` gives a Path instance, and also implements PathLike and the `/` operator

  If the input cannot be converted to the value type, an `TypeConversionConfigurationError` exception is raised.

  A default (fallback) value may be specified. The fallback may be a `callable`.

  A validation callback may be specified for custom logic and error messages.

  Not limited to environment variables; supports redirection to custom implementations.

  **A setting can be set as sensitive for logging purposes. When logging, use repr(setting) to get the correct representation.**





  There are various ways to obtain the value:

  ```python
  from coveo_settings import BoolSetting

  DATABASE_USE_SSL = BoolSetting('project.database.ssl')


  use_ssl = bool(DATABASE_USE_SSL)
  use_ssl = DATABASE_USE_SSL.get_or_raise()
  assert use_ssl in [True, False]


  use_ssl = DATABASE_USE_SSL.value
  assert use_ssl in [True, False, None]


  if DATABASE_USE_SSL.is_set:
      use_ssl = bool(DATABASE_USE_SSL)


  if not DATABASE_USE_SSL.is_valid:
      ...
  ```




  Matching the key of the environment variable `project.database.ssl` is done very loosely:

  - case-insensitive
  - dots and underscores are ignored completely (`foo_bar` and `f__ooba.r` are equal)
      - useful for some runners that don't support dots in environment variable keys




  You can quickly validate that a string is in a specific list like this:

  ```python
  from coveo_settings.settings import StringSetting
  from coveo_settings.validation import InSequence

  ENV = StringSetting("environment", fallback="dev", validation=InSequence("prod", "staging", "dev"))
  ```




  You can register custom redirection schemes in order to support any data source.

  Much like `https://` is a clear scheme, you may register callback functions to trigger when the value of a setting
  starts with the scheme(s) you define. For instance, let's support a custom API and a file storage:

  ```python
  from coveo_settings import settings_adapter, StringSetting, ConfigValue


  @settings_adapter("internal-api::")
  def internal_api_adapter(key: str) -> ConfigValue:
      
      assert "internal-api::" not in key
      return "internal api"  # implement logic to obtain value from internal api


  @settings_adapter("file::", strip_scheme=False)
  def file_adapter(key: str) -> ConfigValue:
      
      assert key.startswith("file::")
      return "file adapter"  # implement logic to parse the key and retrieve the setting value


  assert StringSetting('...', fallback="internal-api::settings/user-name").value == "internal api"
  assert StringSetting('...', fallback="file::settings.yaml/user-name").value == "file adapter"



  import os

  REDIRECT_ME = StringSetting('test')
  os.environ['test'] = "file::user.json::name"
  assert REDIRECT_ME.value == "file adapter"
  os.environ['test'] = "internal-api::url"
  assert REDIRECT_ME.value == "internal api"
  ```

  Keep in mind that there's no restriction on the prefix scheme; it's your responsibility to pick something unique
  that can be set as the value of an environment variable.




  The value of a redirection may be another redirection and may juggle between adapters.
  A limit of 50 redirections is supported:

  ```python
  import os

  from coveo_settings import StringSetting


  os.environ["expected"] = "final value"
  os.environ["redirected"] = "env->expected"
  os.environ["my-setting"] = "env->redirected"

  assert StringSetting("my-setting").value == "final value"
  ```



  The builtin redirection scheme `env->` can be used to redirect to a different environment variable.
  The example below demonstrates the deprecation/migration of `my-setting` into `new-setting`:

  ```python
  import os

  from coveo_settings import StringSetting

  os.environ["new-setting"] = "correct-value"
  os.environ["my-setting"] = "env->new-setting"

  assert StringSetting("my-setting").value == "correct-value"
  ```



  You can set a setting to cache the first valid value with `cached=True`.
  This is particularly useful in redirection scenarios to avoid repeating requests too often.




  You can override the value using `setting.value = "some value"` and clear the override with `setting.value = None`.
  Clearing the override resumes the normal behavior of the environment variables and the fallback value, if set.

  This is typically used as a way to propagate CLI switches globally.
  For mocking scenarios, refer to the `Mocking` section below.




  When you need a setting value for a test, use the `mock_config_value` context manager:

  ```python
  from coveo_settings import StringSetting
  from coveo_settings.mock import mock_config_value

  SETTING = StringSetting(...)

  assert not SETTING.is_set
  with mock_config_value(SETTING, 'new-value'):
      assert SETTING.is_set
  ```

  You can also clear the value:

  ```python
  from coveo_settings import StringSetting
  from coveo_settings.mock import mock_config_value

  SETTING = StringSetting(..., fallback='test')

  assert SETTING.is_set
  with mock_config_value(SETTING, None):
      assert not SETTING.is_set
  ```


