# packages

pkgId: 35e4607bf1371c961dc0b5bee78337e046fc6c5432e719605e3a7dfcff2b8c56
name: python-casparser_isin
arch: src
version: 2023.9.10
epoch: 0
release: 1
summary: ISIN database for casparser
url: https://github.com/codereverser/casparser-isin
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casparser_isin-2023.9.10-1.src.rpm
checksum_type: sha256
description:
  [![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![GitHub](https://img.shields.io/github/license/codereverser/casparser)](https://github.com/codereverser/casparser/blob/main/LICENSE)
  ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/codereverser/casparser-isin/run-pytest.yml?branch=main)
  [![codecov](https://codecov.io/gh/codereverser/casparser-isin/branch/main/graph/badge.svg?token=MQ8ZEVTG1B)](https://codecov.io/gh/codereverser/casparser-isin)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/casparser-isin)

  ISIN Database for [casparser](https://github.com/codereverser/casparser).


  ```bash
  pip install -U casparser-isin
  ```




  ```python
  from casparser_isin import MFISINDb
  with MFISINDb() as db:
      scheme_data = db.isin_lookup("Axis Long Term Equity Fund - Growth",  # scheme name
                                   "KFINTECH", # RTA
                                   "128TSDGG", # Scheme RTA code
                                   )
  print(scheme_data)
  ```
  ```
  SchemeData(name="axis long term equity fund - direct growth",
             isin="INF846K01EW2",
             amfi_code="120503",
             score=100.0)
  ```

  The database also contains NAV values on 31-Jan-2018 for all funds, which can be used for
  taxable LTCG computation for units purchased before the same date.

  ```
  from casparser_isin import MFISINDb
  with MFISINDb() as db:
      nav = db.nav_lookup("INF846K01EW2")
  print(nav)
  ```
  ```
  Decimal('44.8938')
  ```




  - casparser-isin is shipped with a local database which may get obsolete over time. The local
  database can be updated via the cli tool

  ```shell
  casparser-isin --update
  ```

  - casparser-isin will try to use the file provided by `CASPARSER_ISIN_DB` environment variable; if present, and the file exists


pkgId: 8659c98d0677d522a0ddb56a117a7368bb77e11d25aba7c48b11ee0908d7249d
name: python-casperlabs-client
arch: src
version: 0.20.3
epoch: 0
release: 1
summary: Python Client for interacting with a CasperLabs Node
url: https://casperlabs.io/
rpm_license: CasperLabs Open Source License (COSL)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casperlabs-client-0.20.3-1.src.rpm
checksum_type: sha256
description:
  `casperlabs-client` is a Python package consisting of
  - a client library `casperlabs_client` that can be used to interact with
    a [CasperLabs](https://casperlabs.io/) node
    via its gRPC API and
  - a command line interface (CLI) script with the same name: `casperlabs_client`.

  Note, the name of the package available on PyPi is `casperlabs-client` (with hyphen),
  but the name of the library as well as the CLI is written with underscore: `casperlabs_client`.



  These instructions are for Ubuntu 18.04 and 20.04.
  Note: The default versions of Python are different for both versions of Ubuntu.
  These steps are required prior to activating the Python environment every time the client is used.

  `casperlabs-client` is a Python 3.7+ module, it does not support Python 2.7.


  ```
  sudo apt install gcc python3.7 python3.7-dev
  virtualenv -p python3.7 env
  ```


  ```
  sudo apt install gcc python3.8 python3.8-dev
  virtualenv -p python3.8 env
  ```



  Each time you use the virtual environment you need to activate it.  This is done with a script inside the `env` directory you created.

  `source env/bin/activate`

  You will need to do this for the install below, but also each time you open a new terminal to run the `casperlabs_client` once installed.



  After activating the Python environment, install the `casperlabs_client` package with

  ```
  python -m pip install casperlabs-client
  ```



  Install Python 3 with brew: https://docs.python-guide.org/starting/install3/osx/

  Next, type the following commands in the Terminal:

  ```
  brew update
  brew upgrade
  pip install casperlabs-client
  ```



  To install `casperlabs-client` on Windows 10 you need to install latest Python 3.7,
  it is currently not possible to install it on Python 3.8 due to
  https://github.com/grpc/grpc/issues/20831

  It is recommended to install Python from the python.org website:
  https://www.python.org/downloads/windows/

  If you install Python from the Windows Store
  you will need to manually add the `Scripts` folder of your Python installation to your `Path`
  in order to have the `casperlabs_client` command line tool
  available on the command line without providing full path to it.
  This will be located in a path similar to this:

  ```
  C:\Users\[USERNAME]\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.x_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts>
  ```

  You also need to install free Microsoft Visual Studio C++ 14.0.
  Get it with "Build Tools for Visual Studio 2019":
  https://visualstudio.microsoft.com/downloads/
  (All downloads -> Tools for Visual Studio 2019 -> Build tools for Visual Studio 2019).
  This is required by the `pyblake2` extension module.

  After installing the above prerequisites you can install the `casperlabs-client` package by
  typing the following on the command line:

  ```
  C:\Users\alice>python -m pip install casperlabs-client
  ```



  The package `casperlabs-client` includes command line interface (CLI)
  script called `casperlabs_client`.

  Type `casperlabs_client --help` to see short synopsis with a list of
  available commands

  ```
  $ casperlabs_client --help
  usage: casperlabs_client [--help] [-h HOST] [-p PORT]
                           [--port-internal PORT_INTERNAL] [--node-id NODE_ID]
                           [--certificate-file CERTIFICATE_FILE] [--version]
                           {account-hash,balance,deploy,keygen,make-deploy,query-state,send-deploy,show-block,show-blocks,show-deploy,show-deploys,show-peers,sign-deploy,stream-events,transfer,validator-keygen,vdag}
                           ...
  ```

  ```
  $ casperlabs_client deploy --help
  ```




  To see available API functions, their parameters and documentation,
  see [source](https://github.com/CasperLabs/client-py/blob/dev/casperlabs_client/casperlabs_client.py).
  The API functions are marked with `@api` decorator.

  After installing `casperlabs-client` you can start interacting with
  [CasperLabs Testnet](https://clarity.casperlabs.io).


  ```python
  import casperlabs_client
  client = casperlabs_client.CasperLabsClient('deploy.casperlabs.io', 40401)
  block_info = next(client.show_blocks(1, full_view=False))
  for bond in block_info.summary.header.state.bonds:
      print(f'{bond.validator_public_key.hex()}: {bond.stake.value}')
  ```

  When executed the script should print a list of bonded validators' public keys
  and their stake:

  ```
  89e744783c2d70902a5f2ef78e82e1f44102b5eb08ca6234241d95e50f615a6b: 5000000000
  1f66ea6321a48a935f66e97d4f7e60ee2d7fc9ccc62dfbe310f33b4839fc62eb: 8000000000
  569b41d574c46390212d698660b5326269ddb0a761d1294258897ac717b4958b: 4000000000
  d286526663ca3766c80781543a148c635f2388bfe128981c3e4ac69cea88dc35: 3000000000
  ```

  Note, you will also see a warning:

  ```
  WARNING:root:Creating insecure connection to deploy.casperlabs.io:40401 (<class 'casperlabs_client.casper_pb2_grpc.CasperServiceStub'>)
  ```

  Currently it is possible to connect from client to node without SSL encryption, which is what the above example code does.
  In the future encryption will become obligatory and you will have to pass a `certificate_path` to the `CasperLabsClient` constructor.
  The warning about insecure connection is meant to remind about this.



  `casperlabs_client` has `vdag` command that can be used to visualize DAG.
  If you want to use it you need to first install [Graphviz](https://www.graphviz.org/),
  the free graph visualization software.

  For example:

  ```
  casperlabs_client --host deploy.casperlabs.io vdag --depth 10 --out dag.png
  ```

  will produce an image file similar to the one below:


  ![DAG visualization example](https://raw.githubusercontent.com/CasperLabs/client-py/dev/example_vdag_output.png)

  Small boxes represent blocks, labeled with short prefixes of their block hashes.
  Blocks are aligned in "lanes" representing validators that created them.
  Bold arrows point to main parents of blocks.




  To deploy a smart contract to CasperLabs Testnet you have to first:

  1. Create an account using [CasperLabs Explorer](https://clarity.casperlabs.io/#/)
  and transfer (free) tokens to the account from the faucet.

     An account address is a hash of public key in hex format such as:
     ```
     f2cbd19d054bd2b2c06ea26714275271663a5e4503d5d059de159c3b60d81ab7
     ```

  2. Compile a contract to the [WASM](https://webassembly.org) format,
  see CasperLabs [contract examples](https://github.com/CasperLabs/CasperLabs/tree/dev/execution-engine/contracts/examples)
  to see example contracts and instructions on
  [how to compile](https://github.com/CasperLabs/CasperLabs/blob/dev/execution-engine/contracts/examples/README.md)
  them.

  To deploy a compiled contract from your account address, with client as CasperLabsClient instance:

  ```python
  response = client.deploy(from_addr="f2cbd19d054bd2b2c06ea26714275271663a5e4503d5d059de159c3b60d81ab7",
                           payment_amount=1000000,
                           session="helloname.wasm",
                           private_key="path/to/private.pem")
  ```



  Return values of the API functions defined in the `CasperLabsClient` are generally deserialized gRPC response objects
  of the corresponding requests defined in the node's gRPC service, see
  [casper.proto](https://github.com/CasperLabs/CasperLabs/blob/master/protobuf/io/casperlabs/node/api/casper.proto).

  Response to requests like `show_blocks` or `show_deploys` is a stream of objects.
  Corresponding Python API functions return generator objects:

  ```python
  for block in client.show_blocks(depth=10):
      print (block.blockHash)
  ```



  Some requests' response objects (see their definitions in
  [casper.proto](https://github.com/CasperLabs/CasperLabs/blob/master/protobuf/io/casperlabs/node/api/casper.proto)
  ) have fields indicating success.

  `InternalError` is the only exception that user code can expect to be thrown by the API.



  See [Usage of the CasperLabs system](https://github.com/CasperLabs/CasperLabs/blob/master/hack/USAGE.md).


pkgId: d80af15c70e304a5a2f86606c622225c9e3e0c49a7b2771255e2fabb7e7498a1
name: python-caspredict
arch: src
version: 0.5.4
epoch: 0
release: 1
summary: Automatic detection and subtyping of CRISPR-Cas operons
url: https://github.com/russel88/caspredict
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caspredict-0.5.4-1.src.rpm
checksum_type: sha256
description:
  Detect CRISPR-Cas genes and arrays, and predict the subtype based on both Cas genes and CRISPR repeat sequence.

  [CasPredict and RepeatType are also available through a webserver](http://caspredict.crispr.dk)

  This software finds Cas genes with a large suite of HMMs, then groups these HMMs into operons, and predicts the subtype of the operons based on a scoring scheme.
  Furthermore, it finds CRISPR arrays with [minced](https://github.com/ctSkennerton/minced), and using a kmer-based machine learning approach (extreme gradient boosting trees) it predicts the subtype of the CRISPR arrays based on the consensus repeat.
  It then connects the Cas operons and CRISPR arrays, producing as output:
  * CRISPR-Cas loci, with consensus subtype prediction based on both Cas genes (mostly) and CRISPR consensus repeats
  * Orphan Cas operons, and their predicted subtype
  * Orphan CRISPR arrays, and their predicted associated subtype


  * All the ones in the most recent Nature Reviews Microbiology (Makarova et al. 2020): [Evolutionary classification of CRISPR–Cas systems: a burst of class 2 and derived variants](https://doi.org/10.1038/s41579-019-0299-x)
  * Updated type IV subtypes and variants based on: [Type IV CRISPR–Cas systems are highly diverse and involved in competition between plasmids](https://doi.org/10.1093/nar/gkz1197)
  * Type V-K: [RNA-guided DNA insertion with CRISPR-associated transposases](https://doi.org/10.1126/science.aax9181)
  * Transposon associated type I-F: [Transposon-encoded CRISPR–Cas systems direct RNA-guided DNA integration](https://doi.org/10.1038/s41586-019-1323-z)


  <img src='img/plot.png' align="left" height="200" />


  Coming soon...


  1. [Quick start](#quick)
  2. [Installation](#install)
  3. [CasPredict - How to](#caspredicthow)
      * [Plotting](#plot)
  4. [RepeatType - How to](#repeattype)
  4. [RepeatType - Train](#repeattrain)



  ```sh
  conda create -n caspredict -c conda-forge -c bioconda -c russel88 caspredict
  conda activate caspredict
  caspredict my.fasta my_output
  ```


  CasPredict can be installed either through conda or pip.

  It is advised to use conda, since this installs CasPredict and all dependencies, and downloads with database in one go.


  Use [miniconda](https://docs.conda.io/en/latest/miniconda.html) or [anaconda](https://www.anaconda.com/) to install.

  Create the environment with caspredict and all dependencies and database
  ```sh
  conda create -n caspredict -c conda-forge -c bioconda -c russel88 caspredict
  ```


  If you have the dependencies (Python >= 3.8, HMMER >= 3.2, Prodigal >= 2.6, grep, sed) in your PATH you can install with pip

  ```sh
  python -m pip install caspredict
  ```


  ```sh

  svn checkout https://github.com/Russel88/CasPredict/trunk/data
  tar -xvzf data/Profiles.tar.gz
  mv Profiles/ data/
  rm data/Profiles.tar.gz



  export CASPREDICT_DB="/path/to/data/"

  caspredict input.fa output --db /path/to/data/
  ```


  CasPredict takes as input a nucleotide fasta, and produces outputs with CRISPR-Cas predictions


  ```sh
  conda activate caspredict
  ```


  ```sh
  caspredict genome.fa my_output
  ```


  ```sh
  caspredict genome.fa my_output -t 20
  ```


  ```sh
  caspredict -h
  ```


  * **CRISPR_Cas.tab:**           CRISPR_Cas loci, with consensus subtype prediction
      * Contains a consensus prediction (Prediction), and the separate predictions for the Cas operon (Prediction_Cas) and CRISPR arrays (Prediction_CRISPRs)
  * **cas_operons.tab:**          All certain Cas operons
      * Contains a prediction of subtype (Prediction) and the subtype with the highest score (Best_type). If the score is high then Prediction = Best_type
  * **crisprs_all.tab:**          All CRISPR arrays
      * Contains a prediction of the associated subtype based on the repeat sequence (Prediction).
      * The 'Subtype' column is the subtype with highest probability. Prediction = Subtype if Subtype_probability is high
  * **crisprs_orphan.tab:**       Orphan CRISPRs (those not in CRISPR_Cas.tab)
      * Same columns as crisprs_all.tab
  * **cas_operons_orphan.tab:**   Orphan Cas operons (those not in CRISPR_Cas.tab)
      * Same columns as cas_operons.tab
  * **CRISPR_Cas_putative.tab:**  Putative CRISPR_Cas loci, often lonely Cas genes next to a CRISPR array
      * Same columns as CRISPR_Cas.tab
  * **cas_operons_putative.tab:** Putative Cas operons, mostly false positives, but also some ambiguous and partial systems
      * Same columns as cas_operons.tab
  * **spacers/*.fa:**             Fasta files with all spacer sequences
  * **hmmer.tab:**                All HMM vs. ORF matches, unfiltered results
  * **genes.tab**                 All genes and their positions
  * **arguments.tab:**            File with arguments given to CasPredict

  * **hmmer.log**                 Error messages from HMMER (only produced if any errors were encountered)


  * **prodigal.log**              Log from prodigal
  * **proteins.faa**              Protein sequences
  * **hmmer/*.tab**               Alignment output from HMMER for each Cas HMM
  * **minced.out:**               CRISPR array output from minced


  Files are only created if there is any data. For example, the CRISPR_Cas.tab file is only created if there are any CRISPR-Cas loci.


  CasPredict will automatically plot a map of the CRISPR-Cas loci, orphan Cas operons, and orphan CRISPR arrays.

  These maps can be expanded (`--expand N`) by adding unknown genes and genes with alignment scores below the thresholds. This can help in identify potentially un-annotated genes in operons. You can generate new plots without having to re-run the entire pipeline by adding `--redo_typing` to the command. This will re-use the mappings and re-type the operons and re-make the plot, based on new thresholds and plot parameters.

  The plot below is run with `--expand 5`

  * Cas genes are in red.
  * Cas genes, with alignment scores below the thresholds, are in dark green
  * Unknown genes are in gray (the number matches the genes.tab file)
  * Arrays are in blue, with their predicted subtype association based on the consensus repeat sequence.

  <img src='img/plot2.png' align="left" height="350" />


  With an input of CRISPR repeats (one per line, in a simple textfile) RepeatType will predict the subtype, based on the kmer composition of the repeat


  ```sh
  conda activate caspredict
  ```


  ```sh
  repeatType repeats.txt
  ```


  The script prints:
  * Repeat sequence
  * Predicted subtype
  * Probability of prediction


  * Predictions with probabilities below 0.75 are uncertain, and should be taken with a grain of salt.
  * The classifier was only trained on the subtypes for which there were enough (>20) repeats. It can therefore only predict subtypes of repeats associated with the following subtypes:
      * I-A, I-B, I-C, I-D, I-E, I-F, I-G
      * II-A, II-B, II-C
      * III-A, III-B, III-C, III-D
      * IV-A1, IV-A2, IV-A3
      * V-A
      * VI-B
  * This is the accuracy per subtype (on an unseen test dataset):
      * **I-A**      0.60
      * **I-B**      0.90
      * **I-C**      0.98
      * **I-D**      0.47
      * **I-E**      1.00
      * **I-F**      0.99
      * **I-G**      0.83
      * **II-A**     0.94
      * **II-B**     1.00
      * **II-C**     0.89
      * **III-A**    0.89
      * **III-B**    0.49
      * **III-C**    0.60
      * **III-D**    0.28
      * **IV-A1**    0.79
      * **IV-A2**    0.78
      * **IV-A3**    0.98
      * **V-A**      0.77
      * **VI-B**     1.00


  You can train the repeat classifier with your own set of subtyped repeats. With a tab-delimeted input where 1. column contains the subtypes and 2. column contains the CRISPR repeat sequences, RepeatTrain will train a CRISPR repeat classifier that is directly usable for both RepeatType and CasPredict.


  ```sh
  repeatTrain typed_repeats.tab my_classifier
  ```


  ```sh
  repeatType repeats.txt --db my_classifier
  ```


  Save the original database files:
  ```sh
  mv ${CASPREDICT_DB}/type_dict.tab ${CASPREDICT_DB}/type_dict_orig.tab
  mv ${CASPREDICT_DB}/xgb_repeats.model ${CASPREDICT_DB}/xgb_repeats_orig.model
  ```

  Move the new model into the database folder
  ```sh
  mv my_classifier/* ${CASPREDICT_DB}/
  ```


pkgId: ed2f287305055e2e52095566f454b2b8ec6808bad34786d9c2dd57679a7cadb4
name: python-casq
arch: src
version: 1.3.3
epoch: 0
release: 1
summary: CaSQ: Celldesigner as Sbml-Qual
url: https://soliman.gitlabpages.inria.fr/casq/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casq-1.3.3-1.src.rpm
checksum_type: sha256
description:
  CaSQ is provided as a Python3 package, you can install it from the `Python package index`_ with ``pip``, ``conda`` or your Python package manager of choice:
     $ python3 -m pip install casq


pkgId: c22fd2c4a50f3532827c85067569035e972e25db051d92062784da83dbca6fff
name: python-casregnum
arch: src
version: 1.0.1
epoch: 0
release: 1
url: https://github.com/molshape/CASRegistryNumbers
rpm_license: LICENSE
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casregnum-1.0.1-1.src.rpm
checksum_type: sha256
summary:
  casregnum provides a Python class 'CAS' for working with CAS Registry Numbers®. It allows managing, sorting and checking CAS numbers.

description:
  ![PyPI](https://img.shields.io/pypi/v/casregnum)
  ![pytest](https://github.com/molshape/CASRegistryNumbers/actions/workflows/python-app.yml/badge.svg)

  Python class to manage, check and sort CAS Registry Numbers&reg; (CAS RN&reg;).

  <details>
  <summary>Table of Content</summary>

  1. [Description](#description)
  2. [How to install and uninstall?](#how-to-install-and-uninstall)
  3. [How to use?](#how-to-use)
  4. [Examples](#examples)

  </details>


  **casregnum** is a Python class to manage, check, and sort CAS Registry Numbers&reg; (CAS RN&reg;) by the [Chemical Abstracts Service](https://www.cas.org/). Check their official [FAQ website](https://www.cas.org/support/documentation/chemical-substances/faqs) for more information on CAS numbers.



  **casregnum** can be installed from the [Python Package Index (PyPI)](https://pypi.org/) repository by calling

  	pip install casregnum

  In order to uninstall **casregnum** from your local environment use

  	pip uninstall casregnum



  **casregnum** provides the `CAS` class for creating a CAS Registry Number&reg; instance:

  ```Python
  from casregnum import CAS

  substance = CAS(cas_rn)
  ```

  Note that `cas_rn` can either be an integer or a string. If you provide an integer, the `CAS` class will take care of formatting the CAS RN&reg; for you. If you provide a string, it needs to comply with the CAS number formatting rules, i. e. *2-7 digits* **dash** *two digits* **dash** *single check digit* (_____00-00-0).

  The `CAS` class offers the following three properties:

  ```Python
  .cas_string   # CAS number formatted as a string
  .cas_integer  # CAS number as an integer
  .check_digit  # check digit of the CAS number
  ```



  ```Python
  from casregnum import CAS

  caffeine = CAS(58_08_2)
  theine = CAS("58-08-2")
  l_lacticacid = CAS(79_33_4)
  d_lacticacid = CAS(10326_41_7)
  octanes = [
      CAS(111_65_9), CAS(592_27_8), CAS(589_81_1), CAS(589_53_7), CAS( 590_73_8), CAS(584_94_1),
      CAS(589_43_5), CAS(592_13_2), CAS(563_16_6), CAS(583_48_2), CAS( 619_99_8), CAS(564_02_3),
      CAS(540_84_1), CAS(560_21_4), CAS(565_75_3), CAS(609_26_7), CAS(1067_08_9), CAS(594_82_1),
  ]

  print(f"str: {caffeine}")
  print(f"int: {theine.cas_integer}")
  print(f"check digit: {caffeine.check_digit}")
  print(f"{caffeine} == {theine}: {caffeine == theine}")
  print(f"{caffeine} > {theine}: {caffeine > theine}")
  print(f"{l_lacticacid} > {d_lacticacid}: {l_lacticacid > d_lacticacid}")
  print(f"{l_lacticacid} < {d_lacticacid}: {l_lacticacid < d_lacticacid}")

  for i, isomer in enumerate(sorted(octanes), start=1):
      print(f"{isomer:>9}", end=", ")
      if i % 6 == 0:
          print()
  ```

  will generate the following output:

  ```
  str: 58-08-2
  int: 58082
  check digit: 2
  58-08-2 == 58-08-2: True
  58-08-2 > 58-08-2: False
  79-33-4 > 10326-41-7: False
  79-33-4 < 10326-41-7: True
   111-65-9,  540-84-1,  560-21-4,  563-16-6,  564-02-3,  565-75-3,
   583-48-2,  584-94-1,  589-43-5,  589-53-7,  589-81-1,  590-73-8,
   592-13-2,  592-27-8,  594-82-1,  609-26-7,  619-99-8, 1067-08-9,
  ```


pkgId: 30bfd6f656510175a291d617ed000bcf17a10e5d596cbbfb418ae8900adf13ec
name: python-cassandra-driver
arch: src
version: 3.29.2
epoch: 0
release: 1
summary: DataStax Driver for Apache Cassandra
url: http://github.com/datastax/python-driver
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cassandra-driver-3.29.2-1.src.rpm
checksum_type: sha256
description:
  A modern, `feature-rich <https://github.com/datastax/python-driver#features>`_ and highly-tunable Python client library for Apache Cassandra (2.1+) and
  DataStax Enterprise (4.7+) using exclusively Cassandra's binary protocol and Cassandra Query Language v3.
  The driver supports Python 3.8 through 3.12.
  **Note:** DataStax products do not support big-endian systems.


pkgId: 9b3d871747d09f94dc309b457f2382a5887be32d412fb549d50d1a2643e6d6cf
name: python-cassandra-mmm
arch: src
version: 1.1.9
epoch: 0
release: 1
summary: Cassandra library
url: https://github.com/Tsurty/cassandra
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cassandra-mmm-1.1.9-1.src.rpm
checksum_type: sha256
description:
  To best perform an mmm, you will need to perform these processes in order:
  - Data Processing
  - Data Analysis
  - Trasformations
  - Models
  - Model Evaluation




  The first thing to do to deploy your library is to create the zip file to deploy in the dist folder,
  run this command and delete the previous version of the zip
  ```
  python setup.py sdist
  ```

  You can now release your new version. While executing the command, you will be asked for the username and password of your pypi account
  ```
  python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
  ```


  If you haven't installed cassandra yet, run the following command
  ```
  pip install cassandra-mmm
  ```

  otherwise, update the library
  ```
  pip install cassandra-mmm --upgrade
  ```


pkgId: 6aff5963906bb69e06243c8a7b8660b3d9621c51fdec3dd79f411951f4adfab2
name: python-cassandra-sigv4
arch: src
version: 4.0.2
epoch: 0
release: 1
url: https://github.com/aws/aws-sigv4-auth-cassandra-python-driver-plugin/
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cassandra-sigv4-4.0.2-1.src.rpm
checksum_type: sha256
summary:
  Implements a sigv4 authentication plugin for the open-source Datastax Python Driver for Apache Cassandra

description:
  The current version is 4.0.2. Please see the [changelog](./CHANGELOG.md) for details on version history.



  This package implements an authentication plugin for the open-source Datastax Python Driver for Apache Cassandra.
  The driver enables you to add authentication information to your API requests using the AWS Signature Version 4 Process (SigV4).
  Using the plugin, you can provide users and applications short-term credentials to access Amazon Keyspaces (for Apache Cassandra)
  using AWS Identity and Access Management (IAM) users and roles.

  The plugin depends on the AWS SDK for Python (Boto3). It uses `boto3.Session` to obtain credentials.




  ``` python
  ssl_context = SSLContext(PROTOCOL_TLSv1_2)
  ssl_context.load_verify_locations('./AmazonRootCA1.pem')
  ssl_context.verify_mode = CERT_REQUIRED
  boto_session = boto3.Session(aws_access_key_id="AKIAIOSFODNN7EXAMPLE",
                               aws_secret_access_key="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
                               aws_session_token="AQoDYXdzEJr...<remainder of token>",
                               region_name="us-east-2")
  auth_provider = SigV4AuthProvider(boto_session)
  cluster = Cluster(['cassandra.us-east-2.amazonaws.com'], ssl_context=ssl_context, auth_provider=auth_provider,
                    port=9142)
  session = cluster.connect()
  r = session.execute('select * from system_schema.keyspaces')
  print(r.current_rows)
  ```



  The following sections describe how to use the authentication plugin for the open-source DataStax Python Driver for Cassandra to access Amazon Keyspaces.



  The first step is to get an Amazon digital certificate to encrypt your connections using Transport Layer Security (TLS).
  The DataStax Python driver must use an SSL CA certificate so that the client SSL engine can validate the Amazon Keyspaces
  certificate on connection.

  ``` python
  ssl_context = SSLContext(PROTOCOL_TLSv1_2)
  ssl_context.load_verify_locations('./AmazonRootCA1.pem')
  ssl_context.verify_mode = CERT_REQUIRED
  ```



  Before you can start using the plugin, you must configure the AWS Region that the plugin will use when authenticating.
  This is required because SigV4 signatures are Region-specific. For example, if you are connecting to the `cassandra.us-east-2.amazonaws.com` endpoint,
  the Region must be `us-east-2`. For a list of available AWS Regions and endpoints, see [Service Endpoints for Amazon Keyspaces](https://docs.aws.amazon.com/keyspaces/latest/devguide/programmatic.endpoints.html).

  You can specify the Region using one of the following four methods:

  * Environment Variable
  * Constructor
  * Boto3 Session Configuration



  You can use the `AWS_REGION` environment variable to match the endpoint that you are
  communicating with by setting it as part of your application start-up, as follows.

  ``` shell
  $ export AWS_REGION=us-east-1
  ```



  You can either provide the constructor for `SigV4AuthProvider` with a boto3 session, aws credentials and a region,
  or a parameterless constructor to follow the default boto3 credential discovery path.



  ``` shell
  pip install cassandra-sigv4
  ```



  Note that if a session is provided, all other arguments for the constructor are ignored.

  ``` python
  boto_session = boto3.Session(aws_access_key_id="AKIAIOSFODNN7EXAMPLE",
                               aws_secret_access_key="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
                               aws_session_token="AQoDYXdzEJr...<remainder of token>",
                               region_name="us-east-2")
  auth_provider = SigV4AuthProvider(boto_session)
  cluster = Cluster(['cassandra.us-east-2.amazonaws.com'], ssl_context=ssl_context, auth_provider=auth_provider,
                    port=9142)
  ```



  ``` python
  auth_provider = SigV4AuthProvider(aws_access_key_id="AKIAIOSFODNN7EXAMPLE",
                                    aws_secret_access_key="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
                                    aws_session_token="AQoDYXdzEJr...<remainder of token>",
                                    region_name="us-east-2")
  cluster = Cluster(['cassandra.us-east-2.amazonaws.com'], ssl_context=ssl_context, auth_provider=auth_provider,
                    port=9142)
  ```


pkgId: c637fcbd2a35be555ae43c0d797f26984f4072c14235f93ebb071e2c5aa4867f
name: python-cassia-rag
arch: src
version: 0.1.4
epoch: 0
release: 1
summary: A tool for cell type annotation using RAG
url: https://pypi.org/project/cassia-rag/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cassia-rag-0.1.4-1.src.rpm
checksum_type: sha256
description:
  CASSIA RAG is the RAG part of the CASSIA method. It is a tool for cell type annotation using Retrieval-Augmented Generation (RAG).


pkgId: e6265361b0fb45496ee8f1a5a4fe541685529b6d26fbdb3bc0570ed3ea442109
name: python-cassini
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: A tool to structure experimental work, data and analysis using Jupyter Lab.
url: https://pypi.org/project/cassini/
rpm_license: GPL-3.0-only
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cassini-0.3.0-1.src.rpm
checksum_type: sha256
description:
  An electronic laboratory notebook (ELN), built inside Jupyter Lab.

  Cassini's goal is to help you explore, analyse and organise your data in an environment that's familiar.

  ![Screenshot](demo.gif)



  * **Structure your project** into a logical hierarchy _- no more lost data!_
  * **Retreive any data from anywhere**, by name _- no more copy and pasting data here there and everywhere!_
  * **Navigate and explore** your project through a fast, specialised browser _- no more endless clicking through folders!_
  * **Preview summaries of experiment parameters and results**, including graphs, temperatures, volumes, weights _- no more waiting around for notebooks to launch!_
  * **Define reusable templates** for proceedures and analysis _- no more copy and pasting code snippets!_



      > pip install cassini

  Create a `cas_project.py`:

      
      from cassini import Project, DEFAULT_TIERS

      project = Project(DEFAULT_TIERS, __file__)

      if __name__ == '__main__':
          project.launch()

  And launch it:

      > python project.py

  Head to [Quickstart](https://0hughman0.github.io/Cassini/0.3.x/) for more info.



  Contributing guidelines are found [here](https://0hughman0.github.io/Cassini/0.3.x/contributing/).

  This includes development installation instructions and codebase orientation.


pkgId: 0a5bc98c885510a00bbebd7ea34bfa0584d2b20facbaae93d49fe6e38c4528dc
name: python-cassio
arch: src
version: 0.1.10
epoch: 0
release: 1
url: https://cassio.org
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cassio-0.1.10-1.src.rpm
checksum_type: sha256
summary:
  A framework-agnostic Python library to seamlessly integrate Apache Cassandra(R) with ML/LLM/genAI workloads.

description:
  A framework-agnostic Python library to seamlessly integrate Apache Cassandra with ML/LLM/genAI workloads.

  **Note**: this is currently an alpha release.



  Installation is as simple as:

  ```
  pip install cassio
  ```

  For example usages and integration with higher-level LLM frameworks
  such as LangChain, please visit [cassio.org](https://cassio.org).





  To develop `cassio`, we use poetry

  ```shell
  pip install poetry
  ```

  Use poetry to install dependencies

  ```shell
  poetry install
  ```



  If the integration is Poetry-based (e.g. LangChain itself), you should get this
  in your `pyproject.toml`:

  ```
  cassio = {path = "../../cassio", develop = true}
  ```

  Then you do

  ```
  poetry remove cassio                                      # if necessary
  poetry lock --no-update
  poetry install -E all --with dev --with test_integration  # or similar, this is for langchain
  ```

  [Inspired from this](https://github.com/orgs/python-poetry/discussions/1135).
  You also need a recent Poetry for this to work.



  We are still at `0.*`. Occasional breaking changes are to be expected,
  but please think carefully. Later, a stronger versioning model will be adopted.



  Style is enforced through `black`, linting with `ruff`,
  and typechecking with `mypy`.
  The code should run through `make format` without issues.



  At the moment we try to run tests under Python3.8 and Python3.10 to try and
  catch versions-specific issues
  (such as the newer `typing` syntax such as `typeA | typeB`, illegal on 3.8).



  - Bump version in pyproject.toml
  - Add to `CHANGES.txt`
  - Commit the very code that will be built:
  - `git tag v<x.y.z>; git push origin v<x.y.z>`

  ```
  make build
  poetry publish  # (login to PyPI ...)
  ```



  Please run tests (and add some coverage for new features). This is not
  enforced other than to your conscience. Type `make` for the available tests.

  To run the full tests (except specific tests targeting Cassandra),
  there's `make test-all`.



  ```
  make test-unit
  ```



  Ensure the required environment variables are set (see for instance
  the provided `TEMPLATE.testing.env`).
  You need at least one of either Astra DB or a
  Cassandra (5+) cluster to use.

  Launch the tests with either of:

  ```
  make test-integration

  make test-astra-integration
  make test-cassandra-integration
  make test-testcontainerscassandra-integration
  ```

  The last three above specify `TEST_DB_MODE` as either `LOCAL_CASSANDRA`, `TESTCONTAINERS_CASSANDRA` or
  `ASTRA_DB`. Refer to `TEMPLATE.testing.env` for required environment variables in the specific cases.

  _Note: Ideally you should test with both Astra DB and one Cassandra, since some tests are
  skipped in either case._


pkgId: 7e116adaa5432fd16712e30470a3d9d4d139a949c6c8e57420ada32e56210e6d
name: python-cassiopy
arch: src
version: 0.0.26
epoch: 0
release: 1
summary: A python library for clustering using skew-t mixture models.
url: https://pypi.org/project/cassiopy/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cassiopy-0.0.26-1.src.rpm
checksum_type: sha256
description:
  <h1 align="center">CassioPy</h1><br>

  [![PyPI Downloads](https://img.shields.io/pypi/dm/cassiopy.svg?label=PyPI%20downloads)](
  https://pypi.org/project/cassiopy/)

  [![PyPI version](https://img.shields.io/pypi/v/cassiopy.svg)](
  https://pypi.org/project/cassiopy/)



  CassioPy is a python library for clustering using the Skew-t distribution. This model is designed to handle data with skewness, providing more accurate clustering results in many real-world scenarios where data may not follow a normal distribution.




  You can install CassioPy via pip from [Pypi](https://pypi.org/project/cassiopy/):

      $ pip install cassiopy



  Check out the documentation at [https://cassiopy.readthedocs.io](https://cassiopy.readthedocs.io/en/latest/)


pkgId: c94ce7acbff415f66d5f6b4f74a1716c45874fa772b65a26130004eec8eeec7c
name: python-cast-ai-se-cli
arch: src
version: 0.0.34
epoch: 0
release: 1
summary: Provides a CLI to run all sorts of sequences like demo prep.
url: https://pypi.org/project/cast-ai-se-cli/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cast-ai-se-cli-0.0.34-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/my-awesome-package.svg)](https://pypi.org/project/cast-ai-se-cli/)
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
  [![Code Style](https://img.shields.io/badge/code%20style-flake8-000000.svg)](https://flake8.pycqa.org/)

  [![GitHub Issues](https://img.shields.io/github/issues/castai/solutions-engineering-lab)](https://github.com/castai/solutions-engineering-lab/issues)
  [![GitHub release](https://img.shields.io/github/release/castai/solutions-engineering-lab)](https://github.com/castai/solutions-engineering-lab/releases)



  This project aims to serve as swiss knife intended to serve CAST AI SEs.
  Assisting with demo environment prep, providing snapshot analysis and many others in the future.
  The CLI tool is based on a modular architecture and leverages API orchestration tools package -> cast-ai-se-tools



  - [Installation](#installation)
  - [Usage](#usage)
  - [Contributing](#contributing)
  - [License](#license)



  To install, run:\
      `pip install cast-ai-se-cli`\
  or forced:\
      `pip install cast-ai-se-cli --force-reinstall`

  To upgrade, run:\
      `pip install --upgrade cast-ai-se-cli` \
  or forced:\
      `pip install --upgrade --force-reinstall cast-ai-se-cli`



  For some of the functions(commands) the tool offers a configuration file is required (config.json).\
  First time running the tool if file is not found, the tool would create an empty template file.\
  The user is required to fill fields required to automate sequences related to the chosen command. \
  The template comes with additional default parameters that can found [here](config_constants.py)




      se-cli demo <prep|off> <eks|aks|gcp> [--cluster_id <cluster_id>] [-h|--help] [-d|--debug]
      se-cli snapshot <analyze> <brief|detailed> [--cluster_id <cluster_id>] [-h|--help] [-d|--debug]
      se-cli audit <analyze> [--cluster_id <cluster_id>] [-h|--help] [-d|--debug]

      se-cli demo <prep|off> <eks|aks|gcp>
  - demo command is used to either **prep** a demo environment:\
  Use the config.json data to get the cluster into a specific node count (default=7) \
  with specific replicated demo replicas (default=2) and then delete previous nodes
  Turning **off** a cluster would be invoking the hibernation cronjob.

  - The subcommand **<eks|aks|gcp>** is to determine which cluster will be prep`ed or turned off.\


      se-cli snapshot <analyze> <brief|detailed>

  - snapshot command is used to either generate a **brief** or **detailed** report of workloads that have some effect on
  scheduling:
  - nodeSelector
  - topologySpreadConstraints
  - affinity
  - runtimeClassName
  - pdb`s

  Workloads analyzed:
  - deployments
  - replicaSets
  - daemonSets
  - statefulSets
  - jobs

  The detailed report includes the namespaces and names of workloads



      -h, --help  Show this help message and exit.
      -d, --debug  Enable debug logging.
      -c, --cluster_id <cluster_id>  (Optional) Specify the cluster ID for the demo environment.



  `se-cli demo prep` :

  ![Alt Text](images/demo_prep.png)

  `se-cli demo off` :

  ![Alt Text](images/demo_off.png)

  Hitting a timeout:

  ![Alt Text](images/demo_refresh-timeout.png)

  `se-cli audit analyze` :



  Contributions are welcome! To contribute, follow these steps:

  git clone project as first step
  create features/fixes by applying a simple <TYPE(fix/feature...)>/<INITIATING_USER>-<FEATURE/FIX-NAME> branch
  do not forget to update version and open a PR
  Please make sure CI process that enforces light flake8 lint passes (flak8 and other helper script can be found in helper_script folder)



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




  - Version 0.1.0: First semi-major release end of 2023 Q4 - tested and vetted demo functionality
  - Version 0.2.0: Second semi-major release to support snapshots analysis
  - Version 0.3.0: Third semi-major to integrate with solution-engineering tool
  - Version 1.0.0: First Major release tested and vetter all other previous releases (end of 2024 Q1)


pkgId: 6d0b26846ed03a4a87c9f43facf6009bcf58a225ce830b4f8bb6cfdc7fdce2db
name: python-cast-from-env
arch: src
version: 0.0.8
epoch: 0
release: 1
summary: Get and cast environment variables
url: http://github.com/Media-Platforms/cast-from-env
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cast-from-env-0.0.8-1.src.rpm
checksum_type: sha256
description:
  Get and cast environment variables



  `python setup.py install`



  Call `from_env()` with the name of an environment variable, and either a default
  value to return if the environment variable is not set, or a type to cast the
  environment variable's value to if it is set. If a default value is passed and the
  variable is set, its value will be cast to the type of the default value.

  Actually, any callable can be passed as the second parameter, and will be used to
  cast the value if it's not None. So if you pass e.g. `json.loads` a JSON env var value
  will be cast to a Python `list` or `dict`.

  Also, if the type of the default value – or the type passed in instead – is `bool`,
  `from_env()` will return `True` if the environment variable's string value is any
  of `'1'`, `'true'`, `'t'`, `'yes'`, `'y'`, and `'on'`, and `False` otherwise.



      from cast_from_env import from_env
      from json import loads

      from_env('STRING_VAR', 'default value')  # Value or 'default value' if not set
      from_env('INTEGER_VAR', 100)  # Value cast to int, or 100 if not set
      from_env('INTEGER_VAR', int)  # Value cast to int, or None if not set
      from_env('FLOAT_VAR', 1.0)  # Value cast to float, or 1.0 if not set
      from_env('TRUE_VAR', bool)  # True if value is '1', 'true', 'yes', or 'on'
      from_env('TRUE_VAR', True)  # True if value is '1', 'true', 'yes', 'on', or not set
      from_env('TEST_JSON', loads)  # JSON string is cast to Python list or dict


pkgId: 438f415420b08aef7ffe6f996a899525bf215b614112d8d730e52407cf099818
name: python-cast-planet-api
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: A package for searching and retrieving imagery via the Planet REST API
url: https://git.uark.edu/cast/planet/planet-python-api
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cast-planet-api-0.1.1-1.src.rpm
checksum_type: sha256
description:
  A little wrapper package for working with the [Planet APIs](https://developers.planet.com/docs/apis/)

  Currently supported apis:
  - [Data](https://developers.planet.com/docs/apis/data/)
  - [Orders](https://developers.planet.com/apis/orders/)


pkgId: c8411840a6fdad6a15c70940798410f51530c45f5f7d820e60a984cc126db807
name: python-castepinput
arch: src
version: 0.1.10
epoch: 0
release: 1
summary: Base module of castepinput
url: https://pypi.org/project/castepinput/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castepinput-0.1.10-1.src.rpm
checksum_type: sha256
description:
  This package provide a basic framework for read/write input files of CASTEP.
  There is already a excellent reader/writer implemented in [ase](https://gitlab.com/ase/ase)
  but they are ortentated to work with the `Atoms` and `Calculator` classes in `ase`.
  It also requires a CASTEP binary to exist to work.
  This package aim to provide a more generic framework with minimum dependency for
  simple (but important) tasks of writing and reading inputs files of CASTEP.


pkgId: 06c4b39cbf050c76820979ed6bc6d4db62da21264ee37e194d0aaf7b068d3eea
name: python-casting-expert
arch: src
version: 0.1.7
epoch: 0
release: 1
summary: A comprehensive Python package for type casting, conversion, and validation with advanced features
url: https://github.com/ahmednizami/casting-expert
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casting-expert-0.1.7-1.src.rpm
checksum_type: sha256
description:
  A comprehensive Python package for type casting, conversion, and validation with built-in CLI support - perfect for developers, data scientists, and system administrators.




  - Advanced type casting with fallback options
  - Comprehensive input validation
  - Type inference for automatic conversion
  - Multiple format support (JSON, YAML, Query String)
  - Nested dictionary handling
  - Error handling and validation


  - Multiple input methods (string, file, stdin)
  - Multiple output formats
  - Pretty printing options
  - File input/output support
  - Quiet mode operation


  - 👨‍💻 Software Developers
  - 📊 Data Scientists
  - 🔧 System Administrators
  - 👥 IT Professionals




  ```bash
  pip install casting-expert
  ```



  Choose the installation that best suits your needs:

  ```bash

  pip install "casting-expert[yaml]"


  pip install "casting-expert[data]"


  pip install "casting-expert[web]"


  pip install "casting-expert[dev]"


  pip install "casting-expert[full]"
  ```





  ```python
  from casting_expert import safe_cast, cast_to_type


  result1 = safe_cast("123", int)  # Returns: 123
  result2 = safe_cast("invalid", int)  # Returns: None


  result3 = cast_to_type("123", int, default=0)  # Returns: 123
  result4 = cast_to_type("invalid", int, default=0)  # Returns: 0


  from casting_expert import validate_input

  is_valid = validate_input("123", int)  # Returns: True
  can_cast = validate_input("abc", int)  # Returns: False
  ```



  ```python
  from casting_expert import parse_string_to_dict, ParsingError


  json_str = '{"name": "John", "age": 30}'
  try:
      data = parse_string_to_dict(json_str)
      print(data)  # {'name': 'John', 'age': 30}
  except ParsingError as e:
      print(f"Error: {e}")


  from casting_expert import (
      parse_json,
      parse_yaml_like,
      parse_query_string,
      parse_key_value_pairs
  )


  json_data = parse_json('{"name": "John"}')


  yaml_data = parse_yaml_like("""
  name: John
  age: 30
  nested:
    key: value
  """)


  query_data = parse_query_string("name=John&age=30&tags=python,coding")


  kv_data = parse_key_value_pairs("""
  name: John
  age: 30
  """)
  ```



  ```python
  from casting_expert import TypeInference


  raw_data = {
      "id": "123",
      "active": "true",
      "score": "98.6",
      "tags": "python,coding",
      "date": "2024-03-12"
  }

  typed_data = TypeInference.infer_types_in_dict(raw_data)










  number = TypeInference.infer_type("123")         # Returns: 123
  boolean = TypeInference.infer_type("true")       # Returns: True
  date = TypeInference.infer_type("2024-03-12")    # Returns: datetime object
  ```



  ```python
  from casting_expert import DictValidator, ValidationError


  user_schema = {
      "name": DictValidator.create_field(
          str,
          required=True,
          min_length=2,
          pattern=r'^[A-Za-z\s]+$',
          error_messages={
              "pattern": "Name should contain only letters and spaces",
              "required": "Name is required"
          }
      ),
      "age": DictValidator.create_field(
          int,
          min_value=0,
          max_value=150,
          error_messages={
              "min_value": "Age cannot be negative",
              "max_value": "Age cannot be greater than 150"
          }
      ),
      "email": DictValidator.create_field(
          str,
          required=True,
          pattern=r'^[\w\.-]+@[\w\.-]+\.\w+$',
          error_messages={"pattern": "Invalid email format"}
      ).add_validator(
          lambda x: not x.endswith('.temp'),
          "Temporary email domains are not allowed"
      )
  }


  try:
      result = DictValidator.validate(data, user_schema)
      if result.is_valid:
          print("✅ Validation passed!")
      else:
          for issue in result.issues:
              print(f"⚠️ {issue.field}: {issue.message}")
  except ValidationError as e:
      print(f"❌ Validation failed: {e}")
  ```



  ```python
  from casting_expert import DictSerializer

  data = {
      "name": "John",
      "age": 30,
      "scores": [95, 87, 91],
      "details": {
          "city": "New York",
          "role": "developer"
      }
  }


  json_str = DictSerializer.to_json(data, pretty=True)


  query_str = DictSerializer.to_query_string(data, prefix='?')


  yaml_str = DictSerializer.to_yaml_like(data)


  kv_str = DictSerializer.to_key_value(data, delimiter=': ')
  ```







  1. **📝 Parse String Input**
  ```bash

  casting-expert -s '{"name": "John", "age": 30}'


  casting-expert -s '{"name": "John"}' --pretty --indent 4
  ```

  2. **📂 File Operations**
  ```bash

  casting-expert -f input.json


  casting-expert -f input.json -o output.json


  casting-expert -f input.json --format yaml -o output.yaml
  ```

  3. **📊 Format Options**
  ```bash

  casting-expert -s '{"name": "John"}' --format yaml


  casting-expert -s '{"name": "John"}' --format python


  casting-expert -s '{"name": "John"}' --pretty
  ```

  4. **📥 Standard Input**
  ```bash

  echo '{"name": "John"}' | casting-expert -i


  casting-expert -i < input.json
  ```



  ```
  📋 Required Options (choose one):
    -s, --string STRING   Input string to parse
    -f, --file FILE      Input file path
    -i, --stdin          Read from stdin

  📝 Output Options:
    -o, --output OUTPUT  Output file path
    --format FORMAT      Output format (json|yaml|python)
    --indent INDENT     Indentation spaces (default: 2)
    --pretty           Enable pretty printing
    -q, --quiet        Suppress non-error output
  ```



  ```
  src/
  ├── casting_expert/          # Main package directory
  │   ├── __init__.py         # Package initialization
  │   ├── cli.py              # CLI implementation
  │   ├── core.py             # Core casting functions
  │   ├── validators.py       # Input validation
  │   └── casters/            # Specialized casters
  │       ├── __init__.py
  │       ├── parsers.py      # String parsing
  │       ├── serializers.py  # Data serialization
  │       ├── type_inference.py # Type detection
  │       └── validators.py   # Data validation
  ```






  ```python
  from casting_expert import parse_string_to_dict, TypeInference

  def process_api_response():
      
      response = '''
      {
          "status": "success",
          "code": "200",
          "data": {
              "user_id": "12345",
              "is_active": "true",
              "last_login": "2024-03-12T10:30:00Z",
              "metrics": {
                  "visits": "1000",
                  "conversion_rate": "0.15"
              }
          }
      }
      '''

      
      data = parse_string_to_dict(response)
      typed_data = TypeInference.infer_types_in_dict(data)

      
      user_id = typed_data['data']['user_id']  # int: 12345
      is_active = typed_data['data']['is_active']  # bool: True
      conversion = typed_data['data']['metrics']['conversion_rate']  # float: 0.15


  ```python
  from casting_expert import parse_yaml_like, DictValidator


  config_schema = {
      "database": DictValidator.create_field(
          dict,
          schema={
              "host": DictValidator.create_field(str, required=True),
              "port": DictValidator.create_field(int, min_value=1, max_value=65535),
              "credentials": DictValidator.create_field(
                  dict,
                  schema={
                      "username": DictValidator.create_field(str, required=True),
                      "password": DictValidator.create_field(str, required=True)
                  }
              )
          }
      ),
      "cache": DictValidator.create_field(
          dict,
          schema={
              "enabled": DictValidator.create_field(bool, required=True),
              "ttl": DictValidator.create_field(int, min_value=0)
          }
      )
  }


  config_str = '''
  database:
      host: localhost
      port: 5432
      credentials:
          username: admin
          password: secret123
  cache:
      enabled: true
      ttl: 3600
  '''

  config = parse_yaml_like(config_str)
  validation_result = DictValidator.validate(config, config_schema)
  ```


  ```python
  import pandas as pd
  from casting_expert import parse_string_to_dict, TypeInference

  def analyze_data():
      
      data_str = '''
      {
          "sales_data": [
              {"date": "2024-03-01", "revenue": "1000.50", "units": "50"},
              {"date": "2024-03-02", "revenue": "1500.75", "units": "75"},
              {"date": "2024-03-03", "revenue": "1250.25", "units": "60"}
          ],
          "metadata": {
              "currency": "USD",
              "store_id": "123"
          }
      }
      '''

      
      data = parse_string_to_dict(data_str)
      typed_data = TypeInference.infer_types_in_dict(data)

      
      df = pd.DataFrame(typed_data['sales_data'])

      
      total_revenue = df['revenue'].sum()
      avg_units = df['units'].mean()
      return df, total_revenue, avg_units


  ```python
  from casting_expert import parse_string_to_dict, DictSerializer

  def process_logs():
      
      log_entry = '''
      {
          "timestamp": "2024-03-12T10:30:00Z",
          "level": "ERROR",
          "service": "authentication",
          "message": "Login failed",
          "metadata": {
              "user_id": "12345",
              "ip": "192.168.1.1",
              "attempts": "3"
          }
      }
      '''

      
      log = parse_string_to_dict(log_entry)
      typed_log = TypeInference.infer_types_in_dict(log)

      
      enhanced_log = {
          **typed_log,
          "processed_at": datetime.now().isoformat(),
          "severity": 5 if typed_log['level'] == 'ERROR' else 3
      }

      
      return DictSerializer.to_json(enhanced_log)
  ```


  ```python
  from casting_expert import parse_query_string, DictValidator

  def process_form():
      
      form_data = "name=John+Doe&age=30&email=john%40example.com&subscribe=true"

      
      data = parse_query_string(form_data)

      
      form_schema = {
          "name": DictValidator.create_field(str, required=True, min_length=2),
          "age": DictValidator.create_field(int, min_value=18),
          "email": DictValidator.create_field(
              str,
              pattern=r'^[\w\.-]+@[\w\.-]+\.\w+$'
          ),
          "subscribe": DictValidator.create_field(bool)
      }

      validation_result = DictValidator.validate(data, form_schema)
      return validation_result.is_valid, data
  ```


  ```python
  from casting_expert import (
      parse_string_to_dict,
      DictSerializer,
      TypeInference
  )

  def migrate_data():
      
      old_data = '''
      {
          "user": {
              "firstName": "John",
              "lastName": "Doe",
              "isActive": "1",
              "loginCount": "42"
          }
      }
      '''

      
      data = parse_string_to_dict(old_data)
      typed_data = TypeInference.infer_types_in_dict(data)

      
      new_data = {
          "profile": {
              "full_name": f"{typed_data['user']['firstName']} {typed_data['user']['lastName']}",
              "active": bool(typed_data['user']['isActive']),
              "stats": {
                  "logins": typed_data['user']['loginCount']
              }
          }
      }

      
      return {
          "json": DictSerializer.to_json(new_data),
          "yaml": DictSerializer.to_yaml_like(new_data),
          "query": DictSerializer.to_query_string(new_data)
      }
  ```








  ```python
  ParsingError: Invalid dictionary format: Expecting property name enclosed in double quotes
  ```

  **Solution**:
  - Ensure all keys are enclosed in double quotes
  - Check for missing or extra commas
  - Validate JSON syntax using a JSON validator

  **Example Fix**:
  ```python

  data = parse_string_to_dict('{name: "John"}')


  data = parse_string_to_dict('{"name": "John"}')
  ```




  ```python

  data = {"id": "001", "code": "123456"}
  ```

  **Solution**:
  Use explicit type casting or custom validation:
  ```python
  from casting_expert import DictValidator

  schema = {
      "id": DictValidator.create_field(str),  # Force string type
      "code": DictValidator.create_field(str)
  }
  ```




  ```python
  ValidationError: Invalid value for field 'email'
  ```

  **Solution**:
  Use custom validators:
  ```python
  def validate_email_domain(email: str) -> bool:
      return email.endswith(('@company.com', '@company.org'))

  schema = {
      "email": DictValidator.create_field(
          str,
          pattern=r'^[\w\.-]+@[\w\.-]+\.\w+$'
      ).add_validator(
          validate_email_domain,
          "Email must be from company domain"
      )
  }
  ```




  ```bash
  Warning: PyYAML not installed. Defaulting to JSON format.
  ```

  **Solution**:
  Install YAML support:
  ```bash
  pip install "casting-expert[yaml]"
  ```





  **Solution**:
  - Use streaming for large files
  - Process data in chunks
  - Use appropriate format options

  ```python
  def process_large_file(filepath: str):
      with open(filepath, 'r') as f:
          for line in f:
              try:
                  data = parse_string_to_dict(line.strip())
                  
                  yield data
              except ParsingError:
                  continue
  ```





  **Solution**:
  - Verify installation:
  ```bash
  pip show casting-expert
  ```
  - Check Python path
  - Verify virtual environment activation




  - Check input string format
  - Verify quotes and delimiters
  - Ensure valid nesting


  - Check schema requirements
  - Verify all required fields are present
  - Check field names case sensitivity


  - Use appropriate serialization method
  - Convert custom objects to basic types
  - Implement custom serializers if needed



  Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.



  MIT License - See [LICENSE](LICENSE) file for details.



  - 📃 Documentation: [Read the Docs](https://github.com/ahmednizami/casting-expert/)
  - 🐛 Issues: [GitHub Issues](https://github.com/ahmednizami/casting-expert/issues)
  - 💻 Source: [GitHub](https://github.com/ahmednizami/casting-expert)
  - 📧 Email: ahmednizami2021@gmailcom


pkgId: ae7235300bcb93b8dd3376f627a4b896715476368ec84037f0e066a387260e29
name: python-castlabs-evs
arch: src
version: 1.1.5
epoch: 0
release: 1
summary: A client for EVS, Widevine/VMP signing service
url: https://github.com/castlabs/electron-releases/wiki/EVS
rpm_license: APACHE 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castlabs-evs-1.1.5-1.src.rpm
checksum_type: sha256
description:
  `castlabs-evs` is a package that provides a client for the [EVS service](https://github.com/castlabs/electron-releases/wiki/EVS) for [Electron for Content Security](https://github.com/castlabs/electron-releases). EVS provides production Widevine/VMP signing of application packages derived from official releases of Electron for Content Security. It is a free service, but requires signup to use.

  As part of the Widevine 3PL program castLabs also offers [commercial VMP certification](https://github.com/castlabs/electron-releases/wiki/EVS#3pl) of custom Chromium/Electron adaptations, which enables the use of EVS for signing custom builds.

  `castlabs-evs` supports Python 3.7+ and can be installed with:
  ```
  % python3 -m pip install castlabs-evs
  ```

  This installs the EVS client which provides Python and CLI interfaces for account handling and VMP signing. If the pip module binary directory is in your `PATH` the two convenience scripts `evs-account` and `evs-vmp` can be used in place of `python3 -m <module>` in the examples below.

  The CLI interfaces are interactive by default, asking for any information they cannot load from its configuration, unless they are provided through CLI arguments or environment variables. This behaviour can be overridden by not providing a TTY on STDIN, or by passing the `--no-ask` option or setting EVS_NO_ASK in the environment, in which case any missing required information will trigger a runtime error instead, making them more suitable for automation.

  The Python interfaces are not currently documented, but the CLI provides help sections that can be accessed:
  ```
  % python3 -m castlabs_evs.account --help
  usage: account.py [-h] [-v] [-n]
                    {signup,sup,resend,rs,confirm-signup,csup,update,up,reset,res,confirm-reset,cres,refresh,r,deauth,da,reauth,ra,delete,del}
                    ...

  optional arguments:
    -h, --help            show this help message and exit
    -v, --version         show program's version number and exit
    -n, --no-ask          enable non-interactive mode

  commands:
    {signup,sup,resend,rs,confirm-signup,csup,update,up,reset,res,confirm-reset,cres,refresh,r,deauth,da,reauth,ra,delete,del}
      signup (sup)        sign up for EVS account
      resend (rs)         resend EVS account confirmation code
      confirm-signup (csup)
                          confirm account signup
      update (up)         update account details
      reset (res)         reset account password
      confirm-reset (cres)
                          confirm account password reset
      refresh (r)         refresh authorization tokens
      deauth (da)         discard any authorization tokens
      reauth (ra)         discard any authorization tokens & refresh
      delete (del)        delete EVS account
  ```
  ```
  % python3 -m castlabs_evs.vmp --help
  usage: vmp.py [-h] [-v] [-n] [-a] {verify,v,sign,s,verify-pkg,vp,sign-pkg,sp} ...

  optional arguments:
    -h, --help            show this help message and exit
    -v, --version         show program's version number and exit
    -n, --no-ask          enable non-interactive mode
    -a, --any-ski         verify any subject key identifier

  commands:
    {verify,v,sign,s,verify-pkg,vp,sign-pkg,sp}
      verify (v)          verify signature
      sign (s)            refresh signature
      verify-pkg (vp)     verify electron package signature
      sign-pkg (sp)       refresh electron package signature
  ```



  THIS 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, TITLE AND NON-INFRINGEMENT. UPDATES, INCLUDING SECURITY UPDATES, WILL BE PROVIDED ON A BEST-EFFORT BASIS.


pkgId: 082d8e613ad7f31050e5e338a4d85cbc7d2edd08fb34191c4c40ad469c042b0a
name: python-castle
arch: src
version: 6.1.0
epoch: 0
release: 1
summary: Castle protects your users from account compromise
url: https://github.com/castle/castle-python
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castle-6.1.0-1.src.rpm
checksum_type: sha256
description:
  `Castle <https://castle.io>`_ **analyzes user behavior in web and mobile apps to stop fraud before it happens.**


pkgId: 20140cfed37c83cf382f82a898700723e360194d6f2d79754027f7f691f265aa
name: python-castle-ai
arch: src
version: 0.0.13
epoch: 0
release: 1
summary: Distinguish behavioral clusters Toolbox
url: https://pypi.org/project/castle-ai/
rpm_license: AGPL-3.0 license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castle-ai-0.0.13-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/castle-ai.svg)](https://badge.fury.io/py/castle-ai)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/CASTLE-ai/castle-ai/blob/main/notebooks/colab.ipynb)

  CASTLE integrates the strengths of visual foundation models trained on large datasets possess open-world visual concepts, including Segment Anything (SA), DeAOT, and DINOv2, for one-shot image segmentation and unsupervised visual feature extraction. Furthermore, CASTLE employs unsupervised multi-stage and/or multi-layer UMAP clustering algorithms to distinguish behavioral clusters with unique temporal variability.




  ```
  pip install castle-ai
  ```





  For CUDA 12 Users
  ```
  pip install -U xformers --index-url https://download.pytorch.org/whl/cu121
  pip install -U cudf-cu12 cuml-cu12 --extra-index-url=https://pypi.nvidia.com
  ```


  For CUDA 11 Users
  ```
  pip install -U xformers --index-url https://download.pytorch.org/whl/cu118
  pip install -U cudf-cu11 cuml-cu11 --extra-index-url=https://pypi.nvidia.com
  ```



  ```
  git clone https://github.com/CASTLE-ai/castle-ai.git
  ```





  The model will download when you need to use it.

  If you want to download models now
  ```
  cd castle-ai/
  mkdir ckpt
  bash download_ckpt.sh
  ```


  ```
  cd castle-ai/
  mkdir ckpt
  ```

  Then, download the models from the web by copying the links to the Chrome browser and downloading them.
  ```
  https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth
  https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_reg4_pretrain.pth
  https://drive.google.com/file/d/1g4E-F0RPOx9Nd6J7tU9AE1TjsouL4oZq/edit
  https://drive.google.com/file/d/1QoChMkTVxdYZ_eBlZhK2acq9KMQZccPJ/edit
  ```

  Afterward, place them into the ckpt folder.

  ```
  castle-ai
  ├── castle
  └── ckpt
      ├── dinov2_vitb14_reg4_pretrain.pth
      ├── R50_DeAOTL_PRE_YTB_DAV.pth
      ├── sam_vit_b_01ec64.pth
      └── SwinB_DeAOTL_PRE_YTB_DAV.pth

  ```




  ```
  python app.py
  ```




  We would like to express our gratitude for the assistance received from the following projects during the development of this project.

  [Segment Anything](https://github.com/facebookresearch/segment-anything.git)

  [DeAOT & Segment-and-Track-Anything](https://github.com/z-x-yang/Segment-and-Track-Anything.git)

  [DINOv2](https://github.com/facebookresearch/dinov2.git)


pkgId: 1b17d7d6dc1ad3513d65a8d7a28c50547eb1b79c1d4c68965a0816de93cceca0
name: python-castleguard-sdk
arch: src
version: 0.12
epoch: 0
release: 1
summary: A Python SDK for interacting with CastleGuard APIs
url: https://pypi.org/project/castleguard-sdk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castleguard-sdk-0.12-1.src.rpm
checksum_type: sha256
description:
  The CastleGuard Python SDK provides a convenient interface to interact with CastleGuard's API. This SDK allows you to authenticate, log messages, interact with the chatbot, translate text, perform named entity recognition (NER), transcribe audio files, manage document collections, work with vision-based models, and more.



  - **Authentication**: Easily authenticate and retrieve an access token to interact with CastleGuard APIs.
  - **Logging**: Send log messages to CastleGuard's logging endpoint.
  - **Chatbot Integration**: Interact with CastleGuard's chatbot to generate responses based on input prompts, with or without document collections.
  - **Translation**: Translate text between languages, supporting English and French.
  - **Named Entity Recognition (NER)**: Perform NER on text to extract important entities.
  - **Vision**: Perform image-based tasks using a vision model by uploading an image with a descriptive prompt.
  - **Transcription**: Upload and transcribe audio files, and download SRT subtitles.
  - **Collections**: Manage document collections by creating, uploading, and retrieving the status of files.
  - **Heartbeat**: Fetch the health status of various system components.
  - **Text Extraction**: Extract paragraphs from raw text or extract text from a document file.



  Install the package via pip:

  ```bash
  pip install castleguard-sdk
  ```





  To begin, initialize the `CastleGuard` class with your API credentials:

  ```python
  from castleguard_sdk import CastleGuard

  cg = CastleGuard(base_url='https://your-castleguard-url', username='your-username', password='your-password')
  ```



  The class automatically handles authentication. The access token is retrieved upon initialization and used for subsequent API requests.



  Log a message with a specific log level (default is 1):

  ```python
  cg.log("This is a log message", logLevel=2)
  ```



  Send a prompt to the chatbot and get a response:

  ```python
  response, chat_id = cg.chat("What is the weather today?")
  print(response)
  ```

  You can also chat within the context of a document collection:

  ```python
  response, chat_id = cg.chat_with_collection("Summarize the document", collection_id="your-collection-id")
  print(response)
  ```




  Translate a single text with `translate_text`:

  ```python
  translated_text = cg.translate_text("Hello, how are you?", source_lang="en", target_lang="fr")
  print(translated_text)
  ```


  - **text**: The text string to be translated.
  - **source_lang**: Source language code.
  - **target_lang**: Target language code.


  - The translated text. Returns `None` if an error occurs.


  Translate multiple texts simultaneously with `translate_texts`:

  ```python
  texts = ["Hello", "Goodbye"]
  source_langs = ["en", "eng"]
  target_langs = ["fr", "deu"]
  translated_texts = cg.translate_texts(texts, source_langs, target_langs)
  print(translated_texts)
  ```


  - **texts**: List of text strings to translate.
  - **source_langs**: List of source language codes, one for each text.
  - **target_langs**: List of target language codes, one for each text.


  - A list of dictionaries, where each dictionary contains:
    - **originalText**: The original text provided.
    - **translatedText**: The translated text.
    - **sourceLanguageCode**: The source language code.
    - **targetLanguageCode**: The target language code.

    Returns `None` if an error occurs.


  **Note**: The lists for `texts`, `source_langs`, and `target_langs` must be of equal length.


  Upload an audio file and translate it:

  ```python
  document_id = cg.translate_document("path/to/file", source_lang="en", target_lang="fr")
  print(f"Document ID: {document_id}")
  ```


  - **file_path**: Path to the file to be translated. This path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.
  - **source_lang**: Source language code.
  - **target_lang**: Target language code.
  - **keep_original**: Whether to retain the original document (default is True).


  - A `document_id` for the created document. `None` if an error occurs.


  Translate multiple documents:

  ```python
  file_paths = ["/path/tofile1.txt", "/path/tofile2.docx"]
  document_ids = cg.translate_documents(file_paths, source_lang="en", target_lang="fr")
  print(f"Document IDs: {document_ids}")
  ```

  - **file_path_list**: List of file paths to be translated. Like the single-file method, each path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.

  - **source_lang**: Source language code.
  - **target_lang**: Target language code.
  - **keep_original**: Whether to retain the original document (default is True).


  The function returns a list of dictionaries, each corresponding to a document. Each dictionary contains the following keys:

  - **`document_id`**: A unique identifier for the document.
  - **`status`**: The outcome of the translation, either `"fail"` or `"success"`.
  - **`status_code`**: A numerical status code (e.g., `2` for finished).
  - **`status_name`**: A descriptive status name (e.g., `"finished"`).

  In case of an error, the function will return `None`.




  ```python
  saved_original_path = cg.download_translation_original(document_id, save_path="./downloads", file_name="original_file.txt")
  ```


  ```python
  saved_translated_path = cg.download_translation_translated(document_id, save_path="./downloads", file_name="translated_file.txt")
  ```


  - **document_id**: The ID of the document.
  - **save_path**: The path where the document will be saved. This can be either a relative path (e.g., `.` or `../`) or an absolute path. If not provided, the file will be saved in the current working directory by default.
  - **file_name**: The name of the file to save the document as. If not provided, the default file name will be auto-generated based on the original file name, source and target languages, and document type (e.g., 'original' or 'translated').


  - The **path** where the document will be saved. If any error occurs, it will return `None`.



  Check the status of a single document:

  ```python
  status_code = cg.get_translation_document_status(document_id)
  print(status_code)
  ```


  - **document_id**: The ID of the document.


  - The **status code** (e.g., "success", "failed") if successful, `None` if an error occurs.


  Check the status of multiple documents at once:

  ```python
  document_ids = [document_id1, document_id2]
  statuses = cg.get_translation_documents_status(document_ids)
  print(statuses)
  ```


  - **document_ids**: A list of document IDs to check the status for.


  - A **list of dictionaries**, each containing:
    - `"document_id"`: Unique identifier for the document.
    - `"status"`: Translation outcome, either `"fail"` or `"success"`.
    - `"status_code"`: Numerical status code (e.g., `2` for finished, `0` for queued).
    - `"status_name"`: Status description (e.g., `"finished"`, `"queued"`).
  - In case of an error, the function will return `None`.



  Perform NER on text to extract entities:


  ```python
  entities = cg.named_entity_recognition("John Doe works at Google in Mountain View.")
  print(entities)
  ```

  - **text**: The input text for performing NER. The function will analyze the provided text to identify entities such as names, locations, dates, and other key terms.


  - A dictionary containing the original text and a list of extracted entities. The entities are structured as dictionaries with:
    - `entityType`: The type of entity (e.g., "PERSON", "GPE", "DATE", "ORG").
    - `value`: The actual entity extracted from the text.
    - `startPosition`: The start index of the entity in the text.
    - `endPosition`: The end index of the entity in the text.


  To process multiple texts at once:

  ```python
  texts = ["John Doe works at Google.", "Jane Smith is a doctor in New York."]
  entities_list = cg.named_entity_recognition_multiple_text(texts)
  print(entities_list)
  ```


  - **text_list**: A list of input texts for performing NER on multiple documents.


  - A list of dictionaries, where each dictionary contains:
    - The `text` field with the original text.
    - The `entities` field, which is a list of extracted entities for that text.



  Upload an image file and provide a descriptive prompt to perform vision-based tasks:

  ```python
  vision_result = cg.vision(prompt="Detect objects in this image", file_path="/path/to/image.jpg")
  print(vision_result)
  ```




  Upload an audio file and transcribe it:

  ```python
  document_id = cg.transcribe("/path/to/audiofile.mp3")
  ```


  - **file_path**: Path to the audio file to transcribe. This path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.
  - **diarization_config**: (Optional) Diarization configuration. Default is 1.


  - A `document_id` for the created document. `None` if an error occurs.



  Transcribe multiple documents:

  ```python
  file_paths = ["/path/to/audiofile1.mp3", "/path/to/audiofile2.mp3"]
  transcription_status = cg.transcribe_multiple(file_paths)
  print(transcription_status)
  ```


  - **file_path_list**: List of paths to the audio files to transcribe. Like the single-file method, each path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.

  - **diarization_config**: (Optional) Diarization configuration. Default is 1.



  The function returns a list of dictionaries, each corresponding to a document. Each dictionary contains the following keys:

  - **`document_id`**: A unique identifier for the document.
  - **`status`**: The outcome of the translation, either `"fail"` or `"success"`.
  - **`status_code`**: A numerical status code (e.g., `2` for finished).
  - **`status_name`**: A descriptive status name (e.g., `"finished"`).

  In case of an error, the function will return `None`.



  ```python
  saved_file_path = cg.download_transcription_original_file(document_id, save_path="./transcriptions")
  ```


  ```python
  saved_srt_path = cg.download_srt_file(document_id, save_path="./subtitles")
  ```


  ```python
  transcription_text_path = cg.download_transcription_file(document_id, save_path="./transcriptions")
  ```


  - **document_id**: The ID of the document.
  - **save_path**: The path where the document will be saved. This can be either a relative path (e.g., `.` or `../`) or an absolute path. If not provided, the file will be saved in the current working directory by default.
  - **file_name**: Name for the saved file. If not provided, it will be auto-generated based on the original file name and document type (e.g., 'original' or 'SRT').


  - The **path** where the document will be saved. If any error occurs, it will return `None`.


  To download the SRT text directly without saving it to a file, use `download_srt`:

  ```python
  srt_text = cg.download_srt(document_id)
  print(srt_text)
  ```


  - **document_id**: The ID of the transcription document.


  - The **SRT text** if successful, `None` if an error occurs.





  Check the status of a single document:

  ```python
  status_code = cg.get_transcription_document_status(document_id)
  print(status_code)
  ```


  - **document_id**: The ID of the document.


  - The **status code** (e.g., "success", "failed") if successful, `None` if an error occurs.


  Check the status of multiple documents at once:


  ```python
  document_ids = [document_id1, document_id2]
  statuses = cg.get_transcription_documents_status(document_ids)
  print(statuses)
  ```


  - **document_ids**: A list of document IDs to check the status for.


  - A **list of dictionaries**, each containing:
    - `"document_id"`: Unique identifier for the document.
    - `"status"`: Translation outcome, either `"fail"` or `"success"`.
    - `"status_code"`: Numerical status code (e.g., `2` for finished, `0` for queued).
    - `"status_name"`: Status description (e.g., `"finished"`, `"queued"`).
  - In case of an error, the function will return `None`.




  Upload an file and anonimyze it:

  ```python
  document_id = cg.anomyze_document(
      '/path/to/file1.txt',
      [EntityType.ADDRESS.value],
  )
  ```


  - **file_path**: Path to the file to anonimyze. This path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.
  - **options**: List of `EntityType` values to anonymize. If not provided, no entity-based anonymization will be performed.
  - **regex**: Regular expression to match and anonymize additional custom data. If not provided, no regex-based anonymization will be performed.

  - A `document_id` for the created document. `None` if an error occurs.


  Anonimyze multiple documents:
  ```python
  documents_status = cg.anomyze_documents(
      ['/path/to/file1.txt', '/path/to/file2.txt',],
      [EntityType.PERSON.value, EntityType.WORK_OF_ART.value],
      "\\b2019\\b"
  )

  ```


  - **file_path_list**: List of paths to the files to anonimyze. Like the single-file method, each path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.
  - **options**: List of `EntityType` values to anonymize. If not provided, no entity-based anonymization will be performed.
  - **regex**: Regular expression to match and anonymize additional custom data. If not provided, no regex-based anonymization will be performed.


  The function returns a list of dictionaries, each corresponding to a document. Each dictionary contains the following keys:

  - **`document_id`**: A unique identifier for the document.
  - **`status`**: The outcome of the translation, either `"fail"` or `"success"`.
  - **`status_code`**: A numerical status code (e.g., `2` for finished).
  - **`status_name`**: A descriptive status name (e.g., `"finished"`).

  In case of an error, the function will return `None`.


  The following `EntityType` values are available for anonymization. You can specify a list of these entities when calling the anonymization methods:

  ```python
  EntityType.ADDRESS
  EntityType.CARDINAL
  EntityType.COMPANY
  EntityType.CRYPTO
  EntityType.DATE
  EntityType.DNS
  EntityType.EMAIL
  EntityType.EVENT
  EntityType.FAC
  EntityType.GPE
  EntityType.IP
  EntityType.LANGUAGE
  EntityType.LAW
  EntityType.LOC
  EntityType.MONEY
  EntityType.NORP
  EntityType.ORDINAL
  EntityType.ORG
  EntityType.PERCENT
  EntityType.PERSON
  EntityType.PHONE
  EntityType.PRODUCT
  EntityType.QUANTITY
  EntityType.TIME
  EntityType.WORK_OF_ART
  ```



  ```python
  saved_file_path = cg.download_anonimyzed_original_documnet(document_id, save_path="./downloads",file_name="original")
  ```

  ```python
  saved_srt_path = cg.download_anonimyzed_documnet(document_id, save_path="./subtitles",file_name="original")
  ```


  - **document_id**: The ID of the document.
  - **save_path**: The path where the document will be saved. This can be either a relative path (e.g., `.` or `../`) or an absolute path. If not provided, the file will be saved in the current working directory by default.
  - **file_name**: Name for the saved file. If not provided, it will be auto-generated based on the original file name and document type (e.g., 'original' or 'anonymized').


  - The **path** where the document will be saved. If any error occurs, it will return `None`.




  Check the status of a single document:


  ```python
  document_status = cg.get_anonimyzed_document_status(document_id)
  print(document_status)
  ```


  - **document_id**: The ID of the document.


  - The **status code** (e.g., "success", "failed") if successful, `None` if an error occurs.


  Check the status of multiple documents at once:


  ```python
  document_ids = [document_id1, document_id2]
  statuses = cg.get_anonimyzed_documents_status(document_ids)
  print(statuses)
  ```


  - **document_ids**: A list of document IDs to check the status for.


  - A **list of dictionaries**, each containing:
    - `"document_id"`: Unique identifier for the document.
    - `"status"`: Translation outcome, either `"fail"` or `"success"`.
    - `"status_code"`: Numerical status code (e.g., `2` for finished, `0` for queued).
    - `"status_name"`: Status description (e.g., `"finished"`, `"queued"`).
  - In case of an error, the function will return `None`.




  Create a new document collection:

  ```python
  collection_id = cg.create_collection(name="My Collection", description="A collection of legal documents")
  print(f"Collection created with ID: {collection_id}")
  ```

  Upload a document to the collection:

  ```python
  upload_success = cg.upload_to_collection(collection_id, "/path/to/document.pdf")
  print(f"Upload successful: {upload_success}")
  ```



  Fetch the health status of various system components:

  ```python
  heartbeat_status = cg.heartbeat()
  print(heartbeat_status)
  ```


  - None


  - **Dictionary**: A dictionary with the status of each component. Each key represents a system component (e.g., `"SQL Server"`, `"Oracle DB"`) and contains the following fields:
    - **status**: The health status of the component, typically `"UP"` or `"DOWN"`.
    - **message**: A message providing more details about the component's health.
    - **sinceTimestamp**: A timestamp indicating when the status was last updated.



  ```python
  health_status = cg.healthcheck()
  print(health_status)
  ```


  - None


  - **List of Tuples**: The returned list contains tuples where each tuple represents a system resource and its health status. Each tuple contains:
    - **resource name**: The name of the resource (e.g., `"SQL Server"`, `"Oracle DB"`, `"Training GRPC"`, `"Triton Grpc Server"`).
    - **status**: The health status of the resource, which can be either `"UP"` (healthy) or `"DOWN"` (unhealthy).


  ```python
  [
    ("SQL Server", "UP"),
    ("Oracle DB", "UP"),
    ("Training GRPC", "DOWN"),
    ("Triton Grpc Server", "UP")
  ]
  ```




  Extract paragraphs from raw text:

  ```python
  paragraphs = cg.text_extraction("This is a sample text that needs to be divided into paragraphs.")
  print(paragraphs)
  ```

  Extract text from a document file:

  ```python
  extracted_text = cg.text_extraction_from_document("/path/to/document.pdf")
  print(extracted_text)
  ```



  Contributions are welcome! Please fork the repository and submit a pull request.



  This project is licensed under the MIT License.


pkgId: 65f0285ae793dd55a20421fb760b587f0b7c09107229b939938f39350a44cc89
name: python-castleguard-sdk
arch: src
version: 0.17
epoch: 0
release: 1
summary: A Python SDK for interacting with CastleGuard APIs
url: https://pypi.org/project/castleguard-sdk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castleguard-sdk-0.17-1.src.rpm
checksum_type: sha256
description:
  The CastleGuard Python SDK provides a convenient interface to interact with CastleGuard's API. This SDK allows you to authenticate, log messages, interact with the chatbot, translate text, perform named entity recognition (NER), transcribe audio files, manage document collections, work with vision-based models, and more.



  - **Authentication**: Easily authenticate and retrieve an access token to interact with CastleGuard APIs.
  - **Logging**: Send log messages to CastleGuard's logging endpoint.
  - **Chatbot Integration**: Interact with CastleGuard's chatbot to generate responses based on input prompts, with or without document collections.
  - **Translation**: Translate text between languages, supporting English and French.
  - **Named Entity Recognition (NER)**: Perform NER on text to extract important entities.
  - **Vision**: Perform image-based tasks using a vision model by uploading an image with a descriptive prompt.
  - **Transcription**: Upload and transcribe audio files, and download SRT subtitles.
  - **Collections**: Manage document collections by creating, uploading, and retrieving the status of files.
  - **Heartbeat**: Fetch the health status of various system components.
  - **Text Extraction**: Extract paragraphs from raw text or extract text from a document file.



  Install the package via pip:

  ```bash
  pip install castleguard-sdk
  ```





  To begin, initialize the `CastleGuard` class with your API credentials:

  ```python
  from castleguard_sdk import CastleGuard

  cg = CastleGuard(base_url='https://your-castleguard-url', username='your-username', password='your-password')
  ```



  The class automatically handles authentication. The access token is retrieved upon initialization and used for subsequent API requests.



  Log a message with a specific log level (default is 1):

  ```python
  cg.log("This is a log message", logLevel=2)
  ```



  Send a prompt to the chatbot and get a response:

  ```python
  response, chat_id = cg.chat("What is the weather today?")
  print(response)
  ```

  You can also chat within the context of a document collection:

  ```python
  response, chat_id = cg.chat_with_collection("Summarize the document", collection_id="your-collection-id")
  print(response)
  ```




  Translate a single text with `translate_text`:

  ```python
  translated_text = cg.translate_text("Hello, how are you?", source_lang="en", target_lang="fr")
  print(translated_text)
  ```


  - **text**: The text string to be translated.
  - **source_lang**: Source language code.
  - **target_lang**: Target language code.


  - The translated text. Returns `None` if an error occurs.


  Translate multiple texts simultaneously with `translate_texts`:

  ```python
  texts = ["Hello", "Goodbye"]
  source_langs = ["en", "eng"]
  target_langs = ["fr", "deu"]
  translated_texts = cg.translate_texts(texts, source_langs, target_langs)
  print(translated_texts)
  ```


  - **texts**: List of text strings to translate.
  - **source_langs**: List of source language codes, one for each text.
  - **target_langs**: List of target language codes, one for each text.


  - A list of dictionaries, where each dictionary contains:
    - **originalText**: The original text provided.
    - **translatedText**: The translated text.
    - **sourceLanguageCode**: The source language code.
    - **targetLanguageCode**: The target language code.

    Returns `None` if an error occurs.


  **Note**: The lists for `texts`, `source_langs`, and `target_langs` must be of equal length.


  Upload an audio file and translate it:

  ```python
  document_id = cg.translate_document("path/to/file", source_lang="en", target_lang="fr")
  print(f"Document ID: {document_id}")
  ```


  - **file_path**: Path to the file to be translated. This path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.
  - **source_lang**: Source language code.
  - **target_lang**: Target language code.
  - **keep_original**: Whether to retain the original document (default is True).


  - A `document_id` for the created document. `None` if an error occurs.


  Translate multiple documents:

  ```python
  file_paths = ["/path/tofile1.txt", "/path/tofile2.docx"]
  document_ids = cg.translate_documents(file_paths, source_lang="en", target_lang="fr")
  print(f"Document IDs: {document_ids}")
  ```

  - **file_path_list**: List of file paths to be translated. Like the single-file method, each path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.

  - **source_lang**: Source language code.
  - **target_lang**: Target language code.
  - **keep_original**: Whether to retain the original document (default is True).


  The function returns a list of dictionaries, each corresponding to a document. Each dictionary contains the following keys:

  - **`document_id`**: A unique identifier for the document.
  - **`status`**: The outcome of the translation, either `"fail"` or `"success"`.
  - **`status_code`**: A numerical status code (e.g., `2` for finished).
  - **`status_name`**: A descriptive status name (e.g., `"finished"`).

  In case of an error, the function will return `None`.




  ```python
  saved_original_path = cg.download_translation_original(document_id, save_path="./downloads", file_name="original_file.txt")
  ```


  ```python
  saved_translated_path = cg.download_translation_translated(document_id, save_path="./downloads", file_name="translated_file.txt")
  ```


  - **document_id**: The ID of the document.
  - **save_path**: The path where the document will be saved. This can be either a relative path (e.g., `.` or `../`) or an absolute path. If not provided, the file will be saved in the current working directory by default.
  - **file_name**: The name of the file to save the document as. If not provided, the default file name will be auto-generated based on the original file name, source and target languages, and document type (e.g., 'original' or 'translated').


  - The **path** where the document will be saved. If any error occurs, it will return `None`.



  Check the status of a single document:

  ```python
  status_code = cg.get_translation_document_status(document_id)
  print(status_code)
  ```


  - **document_id**: The ID of the document.


  - The **status code** (e.g., "success", "failed") if successful, `None` if an error occurs.


  Check the status of multiple documents at once:

  ```python
  document_ids = [document_id1, document_id2]
  statuses = cg.get_translation_documents_status(document_ids)
  print(statuses)
  ```


  - **document_ids**: A list of document IDs to check the status for.


  - A **list of dictionaries**, each containing:
    - `"document_id"`: Unique identifier for the document.
    - `"status"`: Translation outcome, either `"fail"` or `"success"`.
    - `"status_code"`: Numerical status code (e.g., `2` for finished, `0` for queued).
    - `"status_name"`: Status description (e.g., `"finished"`, `"queued"`).
  - In case of an error, the function will return `None`.



  Perform NER on text to extract entities:


  ```python
  entities = cg.named_entity_recognition("John Doe works at Google in Mountain View.")
  print(entities)
  ```

  - **text**: The input text for performing NER. The function will analyze the provided text to identify entities such as names, locations, dates, and other key terms.


  - A dictionary containing the original text and a list of extracted entities. The entities are structured as dictionaries with:
    - `entityType`: The type of entity (e.g., "PERSON", "GPE", "DATE", "ORG").
    - `value`: The actual entity extracted from the text.
    - `startPosition`: The start index of the entity in the text.
    - `endPosition`: The end index of the entity in the text.


  To process multiple texts at once:

  ```python
  texts = ["John Doe works at Google.", "Jane Smith is a doctor in New York."]
  entities_list = cg.named_entity_recognition_multiple_text(texts)
  print(entities_list)
  ```


  - **text_list**: A list of input texts for performing NER on multiple documents.


  - A list of dictionaries, where each dictionary contains:
    - The `text` field with the original text.
    - The `entities` field, which is a list of extracted entities for that text.



  Upload an image file and provide a descriptive prompt to perform vision-based tasks:

  ```python
  vision_result = cg.vision(prompt="Detect objects in this image", file_path="/path/to/image.jpg")
  print(vision_result)
  ```




  Upload an audio file and transcribe it:

  ```python
  document_id = cg.transcribe("/path/to/audiofile.mp3")
  ```


  - **file_path**: Path to the audio file to transcribe. This path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.
  - **diarization_config**: (Optional) Diarization configuration. Default is 1.


  - A `document_id` for the created document. `None` if an error occurs.



  Transcribe multiple documents:

  ```python
  file_paths = ["/path/to/audiofile1.mp3", "/path/to/audiofile2.mp3"]
  transcription_status = cg.transcribe_multiple(file_paths)
  print(transcription_status)
  ```


  - **file_path_list**: List of paths to the audio files to transcribe. Like the single-file method, each path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.

  - **diarization_config**: (Optional) Diarization configuration. Default is 1.



  The function returns a list of dictionaries, each corresponding to a document. Each dictionary contains the following keys:

  - **`document_id`**: A unique identifier for the document.
  - **`status`**: The outcome of the translation, either `"fail"` or `"success"`.
  - **`status_code`**: A numerical status code (e.g., `2` for finished).
  - **`status_name`**: A descriptive status name (e.g., `"finished"`).

  In case of an error, the function will return `None`.



  ```python
  saved_file_path = cg.download_transcription_original_file(document_id, save_path="./transcriptions")
  ```


  ```python
  saved_srt_path = cg.download_srt_file(document_id, save_path="./subtitles")
  ```


  ```python
  transcription_text_path = cg.download_transcription_file(document_id, save_path="./transcriptions")
  ```


  - **document_id**: The ID of the document.
  - **save_path**: The path where the document will be saved. This can be either a relative path (e.g., `.` or `../`) or an absolute path. If not provided, the file will be saved in the current working directory by default.
  - **file_name**: Name for the saved file. If not provided, it will be auto-generated based on the original file name and document type (e.g., 'original' or 'SRT').


  - The **path** where the document will be saved. If any error occurs, it will return `None`.


  To download the SRT text directly without saving it to a file, use `download_srt`:

  ```python
  srt_text = cg.download_srt(document_id)
  print(srt_text)
  ```


  - **document_id**: The ID of the transcription document.


  - The **SRT text** if successful, `None` if an error occurs.





  Check the status of a single document:

  ```python
  status_code = cg.get_transcription_document_status(document_id)
  print(status_code)
  ```


  - **document_id**: The ID of the document.


  - The **status code** (e.g., "success", "failed") if successful, `None` if an error occurs.


  Check the status of multiple documents at once:


  ```python
  document_ids = [document_id1, document_id2]
  statuses = cg.get_transcription_documents_status(document_ids)
  print(statuses)
  ```


  - **document_ids**: A list of document IDs to check the status for.


  - A **list of dictionaries**, each containing:
    - `"document_id"`: Unique identifier for the document.
    - `"status"`: Translation outcome, either `"fail"` or `"success"`.
    - `"status_code"`: Numerical status code (e.g., `2` for finished, `0` for queued).
    - `"status_name"`: Status description (e.g., `"finished"`, `"queued"`).
  - In case of an error, the function will return `None`.




  Upload an file and anonymize it:

  ```python
  document_id = cg.anonymize_document(
      '/path/to/file1.txt',
      [EntityType.ADDRESS.value],
  )
  ```


  - **file_path**: Path to the file to anonymize. This path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.
  - **options**: List of `EntityType` values to anonymize. If not provided, no entity-based anonymization will be performed.
  - **regex**: Regular expression to match and anonymize additional custom data. If not provided, no regex-based anonymization will be performed.

  - A `document_id` for the created document. `None` if an error occurs.


  Anonymize multiple documents:
  ```python
  documents_status = cg.anonymize_documents(
      ['/path/to/file1.txt', '/path/to/file2.txt',],
      [EntityType.PERSON.value, EntityType.WORK_OF_ART.value],
      "\\b2019\\b"
  )

  ```


  - **file_path_list**: List of paths to the files to anonymize. Like the single-file method, each path can be relative to the file where this function is called (e.g., `.` or `../`) or an absolute path.
  - **options**: List of `EntityType` values to anonymize. If not provided, no entity-based anonymization will be performed.
  - **regex**: Regular expression to match and anonymize additional custom data. If not provided, no regex-based anonymization will be performed.


  The function returns a list of dictionaries, each corresponding to a document. Each dictionary contains the following keys:

  - **`document_id`**: A unique identifier for the document.
  - **`status`**: The outcome of the translation, either `"fail"` or `"success"`.
  - **`status_code`**: A numerical status code (e.g., `2` for finished).
  - **`status_name`**: A descriptive status name (e.g., `"finished"`).

  In case of an error, the function will return `None`.


  The following `EntityType` values are available for anonymization. You can specify a list of these entities when calling the anonymization methods:

  ```python
  EntityType.ADDRESS
  EntityType.CARDINAL
  EntityType.COMPANY
  EntityType.CRYPTO
  EntityType.DATE
  EntityType.DNS
  EntityType.EMAIL
  EntityType.EVENT
  EntityType.FAC
  EntityType.GPE
  EntityType.IP
  EntityType.LANGUAGE
  EntityType.LAW
  EntityType.LOC
  EntityType.MONEY
  EntityType.NORP
  EntityType.ORDINAL
  EntityType.ORG
  EntityType.PERCENT
  EntityType.PERSON
  EntityType.PHONE
  EntityType.PRODUCT
  EntityType.QUANTITY
  EntityType.TIME
  EntityType.WORK_OF_ART
  ```



  ```python
  saved_file_path = cg.download_anonymized_original_documnet(document_id, save_path="./downloads",file_name="original")
  ```

  ```python
  saved_srt_path = cg.download_anonymized_documnet(document_id, save_path="./subtitles",file_name="original")
  ```


  - **document_id**: The ID of the document.
  - **save_path**: The path where the document will be saved. This can be either a relative path (e.g., `.` or `../`) or an absolute path. If not provided, the file will be saved in the current working directory by default.
  - **file_name**: Name for the saved file. If not provided, it will be auto-generated based on the original file name and document type (e.g., 'original' or 'anonymized').


  - The **path** where the document will be saved. If any error occurs, it will return `None`.




  Check the status of a single document:


  ```python
  document_status = cg.get_anonymized_document_status(document_id)
  print(document_status)
  ```


  - **document_id**: The ID of the document.


  - The **status code** (e.g., "success", "failed") if successful, `None` if an error occurs.


  Check the status of multiple documents at once:


  ```python
  document_ids = [document_id1, document_id2]
  statuses = cg.get_anonymized_documents_status(document_ids)
  print(statuses)
  ```


  - **document_ids**: A list of document IDs to check the status for.


  - A **list of dictionaries**, each containing:
    - `"document_id"`: Unique identifier for the document.
    - `"status"`: Translation outcome, either `"fail"` or `"success"`.
    - `"status_code"`: Numerical status code (e.g., `2` for finished, `0` for queued).
    - `"status_name"`: Status description (e.g., `"finished"`, `"queued"`).
  - In case of an error, the function will return `None`.




  Create a new document collection:

  ```python
  collection_id = cg.create_collection(name="My Collection", description="A collection of legal documents")
  print(f"Collection created with ID: {collection_id}")
  ```

  Upload a document to the collection:

  ```python
  upload_success = cg.upload_to_collection(collection_id, "/path/to/document.pdf")
  print(f"Upload successful: {upload_success}")
  ```



  Fetch the health status of various system components:

  ```python
  heartbeat_status = cg.heartbeat()
  print(heartbeat_status)
  ```


  - None


  - **Dictionary**: A dictionary with the status of each component. Each key represents a system component (e.g., `"SQL Server"`, `"Oracle DB"`) and contains the following fields:
    - **status**: The health status of the component, typically `"UP"` or `"DOWN"`.
    - **message**: A message providing more details about the component's health.
    - **sinceTimestamp**: A timestamp indicating when the status was last updated.



  ```python
  health_status = cg.healthcheck()
  print(health_status)
  ```


  - None


  - **List of Tuples**: The returned list contains tuples where each tuple represents a system resource and its health status. Each tuple contains:
    - **resource name**: The name of the resource (e.g., `"SQL Server"`, `"Oracle DB"`, `"Training GRPC"`, `"Triton Grpc Server"`).
    - **status**: The health status of the resource, which can be either `"UP"` (healthy) or `"DOWN"` (unhealthy).


  ```python
  [
    ("SQL Server", "UP"),
    ("Oracle DB", "UP"),
    ("Training GRPC", "DOWN"),
    ("Triton Grpc Server", "UP")
  ]
  ```




  Extract paragraphs from raw text:

  ```python
  paragraphs = cg.text_extraction("This is a sample text that needs to be divided into paragraphs.")
  print(paragraphs)
  ```

  Extract text from a document file:

  ```python
  extracted_text = cg.text_extraction_from_document("/path/to/document.pdf")
  print(extracted_text)
  ```



  Contributions are welcome! Please fork the repository and submit a pull request.



  This project is licensed under the MIT License.


pkgId: f4103a950aa2b97765309b5677704eebd4f27267064dc52bfb93e797542dff54
name: python-castor-extractor
arch: src
version: 0.20.7
epoch: 0
release: 1
summary: Extract your metadata assets.
url: https://www.castordoc.com/
rpm_license: EULA
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castor-extractor-0.20.7-1.src.rpm
checksum_type: sha256
description:
  This library contains utilities to extract your metadata assets into `JSON` or `CSV` files, on your local machine.
  After extraction, those files can be pushed to Castor for ingestion.

  - Visualization assets are typically:
    - `dashboards`
    - `users`
    - `folders`
    - ...

  - Warehouse assets are typically:
    - `databases`
    - `schemas`
    - `tables`
    - `columns`
    - `queries`
    - ...

  It also embeds utilities to help you push your metadata to Castor:

  - `File Checker` to validate your [generic](https://docs.castordoc.com/integrations/data-warehouses/generic-warehouse) CSV files before pushing to Castor
  - `Uploader` to push extracted files to our Google-Cloud-Storage (GCS)



  - [Castor Extractor](#castor-extractor-)
    - [Table of contents](#table-of-contents)
    - [Installation](#installation)
      - [Create castor-env](#create-castor-env)
      - [PIP install](#pip-install)
      - [Create the output directory](#create-the-output-directory)
    - [Contact](#contact)



  Requirements: **python3.8+**
  <img src="https://upload.wikimedia.org/wikipedia/commons/c/c3/Python-logo-notext.svg" width=20 />



  We advise to create a dedicated [Python environment](https://docs.python.org/3/library/venv.html).

  Here's an example using `Pyenv` and Python `3.8.12`:

  - Install Pyenv

  ```bash
  brew install pyenv
  brew install pyenv-virtualenv
  ```

  - [optional] Update your `.bashrc` if you encounter this [issue](https://stackoverflow.com/questions/45577194/failed-to-activate-virtualenv-with-pyenv/45578839)

  ```bash
  eval "$(pyenv init -)"
  eval "$(pyenv init --path)"
  eval "$(pyenv virtualenv-init -)"
  ```

  - [optional] Install python 3.8+

  ```bash
  pyenv versions # check your local python installations

  pyenv install -v 3.8.12 # if none of the installed versions satisfy requirements 8+
  ```

  - Create your virtual env

  ```bash
  pyenv virtualenv 3.8.12 castor-env # create a dedicated env
  pyenv shell castor-env # activate the environment


  python --version # should be `3.8.12`
  pyenv version # should be `castor-env`
  ```



  ⚠️ `castor-env` must be created AND activated first.

  ```bash
  pyenv shell castor-env
  (castor-env) $ # this means the environment is now active
  ```

  ℹ️ please upgrade `PIP` before installing Castor.

  ```bash
  pip install --upgrade pip
  ```

  Run the following command to install `castor-extractor`:

  ```bash
  pip install castor-extractor
  ```

  Depending on your use case, you can also install one of the following `extras`:

  ```bash
  pip install castor-extractor[bigquery]
  pip install castor-extractor[looker]
  pip install castor-extractor[metabase]
  pip install castor-extractor[mysql]
  pip install castor-extractor[powerbi]
  pip install castor-extractor[qlik]
  pip install castor-extractor[postgres]
  pip install castor-extractor[redshift]
  pip install castor-extractor[snowflake]
  pip install castor-extractor[sqlserver]
  pip install castor-extractor[tableau]
  ```



  ```bash
  mkdir /tmp/castor
  ```

  You will provide this path in the `extraction` scripts as follows:

  ```bash
  castor-extract-bigquery --output=/tmp/castor
  ```

  Alternatively, you can also set the following `ENV` in your `bashrc`:

  ```bash
  export CASTOR_OUTPUT_DIRECTORY="/tmp/castor"
  ````



  For any questions or bug report, contact us at [support@castordoc.com](mailto:support@castordoc.com)

  [Castor](https://castordoc.com) helps you find, understand, use your data assets






  * Metabase: fix `require_ssl` type in credentials



  * Tableau: include `site_id` in **workbooks** to build url



  * Redshift: enable extraction from a Redshift Serverless instance



  * Salesforce warehouse: `Labels` instead of `api_names` for columns



  * Looker: no longer extract `as_html` dashboard elements



  * Thoughtspot: Adding connector



  * Power BI: Improved client based on APIClient



  * Switch to Tableau revamped connector



  * Databricks: multithreading to retrieve column lineage



  * Metabase: Handle duplicate dashboards
  * Snowflake: Exclude unnamed tables from extraction
  * Bump dependencies: cryptography, setuptools



  * Metabase: Handle compatibility with older version



  * Metabase: Adding error handler on API call



  * Databricks/Salesforce: Remove deprecated client dependencies



  * Tableau Pulse: extract Metrics and Subscriptions



  - Sigma: Add SafeMode to SigmaClient



  - Reworked APIClient to unify client's behaviours

  Impacted Technologies: Sigma, Soda, Notion



  * Domo: extract datasources via cards metadata endpoint



  * Breaking change Looker CLI:

  `-u` and `--username` changed to `-c` `--client-id`

  `-p` and `--password` changed to `-s` `--client-secret`

  * Breaking change Metabase CLI:

  `-u` and `--username` changed to `-u` `--user`


  * Note: if you use environment variables you shouldn't be impacted



  * Qlik: improve measures extraction



  * Bumps: looker-sdk: 24, setuptools: 72



  * Linting and formatting with Ruff



  * Soda: Added Soda extractor (Castor-Managed integration only)



  * Notion: Added Notion extractor



  * Databricks: more reliable extraction of queries



  * Salesforce: extract table descriptions



  * BigQuery: introduce extended regions to extract missing queries



  * Salesforce: extract DeveloperName and tooling url



  * Fix environment variables assignments for credentials



  * bump dependencies (minor and patches)



  * Added StatusCode handling to SafeMode



  * Bump dependencies: numpy, setuptools, tableauserverclient



  * Dashboarding technologies : Reworked credentials using Pydantic



  * Snowflake, Synapse, Redshift: Remove default_value from the extracted column



  * Sigma: Add `input-table`, `pivot-table` and `viz` in the list of supported **Elements**



  * Databricks: extract tags for tables and column



  * Uploader: support multipart



  * Databricks: extract table source links



  * Uploader: redirect to the proxy, replace credentials with token



  * Tableau: extract database_name for CustomSQLTables



  * Snowflake: Extract SQL user defined function



  * Tableau: extract database_name for tables



  * Databricks: Extract lineage



  * Tableau: add extra fields to optimise storage



  * Salesforce: extract sobjects Label as table name



  * Tableau: extract only fields that are necessary



  * Add compatibility with python 3.12
  * Looker: Bump looker-sdk and refactor client



  * Databricks: allow no emails on user



  * Introducing the revamped connector for Tableau



  * Salesforce: remove DeploymentStatus from EntityDefinition query



  * Salesforce: extract sobjects and fields



  * Databricks: Extract table owners



  * PowerBI: Extract pages from report



  * Systematically escape nul bytes on CSV write



  * Use pydantic v2



  * Pagination: Fix behavior when next page token is missing



  * Sigma: Regenerate token when expired



  * DBT: Add host base URL, use of BaseSettings for DbtCredentials



  * Salesforce: extract dashboard components



  * Support Databricks Unity Catalog extraction



  * Salesforce: Fix on salesforce folders URL



  * Domo client: Handles cases where datasources aren't linked to any cards



  * Domo client: No longer raise 400 exception upon API calls



  * BigQuery client: Use partitioned `creation_time` instead of `start_time`



  * Metabase ApiClient: Remove GET /api/dashboard that is deprecated



  * Add support for python 3.11



  * Salesforce client: extracting folders



  * Domo: ignore 404 errors on datasources API endpoint



  * Bump dependencies



  * Allow support of external lineage for non-generic technologies



  * Salesforce client: Renaming salesforce viz to salesforce reporting



  * Domo: enhance pages with card's datasources to support direct tables lineage



  * Salesforce client: Methods to extract users, dashboards and reports



  * Add sensitive metadata information to credentials dataclass



  * Adding Salesforce client



  * Support MySQL catalog extraction



  * Metabase: renaming of dashboard_cards for Metabase 0.48



  * Metabase: Align postgres connection to postgres connector



  * Tableau: replace luid with id during dashboards extraction



  * SQL Server: extract catalog



  * Metabase: Support postgres connection via SSL



  * Extract: remove null byte characters



  * Fixed bug with jitter argument in Retry class and added field validations



  * Tableau: extract dashboards



  * Redshift: Handle rows with mixed encodings



  * Domo: fix pagination



  * Looker : extract all Looker Explores, even if unused in Dashboards



  * Looker : remove deprecated all_looks parameter



  * Redshift : filter out queries exceeding 65535 char



  * Snowflake : Add key-pair authentication



  * Add a logging option to log to stdout



  * Stream **Looker** Looks and Dashboards directly into their destination files



  * Rollback `escapechar` in csv options



  * Add `escapechar` in csv de-serialization



  * Fetch Domo audits up to yesterday date



  * Add `escapechar` in csv serialisation



  * Pick the most recent sharded tables in `BigQuery`



  * Add retry mechanism to LookerClient when multithreading



  * pycryptodome moved as an optional dependency for extras: metabase and all



  * Fix thread pool size verification



  * Add option to fetch Looker Looks & Dashboards per folder



  * Add refreshing mechanism for Domo authentication tokens



  * Update field_size_limit in CSVFormatter



  * Add support for Domo



  * Move msal dependencies to powerbi extra



  * Retrieve column_id instead of object_id for Snowflake column tags



  * Add column tags for Snowflake



  * Remove non-used dependencies
  * Fix some import in tests
  * Clean pyproject.toml
  * Add deptry config



  * Update column data type validator



  * Use latest version of certifi (2023.7.22)



  * Linting with flakeheaven



  * Add support for Looker's `Users Attributes`



  * Add support for PowerBI's `Activity Events`



  * Fix Metabase DbClient url



  * Add support for Looker's `ContentViews`



  * Stop supporting python3.7



  * Fix on Sigma elements extraction
  * Fix BigQuery dataset extraction
  * Fix the File Checker for View DDL file



  * Added support for Sigma



  * Added support for PowerBI datasets and fields



  * Warning message to deprecate python < 3.8



  * Update enum keys for Metabase credentials



  * Extract metadata from successful dbt runs only



  * Enhance uploader to support `QUALITY` files



  * Tableau : Improve Table <> Datasource lineage



  * Allow COPY statements from Snowflake



  * Improved Field extraction in Tableau



  * Added Tableau datasource and field integration



  * Verify required admin permissions for Looker extraction



  * Constraint `setuptools` explicitly added



  * Constrain `google-cloud-bigquery` dependency below yanked 3.0.0



  * Add connector for dbt-cloud



  * Enhance **Looker** extraction of dashboard filters and groups with roles



  * Add **Looker** support to extract `groups`-related assets
  * Enhance **Looker** extraction of dashboard elements and users



  * Upgrade to Python 3.8
  * Upgrade dependencies



  * Introduce new extractor for visualization tool **PowerBi** with support for
    * `reports`
    * `dashboards`
    * `metadata`



  * Update package dependencies



  * Improve pagination



  * Tableau: Optional `site-id` argument for Tableau Server users



  * Fix command `file_check`



  * Fix `FileChecker` template for `GenericWarehouse.view_ddl`



  * Snowflake: extract `warehouse_size`



  * Allow to skip "App size exceeded" error while fetching Qlik measures
  * Fix missing arguments `warehouse` and `role` passing for script `extract_snowflake`



  * Patch error in Looker explore names



  * Add safe mode to **Looker**



  * Fix extras dependencies



  * Migrate package generation to poetry



  * Improved logging



  * Safe mode for bigquery and file logger



  * Add **Qlik** support to extract `connections` assets



  * Switch to engine's connect for database connections



  * Widen dependencies ranges



  * Improve support for Qlik `measures` and `lineage` and drop extraction of `qvds`



  * Add **Qlik** support to extract `measures` assets



  * Add **Qlik** support to extract `qvds` and `lineage` assets



  * Allow to use `all_looks` endpoint to retrieve looker Looks for param or env variable.



  * Allow to change Looker api timeout through param or env variable.



  * Introduce new extractor for visualization tool **Qlik** with support for
    * `spaces`
    * `users`
    * `apps`



  * Fix typo in Snowflake schema extract query



  * Fetch only distinct schemas in Snowflake warehouse



  * Use versions with range to ease dependency resolution for python 3.7 to 3.10



  * Enhance the file checker to search for prefixed files



  * Add retry for mode analytics



  * Add options to the pager:
    * `start_page`: to start pagination at another index (default to 1)
    * `stop_strategy`: to use different strategy to stop pagination (default to EMPTY_PAGE)



  * Skip snowflake columns with no name



  * Add missing metabase dependencies on Psycopg2



  * Remove top-level imports to isolate modules with different extra dependencies



  * Improved the file checker to detect repeated quotes in CSV.



  * Fix import error in `file_checker` script



  * Snowflake: discard 11 more `query_type` values when fetching queries



  * allow Looker parameters `CASTOR_LOOKER_TIMEOUT_SECOND` and `CASTOR_LOOKER_PAGE_SIZE` to be passed through environment
  variables
  * fix import paths in `castor_extractor/commands/upload.py` script
  * use `storage.Client.from_service_account_info` when `credentials` is a dictionary in `uploader/upload.py`



  * Fix links to documentation in the README



  * Fix dateutil import issue



  First version of Castor Extractor, including:

  * Warehouse assets extraction
    * BigQuery
    * Postgres
    * Redshift
    * Snowflake

  * Visualization assets extraction
    * Looker
    * Metabase
    * Mode Analytics
    * Tableau

  * Utilities
    * Uploader to cloud-storage
    * File Checker (for generic metadata)


pkgId: 1958ab44306a27809e659527e20da177d4dbd4285241abb8560b70693f17581f
name: python-castor-extractor
arch: src
version: 0.21.3
epoch: 0
release: 1
summary: Extract your metadata assets.
url: https://www.castordoc.com/
rpm_license: EULA
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castor-extractor-0.21.3-1.src.rpm
checksum_type: sha256
description:
  This library contains utilities to extract your metadata assets into `JSON` or `CSV` files, on your local machine.
  After extraction, those files can be pushed to Castor for ingestion.

  - Visualization assets are typically:
    - `dashboards`
    - `users`
    - `folders`
    - ...

  - Warehouse assets are typically:
    - `databases`
    - `schemas`
    - `tables`
    - `columns`
    - `queries`
    - ...

  It also embeds utilities to help you push your metadata to Castor:

  - `File Checker` to validate your [generic](https://docs.castordoc.com/integrations/data-warehouses/generic-warehouse) CSV files before pushing to Castor
  - `Uploader` to push extracted files to our Google-Cloud-Storage (GCS)



  - [Castor Extractor](#castor-extractor-)
    - [Table of contents](#table-of-contents)
    - [Installation](#installation)
      - [Create castor-env](#create-castor-env)
      - [PIP install](#pip-install)
      - [Create the output directory](#create-the-output-directory)
    - [Contact](#contact)



  Requirements: **python3.8+**
  <img src="https://upload.wikimedia.org/wikipedia/commons/c/c3/Python-logo-notext.svg" width=20 />



  We advise to create a dedicated [Python environment](https://docs.python.org/3/library/venv.html).

  Here's an example using `Pyenv` and Python `3.8.12`:

  - Install Pyenv

  ```bash
  brew install pyenv
  brew install pyenv-virtualenv
  ```

  - [optional] Update your `.bashrc` if you encounter this [issue](https://stackoverflow.com/questions/45577194/failed-to-activate-virtualenv-with-pyenv/45578839)

  ```bash
  eval "$(pyenv init -)"
  eval "$(pyenv init --path)"
  eval "$(pyenv virtualenv-init -)"
  ```

  - [optional] Install python 3.8+

  ```bash
  pyenv versions # check your local python installations

  pyenv install -v 3.8.12 # if none of the installed versions satisfy requirements 8+
  ```

  - Create your virtual env

  ```bash
  pyenv virtualenv 3.8.12 castor-env # create a dedicated env
  pyenv shell castor-env # activate the environment


  python --version # should be `3.8.12`
  pyenv version # should be `castor-env`
  ```



  ⚠️ `castor-env` must be created AND activated first.

  ```bash
  pyenv shell castor-env
  (castor-env) $ # this means the environment is now active
  ```

  ℹ️ please upgrade `PIP` before installing Castor.

  ```bash
  pip install --upgrade pip
  ```

  Run the following command to install `castor-extractor`:

  ```bash
  pip install castor-extractor
  ```

  Depending on your use case, you can also install one of the following `extras`:

  ```bash
  pip install castor-extractor[bigquery]
  pip install castor-extractor[looker]
  pip install castor-extractor[metabase]
  pip install castor-extractor[mysql]
  pip install castor-extractor[powerbi]
  pip install castor-extractor[qlik]
  pip install castor-extractor[postgres]
  pip install castor-extractor[redshift]
  pip install castor-extractor[snowflake]
  pip install castor-extractor[sqlserver]
  pip install castor-extractor[tableau]
  ```



  ```bash
  mkdir /tmp/castor
  ```

  You will provide this path in the `extraction` scripts as follows:

  ```bash
  castor-extract-bigquery --output=/tmp/castor
  ```

  Alternatively, you can also set the following `ENV` in your `bashrc`:

  ```bash
  export CASTOR_OUTPUT_DIRECTORY="/tmp/castor"
  ````



  For any questions or bug report, contact us at [support@castordoc.com](mailto:support@castordoc.com)

  [Castor](https://castordoc.com) helps you find, understand, use your data assets






  * Tableau: Fix metrics definition url



  * Adding fetch method for confluence client



  * Warning message to deprecate python < 3.9



  * Confluence: Added Confluence extractor



  * bump dependencies (minor and patches)



  * Metabase: fix `require_ssl` type in credentials



  * Tableau: include `site_id` in **workbooks** to build url



  * Redshift: enable extraction from a Redshift Serverless instance



  * Salesforce warehouse: `Labels` instead of `api_names` for columns



  * Looker: no longer extract `as_html` dashboard elements



  * Thoughtspot: Adding connector



  * Power BI: Improved client based on APIClient



  * Switch to Tableau revamped connector



  * Databricks: multithreading to retrieve column lineage



  * Metabase: Handle duplicate dashboards
  * Snowflake: Exclude unnamed tables from extraction
  * Bump dependencies: cryptography, setuptools



  * Metabase: Handle compatibility with older version



  * Metabase: Adding error handler on API call



  * Databricks/Salesforce: Remove deprecated client dependencies



  * Tableau Pulse: extract Metrics and Subscriptions



  - Sigma: Add SafeMode to SigmaClient



  - Reworked APIClient to unify client's behaviours

  Impacted Technologies: Sigma, Soda, Notion



  * Domo: extract datasources via cards metadata endpoint



  * Breaking change Looker CLI:

  `-u` and `--username` changed to `-c` `--client-id`

  `-p` and `--password` changed to `-s` `--client-secret`

  * Breaking change Metabase CLI:

  `-u` and `--username` changed to `-u` `--user`


  * Note: if you use environment variables you shouldn't be impacted



  * Qlik: improve measures extraction



  * Bumps: looker-sdk: 24, setuptools: 72



  * Linting and formatting with Ruff



  * Soda: Added Soda extractor (Castor-Managed integration only)



  * Notion: Added Notion extractor



  * Databricks: more reliable extraction of queries



  * Salesforce: extract table descriptions



  * BigQuery: introduce extended regions to extract missing queries



  * Salesforce: extract DeveloperName and tooling url



  * Fix environment variables assignments for credentials



  * bump dependencies (minor and patches)



  * Added StatusCode handling to SafeMode



  * Bump dependencies: numpy, setuptools, tableauserverclient



  * Dashboarding technologies : Reworked credentials using Pydantic



  * Snowflake, Synapse, Redshift: Remove default_value from the extracted column



  * Sigma: Add `input-table`, `pivot-table` and `viz` in the list of supported **Elements**



  * Databricks: extract tags for tables and column



  * Uploader: support multipart



  * Databricks: extract table source links



  * Uploader: redirect to the proxy, replace credentials with token



  * Tableau: extract database_name for CustomSQLTables



  * Snowflake: Extract SQL user defined function



  * Tableau: extract database_name for tables



  * Databricks: Extract lineage



  * Tableau: add extra fields to optimise storage



  * Salesforce: extract sobjects Label as table name



  * Tableau: extract only fields that are necessary



  * Add compatibility with python 3.12
  * Looker: Bump looker-sdk and refactor client



  * Databricks: allow no emails on user



  * Introducing the revamped connector for Tableau



  * Salesforce: remove DeploymentStatus from EntityDefinition query



  * Salesforce: extract sobjects and fields



  * Databricks: Extract table owners



  * PowerBI: Extract pages from report



  * Systematically escape nul bytes on CSV write



  * Use pydantic v2



  * Pagination: Fix behavior when next page token is missing



  * Sigma: Regenerate token when expired



  * DBT: Add host base URL, use of BaseSettings for DbtCredentials



  * Salesforce: extract dashboard components



  * Support Databricks Unity Catalog extraction



  * Salesforce: Fix on salesforce folders URL



  * Domo client: Handles cases where datasources aren't linked to any cards



  * Domo client: No longer raise 400 exception upon API calls



  * BigQuery client: Use partitioned `creation_time` instead of `start_time`



  * Metabase ApiClient: Remove GET /api/dashboard that is deprecated



  * Add support for python 3.11



  * Salesforce client: extracting folders



  * Domo: ignore 404 errors on datasources API endpoint



  * Bump dependencies



  * Allow support of external lineage for non-generic technologies



  * Salesforce client: Renaming salesforce viz to salesforce reporting



  * Domo: enhance pages with card's datasources to support direct tables lineage



  * Salesforce client: Methods to extract users, dashboards and reports



  * Add sensitive metadata information to credentials dataclass



  * Adding Salesforce client



  * Support MySQL catalog extraction



  * Metabase: renaming of dashboard_cards for Metabase 0.48



  * Metabase: Align postgres connection to postgres connector



  * Tableau: replace luid with id during dashboards extraction



  * SQL Server: extract catalog



  * Metabase: Support postgres connection via SSL



  * Extract: remove null byte characters



  * Fixed bug with jitter argument in Retry class and added field validations



  * Tableau: extract dashboards



  * Redshift: Handle rows with mixed encodings



  * Domo: fix pagination



  * Looker : extract all Looker Explores, even if unused in Dashboards



  * Looker : remove deprecated all_looks parameter



  * Redshift : filter out queries exceeding 65535 char



  * Snowflake : Add key-pair authentication



  * Add a logging option to log to stdout



  * Stream **Looker** Looks and Dashboards directly into their destination files



  * Rollback `escapechar` in csv options



  * Add `escapechar` in csv de-serialization



  * Fetch Domo audits up to yesterday date



  * Add `escapechar` in csv serialisation



  * Pick the most recent sharded tables in `BigQuery`



  * Add retry mechanism to LookerClient when multithreading



  * pycryptodome moved as an optional dependency for extras: metabase and all



  * Fix thread pool size verification



  * Add option to fetch Looker Looks & Dashboards per folder



  * Add refreshing mechanism for Domo authentication tokens



  * Update field_size_limit in CSVFormatter



  * Add support for Domo



  * Move msal dependencies to powerbi extra



  * Retrieve column_id instead of object_id for Snowflake column tags



  * Add column tags for Snowflake



  * Remove non-used dependencies
  * Fix some import in tests
  * Clean pyproject.toml
  * Add deptry config



  * Update column data type validator



  * Use latest version of certifi (2023.7.22)



  * Linting with flakeheaven



  * Add support for Looker's `Users Attributes`



  * Add support for PowerBI's `Activity Events`



  * Fix Metabase DbClient url



  * Add support for Looker's `ContentViews`



  * Stop supporting python3.7



  * Fix on Sigma elements extraction
  * Fix BigQuery dataset extraction
  * Fix the File Checker for View DDL file



  * Added support for Sigma



  * Added support for PowerBI datasets and fields



  * Warning message to deprecate python < 3.8



  * Update enum keys for Metabase credentials



  * Extract metadata from successful dbt runs only



  * Enhance uploader to support `QUALITY` files



  * Tableau : Improve Table <> Datasource lineage



  * Allow COPY statements from Snowflake



  * Improved Field extraction in Tableau



  * Added Tableau datasource and field integration



  * Verify required admin permissions for Looker extraction



  * Constraint `setuptools` explicitly added



  * Constrain `google-cloud-bigquery` dependency below yanked 3.0.0



  * Add connector for dbt-cloud



  * Enhance **Looker** extraction of dashboard filters and groups with roles



  * Add **Looker** support to extract `groups`-related assets
  * Enhance **Looker** extraction of dashboard elements and users



  * Upgrade to Python 3.8
  * Upgrade dependencies



  * Introduce new extractor for visualization tool **PowerBi** with support for
    * `reports`
    * `dashboards`
    * `metadata`



  * Update package dependencies



  * Improve pagination



  * Tableau: Optional `site-id` argument for Tableau Server users



  * Fix command `file_check`



  * Fix `FileChecker` template for `GenericWarehouse.view_ddl`



  * Snowflake: extract `warehouse_size`



  * Allow to skip "App size exceeded" error while fetching Qlik measures
  * Fix missing arguments `warehouse` and `role` passing for script `extract_snowflake`



  * Patch error in Looker explore names



  * Add safe mode to **Looker**



  * Fix extras dependencies



  * Migrate package generation to poetry



  * Improved logging



  * Safe mode for bigquery and file logger



  * Add **Qlik** support to extract `connections` assets



  * Switch to engine's connect for database connections



  * Widen dependencies ranges



  * Improve support for Qlik `measures` and `lineage` and drop extraction of `qvds`



  * Add **Qlik** support to extract `measures` assets



  * Add **Qlik** support to extract `qvds` and `lineage` assets



  * Allow to use `all_looks` endpoint to retrieve looker Looks for param or env variable.



  * Allow to change Looker api timeout through param or env variable.



  * Introduce new extractor for visualization tool **Qlik** with support for
    * `spaces`
    * `users`
    * `apps`



  * Fix typo in Snowflake schema extract query



  * Fetch only distinct schemas in Snowflake warehouse



  * Use versions with range to ease dependency resolution for python 3.7 to 3.10



  * Enhance the file checker to search for prefixed files



  * Add retry for mode analytics



  * Add options to the pager:
    * `start_page`: to start pagination at another index (default to 1)
    * `stop_strategy`: to use different strategy to stop pagination (default to EMPTY_PAGE)



  * Skip snowflake columns with no name



  * Add missing metabase dependencies on Psycopg2



  * Remove top-level imports to isolate modules with different extra dependencies



  * Improved the file checker to detect repeated quotes in CSV.



  * Fix import error in `file_checker` script



  * Snowflake: discard 11 more `query_type` values when fetching queries



  * allow Looker parameters `CASTOR_LOOKER_TIMEOUT_SECOND` and `CASTOR_LOOKER_PAGE_SIZE` to be passed through environment
  variables
  * fix import paths in `castor_extractor/commands/upload.py` script
  * use `storage.Client.from_service_account_info` when `credentials` is a dictionary in `uploader/upload.py`



  * Fix links to documentation in the README



  * Fix dateutil import issue



  First version of Castor Extractor, including:

  * Warehouse assets extraction
    * BigQuery
    * Postgres
    * Redshift
    * Snowflake

  * Visualization assets extraction
    * Looker
    * Metabase
    * Mode Analytics
    * Tableau

  * Utilities
    * Uploader to cloud-storage
    * File Checker (for generic metadata)


pkgId: 80291f076c88e6abff84fc334b394d56be7b4e0bc3f8221cfc3e4a9fa12025a8
name: python-castor-extractor
arch: src
version: 0.21.5
epoch: 0
release: 1
summary: Extract your metadata assets.
url: https://www.castordoc.com/
rpm_license: EULA
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castor-extractor-0.21.5-1.src.rpm
checksum_type: sha256
description:
  This library contains utilities to extract your metadata assets into `JSON` or `CSV` files, on your local machine.
  After extraction, those files can be pushed to Castor for ingestion.

  - Visualization assets are typically:
    - `dashboards`
    - `users`
    - `folders`
    - ...

  - Warehouse assets are typically:
    - `databases`
    - `schemas`
    - `tables`
    - `columns`
    - `queries`
    - ...

  It also embeds utilities to help you push your metadata to Castor:

  - `File Checker` to validate your [generic](https://docs.castordoc.com/integrations/data-warehouses/generic-warehouse) CSV files before pushing to Castor
  - `Uploader` to push extracted files to our Google-Cloud-Storage (GCS)



  - [Castor Extractor](#castor-extractor-)
    - [Table of contents](#table-of-contents)
    - [Installation](#installation)
      - [Create castor-env](#create-castor-env)
      - [PIP install](#pip-install)
      - [Create the output directory](#create-the-output-directory)
    - [Contact](#contact)



  Requirements: **python3.8+**
  <img src="https://upload.wikimedia.org/wikipedia/commons/c/c3/Python-logo-notext.svg" width=20 />



  We advise to create a dedicated [Python environment](https://docs.python.org/3/library/venv.html).

  Here's an example using `Pyenv` and Python `3.8.12`:

  - Install Pyenv

  ```bash
  brew install pyenv
  brew install pyenv-virtualenv
  ```

  - [optional] Update your `.bashrc` if you encounter this [issue](https://stackoverflow.com/questions/45577194/failed-to-activate-virtualenv-with-pyenv/45578839)

  ```bash
  eval "$(pyenv init -)"
  eval "$(pyenv init --path)"
  eval "$(pyenv virtualenv-init -)"
  ```

  - [optional] Install python 3.8+

  ```bash
  pyenv versions # check your local python installations

  pyenv install -v 3.8.12 # if none of the installed versions satisfy requirements 8+
  ```

  - Create your virtual env

  ```bash
  pyenv virtualenv 3.8.12 castor-env # create a dedicated env
  pyenv shell castor-env # activate the environment


  python --version # should be `3.8.12`
  pyenv version # should be `castor-env`
  ```



  ⚠️ `castor-env` must be created AND activated first.

  ```bash
  pyenv shell castor-env
  (castor-env) $ # this means the environment is now active
  ```

  ℹ️ please upgrade `PIP` before installing Castor.

  ```bash
  pip install --upgrade pip
  ```

  Run the following command to install `castor-extractor`:

  ```bash
  pip install castor-extractor
  ```

  Depending on your use case, you can also install one of the following `extras`:

  ```bash
  pip install castor-extractor[bigquery]
  pip install castor-extractor[looker]
  pip install castor-extractor[metabase]
  pip install castor-extractor[mysql]
  pip install castor-extractor[powerbi]
  pip install castor-extractor[qlik]
  pip install castor-extractor[postgres]
  pip install castor-extractor[redshift]
  pip install castor-extractor[snowflake]
  pip install castor-extractor[sqlserver]
  pip install castor-extractor[tableau]
  ```



  ```bash
  mkdir /tmp/castor
  ```

  You will provide this path in the `extraction` scripts as follows:

  ```bash
  castor-extract-bigquery --output=/tmp/castor
  ```

  Alternatively, you can also set the following `ENV` in your `bashrc`:

  ```bash
  export CASTOR_OUTPUT_DIRECTORY="/tmp/castor"
  ````



  For any questions or bug report, contact us at [support@castordoc.com](mailto:support@castordoc.com)

  [Castor](https://castordoc.com) helps you find, understand, use your data assets






  * PostgreSQL: Fix schema extraction when owner is a role without login privilege



  * Uploader: Support environment variables as settings



  * Tableau: Fix metrics definition url



  * Adding fetch method for confluence client



  * Warning message to deprecate python < 3.9



  * Confluence: Added Confluence extractor



  * bump dependencies (minor and patches)



  * Metabase: fix `require_ssl` type in credentials



  * Tableau: include `site_id` in **workbooks** to build url



  * Redshift: enable extraction from a Redshift Serverless instance



  * Salesforce warehouse: `Labels` instead of `api_names` for columns



  * Looker: no longer extract `as_html` dashboard elements



  * Thoughtspot: Adding connector



  * Power BI: Improved client based on APIClient



  * Switch to Tableau revamped connector



  * Databricks: multithreading to retrieve column lineage



  * Metabase: Handle duplicate dashboards
  * Snowflake: Exclude unnamed tables from extraction
  * Bump dependencies: cryptography, setuptools



  * Metabase: Handle compatibility with older version



  * Metabase: Adding error handler on API call



  * Databricks/Salesforce: Remove deprecated client dependencies



  * Tableau Pulse: extract Metrics and Subscriptions



  - Sigma: Add SafeMode to SigmaClient



  - Reworked APIClient to unify client's behaviours

  Impacted Technologies: Sigma, Soda, Notion



  * Domo: extract datasources via cards metadata endpoint



  * Breaking change Looker CLI:

  `-u` and `--username` changed to `-c` `--client-id`

  `-p` and `--password` changed to `-s` `--client-secret`

  * Breaking change Metabase CLI:

  `-u` and `--username` changed to `-u` `--user`


  * Note: if you use environment variables you shouldn't be impacted



  * Qlik: improve measures extraction



  * Bumps: looker-sdk: 24, setuptools: 72



  * Linting and formatting with Ruff



  * Soda: Added Soda extractor (Castor-Managed integration only)



  * Notion: Added Notion extractor



  * Databricks: more reliable extraction of queries



  * Salesforce: extract table descriptions



  * BigQuery: introduce extended regions to extract missing queries



  * Salesforce: extract DeveloperName and tooling url



  * Fix environment variables assignments for credentials



  * bump dependencies (minor and patches)



  * Added StatusCode handling to SafeMode



  * Bump dependencies: numpy, setuptools, tableauserverclient



  * Dashboarding technologies : Reworked credentials using Pydantic



  * Snowflake, Synapse, Redshift: Remove default_value from the extracted column



  * Sigma: Add `input-table`, `pivot-table` and `viz` in the list of supported **Elements**



  * Databricks: extract tags for tables and column



  * Uploader: support multipart



  * Databricks: extract table source links



  * Uploader: redirect to the proxy, replace credentials with token



  * Tableau: extract database_name for CustomSQLTables



  * Snowflake: Extract SQL user defined function



  * Tableau: extract database_name for tables



  * Databricks: Extract lineage



  * Tableau: add extra fields to optimise storage



  * Salesforce: extract sobjects Label as table name



  * Tableau: extract only fields that are necessary



  * Add compatibility with python 3.12
  * Looker: Bump looker-sdk and refactor client



  * Databricks: allow no emails on user



  * Introducing the revamped connector for Tableau



  * Salesforce: remove DeploymentStatus from EntityDefinition query



  * Salesforce: extract sobjects and fields



  * Databricks: Extract table owners



  * PowerBI: Extract pages from report



  * Systematically escape nul bytes on CSV write



  * Use pydantic v2



  * Pagination: Fix behavior when next page token is missing



  * Sigma: Regenerate token when expired



  * DBT: Add host base URL, use of BaseSettings for DbtCredentials



  * Salesforce: extract dashboard components



  * Support Databricks Unity Catalog extraction



  * Salesforce: Fix on salesforce folders URL



  * Domo client: Handles cases where datasources aren't linked to any cards



  * Domo client: No longer raise 400 exception upon API calls



  * BigQuery client: Use partitioned `creation_time` instead of `start_time`



  * Metabase ApiClient: Remove GET /api/dashboard that is deprecated



  * Add support for python 3.11



  * Salesforce client: extracting folders



  * Domo: ignore 404 errors on datasources API endpoint



  * Bump dependencies



  * Allow support of external lineage for non-generic technologies



  * Salesforce client: Renaming salesforce viz to salesforce reporting



  * Domo: enhance pages with card's datasources to support direct tables lineage



  * Salesforce client: Methods to extract users, dashboards and reports



  * Add sensitive metadata information to credentials dataclass



  * Adding Salesforce client



  * Support MySQL catalog extraction



  * Metabase: renaming of dashboard_cards for Metabase 0.48



  * Metabase: Align postgres connection to postgres connector



  * Tableau: replace luid with id during dashboards extraction



  * SQL Server: extract catalog



  * Metabase: Support postgres connection via SSL



  * Extract: remove null byte characters



  * Fixed bug with jitter argument in Retry class and added field validations



  * Tableau: extract dashboards



  * Redshift: Handle rows with mixed encodings



  * Domo: fix pagination



  * Looker : extract all Looker Explores, even if unused in Dashboards



  * Looker : remove deprecated all_looks parameter



  * Redshift : filter out queries exceeding 65535 char



  * Snowflake : Add key-pair authentication



  * Add a logging option to log to stdout



  * Stream **Looker** Looks and Dashboards directly into their destination files



  * Rollback `escapechar` in csv options



  * Add `escapechar` in csv de-serialization



  * Fetch Domo audits up to yesterday date



  * Add `escapechar` in csv serialisation



  * Pick the most recent sharded tables in `BigQuery`



  * Add retry mechanism to LookerClient when multithreading



  * pycryptodome moved as an optional dependency for extras: metabase and all



  * Fix thread pool size verification



  * Add option to fetch Looker Looks & Dashboards per folder



  * Add refreshing mechanism for Domo authentication tokens



  * Update field_size_limit in CSVFormatter



  * Add support for Domo



  * Move msal dependencies to powerbi extra



  * Retrieve column_id instead of object_id for Snowflake column tags



  * Add column tags for Snowflake



  * Remove non-used dependencies
  * Fix some import in tests
  * Clean pyproject.toml
  * Add deptry config



  * Update column data type validator



  * Use latest version of certifi (2023.7.22)



  * Linting with flakeheaven



  * Add support for Looker's `Users Attributes`



  * Add support for PowerBI's `Activity Events`



  * Fix Metabase DbClient url



  * Add support for Looker's `ContentViews`



  * Stop supporting python3.7



  * Fix on Sigma elements extraction
  * Fix BigQuery dataset extraction
  * Fix the File Checker for View DDL file



  * Added support for Sigma



  * Added support for PowerBI datasets and fields



  * Warning message to deprecate python < 3.8



  * Update enum keys for Metabase credentials



  * Extract metadata from successful dbt runs only



  * Enhance uploader to support `QUALITY` files



  * Tableau : Improve Table <> Datasource lineage



  * Allow COPY statements from Snowflake



  * Improved Field extraction in Tableau



  * Added Tableau datasource and field integration



  * Verify required admin permissions for Looker extraction



  * Constraint `setuptools` explicitly added



  * Constrain `google-cloud-bigquery` dependency below yanked 3.0.0



  * Add connector for dbt-cloud



  * Enhance **Looker** extraction of dashboard filters and groups with roles



  * Add **Looker** support to extract `groups`-related assets
  * Enhance **Looker** extraction of dashboard elements and users



  * Upgrade to Python 3.8
  * Upgrade dependencies



  * Introduce new extractor for visualization tool **PowerBi** with support for
    * `reports`
    * `dashboards`
    * `metadata`



  * Update package dependencies



  * Improve pagination



  * Tableau: Optional `site-id` argument for Tableau Server users



  * Fix command `file_check`



  * Fix `FileChecker` template for `GenericWarehouse.view_ddl`



  * Snowflake: extract `warehouse_size`



  * Allow to skip "App size exceeded" error while fetching Qlik measures
  * Fix missing arguments `warehouse` and `role` passing for script `extract_snowflake`



  * Patch error in Looker explore names



  * Add safe mode to **Looker**



  * Fix extras dependencies



  * Migrate package generation to poetry



  * Improved logging



  * Safe mode for bigquery and file logger



  * Add **Qlik** support to extract `connections` assets



  * Switch to engine's connect for database connections



  * Widen dependencies ranges



  * Improve support for Qlik `measures` and `lineage` and drop extraction of `qvds`



  * Add **Qlik** support to extract `measures` assets



  * Add **Qlik** support to extract `qvds` and `lineage` assets



  * Allow to use `all_looks` endpoint to retrieve looker Looks for param or env variable.



  * Allow to change Looker api timeout through param or env variable.



  * Introduce new extractor for visualization tool **Qlik** with support for
    * `spaces`
    * `users`
    * `apps`



  * Fix typo in Snowflake schema extract query



  * Fetch only distinct schemas in Snowflake warehouse



  * Use versions with range to ease dependency resolution for python 3.7 to 3.10



  * Enhance the file checker to search for prefixed files



  * Add retry for mode analytics



  * Add options to the pager:
    * `start_page`: to start pagination at another index (default to 1)
    * `stop_strategy`: to use different strategy to stop pagination (default to EMPTY_PAGE)



  * Skip snowflake columns with no name



  * Add missing metabase dependencies on Psycopg2



  * Remove top-level imports to isolate modules with different extra dependencies



  * Improved the file checker to detect repeated quotes in CSV.



  * Fix import error in `file_checker` script



  * Snowflake: discard 11 more `query_type` values when fetching queries



  * allow Looker parameters `CASTOR_LOOKER_TIMEOUT_SECOND` and `CASTOR_LOOKER_PAGE_SIZE` to be passed through environment
  variables
  * fix import paths in `castor_extractor/commands/upload.py` script
  * use `storage.Client.from_service_account_info` when `credentials` is a dictionary in `uploader/upload.py`



  * Fix links to documentation in the README



  * Fix dateutil import issue



  First version of Castor Extractor, including:

  * Warehouse assets extraction
    * BigQuery
    * Postgres
    * Redshift
    * Snowflake

  * Visualization assets extraction
    * Looker
    * Metabase
    * Mode Analytics
    * Tableau

  * Utilities
    * Uploader to cloud-storage
    * File Checker (for generic metadata)


pkgId: 5f659e199b6e2db2a13a522d1f280241391cd145f93ebdd1ac173432692f66e4
name: python-castor-extractor
arch: src
version: 0.21.9
epoch: 0
release: 1
summary: Extract your metadata assets.
url: https://www.castordoc.com/
rpm_license: EULA
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castor-extractor-0.21.9-1.src.rpm
checksum_type: sha256
description:
  This library contains utilities to extract your metadata assets into `JSON` or `CSV` files, on your local machine.
  After extraction, those files can be pushed to Castor for ingestion.

  - Visualization assets are typically:
    - `dashboards`
    - `users`
    - `folders`
    - ...

  - Warehouse assets are typically:
    - `databases`
    - `schemas`
    - `tables`
    - `columns`
    - `queries`
    - ...

  It also embeds utilities to help you push your metadata to Castor:

  - `File Checker` to validate your [generic](https://docs.castordoc.com/integrations/data-warehouses/generic-warehouse) CSV files before pushing to Castor
  - `Uploader` to push extracted files to our Google-Cloud-Storage (GCS)



  - [Castor Extractor](#castor-extractor-)
    - [Table of contents](#table-of-contents)
    - [Installation](#installation)
      - [Create castor-env](#create-castor-env)
      - [PIP install](#pip-install)
      - [Create the output directory](#create-the-output-directory)
    - [Contact](#contact)



  Requirements: **python3.8+**
  <img src="https://upload.wikimedia.org/wikipedia/commons/c/c3/Python-logo-notext.svg" width=20 />



  We advise to create a dedicated [Python environment](https://docs.python.org/3/library/venv.html).

  Here's an example using `Pyenv` and Python `3.8.12`:

  - Install Pyenv

  ```bash
  brew install pyenv
  brew install pyenv-virtualenv
  ```

  - [optional] Update your `.bashrc` if you encounter this [issue](https://stackoverflow.com/questions/45577194/failed-to-activate-virtualenv-with-pyenv/45578839)

  ```bash
  eval "$(pyenv init -)"
  eval "$(pyenv init --path)"
  eval "$(pyenv virtualenv-init -)"
  ```

  - [optional] Install python 3.8+

  ```bash
  pyenv versions # check your local python installations

  pyenv install -v 3.8.12 # if none of the installed versions satisfy requirements 8+
  ```

  - Create your virtual env

  ```bash
  pyenv virtualenv 3.8.12 castor-env # create a dedicated env
  pyenv shell castor-env # activate the environment


  python --version # should be `3.8.12`
  pyenv version # should be `castor-env`
  ```



  ⚠️ `castor-env` must be created AND activated first.

  ```bash
  pyenv shell castor-env
  (castor-env) $ # this means the environment is now active
  ```

  ℹ️ please upgrade `PIP` before installing Castor.

  ```bash
  pip install --upgrade pip
  ```

  Run the following command to install `castor-extractor`:

  ```bash
  pip install castor-extractor
  ```

  Depending on your use case, you can also install one of the following `extras`:

  ```bash
  pip install castor-extractor[bigquery]
  pip install castor-extractor[looker]
  pip install castor-extractor[metabase]
  pip install castor-extractor[mysql]
  pip install castor-extractor[powerbi]
  pip install castor-extractor[qlik]
  pip install castor-extractor[postgres]
  pip install castor-extractor[redshift]
  pip install castor-extractor[snowflake]
  pip install castor-extractor[sqlserver]
  pip install castor-extractor[tableau]
  ```



  ```bash
  mkdir /tmp/castor
  ```

  You will provide this path in the `extraction` scripts as follows:

  ```bash
  castor-extract-bigquery --output=/tmp/castor
  ```

  Alternatively, you can also set the following `ENV` in your `bashrc`:

  ```bash
  export CASTOR_OUTPUT_DIRECTORY="/tmp/castor"
  ````



  For any questions or bug report, contact us at [support@castordoc.com](mailto:support@castordoc.com)

  [Castor](https://castordoc.com) helps you find, understand, use your data assets






  * Tableau: fix handling of timeout retry



  * Redshift: improve deduplication of columns



  * Metabase: stop using deprecated table `view_log`



  * bump dependencies: ruff, setuptools



  * PostgreSQL: Fix schema extraction when owner is a role without login privilege



  * Uploader: Support environment variables as settings



  * Tableau: Fix metrics definition url



  * Adding fetch method for confluence client



  * Warning message to deprecate python < 3.9



  * Confluence: Added Confluence extractor



  * bump dependencies (minor and patches)



  * Metabase: fix `require_ssl` type in credentials



  * Tableau: include `site_id` in **workbooks** to build url



  * Redshift: enable extraction from a Redshift Serverless instance



  * Salesforce warehouse: `Labels` instead of `api_names` for columns



  * Looker: no longer extract `as_html` dashboard elements



  * Thoughtspot: Adding connector



  * Power BI: Improved client based on APIClient



  * Switch to Tableau revamped connector



  * Databricks: multithreading to retrieve column lineage



  * Metabase: Handle duplicate dashboards
  * Snowflake: Exclude unnamed tables from extraction
  * Bump dependencies: cryptography, setuptools



  * Metabase: Handle compatibility with older version



  * Metabase: Adding error handler on API call



  * Databricks/Salesforce: Remove deprecated client dependencies



  * Tableau Pulse: extract Metrics and Subscriptions



  - Sigma: Add SafeMode to SigmaClient



  - Reworked APIClient to unify client's behaviours

  Impacted Technologies: Sigma, Soda, Notion



  * Domo: extract datasources via cards metadata endpoint



  * Breaking change Looker CLI:

  `-u` and `--username` changed to `-c` `--client-id`

  `-p` and `--password` changed to `-s` `--client-secret`

  * Breaking change Metabase CLI:

  `-u` and `--username` changed to `-u` `--user`


  * Note: if you use environment variables you shouldn't be impacted



  * Qlik: improve measures extraction



  * Bumps: looker-sdk: 24, setuptools: 72



  * Linting and formatting with Ruff



  * Soda: Added Soda extractor (Castor-Managed integration only)



  * Notion: Added Notion extractor



  * Databricks: more reliable extraction of queries



  * Salesforce: extract table descriptions



  * BigQuery: introduce extended regions to extract missing queries



  * Salesforce: extract DeveloperName and tooling url



  * Fix environment variables assignments for credentials



  * bump dependencies (minor and patches)



  * Added StatusCode handling to SafeMode



  * Bump dependencies: numpy, setuptools, tableauserverclient



  * Dashboarding technologies : Reworked credentials using Pydantic



  * Snowflake, Synapse, Redshift: Remove default_value from the extracted column



  * Sigma: Add `input-table`, `pivot-table` and `viz` in the list of supported **Elements**



  * Databricks: extract tags for tables and column



  * Uploader: support multipart



  * Databricks: extract table source links



  * Uploader: redirect to the proxy, replace credentials with token



  * Tableau: extract database_name for CustomSQLTables



  * Snowflake: Extract SQL user defined function



  * Tableau: extract database_name for tables



  * Databricks: Extract lineage



  * Tableau: add extra fields to optimise storage



  * Salesforce: extract sobjects Label as table name



  * Tableau: extract only fields that are necessary



  * Add compatibility with python 3.12
  * Looker: Bump looker-sdk and refactor client



  * Databricks: allow no emails on user



  * Introducing the revamped connector for Tableau



  * Salesforce: remove DeploymentStatus from EntityDefinition query



  * Salesforce: extract sobjects and fields



  * Databricks: Extract table owners



  * PowerBI: Extract pages from report



  * Systematically escape nul bytes on CSV write



  * Use pydantic v2



  * Pagination: Fix behavior when next page token is missing



  * Sigma: Regenerate token when expired



  * DBT: Add host base URL, use of BaseSettings for DbtCredentials



  * Salesforce: extract dashboard components



  * Support Databricks Unity Catalog extraction



  * Salesforce: Fix on salesforce folders URL



  * Domo client: Handles cases where datasources aren't linked to any cards



  * Domo client: No longer raise 400 exception upon API calls



  * BigQuery client: Use partitioned `creation_time` instead of `start_time`



  * Metabase ApiClient: Remove GET /api/dashboard that is deprecated



  * Add support for python 3.11



  * Salesforce client: extracting folders



  * Domo: ignore 404 errors on datasources API endpoint



  * Bump dependencies



  * Allow support of external lineage for non-generic technologies



  * Salesforce client: Renaming salesforce viz to salesforce reporting



  * Domo: enhance pages with card's datasources to support direct tables lineage



  * Salesforce client: Methods to extract users, dashboards and reports



  * Add sensitive metadata information to credentials dataclass



  * Adding Salesforce client



  * Support MySQL catalog extraction



  * Metabase: renaming of dashboard_cards for Metabase 0.48



  * Metabase: Align postgres connection to postgres connector



  * Tableau: replace luid with id during dashboards extraction



  * SQL Server: extract catalog



  * Metabase: Support postgres connection via SSL



  * Extract: remove null byte characters



  * Fixed bug with jitter argument in Retry class and added field validations



  * Tableau: extract dashboards



  * Redshift: Handle rows with mixed encodings



  * Domo: fix pagination



  * Looker : extract all Looker Explores, even if unused in Dashboards



  * Looker : remove deprecated all_looks parameter



  * Redshift : filter out queries exceeding 65535 char



  * Snowflake : Add key-pair authentication



  * Add a logging option to log to stdout



  * Stream **Looker** Looks and Dashboards directly into their destination files



  * Rollback `escapechar` in csv options



  * Add `escapechar` in csv de-serialization



  * Fetch Domo audits up to yesterday date



  * Add `escapechar` in csv serialisation



  * Pick the most recent sharded tables in `BigQuery`



  * Add retry mechanism to LookerClient when multithreading



  * pycryptodome moved as an optional dependency for extras: metabase and all



  * Fix thread pool size verification



  * Add option to fetch Looker Looks & Dashboards per folder



  * Add refreshing mechanism for Domo authentication tokens



  * Update field_size_limit in CSVFormatter



  * Add support for Domo



  * Move msal dependencies to powerbi extra



  * Retrieve column_id instead of object_id for Snowflake column tags



  * Add column tags for Snowflake



  * Remove non-used dependencies
  * Fix some import in tests
  * Clean pyproject.toml
  * Add deptry config



  * Update column data type validator



  * Use latest version of certifi (2023.7.22)



  * Linting with flakeheaven



  * Add support for Looker's `Users Attributes`



  * Add support for PowerBI's `Activity Events`



  * Fix Metabase DbClient url



  * Add support for Looker's `ContentViews`



  * Stop supporting python3.7



  * Fix on Sigma elements extraction
  * Fix BigQuery dataset extraction
  * Fix the File Checker for View DDL file



  * Added support for Sigma



  * Added support for PowerBI datasets and fields



  * Warning message to deprecate python < 3.8



  * Update enum keys for Metabase credentials



  * Extract metadata from successful dbt runs only



  * Enhance uploader to support `QUALITY` files



  * Tableau : Improve Table <> Datasource lineage



  * Allow COPY statements from Snowflake



  * Improved Field extraction in Tableau



  * Added Tableau datasource and field integration



  * Verify required admin permissions for Looker extraction



  * Constraint `setuptools` explicitly added



  * Constrain `google-cloud-bigquery` dependency below yanked 3.0.0



  * Add connector for dbt-cloud



  * Enhance **Looker** extraction of dashboard filters and groups with roles



  * Add **Looker** support to extract `groups`-related assets
  * Enhance **Looker** extraction of dashboard elements and users



  * Upgrade to Python 3.8
  * Upgrade dependencies



  * Introduce new extractor for visualization tool **PowerBi** with support for
    * `reports`
    * `dashboards`
    * `metadata`



  * Update package dependencies



  * Improve pagination



  * Tableau: Optional `site-id` argument for Tableau Server users



  * Fix command `file_check`



  * Fix `FileChecker` template for `GenericWarehouse.view_ddl`



  * Snowflake: extract `warehouse_size`



  * Allow to skip "App size exceeded" error while fetching Qlik measures
  * Fix missing arguments `warehouse` and `role` passing for script `extract_snowflake`



  * Patch error in Looker explore names



  * Add safe mode to **Looker**



  * Fix extras dependencies



  * Migrate package generation to poetry



  * Improved logging



  * Safe mode for bigquery and file logger



  * Add **Qlik** support to extract `connections` assets



  * Switch to engine's connect for database connections



  * Widen dependencies ranges



  * Improve support for Qlik `measures` and `lineage` and drop extraction of `qvds`



  * Add **Qlik** support to extract `measures` assets



  * Add **Qlik** support to extract `qvds` and `lineage` assets



  * Allow to use `all_looks` endpoint to retrieve looker Looks for param or env variable.



  * Allow to change Looker api timeout through param or env variable.



  * Introduce new extractor for visualization tool **Qlik** with support for
    * `spaces`
    * `users`
    * `apps`



  * Fix typo in Snowflake schema extract query



  * Fetch only distinct schemas in Snowflake warehouse



  * Use versions with range to ease dependency resolution for python 3.7 to 3.10



  * Enhance the file checker to search for prefixed files



  * Add retry for mode analytics



  * Add options to the pager:
    * `start_page`: to start pagination at another index (default to 1)
    * `stop_strategy`: to use different strategy to stop pagination (default to EMPTY_PAGE)



  * Skip snowflake columns with no name



  * Add missing metabase dependencies on Psycopg2



  * Remove top-level imports to isolate modules with different extra dependencies



  * Improved the file checker to detect repeated quotes in CSV.



  * Fix import error in `file_checker` script



  * Snowflake: discard 11 more `query_type` values when fetching queries



  * allow Looker parameters `CASTOR_LOOKER_TIMEOUT_SECOND` and `CASTOR_LOOKER_PAGE_SIZE` to be passed through environment
  variables
  * fix import paths in `castor_extractor/commands/upload.py` script
  * use `storage.Client.from_service_account_info` when `credentials` is a dictionary in `uploader/upload.py`



  * Fix links to documentation in the README



  * Fix dateutil import issue



  First version of Castor Extractor, including:

  * Warehouse assets extraction
    * BigQuery
    * Postgres
    * Redshift
    * Snowflake

  * Visualization assets extraction
    * Looker
    * Metabase
    * Mode Analytics
    * Tableau

  * Utilities
    * Uploader to cloud-storage
    * File Checker (for generic metadata)


pkgId: ab39358d3c853c47778b7a9c276324c63b6df7ed69bccecf65406543a6daf934
name: python-castoredc-api
arch: src
version: 0.1.9.1
epoch: 0
release: 1
summary: Python wrapper for the Castor EDC API
url: https://github.com/reiniervlinschoten/castoredc_api
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-castoredc-api-0.1.9.1-1.src.rpm
checksum_type: sha256
description:
  [![MIT License](https://img.shields.io/github/license/reiniervlinschoten/castoredc_api)](https://github.com/reiniervlinschoten/castoredc_api/blob/main/LICENSE.md)
  [![pylint](https://github.com/reiniervlinschoten/castoredc_api/actions/workflows/pylint.yml/badge.svg)](https://github.com/reiniervlinschoten/castoredc_api/actions/workflows/pylint.yml)
  [![pytest](https://github.com/reiniervlinschoten/castoredc_api/actions/workflows/pytest.yml/badge.svg)](https://github.com/reiniervlinschoten/castoredc_api/actions/workflows/pytest.yml)
  [![coverage](https://img.shields.io/codecov/c/github/reiniervlinschoten/castoredc_api)](https://app.codecov.io/gh/reiniervlinschoten/castoredc_api)
  [![black](https://github.com/reiniervlinschoten/castoredc_api/actions/workflows/black.yml/badge.svg)](https://github.com/reiniervlinschoten/castoredc_api/actions/workflows/black.yml)

  [![pypi](https://img.shields.io/pypi/v/castoredc_api)](https://pypi.org/project/castoredc-api/)
  [![conda](https://img.shields.io/conda/v/reiniervl/castoredc_api)](https://anaconda.org/reiniervl/castoredc_api)
  [![conda-forge](https://img.shields.io/conda/v/conda-forge/castoredc_api)](https://anaconda.org/conda-forge/castoredc_api)




  This is a Python package for interacting with the API of Castor Electronic Data Capture (EDC).
  The package contains functions to interact with all the endpoints defined on https://data.castoredc.com/api#/.
  Within the package are functions for easy export and import of your data through the API.


  Supported export formats are
  * Pandas
  * CSV
  * R (using Feather)


  Import currently only supports .xlsx files with some configuration.
  See for more information below.


  1. Install the package
     * `pip install castoredc-api`
     * `conda install -c conda-forge castoredc_api`
     * `conda install -c reiniervl castoredc_api`
  2. Import the client
  3. Instantiate the client with your client-ID and client-secret (don't share these!) and url to the server.
     * ID and secret: Account -> Settings -> Castor EDC API
     * url: *region*.castoredc.com
  4. Link the client to your study with the study-ID
     * ID: Study -> Settings -> Castor Study ID
  5. Use the wrapper functions to start working with your study.

  For all implemented functions, see: https://data.castoredc.com/api#/

  ```python
  from castoredc_api import CastorClient


  c = CastorClient('MYCLIENTID',
                   'MYCLIENTSECRET',
                   'data.castoredc.com')


  c.link_study('MYSTUDYID')



  c.all_records()


  c.create_survey_package_instance(survey_package_id="FAKESURVEY-PACKAGE-ID",
                                   record_id="TEST-RECORD",
                                   email_address="obviously@fakeemail.com",
                                   auto_send=True)
  ```


  1. Instantiate the CastorStudy with your credentials, study ID and server url.
  2. Use the Study functions to start working with your database

  For exporting data: The endpoint that extracts data for the study can't be used if the authenticated user has a role within the study.
  See: https://data.castoredc.com/api#/export/get_study__study_id__export_data


  ```python
  from castoredc_api import CastorStudy


  study = CastorStudy('MYCLIENTID',
                      'MYCLIENTSECRET',
                      'MYSTUDYID',
                      'data.castoredc.com')


  study.export_to_dataframe()
  study.export_to_csv()



  study.map_data()


  study.map_structure()



  study.get_all_report_forms()

  study.get_single_record('000011').get_all_data_points()
  ```


  Date fields are returned as strings (dd-mm-yyyy)
  Datetime fields are returned as strings (dd-mm-yyyy hh-mm)
  Numeric fields are all returned as floats.

  This can be changed by supplying the argument format_options when intialising the CastorStudy.
  Allowed options are date, datetime, datetime_seconds and time.
  See https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior for formatting options.

  ```python
  from castoredc_api import CastorStudy


  study = CastorStudy('MYCLIENTID',
                      'MYCLIENTSECRET',
                      'MYSTUDYID',
                      'data.castoredc.com',
                      format_options={
                        "date": "%B %e %Y",
                        "datetime": "%B %e %Y %I:%M %p",
                        "datetime_seconds": "%B %e %Y %I:%M:%SOURCE%p",
                        "time": "%I:%M %p",
                      })
  ```


  Missing data is mostly handled through pandas (NaN).

  User-defined missing data is handled through its definitions in Castor.
  For numeric and text-like variables, these values are -95, -96, -97, -98 and -99.
  For datetime data, missing data values are with the years 2995, 2996, 2997, 2998, and 2999.


  1. Instantiate the CastorStudy with your credentials, study ID and server url.
  2. Format your data in the right format (see below)
  3. Create a link file to link external and Castor variables (see below)
  4. (Optional) Create a variable translation file to translate values and labels to Castor optiongroups (see below).
  5. (Optional) Create a merge file to merge multiple columns into one CastorField (see below).
  6. (Optional) Set date, datetime and time formatting to translate local format into Castor format (see below).
  7. Import your data with the import_data function.
     * If label_data is set to true, it translates the string values to their integer values of the optiongroup in Castor.
     * If set to false, it takes the integer values as is.

  Data is validated against the Castor database, meaning that:
  * Existence of records and fields is checked
  * Numeric values are compared against allowed values (min & max)
  * Date(time) and time formats are compared against the specified format


  The synchronous upload option uploads each row one by one.
  When an Error is encountered or the upload finishes successfully, the program outputs the upload log to the output folder and stops.


  The asynchronous upload option uploads each row one by one.
  This is about 15-30 times faster than synchronous upload.
  The program does not stop if uploading a row encounters an error.
  When the upload finishes, the program outputs the upload log to the output folder and stops.
  Error messages are stored in the output folder for debugging.



  ```python
  from castoredc_api import CastorStudy
  from castoredc_api import import_data


  study = CastorStudy('MYCLIENTID',
                      'MYCLIENTSECRET',
                      'MYSTUDYID',
                      'data.castoredc.com')


  imported_data = import_data(data_source_path="PATH/TO/YOUR/LABELLED/STUDY/DATA",
                              column_link_path="PATH/TO/YOUR/LINK/FILE",
                              study=study,
                              label_data=True,
                              target="Study")


  imported_data = import_data(data_source_path="PATH/TO/YOUR/LABELLED/STUDY/DATA",
                              column_link_path="PATH/TO/YOUR/LINK/FILE",
                              study=study,
                              label_data=True,
                              target="Study",
                              use_async=True)


  imported_data = import_data(data_source_path="PATH/TO/YOUR/REPORT/DATA",
                              column_link_path="PATH/TO/YOUR/LINK/FILE",
                              study=study,
                              label_data=False,
                              target="Report",
                              target_name="Medication")


  imported_data = import_data(data_source_path="PATH/TO/YOUR/LABELLED/SURVEY/DATA",
                              column_link_path="PATH/TO/YOUR/LINK/FILE",
                              study=study,
                              label_data=True,
                              target="Survey",
                              target_name="My first survey package",
                              email="python_wrapper@you-spam.com")
  ```


  See below and example_files/ for an examples.
  * Dates should be formatted as dd-mm-yyyy.
  * Datetime should be formatted as dd-mm-yyyy;hh:mm
  * Use semicolons for fields that allow multiple options (e.g. checkboxes)
  * If any value for a column is translated, all values should have a translation mapped (see below)


  The mg/4 weeks and mg/8 weeks under units will be imported to the med_other_unit fields as they do not match any option of the optiongroup, see link files.



  | patient | medication   | startdate  | stopdate   | dose | units      |
  | ------- | ------------ | ---------- | ---------- | ---- | ---------- |
  | 110001  | Azathioprine | 05-12-2019 | 05-12-2020 | 0.05 | g/day      |
  | 110002  | Vedolizumab  | 17-08-2018 | 17-09-2020 | 300  | mg/4 weeks |
  | 110003  | Ustekinumab  | 19-12-2017 | 03-06-2019 | 90   | mg/8 weeks |
  | 110004  | Thioguanine  | 25-04-2020 | 27-05-2021 | 15   | mg/day     |
  | 110005  | Tofacitinib  | 01-03-2020 | 31-12-2999 | 10   | mg/day     |


  The non-integer variables under units will be imported to the med_other_unit fields as they do not match any optionvalue of the optiongroup, see link files.



  | patient | medication   | startdate  | stopdate   | dose | units      |
  | ------- | ------------ | ---------- | ---------- | ---- | ---------- |
  | 110001  | Azathioprine | 05-12-2019 | 05-12-2020 | 0.05 | 3          |
  | 110002  | Vedolizumab  | 17-08-2018 | 17-09-2020 | 300  | mg/4 weeks |
  | 110003  | Ustekinumab  | 19-12-2017 | 03-06-2019 | 90   | mg/8 weeks |
  | 110004  | Thioguanine  | 25-04-2020 | 27-05-2021 | 15   | 2          |
  | 110005  | Tofacitinib  | 01-03-2020 | 31-12-2999 | 10   | 2          |



  Link files should be of the format as shown below.
  The mapping is variable name in the Excel file -> variable name in Castor.
  If a variable in other is referenced twice in the Castor column, it means that it has a dependency in Castor.

  This is a way to import data that has an "other" category, for example a radio question that reads:
  * A
  * B
  * C
  * Other

  In which case selecting other opens a new text box to enter this information.
  The second variable in the link_file should be this new text box.

  This is treated in the following manner:
  * First, the data is mapped to the first variable referenced
  * For all data that could not be mapped to the first variable, the 'other' category is selected in the first variable
  * Then the data that could not be mapped is written to the second variable referenced.



  | other      | castor           |
  | ---------- | ---------------- |
  | patient    | record\_id       |
  | medication | med\_name        |
  | startdate  | med\_start       |
  | stopdate   | med\_stop        |
  | dose       | med\_dose        |
  | units      | med\_units       |
  | units      | med\_other\_unit |


  Translation files link the optiongroup value or label from the external database to the optiongroups from Castor.
  Values are translated for all variables specified in the first column of the file.

  Two situations can occur when a value is encountered for which no translation is given:
  * If a dependent field is specified (see link files): the value is not translated and imported to the dependent field.
  * If no dependent field is specified: the program gives an error. In this situation, every value that occurs in the external database needs to be mapped.


  | variable               | other                  | castor                              |
  | ---------------------- | ---------------------- | ----------------------------------- |
  | family disease history | none                   | None                                |
  | family disease history | don't know             | Unknown                             |
  | family disease history | deaf                   | Deafness                            |
  | family disease history | cardiomyopathy         | (Cardio)myopathy                    |
  | family disease history | encephalopathy         | Encephalopathy                      |
  | family disease history | diabetes               | Diabetes Mellitus                   |
  | family disease history | cardiovascular disease | Hypertension/Cardiovascular disease |
  | family disease history | thromboembolism        | Thrombosis                          |
  | family disease history | tumor                  | Malignancy                          |

  ```python
  from castoredc_api import CastorStudy
  from castoredc_api import import_data


  study = CastorStudy('MYCLIENTID',
                      'MYCLIENTSECRET',
                      'MYSTUDYID',
                      'data.castoredc.com')


  imported_data = import_data(data_source_path="PATH/TO/YOUR/LABELLED/STUDY/DATA",
                              column_link_path="PATH/TO/YOUR/LINK/FILE",
                              study=study,
                              label_data=True,
                              target="Study",
                              translation_path="PATH/TO/YOUR/TRANSLATION/FILE")
  ```


  Merge files link the multiple columns from the external database to a single checkbox field in Castor.
  For each column from the external database specified under other_variable the value under other_value is mapped to the castor_value for the castor_variable.
  If specifying a merge file, note that castor_value is the new other variable for your link file (see below).
  All other_values not defined raise an Error.
  Only supports many-to-one matching.




  | patient | date baseline blood sample | baseline hemoglobin | factor V Leiden | datetime onset stroke | time onset trombectomy | year of birth | patient sex | patient race    | famhist\_none | famhist\_deaf | famhist\_cardiomyopathy | famhist\_encephalopathy | famhist\_diabmell | famhist\_cardiovasc | famhist\_malignancy | famhist\_unknown |
  | ------- | -------------------------- | ------------------- | --------------- | --------------------- | ---------------------- | ------------- | ----------- | --------------- | ------------- | ------------- | ----------------------- | ----------------------- | ----------------- | ------------------- | ------------------- | ---------------- |
  | 110001  | 16-03-2021                 | 8.3                 | 55;16-03-2021   | 16-03-2021;07:30      | 09:25                  | 1999          | Female      | Asian           | No            | No            | Yes                     | Yes                     | Yes               | No                  | No                  | No               |
  | 110002  | 17-03-2021                 | 7.2                 | 33;17-03-2021   | 17-03-2021;15:30      | 06:33                  | 1956          | Female      | African/black   | No            | Yes           | Yes                     | No                      | No                | No                  | No                  | No               |
  | 110003  | 16-03-2022                 | 9.1                 | \-45;18-03-2022 | 18-03-2022;02:00      | 12:24                  | 1945          | Male        | Chinese         | Yes           | No            | No                      | No                      | No                | No                  | No                  | No               |
  | 110004  | 17-03-2022                 | 3.2                 | 28;19-03-2022   | 17-03-2022;21:43      | 23:23                  | 1933          | Male        | Caucasian/white | No            | No            | No                      | No                      | No                | Yes                 | Yes                 | No               |
  | 110005  | 16-03-2023                 | 10.3                | 5;20-03-2023    | 16-03-2023;07:22      | 08:14                  | 1921          | Female      | Hispanic        | No            | No            | No                      | No                      | No                | No                  | No                  | Yes              |



  | other\_variable         | other\_value | castor\_variable | castor\_value                       |
  | ----------------------- | ------------ | ---------------- | ----------------------------------- |
  | famhist\_none           | Yes          | his\_family      | None                                |
  | famhist\_deaf           | Yes          | his\_family      | Deafness                            |
  | famhist\_cardiomyopathy | Yes          | his\_family      | (Cardio)myopathy                    |
  | famhist\_encephalopathy | Yes          | his\_family      | Encephalopathy                      |
  | famhist\_diabmell       | Yes          | his\_family      | Diabetes Mellitus                   |
  | famhist\_cardiovasc     | Yes          | his\_family      | Hypertension/Cardiovascular disease |
  | famhist\_malignancy     | Yes          | his\_family      | Malignancy                          |
  | famhist\_unknown        | Yes          | his\_family      | Unknown                             |
  | famhist\_none           | No           | his\_family      |                                     |
  | famhist\_deaf           | No           | his\_family      |                                     |
  | famhist\_cardiomyopathy | No           | his\_family      |                                     |
  | famhist\_encephalopathy | No           | his\_family      |                                     |
  | famhist\_diabmell       | No           | his\_family      |                                     |
  | famhist\_cardiovasc     | No           | his\_family      |                                     |
  | famhist\_malignancy     | No           | his\_family      |                                     |
  | famhist\_unknown        | No           | his\_family      |                                     |



  | other                      | castor             |
  | -------------------------- | ------------------ |
  | patient                    | record\_id         |
  | date baseline blood sample | base\_bl\_date     |
  | baseline hemoglobin        | base\_hb           |
  | factor V Leiden            | fac\_V\_leiden     |
  | datetime onset stroke      | onset\_stroke      |
  | time onset trombectomy     | onset\_trombectomy |
  | year of birth              | pat\_birth\_year   |
  | patient sex                | pat\_sex           |
  | patient race               | pat\_race          |
  | **his\_family**            | **his\_family**    |

  ```python
  from castoredc_api import CastorStudy
  from castoredc_api import import_data


  study = CastorStudy('MYCLIENTID',
                      'MYCLIENTSECRET',
                      'MYSTUDYID',
                      'data.castoredc.com')


  imported_data = import_data(data_source_path="PATH/TO/YOUR/LABELLED/STUDY/DATA",
                              column_link_path="PATH/TO/YOUR/LINK/FILE",
                              study=study,
                              label_data=True,
                              target="Study",
                              merge_path="PATH/TO/YOUR/MERGE/FILE")
  ```


  Standard date formatting settings are the following.
  Date(time) and time fields should follow these formats in the Excel sheet to be uploaded.
  - Date = dd-mm-yyyy
  - Datetime = dd-mm-yyyy;hh-mm
  - Time = hh:mm
  - Decimal separator = .

  These can be changed by supplying the argument format_options when calling create upload.
  Allowed options are date, datetime, and time. Decimal separator cannot be changed.
  See https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior for formatting options.

  ```python
  from castoredc_api import CastorStudy
  from castoredc_api import import_data


  study = CastorStudy('MYCLIENTID',
                      'MYCLIENTSECRET',
                      'MYSTUDYID',
                      'data.castoredc.com')


  imported_data = import_data(data_source_path="PATH/TO/YOUR/LABELLED/STUDY/DATA",
                              column_link_path="PATH/TO/YOUR/LINK/FILE",
                              study=study,
                              label_data=True,
                              target="Study",
                              format_options={
                                 "date": "%B %d %Y",
                                 "datetime": "%B %d %Y %I:%M %p",
                                 "time": "%I:%M %p",
                              })
  ```


  1. Python Version >= 3.8
  2. See [requirements.txt](requirements.txt)



  1. Async import and export cannot be used in an IPython environment, see [this discussion](https://github.com/reiniervlinschoten/castoredc_api/pull/39#discussion_r740389868)
  2. Feather export is uncompressed, see [this issue](https://github.com/ContinuumIO/anaconda-issues/issues/12500)
  3. Device token and Econsent endpoints are untested. Use at your own risk.




  Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.



  Want to contribute to the testing suite? Or test possible changes you want to contribute?
  Tests can be ran via two methods: on Github and on your local machine.

  On Github: when you create a pull request for this project, Pytest automatically runs for the testing suite (see [pytest.yml](.github/workflows/pytest.yml)).
  If you have added a whole new testing module, don't forget to add this to the pytest.yml file. Within the repository, applicable access rights have been set for the client.
  Use the following fixtures for the respective modules you want to test:
  * Testing API read endpoints: client
  * Testing API write endpoints: write_client
  * Testing output:
    * For structure output to Python: integration_study & integration_study_format
    * For data output to Python: integration_study_mapped & integration_study_format_mapped
    * For data output to csv: output_data
  * Testing importing of data: import_study

  Locally: You can only run tests locally when you have read and write access to the correct Castor Studies.
  Please send a message to the repository owner to ask for the correct access, with information on why.
  Access and correct study IDs will then be given to run the tests.



  We use [SemVer](https://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/reiniervlinschoten/castoredc_api/tags).



  * **R.C.A. van Linschoten** - *Initial Development* - [Reinier van Linschoten](https://github.com/reiniervlinschoten)

  See also the list of [contributors](https://github.com/reiniervlinschoten/castoredc_api/contributors) who participated in this project.



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



  * Franciscus Gasthuis & Vlietland for making time available for development
  * Castor EDC for support and code review


pkgId: b0b755ecf605c63d93e4a27784dcfad625529fe486198b396001aa296f829a16
name: python-casual_inference
arch: src
version: 0.7.1
epoch: 0
release: 1
summary: Do causal inference more casually
url: https://github.com/shyaginuma
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casual_inference-0.7.1-1.src.rpm
checksum_type: sha256
description:
  [![ci](https://github.com/shyaginuma/casual_inference/actions/workflows/lint_and_test.yml/badge.svg)](https://github.com/shyaginuma/casual_inference/actions/workflows/lint_and_test.yml)
  [![PyPI version](https://badge.fury.io/py/casual_inference.svg)](https://badge.fury.io/py/casual_inference)
  [![Downloads](https://static.pepy.tech/badge/casual-inference/month)](https://pepy.tech/project/casual-inference)



  The `casual_inference` is a Python package provides a simple interface to do causal inference.
  Doing causal analyses is a complicated stuff. We have to pay attention to many things to do such analyses properly.
  The `casual_inference` is developed aiming to reduce such effort.



  ```shell
  pip install casual-inference
  ```



  This package will provide several types of **`evaluator`**. They have `evaluate()` and some `summary_xxx()` methods. The `evaluate()` method evaluates treatment impact by calculating several statistics in it, and the `summary_xxx()` methods summarize such statistics in some ways. (e.g., table style, bar chart style, ...)

  The `evaluate()` method expects that the data which has a schema like as follows will be passed.

  |unit|variant|metric_A|metric_B|...|
  |----|-------|--------|--------|---|
  |1   |1      |0       |0.01    |...|
  |2   |1      |1       |0.05    |...|
  |3   |2      |0       |0.02    |...|
  |... |...    |...     |...     |...|

  The table has been already aggregated by the `unit` column. (i.e. The `unit` column should be the primary key)



  - `unit`: The unit you want to conduct analysis on. Typically it will be user_id, session_id, ... in the web service domain.
  - `variant`: The group of intervention. This package always assumes `1` is a variant of control group.
  - `metrics`: metrics you want to evaluate. e.g., The number of purchases, conversion rate, ...



  The `casual_inference` supports not only the evaluation of normal A/B testing and A/A testing, but also advanced causal inference techniques.



  ```python
  from casual_inference.dataset import create_sample_ab_result
  from casual_inference.evaluator import ABTestEvaluator

  data = create_sample_ab_result(n_variant=3, sample_size=1000000, simulated_lift=[-0.01, 0.01])

  evaluator = ABTestEvaluator()
  evaluator.evaluate(
      data=data,
      unit_col="rand_unit",
      variant_col="variant",
      metrics=["metric_bin", "metric_cont"]
  )

  evaluator.summary_plot()
  ```

  ![eval_result](examples/images/plot_abtestevaluator_result.png)

  It diagnoses [Sample Ratio Mismatch](https://dl.acm.org/doi/10.1145/3292500.3330722) (SRM) automatically. When it detects the SRM, it'll display a warning on the output so that the Analyst can interpret the result carefully.

  You can also see the [example notebook](https://github.com/shyaginuma/casual_inference/blob/main/examples/ab_test_evaluator.ipynb) to see more detailed example.



  ```python
  from casual_inference.dataset import create_sample_ab_result
  from casual_inference.evaluator import AATestEvaluator

  data = create_sample_ab_result(n_variant=2, sample_size=1000000, simulated_lift=[0.0])

  evaluator = AATestEvaluator()
  evaluator.evaluate(
      data=data,
      unit_col="rand_unit",
      metrics=["metric_bin", "metric_cont"]
  )

  evaluator.summary_plot()
  ```

  ![eval_result](examples/images/plot_aatestevaluator_result.png)

  You can also see the [example notebook](https://github.com/shyaginuma/casual_inference/blob/main/examples/aa_test_evaluator.ipynb) to see more detailed example.



  ```python
  from casual_inference.dataset import create_sample_ab_result
  from casual_inference.evaluator import SampleSizeEvaluator

  data = create_sample_ab_result(n_variant=2, sample_size=1000000)

  evaluator = SampleSizeEvaluator()
  evaluator.evaluate(
      data=data,
      unit_col="rand_unit",
      metrics=["metric_bin", "metric_cont"]
  )

  evaluator.summary_plot()
  ```

  ![eval_result](examples/images/plot_samplesizeevaluator_result.png)

  You can also see the [example notebook](https://github.com/shyaginuma/casual_inference/blob/main/examples/sample_size_evaluator.ipynb) to see more detailed example.



  It also supports advanced causal inference techniques.

  - Linear Regression

  Another evaluation methods like Propensity Score Matching are planed to implement in the future.



  - Kohavi, Ron, Diane Tang, and Ya Xu. 2020. ​Trustworthy Online Controlled Experiments: A Practical Guide to A/B Testing. Cambridge University Press. https://experimentguide.com/
    - A Great book covering comprehensive topics around practical A/B testing. I do recommend to read this book for all people who works on A/B testing.
  - Alex Deng, Ulf Knoblich, and Jiannan Lu. 2018. Applying the Delta Method in Metric Analytics: A Practical Guide with Novel Ideas. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (KDD '18). Association for Computing Machinery, New York, NY, USA, 233–242. https://doi.org/10.1145/3219819.3219919
    - Describing how to approximate variance of relative difference, and when the analysis unit was more granular than the randomization unit.
  - Lucile Lu. 2016. Power, minimal detectable effect, and bucket size estimation in A/B tests. Twitter Engineering Blog. [link](https://blog.twitter.com/engineering/en_us/a/2016/power-minimal-detectable-effect-and-bucket-size-estimation-in-ab-tests)
    - Describing Concept around Type I error and Type II error, Power Analysis. (Sample size calculation)
  - Aleksander Fabijan, Jayant Gupchup, Somit Gupta, Jeff Omhover, Wen Qin, Lukas Vermeer, and Pavel Dmitriev. 2019. Diagnosing Sample Ratio Mismatch in Online Controlled Experiments: A Taxonomy and Rules of Thumb for Practitioners. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (KDD '19). Association for Computing Machinery, New York, NY, USA, 2156–2164. https://doi.org/10.1145/3292500.3330722
    - Introduce Sample Ratio Mismatch (SRM) and describe various example of SRM happening, and provide taxonomy that help debugging when the SRM happened.
  - Shota Yasui. 2020. 効果検証入門. 技術評論社. https://gihyo.jp/book/2020/978-4-297-11117-5
    - A Great introduction book about practical causal inference technique written in Japanese.


pkgId: 5054fe0a5921fdf57d7c4715e9d1dee9726e3b5ac64aefb4b95ec3fb71103796
name: python-casymda
arch: src
version: 0.2.29
epoch: 0
release: 1
summary: Simple DES modeling and simulation based on SimPy, BPMN, and pixi.js
url: https://github.com/fladdimir/casymda
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-casymda-0.2.29-1.src.rpm
checksum_type: sha256
description:
  Wouldn't it be _cool_ to combine the block-based process modeling experience of commercial discrete event simulation packages with the amenities of proper IDE-based source-code editing?
  (Think Arena / Anylogic / ExtendSim / Plant Simulation / ... but with simple integration of third-party libraries, industry-standard interfaces, unit- and integration testing, dockerization, serverless execution in the cloud of your choice... and even actually working auto-completion! _:D_)

  And all that not only for free, but using the worlds most popular language for data analytics and machine learning?

  _Casymda_ enables you to create [SimPy3](https://simpy.readthedocs.io/en/latest/) simulation models, with help of BPMN and the battle-tested [Camunda-Modeler](<http://www.bpmn.io>).

  Created BPMN process diagrams are parsed and converted to Python-code, combining visual oversight of model structure with code-based definition of model behavior.
  Immediately executable, including a token-based process animation, allowing for space-discrete entity movements, and ready to be wrapped as a gym-environment to let a machine-learning algorithm find a control strategy.

  Further information and sample projects:

  - <https://fladdimir.github.io/post/> (English)
  - <https://casymda.github.io/page/Webpage/Startpage.html> (German)



  From [PyPI](https://pypi.org/project/casymda/):

  ``` l
  pip install casymda
  ```



  - connectable blocks for processing of entities
  - graphical model description via camunda modeler
  - process visualization browser-based or via tkinter
  - space-discrete tilemap-movements of entities
  - gradually typed (checkout [pyright](https://github.com/microsoft/pyright) for vscode)

  Coming soon:

  - automated model generation from process event-logs via [PM4Py](http://pm4py.org/)



  Basic features are illustrated as part of the example models (which also serve as integration tests):

  - basics:
    - bpmn-based generation of a simple model file
    - run the generated model
    - process visualization via tkinter
    - browser-based visualization (served with [flask](https://palletsprojects.com/p/flask/), animated with [pixijs](https://www.pixijs.com/))
  - resources:
    - seize and release a resource via graphical modeling
  - tilemap:
    - entity movement along a shortest path defined by a csv-tilemap (built on networkx: <https://networkx.github.io/>)

  For setup just clone the repository and install casymda ([virtual environment](https://docs.python.org/3/tutorial/venv.html) recommended). See [basics-visual-run-tkinter](exec/basics/visual_run.py) for an example of how to cope with python-path issues.



  - [Model generation and execution](diagrams/model+execution.pdf)
  - [Blocks and animation](diagrams/blocks+animation.pdf)



  This project trusts [Black](https://black.readthedocs.io/en/stable/) for formatting, [Sonarqube](https://www.sonarqube.org/) for static code analysis, and [pytest](https://docs.pytest.org/en/latest/) for unit & integration testing. Developed and tested on Linux (Ubuntu 20.04), Python 3.8.5.
  Tests can be carried out inside a docker-container, optionally including an installation from pypi to verify a successful upload.



  sonarqube server (public docker image):

  ``` l
  docker-compose up sonarqube
  ```

  sonar-scanner (public docker image):

  ``` l
  docker-compose up analysis
  ```

  (run a docker-based unit-test first for coverage-reporting)
  (remember to share your drive via Docker-Desktop settings if necessary, to be re-applied after each password change)



  ``` l
  pytest --cov-report term --cov=src/casymda/ tests/
  ```

  integrations tests:

  ``` l
  python3 -m pytest examples
  ```

  (integration-tests require tkinter, which may be installed via `sudo apt-get install python3-tk`)

  For Docker-based tests see [docker-compose.yml](docker-compose.yml)

  ``` l
  docker-compose run unit-test
  docker-compose run examples-test
  docker-compose run examples-test-pypi
  ```



  ``` l
  python3 -m venv venv
  ```



  ``` l
  pip install -e .
  ```



  ``` l
  python setup.py sdist

  twine upload dist/*
  ```

  pip install twine if necessary,
  remember to set the version in [setup.py](setup.py) and [src/casymda](src/casymda/__init__.py) as required



  Tested PyPy3 (7.3.1-final). Install pypy3 pypy3-dev pypy-tk.

  Runtime could be decreased by factor ~2 when using PyPy3 for longer simulations runs (e.g. from ~45s to ~25s for a [simple example model test](examples/basics/model/long_run_bpmn_example_test.py) with MAX_ENTITIES set to 40.000 on an i5 notebook).



  fladdi.mir@gmx.de

  feedback / ideas / discussion / cheering / complaints welcome

  MIT License

  2020


pkgId: eee94bc5f1f8bb01a8db5800941703496b80b9f66f94447aca261a5f608771c3
name: python-cat-context
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: A command-line tool to print file trees and display file contents.
url: https://github.com/asnunes/cat-context
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cat-context-1.0.0-1.src.rpm
checksum_type: sha256
description:
  Have you ever wanted to ask a question about a project to a LLM but lost a lot of time trying to explain the structure of the project and the relevant files?

  `cctx` is a command-line tool that allows you to recursively print the file tree of a specified directory, display contents of specified files, and ignore certain paths or the entire tree. It's useful for quickly understanding the structure and content of a project in the context of a question.



  - **Recursively print file trees**: Visualize the directory structure of your project.
  - **Display file contents**: Easily view the contents of specified files.
  - **Ignore paths**: Exclude certain files or directories from the tree.
  - **Ignore entire tree**: Focus solely on specified files without displaying the tree.
  - **Specify line ranges**: Display specific lines from files.



  You can install `cat-context` via pip:

  ```bash
  pip install cat-context
  ```

  This will install the `cat-context` package and make the `cctx` command available globally.



  ```bash
  cctx [OPTIONS] [FILE_PATHS...]
  ```



  - `--cwd <path>`: Change the current working directory. Defaults to the current directory.
  - `-ip`, `--ignore-path <path>`: Paths to ignore in the file tree (relative to cwd or absolute). Can be used multiple times to ignore multiple paths.
  - `-it`, `--ignore-tree`: Ignore the entire tree and only display specified files.



  - `FILE_PATHS`: One or more files to display contents of if they exist in the tree. You can specify line numbers using the format `path:start_line:end_line`.





  ```bash
  cctx README.md cctx/main.py
  ```



  ```bash
  cctx cctx/main.py:10:20
  ```



  ```bash
  cctx --ignore-tree README.md
  ```



  ```bash
  cctx --ignore-path=folder1 --ignore-path=folder2
  ```



  ```bash
  cctx --cwd=/path/to/directory
  ```



  If you want to run `ctx` in development mode or contribute to the project, follow these steps.



  ```bash
  git clone https://github.com/asnunes/ctx.git
  cd cctx
  ```



  Make sure you have Python 3 installed. It's recommended to use a virtual environment.

  ```bash
  python3 -m venv venv
  source venv/bin/activate  # On Windows use venv\Scripts\activate
  ```



  ```bash
  pip install -e .
  ```



  ```bash
  cctx [OPTIONS] [FILE_PATHS...]
  ```

  Or directly via Python:

  ```bash
  python cctx/main.py [OPTIONS] [FILE_PATHS...]
  ```



  ```bash
  python cctx/main.py --cwd=. README.md
  ```



  To run the tests, use the `unittest` module from the root directory.

  ```bash
  python -m unittest discover tests
  ```



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


pkgId: f645461cd71ddb4004c3d0ab57d0e89ae17e5d8d05008e6e37f96963825d270b
name: python-cat-win
arch: src
version: 1.10.1
epoch: 0
release: 1
summary: Simple Text-Processing and -Analytics Command Line Tool made in Python.
url: https://github.com/SilenZcience/cat_win
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cat-win-1.10.1-1.src.rpm
checksum_type: sha256
description:
  [![Unittests]](https://github.com/SilenZcience/cat_win/actions/workflows/unit_test.yml)
  [![Build-and-Check]](https://github.com/SilenZcience/cat_win/actions/workflows/package_test.yml)
  [![Coverage]](https://github.com/SilenZcience/cat_win/actions/workflows/coverage.yml)
  [![Tests]](https://github.com/SilenZcience/cat_win/actions/workflows/coverage.yml)
  [![GitHub-Issues]](https://github.com/SilenZcience/cat_win/issues)
  <!-- [![Compile-and-Push]](https://github.com/SilenZcience/cat_win/actions/workflows/build_executable.yml) -->
  This project copies the fundamental framework of the most essential command-line tools from Unix and translates its features to an OS Independent program using Python.</br>
  The project includes the basic functionality of subject areas like 'cat', 'echo', 'grep', 'ls', 'base64', 'xxd', ...
  Additionally, it includes an **editor** and a **hex editor**, as well as the feature to visualize data in various ways.
  It enables the user to manipulate the content of any given file, displaying meta-data, calculating checksums, converting hexadecimal, decimal, octal and binary numbers within any text, and much *much* <a href="#usage">more</a> ...
  This project does not aim to exactly replicate existing tools or their specific functionalities but rather to deliver essential core features in a user-friendly manner, providing straightforward access to helpful and valuable tools. It is purposefully designed to be lightweight and offer a streamlined, accessible solution to engage with powerful utilities by providing a practical and effective resource for users seeking core functionality without unnecessary overhead.
  <div id="made-with"></div>

  [![MadeWith-Python]](https://www.python.org/)
  [![Python-Version]](https://www.python.org/)
  <p align="right">(<a href="#top">↑back to top↑</a>)</p>
  <div id="getting-started"></div>
  <h2>
  	<a href="#">&#x200B;</a>
  	<a href="#getting-started" title="Noto Emoji, licensed under CC BY 4.0">
  		<img unselectable="on" pointer-events="none" src="https://fonts.gstatic.com/s/e/notoemoji/latest/1f680/512.gif" width="30" />
  	</a>
  	<b>Getting Started</b>
  </h2>
  <div id="prerequisites"></div>

  Using cat_win as a `Python Package` demands a Python-Interpreter (>= 3.6).
  Using cat_win as a `Binary Executable` demands no prerequisites, hereby the stand-alone executables are sufficient.
  <div id="installation"></div>

  [![CurrentVersion]](https://pypi.org/project/cat-win/)
  [![GitHub-Release]](https://github.com/SilenZcience/cat_win/releases)
  [![GitHub-Release-Date]](https://github.com/SilenZcience/cat_win/releases)
  `Python Package` </br>
  Simply install the python package (via [PyPI-cat_win](https://pypi.org/project/cat-win/)):
  ```console
  python -m pip install -U cat_win[clip]
  ```
  ```console
  python -m pip install -U cat_win
  ```
  cat_win uses the [pyperclip](https://pypi.org/project/pyperclip/) module by default. Should any problems occur, you can also use
  the [pyperclip3](https://pypi.org/project/pyperclip3/) or [pyclip](https://pypi.org/project/pyclip/) module.
  In this case simply don't install with `[clip]` and manually install the desired module yourself.
  On older Windows systems colored output may not be displayed correctly.
  In this case you can try to fix the problem by installing the cat_win-package with the optional color-fix `[cfix]` dependency.
  This fix will use the [colorama](https://pypi.org/project/colorama/) module
  which can also be installed after the fact to patch the problem.
  `Binary Executable` </br>
  **OR alternatively** you can use the (standalone) binary executable version:
  <div id="download"></div>
  Direct Download:
  </br>
  [Windows - __catw.exe__](https://raw.githubusercontent.com/SilenZcience/cat_win/binaries/bin/windows/catw.exe) </br>
  [Windows - __cats.exe__ (REPL)](https://raw.githubusercontent.com/SilenZcience/cat_win/binaries/bin/windows/cats.exe) </br>
  [Linux - __catw__](https://raw.githubusercontent.com/SilenZcience/cat_win/binaries/bin/linux/catw) </br>
  [Linux - __cats__ (REPL)](https://raw.githubusercontent.com/SilenZcience/cat_win/binaries/bin/linux/cats) </br>
  [MacOS - __catw__](https://raw.githubusercontent.com/SilenZcience/cat_win/binaries/bin/darwin/catw) </br>
  [MacOS - __cats__ (REPL)](https://raw.githubusercontent.com/SilenZcience/cat_win/binaries/bin/darwin/cats) </br>
  (compiled using PyInstaller) </br>
  It is recommended to add the file path(s) to your system-environment `PATH`-variables.
  > [!CAUTION]
  > **You should never trust any executable file!** Feel free to compile the package yourself (e.g. using [PyInstaller](https://pyinstaller.org/en/stable/)).\
  > You can verify the creation of the executable files yourself by reading the [source code](https://github.com/SilenZcience/cat_win/blob/main/cat_win/src/cat.py), checking the [origin](https://github.com/SilenZcience/cat_win/tree/binaries/bin) of the file and validating the corresponding [workflow](https://github.com/SilenZcience/cat_win/blob/main/.github/workflows/build_executable.yml) used.
  <p align="right">(<a href="#top">↑back to top↑</a>)</p>
  <div id="usage"></div>
  <h2>
  	<a href="#">&#x200B;</a>
  	<a href="#usage" title="Noto Emoji, licensed under CC BY 4.0">
  		<img unselectable="on" pointer-events="none" src="https://fonts.gstatic.com/s/e/notoemoji/latest/2699_fe0f/512.gif" width="30" />
  	</a>
  	<b>Usage</b>
  </h2>
  ```console
  > catw [FILE]... [OPTION]...
  > catw --help
  Concatenate FILE(s) to standard output.
  ```
  ```console
  > cats [OPTION]...
  > cats --help
  Interactively manipulate standard input.
  ```
  <div id="documentation"></div>
  <h3>
  	<a href="#">&#x200B;</a>
  	<a href="#documentation" title="Noto Emoji, licensed under CC BY 4.0">
  		<img unselectable="on" pointer-events="none" src="https://fonts.gstatic.com/s/e/notoemoji/latest/1f4a1/512.gif" width="25" />
  	</a>
  	<b>Documentation</b>
  </h3>
  > [!TIP]
  > 👉 A detailed [Documentation](https://github.com/SilenZcience/cat_win/blob/main/DOCUMENTATION.md) of all **Parameters**, **Configurations** and **General Usage** has moved to another File.\
  > Read about specific **Arguments & Options** [here](https://github.com/SilenZcience/cat_win/blob/main/DOCUMENTATION.md#arguments--options).
  <div id="examples"></div>

  <details>
     <summary><b>📂 Images 📂</b></summary>
     </br>
     <p float="left">
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examplew1.png" width="49%"/>
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examplew2.png" width="49%"/>
     </p>
     <p float="left">
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examplew3.png" width="49%"/>
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examplew4.png" width="49%"/>
     </p>
     <p float="left">
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examplew5.png" width="49%"/>
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examplew6.png" width="49%"/>
     </p>
     <p float="left">
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examplew7.png" width="49%"/>
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examplew8.png" width="49%"/>
     </p>
     <p float="left">
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examplew9.png" width="49%"/>
     </p>
     - - - -
     <p float="left">
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examples1.png" width="49%"/>
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examples2.png" width="49%"/>
     </p>
     <p float="left">
        <img src="https://raw.githubusercontent.com/SilenZcience/cat_win/main/img/examples3.png" width="49%"/>
     </p>
  </details>
  </br>
  ```py
  > echo "Hello World :)" | catw - [6:] | catw - [::-1] -ln
  1) [8] ): dlroW
  ```
  - - - -
  ```py
  > cats --eval --dec
  > >>> 0xF * 5
  75 [Bin: 0b1001011, Oct: 0o113, Hex: 0x4b]
  > >>> ...
  ```
  <p align="right">(<a href="#top">↑back to top↑</a>)</p>
  <div id="changelog"></div>
  <h2>
  	<a href="#">&#x200B;</a>
  	<a href="#changelog" title="Noto Emoji, licensed under CC BY 4.0">
  		<img unselectable="on" pointer-events="none" src="https://fonts.gstatic.com/s/e/notoemoji/latest/270f_fe0f/512.gif" width="30" />
  	</a>
  	<b>Changelog</b>
  </h2>
  > [!NOTE]
  > Take a look at the [Changelog](https://github.com/SilenZcience/cat_win/blob/main/CHANGELOG.md) file.
  <div id="license"></div>
  <h2>
  	<a href="#">&#x200B;</a>
  	<a href="#license" title="Noto Emoji, licensed under CC BY 4.0">
  		<img unselectable="on" pointer-events="none" src="https://fonts.gstatic.com/s/e/notoemoji/latest/2757/512.gif" width="30" />
  	</a>
  	<b>License</b>
  </h2>
  <a href="https://github.com/SilenZcience/cat_win/blob/main/LICENSE" alt="License">
     <img src="https://img.shields.io/pypi/l/cat_win" align="right">
  </a>
  > [!IMPORTANT]
  > This software is provided "as is," **without warranty** of any kind. There are **no guarantees** of its functionality or suitability for any purpose. Use at your own risk—**No responsibility** for any issues, damages, or losses that may arise from using this software are taken.
  This project is licensed under the MIT License - see the [LICENSE](https://github.com/SilenZcience/cat_win/blob/main/LICENSE) file for details
  <div id="contact"></div>
  <h2>
  	<a href="#">&#x200B;</a>
  	<a href="#contact" title="Noto Emoji, licensed under CC BY 4.0">
  		<img unselectable="on" pointer-events="none" src="https://fonts.gstatic.com/s/e/notoemoji/latest/1f4ab/512.gif" width="30" />
  	</a>
  	<b>Contact</b>
  </h2>
  > **SilenZcience** <br/>
  [![GitHub-SilenZcience][GitHub-SilenZcience]](https://github.com/SilenZcience)
  [OS-Windows]: https://img.shields.io/badge/os-windows-green?label=OS
  [OS-Linux]: https://img.shields.io/badge/os-linux-green?label=OS
  [OS-MacOS]: https://img.shields.io/badge/os-macOS-green?label=OS
  [Unittests]: https://github.com/SilenZcience/cat_win/actions/workflows/unit_test.yml/badge.svg?branch=dev
  [Build-and-Check]: https://github.com/SilenZcience/cat_win/actions/workflows/package_test.yml/badge.svg?branch=dev
  [Compile-and-Push]: https://github.com/SilenZcience/cat_win/actions/workflows/build_executable.yml/badge.svg?branch=dev
  [Coverage]: https://raw.githubusercontent.com/SilenZcience/cat_win/badges/badges/badge-coverage.svg
  [Tests]: https://raw.githubusercontent.com/SilenZcience/cat_win/badges/badges/badge-tests.svg
  [GitHub-Last-Commit]: https://img.shields.io/github/last-commit/SilenZcience/cat_win/dev
  [GitHub-Issues]: https://img.shields.io/github/issues/SilenZcience/cat_win
  [GitHub-Release]: https://img.shields.io/github/v/release/SilenZcience/cat_win?label=Github
  [GitHub-Release-Date]: https://img.shields.io/github/release-date/SilenZcience/cat_win?label=Release%20Date
  [Github-Stars]: https://img.shields.io/github/stars/SilenZcience/cat_win?style=flat&color=yellow
  [Github-Forks]: https://img.shields.io/github/forks/SilenZcience/cat_win?style=flat&color=purple
  [Github-Watchers]: https://img.shields.io/github/watchers/SilenZcience/cat_win?style=flat&color=purple
  [MadeWith-Python]: https://img.shields.io/badge/Made%20with-Python-brightgreen
  [Python-Version]: https://img.shields.io/badge/Python-3.6%20--%203.13%20%7C%20pypy--3.6%20--%20pypy--3.10-blue
  <!-- https://img.shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%20pypy--3.7%20%7C%20pypy--3.8%20%7C%20pypy--3.9%20%7C%20pypy--3.10-blue -->
  [CurrentVersion]: https://img.shields.io/pypi/v/cat_win?label=PyPI
  [License]: https://img.shields.io/pypi/l/cat_win
  [GitHub-SilenZcience]: https://img.shields.io/badge/GitHub-SilenZcience-orange


pkgId: dbfaf0fc7888cdd7fb9227ac06d172c181489e3afa6e9b8c557a8dc299d58e53
name: python-catabra-pandas
arch: src
version: 0.0.2
epoch: 0
release: 1
summary: CaTabRa-pandas is a library with additional functionality for pandas
url: https://github.com/risc-mi/catabra-pandas
rpm_license: Apache 2.0 with Commons Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catabra-pandas-0.0.2-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <a href="#About"><b>About</b></a> &bull;
    <a href="#Quickstart"><b>Quickstart</b></a> &bull;
    <a href="#References"><b>References</b></a> &bull;
    <a href="#Contact"><b>Contact</b></a> &bull;
    <a href="#Acknowledgments"><b>Acknowledgments</b></a>
  </p>

  [![Platform Support](https://img.shields.io/badge/python->=3.6-blue)]()
  [![Platform Support](https://img.shields.io/badge/pandas->=1.0-blue)]()
  [![Platform Support](https://img.shields.io/badge/platform-Linux%20|%20Windows%20|%20MacOS-blue)]()



  **CaTabRa-pandas** is a Python library with a couple of useful functions for efficiently working with [pandas](https://pandas.pydata.org/) DataFrames. In particular, many of these functions are concerned with DataFrames containing *intervals*, i.e., DataFrames with (at least) two columns `"start"` and `"stop"` defining the left and right endpoints of intervals.

  **Highlights**:
  * Resample observations with respect to arbitrary (possibly irregular, possibly overlapping) windows: `catabra_pandas.resample_eav` and `catabra_pandas.resample_interval`.
  * Compute the intersection, union, difference, etc. of intervals: `catabra_pandas.combine_intervals`.
  * Group intervals by their distance to each other: `catabra_pandas.group_intervals`.
  * For each point in a given DataFrame, find the interval that contains it: `catabra_pandas.find_containing_interval`.
  * Find the previous/next observation for each entry in a DataFrame of timestamped observations: `catabra_pandas.prev_next_values`.

  Each of these functions lacks a native pandas implementation, and is implemented *extremely efficiently* in **CaTabRa-pandas**. DataFrames with 10M+ rows are no problem!

  **[Dask](https://docs.dask.org/en/stable/index.html) DataFrames are partly supported, too.**

  If you are interested in **CaTabRa-pandas**, you might be interested in **[CaTabRa](https://github.com/risc-mi/catabra)**, too: **CaTabRa** is a full-fledged tabular data analysis framework that enables you to calculate statistics, generate appealing visualizations and train machine learning models with a single command.



  **CaTabRa-pandas** has minimal requirements (Python >= 3.6, pandas >= 1.0) and can be easily installed using `pip`:

  ```
  pip install catabra-pandas
  ```

  Once installed, **CaTabRa-pandas** can be readily used.



  ```python
  import pandas as pd
  import catabra_pandas

  left = pd.DataFrame(data=dict(start=[0, 7, 1, 8], stop=[2, 8, 5, 9]))
  right = pd.DataFrame(data=dict(start=[10, 4, 0], stop=[11, 5, 3]))

  catabra_pandas.merge_intervals(
      left,
      right,
      how="inner",
      left_start="start",
      left_stop="stop",
      right_start="start",
      right_stop="stop"
  )
  ```

  **Note**: This is a special case of a *conditional join*. Conditional joins are not supported by pandas by default, but are available in [pyjanitor](https://github.com/pyjanitor-devs/pyjanitor) and [Polars](https://github.com/pola-rs/polars). **The catabra-pandas implementation of interval-overlap- and interval-containment-joins is extremely fast and memory-efficient**, as can be seen in [these benchmarks](benchmarks/Merging.ipynb).



  ```python
  import pandas as pd
  import catabra_pandas

  observations = pd.DataFrame(
      data={
          "subject_id": [0, 0, 0, 0, 1, 1],
          "attribute": ["HR", "Temp", "HR", "HR", "Temp", "HR"],
          "timestamp": [1, 1, 5, 7, 2, 3],
          "value": [82.7, 36.9, 79.5, 78.7, 37.2, 89.4]
      }
  )
  windows = pd.DataFrame(
      data={
          ("subject_id", ""): [0, 0, 1],
          ("timestamp", "start"): [0, 4, 1],
          ("timestamp", "stop"): [6, 8, 4]
      }
  )
  catabra_pandas.resample_eav(
      observations,
      windows,
      agg={
          "HR": ["mean", "p75", "r-1"],   # mean value, 75-th percentile, last observed value
          "Temp": ["count", "mode"]     # standard deviation, mode
      },
      entity_col="subject_id",
      time_col="timestamp",
      attribute_col="attribute",
      value_col="value"
  )
  ```



  ```python
  import pandas as pd
  import catabra_pandas

  intervals = pd.DataFrame(
      data={
          "subject_id": [0, 0, 1],
          "start": [0.5, 3.0, -10.7],
          "stop": [2.3, 10., 10.7]
      }
  )
  points = pd.DataFrame(
      data={
          "subject_id": [0, 0, 0, 1, 1],
          "point": [1.0, 2.5, 9.9, 0.0, -8.8]
      }
  )
  catabra_pandas.find_containing_interval(
      points,
      intervals,
      ["point"],
      start_col="start",
      stop_col="stop",
      group_by="subject_id"
  )
  ```



  **If you use CaTabRa-pandas in your research, we would appreciate citing the following conference paper:**

  * A. Maletzky, S. Kaltenleithner, P. Moser and M. Giretzlehner.
    *CaTabRa: Efficient Analysis and Predictive Modeling of Tabular Data*. In: I. Maglogiannis, L. Iliadis, J. MacIntyre
    and M. Dominguez (eds), Artificial Intelligence Applications and Innovations (AIAI 2023). IFIP Advances in
    Information and Communication Technology, vol 676, pp 57-68, 2023.
    [DOI:10.1007/978-3-031-34107-6_5](https://doi.org/10.1007/978-3-031-34107-6_5)

    ```
    @inproceedings{CaTabRa2023,
      author = {Maletzky, Alexander and Kaltenleithner, Sophie and Moser, Philipp and Giretzlehner, Michael},
      editor = {Maglogiannis, Ilias and Iliadis, Lazaros and MacIntyre, John and Dominguez, Manuel},
      title = {{CaTabRa}: Efficient Analysis and Predictive Modeling of Tabular Data},
      booktitle = {Artificial Intelligence Applications and Innovations},
      year = {2023},
      publisher = {Springer Nature Switzerland},
      address = {Cham},
      pages = {57--68},
      isbn = {978-3-031-34107-6},
      doi = {10.1007/978-3-031-34107-6_5}
    }
    ```



  If you have any inquiries, please open a GitHub issue.



  This project is financed by research subsidies granted by the government of Upper Austria. RISC Software GmbH is Member
  of UAR (Upper Austrian Research) Innovation Network.


pkgId: df2957c51ef542cd655be7768d94435dcccfd348d9215cafc643ec78993349b8
name: python-catalogue
arch: src
version: 2.0.10
epoch: 0
release: 1
summary: Super lightweight function registries for your library
url: https://github.com/explosion/catalogue
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catalogue-2.0.10-1.src.rpm
checksum_type: sha256
description:
  <a href="https://explosion.ai"><img src="https://explosion.ai/assets/img/logo.svg" width="125" height="125" align="right" /></a>



  `catalogue` is a tiny, zero-dependencies library that makes it easy to **add
  function (or object) registries** to your code. Function registries are helpful
  when you have objects that need to be both easily serializable and fully
  customizable. Instead of passing a function into your object, you pass in an
  identifier name, which the object can use to lookup the function from the
  registry. This makes the object easy to serialize, because the name is a simple
  string. If you instead saved the function, you'd have to use Pickle for
  serialization, which has many drawbacks.

  [![tests](https://github.com/explosion/catalogue/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/catalogue/actions/workflows/tests.yml)
  [![Current Release Version](https://img.shields.io/github/v/release/explosion/catalogue.svg?style=flat-square&include_prereleases&logo=github)](https://github.com/explosion/catalogue/releases)
  [![pypi Version](https://img.shields.io/pypi/v/catalogue.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/catalogue/)
  [![conda Version](https://img.shields.io/conda/vn/conda-forge/catalogue.svg?style=flat-square&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/catalogue)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/ambv/black)



  ```bash
  pip install catalogue
  ```

  ```bash
  conda install -c conda-forge catalogue
  ```

  > ⚠️ **Important note:** `catalogue` v2.0+ is only compatible with Python 3.6+.
  > For Python 2.7+ compatibility, use `catalogue` v1.x.



  Let's imagine you're developing a Python package that needs to load data
  somewhere. You've already implemented some loader functions for the most common
  data types, but you want to allow the user to easily add their own. Using
  `catalogue.create` you can create a new registry under the namespace
  `your_package` &rarr; `loaders`.

  ```python

  import catalogue

  loaders = catalogue.create("your_package", "loaders")
  ```

  This gives you a `loaders.register` decorator that your users can import and
  decorate their custom loader functions with.

  ```python

  from your_package import loaders

  @loaders.register("custom_loader")
  def custom_loader(data):
      
      return data
  ```

  The decorated function will be registered automatically and in your package,
  you'll be able to access all loaders by calling `loaders.get_all`.

  ```python

  def load_data(data, loader_id):
      print("All loaders:", loaders.get_all()) # {"custom_loader": <custom_loader>}
      loader = loaders.get(loader_id)
      return loader(data)
  ```

  The user can now refer to their custom loader using only its string name
  (`"custom_loader"`) and your application will know what to do and will use their
  custom function.

  ```python

  from your_package import load_data

  load_data(data, loader_id="custom_loader")
  ```





  Sure, that's the more classic callback approach. Instead of a string ID,
  `load_data` could also take a function, in which case you wouldn't need a
  package like this. `catalogue` helps you when you need to produce a serializable
  record of which functions were passed in. For instance, you might want to write
  a log message, or save a config to load back your object later. With
  `catalogue`, your functions can be parameterized by strings, so logging and
  serialization remains easy – while still giving you full extensibility.



  Decorators normally run when modules are imported. Relying on this side-effect
  can sometimes lead to confusion, especially if there's no other reason the
  module would be imported. One solution is to use
  [entry points](https://packaging.python.org/specifications/entry-points/).

  For instance, in [spaCy](https://spacy.io) we're starting to use function
  registries to make the pipeline components much more customizable. Let's say one
  user, Jo, develops a better tagging model using new machine learning research.
  End-users of Jo's package should be able to write
  `spacy.load("jo_tagging_model")`. They shouldn't need to remember to write
  `import jos_tagged_model` first, just to run the function registries as a
  side-effect. With entry points, the registration happens at install time – so
  you don't need to rely on the import side-effects.





  Create a new registry for a given namespace. Returns a setter function that can
  be used as a decorator or called with a name and `func` keyword argument. If
  `entry_points=True` is set, the registry will check for
  [Python entry points](https://packaging.python.org/tutorials/packaging-projects/#entry-points)
  advertised for the given namespace, e.g. the entry point group
  `spacy_architectures` for the namespace `"spacy", "architectures"`, in
  `Registry.get` and `Registry.get_all`. This allows other packages to
  auto-register functions.

  | Argument       | Type       | Description                                                                                    |
  | -------------- | ---------- | ---------------------------------------------------------------------------------------------- |
  | `*namespace`   | str        | The namespace, e.g. `"spacy"` or `"spacy", "architectures"`.                                   |
  | `entry_points` | bool       | Whether to check for entry points of the given namespace and pre-populate the global registry. |
  | **RETURNS**    | `Registry` | The `Registry` object with methods to register and retrieve functions.                         |

  ```python
  architectures = catalogue.create("spacy", "architectures")


  @architectures.register("custom_architecture")
  def custom_architecture():
      pass


  architectures.register("custom_architecture", func=custom_architecture)
  ```



  The registry object that can be used to register and retrieve functions. It's
  usually created internally when you call `catalogue.create`.



  Initialize a new registry. If `entry_points=True` is set, the registry will
  check for
  [Python entry points](https://packaging.python.org/tutorials/packaging-projects/#entry-points)
  advertised for the given namespace, e.g. the entry point group
  `spacy_architectures` for the namespace `"spacy", "architectures"`, in
  `Registry.get` and `Registry.get_all`.

  | Argument       | Type       | Description                                                                      |
  | -------------- | ---------- | -------------------------------------------------------------------------------- |
  | `namespace`    | Tuple[str] | The namespace, e.g. `"spacy"` or `"spacy", "architectures"`.                     |
  | `entry_points` | bool       | Whether to check for entry points of the given namespace in `get` and `get_all`. |
  | **RETURNS**    | `Registry` | The newly created object.                                                        |

  ```python

  architectures = catalogue.create("spacy", "architectures")

  architectures = Registry(("spacy", "architectures"))
  ```



  Check whether a name is in the registry.

  | Argument    | Type | Description                          |
  | ----------- | ---- | ------------------------------------ |
  | `name`      | str  | The name to check.                   |
  | **RETURNS** | bool | Whether the name is in the registry. |

  ```python
  architectures = catalogue.create("spacy", "architectures")

  @architectures.register("custom_architecture")
  def custom_architecture():
      pass

  assert "custom_architecture" in architectures
  ```



  Register a function in the registry's namespace. Can be used as a decorator or
  called as a function with the `func` keyword argument supplying the function to
  register. Delegates to `Registry.register`.



  Register a function in the registry's namespace. Can be used as a decorator or
  called as a function with the `func` keyword argument supplying the function to
  register.

  | Argument    | Type     | Description                                               |
  | ----------- | -------- | --------------------------------------------------------- |
  | `name`      | str      | The name to register under the namespace.                 |
  | `func`      | Any      | Optional function to register (if not used as decorator). |
  | **RETURNS** | Callable | The decorator that takes one argument, the name.          |

  ```python
  architectures = catalogue.create("spacy", "architectures")


  @architectures.register("custom_architecture")
  def custom_architecture():
      pass


  architectures.register("custom_architecture", func=custom_architecture)
  ```



  Get a function registered in the namespace.

  | Argument    | Type | Description              |
  | ----------- | ---- | ------------------------ |
  | `name`      | str  | The name.                |
  | **RETURNS** | Any  | The registered function. |

  ```python
  custom_architecture = architectures.get("custom_architecture")
  ```



  Get all functions in the registry's namespace.

  | Argument    | Type           | Description                              |
  | ----------- | -------------- | ---------------------------------------- |
  | **RETURNS** | Dict[str, Any] | The registered functions, keyed by name. |

  ```python
  all_architectures = architectures.get_all()

  ```



  Get registered entry points from other packages for this namespace. The name of
  the entry point group is the namespace joined by `_`.

  | Argument    | Type           | Description                             |
  | ----------- | -------------- | --------------------------------------- |
  | **RETURNS** | Dict[str, Any] | The loaded entry points, keyed by name. |

  ```python
  architectures = catalogue.create("spacy", "architectures", entry_points=True)

  all_entry_points = architectures.get_entry_points()
  ```



  Check if registered entry point is available for a given name in the namespace
  and load it. Otherwise, return the default value.

  | Argument    | Type | Description                                      |
  | ----------- | ---- | ------------------------------------------------ |
  | `name`      | str  | Name of entry point to load.                     |
  | `default`   | Any  | The default value to return. Defaults to `None`. |
  | **RETURNS** | Any  | The loaded entry point or the default value.     |

  ```python
  architectures = catalogue.create("spacy", "architectures", entry_points=True)

  custom_architecture = architectures.get_entry_point("custom_architecture")
  ```



  Find the information about a registered function, including the module and path
  to the file it's defined in, the line number and the docstring, if available.

  | Argument    | Type                       | Description                         |
  | ----------- | -------------------------- | ----------------------------------- |
  | `name`      | str                        | Name of the registered function.    |
  | **RETURNS** | Dict[str, Union[str, int]] | The information about the function. |

  ```python
  import catalogue

  architectures = catalogue.create("spacy", "architectures", entry_points=True)

  @architectures("my_architecture")
  def my_architecture():
      """This is an architecture"""
      pass

  info = architectures.find("my_architecture")




  ```



  Check if a namespace exists.

  | Argument     | Type | Description                                                  |
  | ------------ | ---- | ------------------------------------------------------------ |
  | `*namespace` | str  | The namespace, e.g. `"spacy"` or `"spacy", "architectures"`. |
  | **RETURNS**  | bool | Whether the namespace exists.                                |


pkgId: e5379e2915ec0aef378b7563eb9cbf425e36f6c178e8f74fc258a74fd15359ed
name: python-catalyst-sdwan-lab
arch: src
version: 2.0.14
epoch: 0
release: 1
url: https://github.com/cisco-open/sdwan-lab-deployment-tool
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catalyst-sdwan-lab-2.0.14-1.src.rpm
checksum_type: sha256
summary:
  Catalyst SD-WAN Lab Deployment Tool - Automation Tool for managing Cisco Catalyst SD-WAN labs inside Cisco Modeling Labs

description:
  [![Tests](https://github.com/cisco-open/sdwan-lab-deployment-tool/actions/workflows/test.yml/badge.svg)](https://github.com/netascode/iac-validate/actions/workflows/test.yml)
  ![Python Support](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-informational "Python Support: 3.9, 3.10, 3.11, 3.12")



  This tool automates [Cisco Catalyst SD-WAN](https://www.cisco.com/site/us/en/solutions/networking/sdwan/index.html) lab deployment inside [Cisco Modeling Labs (CML)](https://www.cisco.com/c/en/us/products/cloud-systems-management/modeling-labs/index.html).

  The tool will help you automate your CML lab deployments with SD-WAN Manager, Controllers and Validators and up to 20 SD-WAN edges. You can build as pods as your CML platform can host. Please refer to the [Limitations and scale](#limitations-and-scale) for details.






  Catalyst SD-WAN Lab Deployment Tool requires Linux or macOS system.
  To run is on Windows, please use [Linux on Windows with WSL](/README.md#appendix---wsl-installation) or set up Linux VM/container.

  Catalyst SD-WAN Lab Deployment Tool requires Python 3.9 or newer. This can be verified by pasting the following to a terminal window:

      % python3 -c "import sys;assert sys.version_info>(3,9)" && echo "ALL GOOD"

  If 'ALL GOOD' is printed it means Python requirements are met. If not, download and install the latest 3.x version at Python.org (https://www.python.org/downloads/).

  All the Python prerequisites are automaticaly installed when you install the package. Please refer to the [Installing](#installing) section for details.

  This tool requires CML 2.6 or higher.


  The recommended way to install is via pip.

  Create a directory to store the virtual environment and runtime files:

        mkdir csdwan
        cd csdwan

  Create virtual environment:

        python3 -m venv venv

  Activate virtual environment:

       source venv/bin/activate

  - Note that the prompt is updated with the virtual environment name (venv), indicating that the virtual environment is active.

  Upgrade initial virtual environment packages:

      pip install --upgrade pip setuptools

  To install SD-WAN Lab Deployment Tool:

      pip install --upgrade catalyst-sdwan-lab

  Verify that SD-WAN Lab tool can run:

      sdwan-lab --version

  You can also use the following shortcut to run any lab task:

      csdwan --version

  Notes:
  - The virtual environment is deactivated by typing 'deactivate' at the command prompt.
  - Before running Catalyst SD-WAN Lab Deployment Tool again, make sure to activate the virtual environment back again (source venv/bin/activate).


  Simmilar to [Sastre](https://github.com/CiscoDevNet/sastre), the command line is structured as a set of base parameters, the task specification followed by task-specific parameters:

        sdwan-lab <base parameters> <task> <task-specific parameters>

  Base parameters define global options such as verbosity level, CML credentials, etc.

  Task indicates the operation to be performed. The following tasks are currently available:
  * [Setup](#setup-task): Setup CML to support Catalyst SD-WAN use cases, upload new software images, and create node and image definitions that are required to run Catalyst SD-WAN lab in the CML.
  * [Deploy](#deploy-task): Deploy CML topology with two underlay networks (INET, MPLS), one Manager/Validator/Controller, and one Gateway router. Once topology boots up, configure the control components and create basic templates / configuration groups.
  * [Add](#add-task): Add and automatically onboard additional SD-WAN nodes (Validators/Controllers/Edges) to existing lab.
  * [Backup](#backup-task): Backup the Catalyst SD-WAN Lab runnning in CML, including the CML topology and all its nodes, SD-WAN device states and templates / configuration groups.
  * [Restore](#restore-task): Restore the Catalyst SD-WAN Lab from backup, onboard and confgure control components and create basic feature templates / configuration groups. If there are any WAN Edges, automatically onboard the WAN Edges back to the SD-WAN Manager using the configuration from the backup.
  * [Delete](#delete-task): Delete currently running lab from CML and remove all lab data.
  * [Sign](#sign-task): Sign Certificate Signing Request (CSR) using SD-WAN Lab Deployment Tool Root CA

  Task-specific parameters are provided after the task argument.



        sdwan-lab -h
        usage: sdwan-lab.py [-h] [-c <cml-ip>] [-u <cml-user>] [-p <cml-password>] [-v] [--version] {setup,deploy,add,backup,restore,delete} ...

        Catalyst SD-WAN Lab Deployment Tool - Automation Tool for managing Cisco Catalyst SD-WAN labs inside Cisco Modelling Labs

        positional arguments:
          {setup,deploy,add,backup,restore,delete}
                                Task to be performed.
            setup               Setup on-prem CML to use Catalyst SD-WAN Lab automation.
            deploy              Deploy a new Catalyst SD-WAN lab pod.
            add                 Add Catalyst SD-WAN device to running lab pod.
            backup              Backup running Catalyst SD-WAN lab pod.
            restore             Restore Catalyst SD-WAN POD from backup.
            delete              Delete the CML lab and all the lab data.
            sign                Sign CSR using the SD-WAN Lab Deployment Tool Root CA.

        optional arguments:
          -h, --help            show this help message and exit
          -c <cml-ip>, --cml <cml-ip>
                                CML IP address, can also be defined via CML_IP environment variable. If neither is provided user is prompted for CML IP.
          -u <cml-user>, --user <cml-user>
                                CML username, can also be defined via CML_USER environment variable. If neither is provided user is prompted for CML username.
          -p <cml-password>, --password <cml-password>
                                CML password, can also be defined via CML_PASSWORD environment variable. If neither is provided user is prompted for CML password.
          -v, --verbose         Increase output verbosity.
          --version             show program's version number and exit

  Most of the parameters can also be provided via environment variables:
  * CML_IP
  * CML_USER
  * CML_PASSWORD
  * MANAGER_IP
  * MANAGER_USER
  * MANAGER_PASSWORD
  * MANAGER_MASK
  * MANAGER_GATEWAY
  * LAB_NAME

  For any of the required arguments, user is prompted for a value if they are not provided via the environment variables or command line arguments.

  The easiest way to run the tool is to provide all the lab variables in the rc file and source that file. The example file below contains all the variables required to run all the tasks.

      % cat rc-example.sh
      export CML_IP='10.0.0.1'
      export CML_USER='user1'
      export CML_PASSWORD='password123'
      export MANAGER_IP='10.0.0.10'
      export MANAGER_USER='sdwan'
      export MANAGER_PASSWORD='sdwanlab123'
      export MANAGER_MASK='/24'
      export MANAGER_GATEWAY='10.0.0.254'
      export LAB_NAME='sdwan'
      % source rc-example.sh

  Note that if password was not defined, the user will be prompted for a password. Also please note we recommend not to use admin user as MANAGER_USER. Instead, configure a different user name to always have a backup user. By default, the MANAGER_PASSWORD will be set for both admin user and the MANAGER_USER that you specify.

  Note that MANAGER_IP can be:
  - an IP address: SD-WAN Manager will be reachable over this IP address. By default the IP address should come from the same subnet as CML IP, unless custom bridge is specified during deploy task.
  - a PATty port in format "pat:<outside-port>": SD-WAN Manager will be reachable over CML IP port <outside-port>. Before using this option, PATTy needs to be enabled on the CML server as per [CML documentation](https://developer.cisco.com/docs/modeling-labs/patty-tool-overview/).


  Task-specific parameters and options are defined after the task is provided. Each task has its own set of parameters. Check the task documentation to learn more about task-specific parameters.


  This task makes sure your CML is ready to run Catalyst SD-WAN labs. The task will:
  * Create node definitions that are required to run Catalyst SD-WAN lab in the CML: Manager, Validator, Controller and Edge
  * Look for new SD-WAN software images in the folder where the script was run. If the image is found, upload the image to CML and create image definition for the right node definition: Manager, Validator, Controller and Edge

  On each CML server that you want to use, you should run a setup task at least once to create required node and image definitions. You can rerun the setup task each time you want to add a new Catalyst SD-WAN software image to your CML server.

  This task have one task-specific argument that allows you to migrate the node and image definitions to new format if you've used SD-WAN Lab 1.x in the past.

        sdwan-lab setup -h
        usage: sdwan-lab.py setup [-h] [--migrate]

        optional arguments:
          -h, --help  show this help message and exit
          --migrate   Migrate node and image definitions from SD-WAN Lab v1.x to v2.x. This task should be run once if CML server was using SD-WAN LAb Tool v1.x in the past.


  This task:
  1. Defines four/five subnets:
     * VPN0 - 172.16.0.0/24
     * INET - 172.16.1.0/24
     * MPLS - 172.16.2.0/24
     * External Connector - in bridge mode, this subnet is defined by task-specific parameters and is used to provide external reachability to SD-WAN Manager.
     * Internet Connector - in NAT mode, this subnet provides Internet connectivity for Internet transport and is same as CML subnet
  2. Deploys basic SD-WAN topology with:
     * two underlay networks (INET, MPLS)
     * one Manager
     * one Validator
     * one Controller
     * one Gateway router that connects VPN0 subnet to INET and MPLS subnets
  3. Once topology boots up, the task configures the control plane (control components, certificates, etc.) and create basic feature templates / configuration groups that can be used for WAN Edge onboarding. It also attaches Controller to device template.
  4. At this point you can start creating your custom topology using [Add Task](#add-task) to automatically onboard additional SD-WAN nodes (Validators/Controllers/Edges).

  You should run this task to deploy a new lab with control plane configured and build any WAN Edge topology you like.

  This task has several task-specific parameters, including software version that you want to run on the control components.

        sdwan-lab deploy -h
        usage: sdwan-lab.py deploy [-h] [--manager <manager-ip>] [--mmask <manager-mask>] [--mgateway <manager-gateway>] [--muser <manager-user>] [--mpassword <manager-password>] [--bridge <custom-bridge-name>] [--dns <dns-server-ip>]
                                   <software-version>

        positional arguments:
          <software-version>    Software version that will be used on SD-WAN Control Components.

        optional arguments:
          -h, --help            show this help message and exit
          --manager <manager-ip>
                                SD-WAN Manager IP address, can also be defined via MANAGER_IP environment variable. If neither is provided user is prompted for SD-WAN Manager IP.
          --mmask <manager-mask>
                                Subnet mask for given SD-WAN Manager IP (e.g. /24), can also be defined via MANAGER_MASK environment variable. If neither is provided user is prompted for SD-WAN Manager subnet mask.
          --mgateway <manager-gateway>
                                Gateway IP for given SD-WAN Manager IP, can also be defined via MANAGER_GATEWAY environment variable. If neither is provided user is prompted for Manager gateway IP.
          --muser <manager-user>
                                SD-WAN Manager username, can also be defined via MANAGER_USER environment variable. If neither is provided user is prompted for SD-WAN Manager username.
          --mpassword <manager-password>
                                SD-WAN Manager password, can also be defined via MANAGER_PASSWORD environment variable. If neither is provided user is prompted for SD-WAN Manager password.
          --lab <lab_name>      Set CML Lab name, can also be defined via LAB_NAME environment variable. If not provided, default name "sdwan<number>" will be assigned.
          --bridge <custom-bridge-name>
                                Set custom bridge for SD-WAN Manager external connection. Default is System Bridge
          --dns <dns-server-ip>
                                Set custom DNS server for Internet/VPN0 transport. Default is same as CML DNS
          --retry               If for some reason your script lost connectivity during SD-WAN Manager boot, you can add --retry to continue onboarding the lab that is already in CML.

  Time to complete the deployment task depends on:
  * SD-WAN software version
  * CML resources


  This task adds Catalyst SD-WAN nodes (Validators/Controllers/Edges) into existing Catalyst SD-WAN lab. This task will:
  1. Add requested number of nodes to the CML topology and boot them with cloud-init configuration
  2. Once nodes boot up, automatically onboard them to SD-WAN Manager
  3. For Controller/Edge nodes, automatically attach basic device template / configuration group
  4. For Validator nodes, automatically update Validator FQDN mapping with new IP addresses

  This task has several task-specific parameters.

        sdwan-lab add -h
        usage: sdwan-lab.py add [-h] [--manager <manager-ip>] [--muser <manager-user>] [--mpassword <manager-password>] [--lab <lab_name>] <number-of-devices> <device-type> <software-version>

        positional arguments:
          <number-of-devices>   Number of devices to be added.
          <device-type>         Type of device/s to be added (e.g. validator, controller, edge, sdrouting).
          <software-version>    Software version that will be used.

        optional arguments:
          -h, --help            show this help message and exit
          --manager <manager-ip>
                                SD-WAN Manager IP address, can also be defined via MANAGER_IP environment variable. If neither is provided user is prompted for SD-WAN Manager IP.
          --muser <manager-user>
                                SD-WAN Manager username, can also be defined via MANAGER_USER environment variable. If neither is provided user is prompted for SD-WAN Manager username.
          --mpassword <manager-password>
                                SD-WAN Manager password, can also be defined via MANAGER_PASSWORD environment variable. If neither is provided user is prompted for SD-WAN Manager password.
          --lab <lab_name>      CML Lab name, can also be defined via LAB_NAME environment variable. If neither is provided user is prompted for lab name.

  Below you will find few examples of add task:

      sdwan-lab add 1 validator 20.9.4 --lab sdwan1
      sdwan-lab add 2 controllers 20.12.2 --lab sdwan2
      sdwan-lab add 5 edges 17.09.03a --lab vsdwan1
      sdwan-lab add 2 sdrouting 17.12.2 --lab vsdwan1


  This task creates a backup of the Catalyst SD-WAN lab running in CML. CML doesn't natively support configuration export from Catalyst SD-WAN nodes, but this script can help you to save your Catalyst SD-WAN configuration. This task will:
  1. For Manager, Validator, Controller and WAN Edge nodes (SD-WAN and SD-Routing), create configuration backup.
  2. For non-SD-WAN nodes, export the configuration if it's supported by CML.
  3. Save the CML topology with exported configuration.
  4. Create a backup of SD-WAN Manager templates, policies and configuration groups using [Sastre](https://github.com/CiscoDevNet/sastre).

  This task has several task-specific parameters, including working directory where backup is saved.

      % sdwan-lab back -h
        usage: sdwan-lab.py backup [-h] [--manager <manager-ip>] [--muser <manager-user>] [--mpassword <manager-password>] [--lab <lab_name>] [--workdir <directory>]

        optional arguments:
          -h, --help            show this help message and exit
          --manager <manager-ip>
                                SD-WAN Manager IP address, can also be defined via MANAGER_IP environment variable. If neither is provided user is prompted for SD-WAN Manager IP.
          --muser <manager-user>
                                SD-WAN Manager username, can also be defined via MANAGER_USER environment variable. If neither is provided user is prompted for SD-WAN Manager username.
          --mpassword <manager-password>
                                SD-WAN Manager password, can also be defined via MANAGER_PASSWORD environment variable. If neither is provided user is prompted for SD-WAN Manager password.
          --lab <lab_name>      CML Lab name, can also be defined via LAB_NAME environment variable. If neither is provided user is prompted for lab name.
          --workdir <directory>
                                Backup destination folder


  This task restores Catalyst SD-WAN lab from a backup. This task will:
  1. Import the CML topology from the backup and boot the Catalyst SD-WAN control components first.
  2. Once control components are up, configure the control plane (control components, certificates, etc.).
  3. Restore SD-WAN Manager templates, policies and configuration groups using [Sastre](https://github.com/CiscoDevNet/sastre).
  4. Verify if there are any WAN Edges in the topology (SD-WAN and SD-Routing). If yes, then generate the new OTP and automatically reonboard them to SD-WAN Manager.

  This task has several task-specific parameters, including working directory from where backup is restored.

      % sdwan-lab restore -h
        usage: sdwan-lab.py restore [-h] [--manager <manager-ip>] [--mmask <manager-mask>] [--mgateway <manager-gateway>] [--muser <manager-user>] [--mpassword <manager-password>] [--lab <lab_name>]
                                    [--workdir <directory>] [--deleteexisting] [--retry]

        optional arguments:
          -h, --help            show this help message and exit
          --manager <manager-ip>
                                SD-WAN Manager IP address, can also be defined via MANAGER_IP environment variable. If neither is provided user is prompted for SD-WAN Manager IP.
          --mmask <manager-mask>
                                Subnet mask for given SD-WAN Manager IP (e.g. /24), can also be defined via MANAGER_MASK environment variable. If neither is provided user is prompted for SD-WAN Manager subnet mask.
          --mgateway <manager-gateway>
                                Gateway IP for given SD-WAN Manager IP, can also be defined via MANAGER_GATEWAY environment variable. If neither is provided user is prompted for Manager gateway IP.
          --muser <manager-user>
                                SD-WAN Manager username, can also be defined via MANAGER_USER environment variable. If neither is provided user is prompted for SD-WAN Manager username.
          --mpassword <manager-password>
                                SD-WAN Manager password, can also be defined via MANAGER_PASSWORD environment variable. If neither is provided user is prompted for SD-WAN Manager password.
          --lab <lab_name>      CML Lab name, can also be defined via LAB_NAME environment variable. If neither is provided user is prompted for lab name.
          --workdir <directory>
                                Restore source folder
          --deleteexisting      If there is already lab running with same name and using same SD-WAN Manager IP, delete this lab before restoring. Note the all running lab data will be lost!
          --retry               If for some reason your script lost connectivity during SD-WAN Manager boot, you can add --retry to continue restoring the lab that is already in CML


  This task deletes the CML lab and removes all it's data. Note after this operation, all lab data is lost.

  This task has several task-specific parameters.

        sdwan-lab delete -h
        usage: sdwan-lab.py delete [-h] [--lab <lab_name>] [--force]

        optional arguments:
          -h, --help        show this help message and exit
          --lab <lab_name>  Lab name
          --force           Delete the lab without asking for confirmation. Note the all lab data will be lost!


  This tasks reads the Certificate Signing Request (CSR) from a file and signs it using SD-WAN Lab Deployment Tool Root CA.
  At the end, the task prints the signed certificate in standard output.

  This task has several task-specific parameters.

        sdwan-lab delete -h
        usage: sdwan-lab.py sign [-h] <csr_file>

        positional arguments:
          <csr_file>  Certificate Signing Request (CSR) File


  The tool supports the following scale per CML lab:

  - 1 SD-wan Manager instance (Cluster is not yet supported)
  - 8 SD-WAN Validators (Documented support from CCO)
  - 12 SD-WAN Controllers (Documented support from CCO)
  - 20 SD-WAN Edges
  - 10 SD-Routing edges





  To install WSL on your Windows VM or Physical machine. Ensure that the HW Virutalization is enabled in the BIOS or VM Defintion.

  If its on Windows server you may need to run this command to allow the WSL to function properly

  Open PowerShell as Administrator and run:

  `Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux`

  Install WSL with default distribution (Ubuntu)
  Open PowerShell and run

   `wsl --install`

  Once the installation is finished and you have restarted Windows you are able to continue the installation of this tool as described in the [installation section](README.md#installing) of this document.

  You can read more about [Linux on Windows with WSL here](https://learn.microsoft.com/en-us/windows/wsl/install).



  Tomasz Zarski (tzarski@cisco.com)



  BSD-3-Clause


  - Marcelo Reis and [Sastre](https://github.com/CiscoDevNet/sastre)
  - Inigo Alonso


pkgId: 8fca96d09d6cf6785d70a54a79a15a25c6fc6ee34f45a09707866aa50beb4533
name: python-catalystcoop.ferc-xbrl-extractor
arch: src
version: 1.5.1
epoch: 0
release: 1
summary: A tool for extracting data from FERC XBRL Filings.
url: https://github.com/catalyst-cooperative/ferc-xbrl-extractor
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catalystcoop.ferc-xbrl-extractor-1.5.1-1.src.rpm
checksum_type: sha256
rpm_license:
  MIT License  Copyright (c) 2022 Catalyst Cooperative  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: 0a6481fdceef9249d75923ca7d564743685a667100ffd103df948b9fb0d379e7
name: python-catalystwan
arch: src
version: 0.35.6
epoch: 0
release: 1
summary: Cisco Catalyst WAN SDK for Python
url: https://github.com/cisco-open/cisco-catalyst-wan-sdk
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catalystwan-0.35.6-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <a href="#"><img src="docs/images/catalystwan.svg" alt="Cisco Catalyst WAN SDK Logo" style="height:150px" />
  </p>

  [![Python-Supported](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12)](https://www.python.org/)

  Cisco Catalyst WAN SDK is a package for creating simple and parallel automatic requests via official SD-WAN Manager API. It is intended to serve as a multiple session handler (provider, provider as a tenant, tenant). The library is not dependent on environment which is being run in, you just need a connection to any SD-WAN Manager.



  Welcome to the Cisco Catalyst WAN SDK!

  We are thrilled to announce that Cisco Catalyst WAN SDK is now available in early beta. This is an exciting step forward in enabling developers to harness the full potential of Cisco's networking solutions.  Please be aware that, as an early beta release, this version of the SDK is still undergoing development and testing. As such, it is provided "as is" and support to address any issues are limited and best effort.


  We encourage developers to explore and test the SDK's capabilities, but please exercise caution when using it in production environments.  We are dedicated to improving the Cisco Catalyst WAN SDK and we value your input. Your feedback is crucial to us-it will guide us in refining and enhancing the SDK to better meet your needs.
  To report any issues, share your insights, or suggest improvements, please visit our Issues page on GitHub or reach out to us through the provided communication channels.

  Thank you for being a part of our development journey!


  ```console
  pip install catalystwan
  ```


  In order to execute SDK APIs **ManagerSession** needs to be created. The fastest way to get started is to use `create_manager_session()` method which configures session, performs authentication for given credentials and returns **ManagerSession** instance in operational state. **ManagerSession** provides a collection of supported APIs in `api` instance variable.
  Please check example below:

  ```python
  from catalystwan.session import create_manager_session

  url = "example.com"
  username = "admin"
  password = "password123"

  with create_manager_session(url=url, username=username, password=password) as session:
      devices = session.api.devices.get()
      print(devices)
  ```

  **ManagerSession** extends [requests.Session](https://requests.readthedocs.io/en/latest/user/advanced/#session-objects) so all functionality from [requests](https://requests.readthedocs.io/en/latest/) library is avaiable to user, it also implements python [contextmanager](https://docs.python.org/3.8/library/contextlib.html#contextlib.contextmanager) and automatically frees server resources on exit.

  <details>
      <summary> <b>Configure Manager Session before using</b> <i>(click to expand)</i></summary>

  It is possible to configure **ManagerSession** prior sending any request.

  ```python
  from catalystwan.session import ManagerSession
  from catalystwan.vmanage_auth import vManageAuth

  url = "example.com"
  username = "admin"
  password = "password123"


  auth = vManageAuth(username, password)
  session = ManagerSession(url=url, auth=auth)

  session.login()
  session.get("/dataservice/device")
  session.close()
  ```
  When interacting with the SDWAN Manager API without using a context manager, it's important
  to manually execute the `close()` method to release the user session resource.
  Ensure that the `close()` method is called after you have finished using the session to maintain optimal resource management and avoid potential errors.

  </details>

  <details>
      <summary> <b>Login as Tenant</b> <i>(click to expand)</i></summary>

  Tenant domain needs to be provided in url together with Tenant credentials.

  ```python
  from catalystwan.session import create_manager_session

  url = "tenant.example.com"
  username = "tenant_user"
  password = "password123"

  with create_manager_session(url=url, username=username, password=password) as session:
      print(session.session_type)
  ```

  </details>

  <details>
      <summary> <b>Login as Provider-as-Tenant</b> <i>(click to expand)</i></summary>

  Tenant `subdomain` needs to be provided as additional argument together with Provider credentials.

  ```python
  from catalystwan.session import create_manager_session

  url = "example.com"
  username = "provider"
  password = "password123"
  subdomain = "tenant.example.com"

  with create_manager_session(url=url, username=username, password=password, subdomain=subdomain) as session:
      print(session.session_type)
  ```

  </details>

  <details>
      <summary> <b>Login using Api Gateway</b> <i>(click to expand)</i></summary>

  ```python
  from catalystwan.session import create_apigw_session

  with create_apigw_session(
      url="example.com",
      client_id="client_id",
      client_secret="client_secret",
      org_name="Org-Name",
      username="user",
      mode="user",
      token_duration=10,
  ) as session:
      devices = session.api.devices.get()
      print(devices)
  ```
  </details>



  All examples below assumes `session` variable contains logged-in [Manager Session](#Manager-Session) instance.

  <details>
      <summary> <b>Get devices</b> <i>(click to expand)</i></summary>

  ```python
  devices = session.api.devices.get()
  ```

  </details>

  <details>
      <summary> <b>Admin Tech</b> <i>(click to expand)</i></summary>

  ```Python
  admin_tech_file = session.api.admin_tech.generate("172.16.255.11")
  session.api.admin_tech.download(admin_tech_file)
  session.api.admin_tech.delete(admin_tech_file)
  ```
  </details>

  <details>
      <summary> <b>Speed test</b> <i>(click to expand)</i></summary>

  ```python
  devices = session.api.devices.get()
  speedtest = session.api.speedtest.speedtest(devices[0], devices[1])
  ```

  </details>

  <details>
      <summary> <b>Upgrade device</b> <i>(click to expand)</i></summary>

  ```python

  controllers = session.endpoints.configuration_device_inventory.get_device_details('controllers')
  vsmarts = controllers.filter(personality=Personality.VSMART)
  image = "viptela-20.7.2-x86_64.tar.gz"


  session.api.repository.upload_image(image)



  install_task = session.api.software.install(devices=vsmarts, image=image)


  install_task.wait_for_completed()
  ```

  </details>

  <details>
      <summary> <b>Get alarms</b> <i>(click to expand)</i></summary>
  To get all alarms:

  ```python
  alarms = session.api.alarms.get()
  ```

  To get all not viewed alarms:

  ```python
  not_viewed_alarms = session.api.alarms.get().filter(viewed=False)
  ```

  To get all alarms from past `n` hours:

  ```python
  n = 24
  alarms_from_n_hours = session.api.alarms.get(from_time=n)
  ```

  To get all critical alarms from past `n` hours:

  ```python
  from catalystwan.utils.alarm_status import Severity
  n = 48
  critical_alarms = session.api.alarms.get(from_time=n).filter(severity=Severity.CRITICAL)
  ```

  </details>

  <details>
      <summary> <b>Users</b> <i>(click to expand)</i></summary>

  ```python

  session.api.users.get()


  from catalystwan.endpoints.administration_user_and_group import User
  new_user = User(username="new_user", password="new_user", group=["netadmin"], description="new user")
  session.api.users.create(new_user)


  new_user_update = UserUpdateRequest(username="new_user", group=["netadmin", "netops"], locale="en_US", description="updated-new_user-description")
  session.api.users.update(new_user_update)


  session.api.users.update_password("new_user", "n3W-P4s$w0rd")


  session.api.users.reset("new_user")


  session.api.users.delete("new_user")


  session.api.users.get_auth_type()
  session.api.users.get_role()
  ```

  </details>

  <details>
      <summary> <b>User Groups</b> <i>(click to expand)</i></summary>

  ```python

  session.api.user_groups.get()


  group = UserGroup("new_user_group", [])
  group.enable_read({"Audit Log", "Alarms"})
  group.enable_read_and_write({"Device Inventory"})
  session.api.user_groups.create(group)


  group.disable({"Alarms"})
  session.api.user_groups.update(group)


  session.api.user_groups.delete(group.group_name)
  ```

  </details>

  </details>

  <details>
      <summary> <b>Sessions</b> <i>(click to expand)</i></summary>

  ```python

  active_sessions = session.api.sessions.get()


  new_user_sessions = active_sessions.filter(raw_username="new_user")
  session.api.sessions.invalidate(new_user_sessions)
  ```

  </details>

  <details>
      <summary> <b>Resource Groups</b> <i>(click to expand)</i></summary>

  ```python

  session.api.resource_groups.get()


  new_resource_group = ResourceGroup(
      name="new_resource_group",
      desc="Custom Resource Group #1",
      siteIds=[]
  )
  session.api.resource_groups.create(new_resource_group)


  resource_group = session.api.resource_groups.get().filter(name="new_resource_group").single_or_default()
  updated_resource_group = ResourceGroupUpdateRequest(
      id=resource_group.id,
      name=resource_group.name,
      desc="Custom Resource Group #1 with updated description and site ids",
      siteIds=[200]
  )


  session.api.resource_groups.switch("new_resource_group")


  session.api.resource_groups.delete(resource_group.id)
  ```

  </details>

  <details>
      <summary> <b>Tenant management</b> <i>(click to expand)</i></summary>

  ```python
  api = session.api.tenant_management

  tenants = [
      Tenant(
          name="tenant1",
          org_name="CiscoDevNet",
          subdomain="alpha.bravo.net",
          desc="This is tenant for unit tests",
          edge_connector_enable=True,
          edge_connector_system_ip="172.16.255.81",
          edge_connector_tunnel_interface_name="GigabitEthernet1",
          wan_edge_forecast=1,
      )
  ]
  create_task = api.create(tenants)
  create_task.wait_for_completed()

  tenants_data = api.get_all()

  tenant = tenants_data.filter(name="tenant1").single_or_default()

  tenant_id = tenant.tenant_id

  vsessionid = api.vsession_id(tenant_id)

  delete_task = api.delete([tenant_id])
  delete_task.wait_for_completed()

  api.get_hosting_capacity_on_vsmarts()
  api.get_statuses()
  api.get_vsmart_mapping()
  ```
  </details>

  <details>
      <summary> <b>Tenant migration</b> <i>(click to expand)</i></summary>

  ```python
  from pathlib import Path
  from catalystwan.session import create_manager_session
  from catalystwan.models.tenant import TenantExport
  from catalystwan.workflows.tenant_migration import migration_workflow

  tenant = TenantExport(
      name="mango",
      desc="Mango tenant description",
      org_name="Provider Org-Mango Inc",
      subdomain="mango.fruits.com",
      wan_edge_forecast=100,
      migration_key="MangoTenantMigrationKey",   # only for SDWAN Manager >= 20.13
      is_destination_overlay_mt=True,            # only for SDWAN Manager >= 20.13
  )

  with create_manager_session(url="10.0.1.15", username="st-admin", password="") as origin_session, \
       create_manager_session(url="10.9.0.16", username="mt-provider-admin", password="") as target_session:
      migration_workflow(
          origin_session=origin_session,
          target_session=target_session,
          workdir=Path("workdir"),
          tenant=tenant,
          validator="10.9.12.26"
      )
  ```

  `migration_workflow` performs multi-step migration procedure according to [Migrate Single-Tenant Cisco SD-WAN Overlay to Multitenant Cisco SD-WAN Deployment](https://www.cisco.com/c/en/us/td/docs/routers/sdwan/configuration/system-interface/vedge-20-x/systems-interfaces-book/sdwan-multitenancy.html#concept_sjj_jmm_z4b)


  Since 20.13 also MT to ST is supported (just provide suitable origin/target sessions, and `is_destination_overlay_mt` parameter)


  Each step of the `migration_workflow` procedure can be executed independently using api methods: `export_tenant`, `download`, `import_tenant`, `store_token`, `migrate_network`

  ```python
  origin_api = origin_session.api.tenant_migration_api
  target_api = target_session.api.tenant_migration_api
  tenant_file = Path("~/tenant.tar.gz")
  token_file = Path("~/tenant-token.txt")

  export_task = origin_api.export_tenant(tenant=tenant)
  remote_filename = export_task.wait_for_file()

  origin_api.download(export_path, remote_filename)

  import_task = target_api.import_tenant(export_path, tenant.migration_key)
  import_task.wait_for_completed()

  migration_id = import_task.import_info.migration_token_query_params.migration_id
  target_api.store_token(migration_id, token_path)

  migrate_task = origin_api.migrate_network(token_path)
  migrate_task.wait_for_completed()
  ```
  </details>


  To remove `InsecureRequestWarning`, you can include in your scripts (warning is suppressed when `catalystwan_devel` environment variable is set):
  ```Python
  import urllib3
  urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  ```


  ```python
  try:
      session.api.users.delete("bogus-user-name")
  except ManagerHTTPError as error:
      
      print(error.response.status_code)
      print(error.info.code)
      print(error.info.message)
      print(error.info.details)

  ```








  You can contact us by submitting [issues](https://github.com/cisco-open/cisco-catalyst-wan-sdk/issues), or directly via mail on catalystwan@cisco.com.


pkgId: 094d9c9b374d915f742bdd636ff11e9b849dd282c5e7197b58f212754d324354
name: python-catalystwan
arch: src
version: 0.36.1
epoch: 0
release: 1
summary: Cisco Catalyst WAN SDK for Python
url: https://github.com/cisco-open/cisco-catalyst-wan-sdk
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catalystwan-0.36.1-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <a href="#"><img src="docs/images/catalystwan.svg" alt="Cisco Catalyst WAN SDK Logo" style="height:150px" />
  </p>

  [![Python-Supported](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12)](https://www.python.org/)

  Cisco Catalyst WAN SDK is a package for creating simple and parallel automatic requests via official SD-WAN Manager API. It is intended to serve as a multiple session handler (provider, provider as a tenant, tenant). The library is not dependent on environment which is being run in, you just need a connection to any SD-WAN Manager.



  Welcome to the Cisco Catalyst WAN SDK!

  We are thrilled to announce that Cisco Catalyst WAN SDK is now available in early beta. This is an exciting step forward in enabling developers to harness the full potential of Cisco's networking solutions.  Please be aware that, as an early beta release, this version of the SDK is still undergoing development and testing. As such, it is provided "as is" and support to address any issues are limited and best effort.


  We encourage developers to explore and test the SDK's capabilities, but please exercise caution when using it in production environments.  We are dedicated to improving the Cisco Catalyst WAN SDK and we value your input. Your feedback is crucial to us-it will guide us in refining and enhancing the SDK to better meet your needs.
  To report any issues, share your insights, or suggest improvements, please visit our Issues page on GitHub or reach out to us through the provided communication channels.

  Thank you for being a part of our development journey!


  ```console
  pip install catalystwan
  ```


  In order to execute SDK APIs **ManagerSession** needs to be created. The fastest way to get started is to use `create_manager_session()` method which configures session, performs authentication for given credentials and returns **ManagerSession** instance in operational state. **ManagerSession** provides a collection of supported APIs in `api` instance variable.
  Please check example below:

  ```python
  from catalystwan.session import create_manager_session

  url = "example.com"
  username = "admin"
  password = "password123"

  with create_manager_session(url=url, username=username, password=password) as session:
      devices = session.api.devices.get()
      print(devices)
  ```

  **ManagerSession** extends [requests.Session](https://requests.readthedocs.io/en/latest/user/advanced/#session-objects) so all functionality from [requests](https://requests.readthedocs.io/en/latest/) library is avaiable to user, it also implements python [contextmanager](https://docs.python.org/3.8/library/contextlib.html#contextlib.contextmanager) and automatically frees server resources on exit.

  <details>
      <summary> <b>Configure Manager Session before using</b> <i>(click to expand)</i></summary>

  It is possible to configure **ManagerSession** prior sending any request.

  ```python
  from catalystwan.session import ManagerSession
  from catalystwan.vmanage_auth import vManageAuth

  url = "example.com"
  username = "admin"
  password = "password123"


  auth = vManageAuth(username, password)
  session = ManagerSession(url=url, auth=auth)

  session.login()
  session.get("/dataservice/device")
  session.close()
  ```
  When interacting with the SDWAN Manager API without using a context manager, it's important
  to manually execute the `close()` method to release the user session resource.
  Ensure that the `close()` method is called after you have finished using the session to maintain optimal resource management and avoid potential errors.

  </details>

  <details>
      <summary> <b>Login as Tenant</b> <i>(click to expand)</i></summary>

  Tenant domain needs to be provided in url together with Tenant credentials.

  ```python
  from catalystwan.session import create_manager_session

  url = "tenant.example.com"
  username = "tenant_user"
  password = "password123"

  with create_manager_session(url=url, username=username, password=password) as session:
      print(session.session_type)
  ```

  </details>

  <details>
      <summary> <b>Login as Provider-as-Tenant</b> <i>(click to expand)</i></summary>

  Tenant `subdomain` needs to be provided as additional argument together with Provider credentials.

  ```python
  from catalystwan.session import create_manager_session

  url = "example.com"
  username = "provider"
  password = "password123"
  subdomain = "tenant.example.com"

  with create_manager_session(url=url, username=username, password=password, subdomain=subdomain) as session:
      print(session.session_type)
  ```

  </details>

  <details>
      <summary> <b>Login using Api Gateway</b> <i>(click to expand)</i></summary>

  ```python
  from catalystwan.session import create_apigw_session

  with create_apigw_session(
      url="example.com",
      client_id="client_id",
      client_secret="client_secret",
      org_name="Org-Name",
      username="user",
      mode="user",
      token_duration=10,
  ) as session:
      devices = session.api.devices.get()
      print(devices)
  ```
  </details>

  <details>
      <summary> <b>Threading</b> <i>(click to expand)</i></summary>

  ```python
  from threading import Thread
  from catalystwan.session import ManagerSession
  from catalystwan.vmanage_auth import vManageAuth
  from copy import copy

  def print_devices(manager: ManagerSession):
      
      with manager.login() as session:
          print(session.api.devices.get())

  if __name__ =="__main__":

      
      auth = vManageAuth(username="username", password="password")
      
      manager = ManagerSession(base_url="https://url:port", auth=auth)

      
      t1 = Thread(target=print_devices, args=(manager,))
      t2 = Thread(target=print_devices, args=(copy(manager),))
      t3 = Thread(target=print_devices, args=(copy(manager),))

      t1.start()
      t2.start()
      t3.start()

      t1.join()
      t2.join()
      t3.join()

      print("Done!")
  ```
  Threading can be achieved by using a shared auth object with sessions in each thread. As `ManagerSession` is not guaranteed to be thread-safe, it is recommended to create one session per thread. `ManagerSession` also comes in with a default `RequestLimiter`, which limits the number of concurrent requests to 50. It keeps `ManagerSession` from overloading the server and avoids HTTP 503 and HTTP 429 errors.
  If you wish to modify the limit, you can pass a modified `RequestLimiter` to `ManagerSession`:
  ```python
  from catalystwan.session import ManagerSession
  from catalystwan.vmanage_auth import vManageAuth
  from catalystwan.request_limiter import RequestLimiter

  auth = vManageAuth(username="username", password="password")
  limiter = RequestLimiter(max_requests=30)
  manager = ManagerSession(base_url="https://url:port", auth=auth, request_limiter=limiter)
  ```
  </details>


  All examples below assumes `session` variable contains logged-in [Manager Session](#Manager-Session) instance.

  <details>
      <summary> <b>Get devices</b> <i>(click to expand)</i></summary>

  ```python
  devices = session.api.devices.get()
  ```

  </details>

  <details>
      <summary> <b>Admin Tech</b> <i>(click to expand)</i></summary>

  ```Python
  admin_tech_file = session.api.admin_tech.generate("172.16.255.11")
  session.api.admin_tech.download(admin_tech_file)
  session.api.admin_tech.delete(admin_tech_file)
  ```
  </details>

  <details>
      <summary> <b>Speed test</b> <i>(click to expand)</i></summary>

  ```python
  devices = session.api.devices.get()
  speedtest = session.api.speedtest.speedtest(devices[0], devices[1])
  ```

  </details>

  <details>
      <summary> <b>Upgrade device</b> <i>(click to expand)</i></summary>

  ```python

  controllers = session.endpoints.configuration_device_inventory.get_device_details('controllers')
  vsmarts = controllers.filter(personality=Personality.VSMART)
  image = "viptela-20.7.2-x86_64.tar.gz"


  session.api.repository.upload_image(image)



  install_task = session.api.software.install(devices=vsmarts, image=image)


  install_task.wait_for_completed()
  ```

  </details>

  <details>
      <summary> <b>Get alarms</b> <i>(click to expand)</i></summary>
  To get all alarms:

  ```python
  alarms = session.api.alarms.get()
  ```

  To get all not viewed alarms:

  ```python
  not_viewed_alarms = session.api.alarms.get().filter(viewed=False)
  ```

  To get all alarms from past `n` hours:

  ```python
  n = 24
  alarms_from_n_hours = session.api.alarms.get(from_time=n)
  ```

  To get all critical alarms from past `n` hours:

  ```python
  from catalystwan.utils.alarm_status import Severity
  n = 48
  critical_alarms = session.api.alarms.get(from_time=n).filter(severity=Severity.CRITICAL)
  ```

  </details>

  <details>
      <summary> <b>Users</b> <i>(click to expand)</i></summary>

  ```python

  session.api.users.get()


  from catalystwan.endpoints.administration_user_and_group import User
  new_user = User(username="new_user", password="new_user", group=["netadmin"], description="new user")
  session.api.users.create(new_user)


  new_user_update = UserUpdateRequest(username="new_user", group=["netadmin", "netops"], locale="en_US", description="updated-new_user-description")
  session.api.users.update(new_user_update)


  session.api.users.update_password("new_user", "n3W-P4s$w0rd")


  session.api.users.reset("new_user")


  session.api.users.delete("new_user")


  session.api.users.get_auth_type()
  session.api.users.get_role()
  ```

  </details>

  <details>
      <summary> <b>User Groups</b> <i>(click to expand)</i></summary>

  ```python

  session.api.user_groups.get()


  group = UserGroup("new_user_group", [])
  group.enable_read({"Audit Log", "Alarms"})
  group.enable_read_and_write({"Device Inventory"})
  session.api.user_groups.create(group)


  group.disable({"Alarms"})
  session.api.user_groups.update(group)


  session.api.user_groups.delete(group.group_name)
  ```

  </details>

  </details>

  <details>
      <summary> <b>Sessions</b> <i>(click to expand)</i></summary>

  ```python

  active_sessions = session.api.sessions.get()


  new_user_sessions = active_sessions.filter(raw_username="new_user")
  session.api.sessions.invalidate(new_user_sessions)
  ```

  </details>

  <details>
      <summary> <b>Resource Groups</b> <i>(click to expand)</i></summary>

  ```python

  session.api.resource_groups.get()


  new_resource_group = ResourceGroup(
      name="new_resource_group",
      desc="Custom Resource Group #1",
      siteIds=[]
  )
  session.api.resource_groups.create(new_resource_group)


  resource_group = session.api.resource_groups.get().filter(name="new_resource_group").single_or_default()
  updated_resource_group = ResourceGroupUpdateRequest(
      id=resource_group.id,
      name=resource_group.name,
      desc="Custom Resource Group #1 with updated description and site ids",
      siteIds=[200]
  )


  session.api.resource_groups.switch("new_resource_group")


  session.api.resource_groups.delete(resource_group.id)
  ```

  </details>

  <details>
      <summary> <b>Tenant management</b> <i>(click to expand)</i></summary>

  ```python
  api = session.api.tenant_management

  tenants = [
      Tenant(
          name="tenant1",
          org_name="CiscoDevNet",
          subdomain="alpha.bravo.net",
          desc="This is tenant for unit tests",
          edge_connector_enable=True,
          edge_connector_system_ip="172.16.255.81",
          edge_connector_tunnel_interface_name="GigabitEthernet1",
          wan_edge_forecast=1,
      )
  ]
  create_task = api.create(tenants)
  create_task.wait_for_completed()

  tenants_data = api.get_all()

  tenant = tenants_data.filter(name="tenant1").single_or_default()

  tenant_id = tenant.tenant_id

  vsessionid = api.vsession_id(tenant_id)

  delete_task = api.delete([tenant_id])
  delete_task.wait_for_completed()

  api.get_hosting_capacity_on_vsmarts()
  api.get_statuses()
  api.get_vsmart_mapping()
  ```
  </details>

  <details>
      <summary> <b>Tenant migration</b> <i>(click to expand)</i></summary>

  ```python
  from pathlib import Path
  from catalystwan.session import create_manager_session
  from catalystwan.models.tenant import TenantExport
  from catalystwan.workflows.tenant_migration import migration_workflow

  tenant = TenantExport(
      name="mango",
      desc="Mango tenant description",
      org_name="Provider Org-Mango Inc",
      subdomain="mango.fruits.com",
      wan_edge_forecast=100,
      migration_key="MangoTenantMigrationKey",   # only for SDWAN Manager >= 20.13
      is_destination_overlay_mt=True,            # only for SDWAN Manager >= 20.13
  )

  with create_manager_session(url="10.0.1.15", username="st-admin", password="") as origin_session, \
       create_manager_session(url="10.9.0.16", username="mt-provider-admin", password="") as target_session:
      migration_workflow(
          origin_session=origin_session,
          target_session=target_session,
          workdir=Path("workdir"),
          tenant=tenant,
          validator="10.9.12.26"
      )
  ```

  `migration_workflow` performs multi-step migration procedure according to [Migrate Single-Tenant Cisco SD-WAN Overlay to Multitenant Cisco SD-WAN Deployment](https://www.cisco.com/c/en/us/td/docs/routers/sdwan/configuration/system-interface/vedge-20-x/systems-interfaces-book/sdwan-multitenancy.html#concept_sjj_jmm_z4b)


  Since 20.13 also MT to ST is supported (just provide suitable origin/target sessions, and `is_destination_overlay_mt` parameter)


  Each step of the `migration_workflow` procedure can be executed independently using api methods: `export_tenant`, `download`, `import_tenant`, `store_token`, `migrate_network`

  ```python
  origin_api = origin_session.api.tenant_migration_api
  target_api = target_session.api.tenant_migration_api
  tenant_file = Path("~/tenant.tar.gz")
  token_file = Path("~/tenant-token.txt")

  export_task = origin_api.export_tenant(tenant=tenant)
  remote_filename = export_task.wait_for_file()

  origin_api.download(export_path, remote_filename)

  import_task = target_api.import_tenant(export_path, tenant.migration_key)
  import_task.wait_for_completed()

  migration_id = import_task.import_info.migration_token_query_params.migration_id
  target_api.store_token(migration_id, token_path)

  migrate_task = origin_api.migrate_network(token_path)
  migrate_task.wait_for_completed()
  ```
  </details>



  To remove `InsecureRequestWarning`, you can include in your scripts (warning is suppressed when `catalystwan_devel` environment variable is set):
  ```Python
  import urllib3
  urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  ```


  ```python
  try:
      session.api.users.delete("bogus-user-name")
  except ManagerHTTPError as error:
      
      print(error.response.status_code)
      print(error.info.code)
      print(error.info.message)
      print(error.info.details)

  ```








  You can contact us by submitting [issues](https://github.com/cisco-open/cisco-catalyst-wan-sdk/issues), or directly via mail on catalystwan@cisco.com.


pkgId: 0a7454f15f345cd478ec829a6f6faca4331e05ca8938fc5108a4e6c226f09e38
name: python-catalystwan
arch: src
version: 0.40.0
epoch: 0
release: 1
summary: Cisco Catalyst WAN SDK for Python
url: https://github.com/cisco-en-programmability/catalystwan-sdk
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catalystwan-0.40.0-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <a href="#"><img src="docs/images/catalystwan.svg" alt="Cisco Catalyst WAN SDK Logo" style="height:150px" />
  </p>

  [![Python-Supported](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12)](https://www.python.org/)

  Cisco Catalyst WAN SDK is a package for creating simple and parallel automatic requests via official SD-WAN Manager API. It is intended to serve as a multiple session handler (provider, provider as a tenant, tenant). The library is not dependent on environment which is being run in, you just need a connection to any SD-WAN Manager.



  Welcome to the Cisco Catalyst WAN SDK!

  We are thrilled to announce that Cisco Catalyst WAN SDK is now available in early beta. This is an exciting step forward in enabling developers to harness the full potential of Cisco's networking solutions.  Please be aware that, as an early beta release, this version of the SDK is still undergoing development and testing. As such, it is provided "as is" and support to address any issues are limited and best effort.


  We encourage developers to explore and test the SDK's capabilities, but please exercise caution when using it in production environments.  We are dedicated to improving the Cisco Catalyst WAN SDK and we value your input. Your feedback is crucial to us-it will guide us in refining and enhancing the SDK to better meet your needs.
  To report any issues, share your insights, or suggest improvements, please visit our Issues page on GitHub or reach out to us through the provided communication channels.

  Thank you for being a part of our development journey!


  ```console
  pip install catalystwan
  ```


  In order to execute SDK APIs **ManagerSession** needs to be created. The fastest way to get started is to use `create_manager_session()` method which configures session, performs authentication for given credentials and returns **ManagerSession** instance in operational state. **ManagerSession** provides a collection of supported APIs in `api` instance variable.
  Please check example below:

  ```python
  from catalystwan.session import create_manager_session

  url = "example.com"
  username = "admin"
  password = "password123"

  with create_manager_session(url=url, username=username, password=password) as session:
      devices = session.api.devices.get()
      print(devices)
  ```

  **ManagerSession** extends [requests.Session](https://requests.readthedocs.io/en/latest/user/advanced/#session-objects) so all functionality from [requests](https://requests.readthedocs.io/en/latest/) library is avaiable to user, it also implements python [contextmanager](https://docs.python.org/3.8/library/contextlib.html#contextlib.contextmanager) and automatically frees server resources on exit.

  <details>
      <summary> <b>Configure Manager Session before using</b> <i>(click to expand)</i></summary>

  It is possible to configure **ManagerSession** prior sending any request.

  ```python
  from catalystwan.session import ManagerSession
  from catalystwan.vmanage_auth import vManageAuth

  url = "example.com"
  username = "admin"
  password = "password123"


  auth = vManageAuth(username, password)
  session = ManagerSession(url=url, auth=auth)

  session.login()
  session.get("/dataservice/device")
  session.close()
  ```
  When interacting with the SDWAN Manager API without using a context manager, it's important
  to manually execute the `close()` method to release the user session resource.
  Ensure that the `close()` method is called after you have finished using the session to maintain optimal resource management and avoid potential errors.

  </details>

  <details>
      <summary> <b>Login as Tenant</b> <i>(click to expand)</i></summary>

  Tenant domain needs to be provided in url together with Tenant credentials.

  ```python
  from catalystwan.session import create_manager_session

  url = "tenant.example.com"
  username = "tenant_user"
  password = "password123"

  with create_manager_session(url=url, username=username, password=password) as session:
      print(session.session_type)
  ```

  </details>

  <details>
      <summary> <b>Login as Provider-as-Tenant</b> <i>(click to expand)</i></summary>

  Tenant `subdomain` needs to be provided as additional argument together with Provider credentials.

  ```python
  from catalystwan.session import create_manager_session

  url = "example.com"
  username = "provider"
  password = "password123"
  subdomain = "tenant.example.com"

  with create_manager_session(url=url, username=username, password=password, subdomain=subdomain) as session:
      print(session.session_type)
  ```

  </details>

  <details>
      <summary> <b>Login using Api Gateway</b> <i>(click to expand)</i></summary>

  ```python
  from catalystwan.session import create_apigw_session

  with create_apigw_session(
      url="example.com",
      client_id="client_id",
      client_secret="client_secret",
      org_name="Org-Name",
      username="user",
      mode="user",
      token_duration=10,
  ) as session:
      devices = session.api.devices.get()
      print(devices)
  ```
  </details>

  <details>
      <summary> <b>Threading</b> <i>(click to expand)</i></summary>

  ```python
  from threading import Thread
  from catalystwan.session import ManagerSession
  from catalystwan.vmanage_auth import vManageAuth
  from copy import copy

  def print_devices(manager: ManagerSession):
      
      with manager.login() as session:
          print(session.api.devices.get())

  if __name__ =="__main__":

      
      auth = vManageAuth(username="username", password="password")
      
      manager = ManagerSession(base_url="https://url:port", auth=auth)

      
      t1 = Thread(target=print_devices, args=(manager,))
      t2 = Thread(target=print_devices, args=(copy(manager),))
      t3 = Thread(target=print_devices, args=(copy(manager),))

      t1.start()
      t2.start()
      t3.start()

      t1.join()
      t2.join()
      t3.join()

      print("Done!")
  ```
  Threading can be achieved by using a shared auth object with sessions in each thread. As `ManagerSession` is not guaranteed to be thread-safe, it is recommended to create one session per thread. `ManagerSession` also comes in with a default `RequestLimiter`, which limits the number of concurrent requests to 50. It keeps `ManagerSession` from overloading the server and avoids HTTP 503 and HTTP 429 errors.
  If you wish to modify the limit, you can pass a modified `RequestLimiter` to `ManagerSession`:
  ```python
  from catalystwan.session import ManagerSession
  from catalystwan.vmanage_auth import vManageAuth
  from catalystwan.request_limiter import RequestLimiter

  auth = vManageAuth(username="username", password="password")
  limiter = RequestLimiter(max_requests=30)
  manager = ManagerSession(base_url="https://url:port", auth=auth, request_limiter=limiter)
  ```
  </details>


  All examples below assumes `session` variable contains logged-in [Manager Session](#Manager-Session) instance.

  <details>
      <summary> <b>Get devices</b> <i>(click to expand)</i></summary>

  ```python
  devices = session.api.devices.get()
  ```

  </details>

  <details>
      <summary> <b>Admin Tech</b> <i>(click to expand)</i></summary>

  ```Python
  admin_tech_file = session.api.admin_tech.generate("172.16.255.11")
  session.api.admin_tech.download(admin_tech_file)
  session.api.admin_tech.delete(admin_tech_file)
  ```
  </details>

  <details>
      <summary> <b>Speed test</b> <i>(click to expand)</i></summary>

  ```python
  devices = session.api.devices.get()
  speedtest = session.api.speedtest.speedtest(devices[0], devices[1])
  ```

  </details>

  <details>
      <summary> <b>Upgrade device</b> <i>(click to expand)</i></summary>

  ```python

  controllers = session.endpoints.configuration_device_inventory.get_device_details('controllers')
  vsmarts = controllers.filter(personality=Personality.VSMART)
  image = "viptela-20.7.2-x86_64.tar.gz"


  session.api.repository.upload_image(image)



  install_task = session.api.software.install(devices=vsmarts, image=image)


  install_task.wait_for_completed()
  ```

  </details>

  <details>
      <summary> <b>Get alarms</b> <i>(click to expand)</i></summary>
  To get all alarms:

  ```python
  alarms = session.api.alarms.get()
  ```

  To get all not viewed alarms:

  ```python
  not_viewed_alarms = session.api.alarms.get().filter(viewed=False)
  ```

  To get all alarms from past `n` hours:

  ```python
  n = 24
  alarms_from_n_hours = session.api.alarms.get(from_time=n)
  ```

  To get all critical alarms from past `n` hours:

  ```python
  from catalystwan.utils.alarm_status import Severity
  n = 48
  critical_alarms = session.api.alarms.get(from_time=n).filter(severity=Severity.CRITICAL)
  ```

  </details>

  <details>
      <summary> <b>Users</b> <i>(click to expand)</i></summary>

  ```python

  session.api.users.get()


  from catalystwan.endpoints.administration_user_and_group import User
  new_user = User(username="new_user", password="new_user", group=["netadmin"], description="new user")
  session.api.users.create(new_user)


  new_user_update = UserUpdateRequest(username="new_user", group=["netadmin", "netops"], locale="en_US", description="updated-new_user-description")
  session.api.users.update(new_user_update)


  session.api.users.update_password("new_user", "n3W-P4s$w0rd")


  session.api.users.reset("new_user")


  session.api.users.delete("new_user")


  session.api.users.get_auth_type()
  session.api.users.get_role()
  ```

  </details>

  <details>
      <summary> <b>User Groups</b> <i>(click to expand)</i></summary>

  ```python

  session.api.user_groups.get()


  group = UserGroup("new_user_group", [])
  group.enable_read({"Audit Log", "Alarms"})
  group.enable_read_and_write({"Device Inventory"})
  session.api.user_groups.create(group)


  group.disable({"Alarms"})
  session.api.user_groups.update(group)


  session.api.user_groups.delete(group.group_name)
  ```

  </details>

  </details>

  <details>
      <summary> <b>Sessions</b> <i>(click to expand)</i></summary>

  ```python

  active_sessions = session.api.sessions.get()


  new_user_sessions = active_sessions.filter(raw_username="new_user")
  session.api.sessions.invalidate(new_user_sessions)
  ```

  </details>

  <details>
      <summary> <b>Resource Groups</b> <i>(click to expand)</i></summary>

  ```python

  session.api.resource_groups.get()


  new_resource_group = ResourceGroup(
      name="new_resource_group",
      desc="Custom Resource Group #1",
      siteIds=[]
  )
  session.api.resource_groups.create(new_resource_group)


  resource_group = session.api.resource_groups.get().filter(name="new_resource_group").single_or_default()
  updated_resource_group = ResourceGroupUpdateRequest(
      id=resource_group.id,
      name=resource_group.name,
      desc="Custom Resource Group #1 with updated description and site ids",
      siteIds=[200]
  )


  session.api.resource_groups.switch("new_resource_group")


  session.api.resource_groups.delete(resource_group.id)
  ```

  </details>

  <details>
      <summary> <b>Tenant management</b> <i>(click to expand)</i></summary>

  ```python
  api = session.api.tenant_management

  tenants = [
      Tenant(
          name="tenant1",
          org_name="CiscoDevNet",
          subdomain="alpha.bravo.net",
          desc="This is tenant for unit tests",
          edge_connector_enable=True,
          edge_connector_system_ip="172.16.255.81",
          edge_connector_tunnel_interface_name="GigabitEthernet1",
          wan_edge_forecast=1,
      )
  ]
  create_task = api.create(tenants)
  create_task.wait_for_completed()

  tenants_data = api.get_all()

  tenant = tenants_data.filter(name="tenant1").single_or_default()

  tenant_id = tenant.tenant_id

  vsessionid = api.vsession_id(tenant_id)

  delete_task = api.delete([tenant_id])
  delete_task.wait_for_completed()

  api.get_hosting_capacity_on_vsmarts()
  api.get_statuses()
  api.get_vsmart_mapping()
  ```
  </details>

  <details>
      <summary> <b>Tenant migration</b> <i>(click to expand)</i></summary>

  ```python
  from pathlib import Path
  from catalystwan.session import create_manager_session
  from catalystwan.models.tenant import TenantExport
  from catalystwan.workflows.tenant_migration import migration_workflow

  tenant = TenantExport(
      name="mango",
      desc="Mango tenant description",
      org_name="Provider Org-Mango Inc",
      subdomain="mango.fruits.com",
      wan_edge_forecast=100,
      migration_key="MangoTenantMigrationKey",   # only for SDWAN Manager >= 20.13
      is_destination_overlay_mt=True,            # only for SDWAN Manager >= 20.13
  )

  with create_manager_session(url="10.0.1.15", username="st-admin", password="") as origin_session, \
       create_manager_session(url="10.9.0.16", username="mt-provider-admin", password="") as target_session:
      migration_workflow(
          origin_session=origin_session,
          target_session=target_session,
          workdir=Path("workdir"),
          tenant=tenant,
          validator="10.9.12.26"
      )
  ```

  `migration_workflow` performs multi-step migration procedure according to [Migrate Single-Tenant Cisco SD-WAN Overlay to Multitenant Cisco SD-WAN Deployment](https://www.cisco.com/c/en/us/td/docs/routers/sdwan/configuration/system-interface/vedge-20-x/systems-interfaces-book/sdwan-multitenancy.html#concept_sjj_jmm_z4b)


  Since 20.13 also MT to ST is supported (just provide suitable origin/target sessions, and `is_destination_overlay_mt` parameter)


  Each step of the `migration_workflow` procedure can be executed independently using api methods: `export_tenant`, `download`, `import_tenant`, `store_token`, `migrate_network`

  ```python
  origin_api = origin_session.api.tenant_migration_api
  target_api = target_session.api.tenant_migration_api
  tenant_file = Path("~/tenant.tar.gz")
  token_file = Path("~/tenant-token.txt")

  export_task = origin_api.export_tenant(tenant=tenant)
  remote_filename = export_task.wait_for_file()

  origin_api.download(export_path, remote_filename)

  import_task = target_api.import_tenant(export_path, tenant.migration_key)
  import_task.wait_for_completed()

  migration_id = import_task.import_info.migration_token_query_params.migration_id
  target_api.store_token(migration_id, token_path)

  migrate_task = origin_api.migrate_network(token_path)
  migrate_task.wait_for_completed()
  ```
  </details>



  To remove `InsecureRequestWarning`, you can include in your scripts (warning is suppressed when `catalystwan_devel` environment variable is set):
  ```Python
  import urllib3
  urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  ```


  ```python
  try:
      session.api.users.delete("bogus-user-name")
  except ManagerHTTPError as error:
      
      print(error.response.status_code)
      print(error.info.code)
      print(error.info.message)
      print(error.info.details)

  ```








  You can contact us by submitting [issues](https://github.com/cisco-en-programmability/catalystwan-sdk/issues), or directly via mail on catalystwan@cisco.com.


pkgId: b9dd79e228f68ffe59b02c7609e0f69e360e94678bbbb0fbfe01c63402dcf247
name: python-catbench
arch: src
version: 0.1.17
epoch: 0
release: 1
description: Benchmark of Graph Neural Networks for Adsorption Energy Predictions in Heterogeneous Catalysis
url: https://github.com/JinukMoon/catbench
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catbench-0.1.17-1.src.rpm
checksum_type: sha256
summary:
  CatBench: Benchmark of Graph Neural Networks for Adsorption Energy Predictions in Heterogeneous Catalysis


pkgId: d0aa9ef0b76350c1f37f9049c6063e14e1b8964ba017f5329d7a55d83c8af8df
name: python-catbox-uploader
arch: src
version: 2.9
epoch: 0
release: 1
summary: A simple Python library to upload files and URLs to Catbox.moe
url: https://github.com/lunaticsm/catbox-uploader
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catbox-uploader-2.9-1.src.rpm
checksum_type: sha256
description:
  Catbox Uploader is a simple Python library to upload files and URLs to [Catbox.moe](https://catbox.moe), including its temporary storage feature, **Litterbox**, and album management.



  ```bash
  pip install catbox-uploader
  ```





  CatboxUploader supports using a **userhash** directly. You can pass the `userhash` when initializing the `CatboxUploader` and use it for authenticated uploads and album management.



  ```python
  from catbox import CatboxUploader

  uploader = CatboxUploader(userhash='your_userhash_here')
  ```



  ```python
  from catbox import CatboxUploader

  uploader = CatboxUploader()
  ```



  ```python
  link = uploader.upload_file('path/to/your/file.jpg')
  print(f'Uploaded file: {link}')
  ```



  Litterbox allows you to upload files for a temporary period, after which the files will be deleted automatically. Use the `upload_to_litterbox` method to upload files with a specified expiration time.

  **Available expiration times**:
  - `1h`: 1 hour
  - `12h`: 12 hours
  - `24h`: 24 hours
  - `72h`: 3 days

  ```python
  link = uploader.upload_to_litterbox('path/to/your/file.jpg', time='24h')
  print(f'Uploaded file (available for 24 hours): {link}')
  ```



  You can upload multiple files as an album to **Catbox.moe** using the `upload_album` method. This allows you to upload several files at once, and it will return the links for all uploaded files.

  ```python
  file_paths = ['file1.jpg', 'file2.jpg', 'file3.jpg']
  links = uploader.upload_album(file_paths)
  for link in links:
      print(f'Uploaded file link: {link}')
  ```





  You can create an album with uploaded files, a title, and a description using the `create_album` method:

  ```python
  album_shortcode = uploader.create_album(file_links, "My Album", "This is a test album")
  print(f"Album created: https://catbox.moe/c/{album_shortcode}")
  ```



  You can edit an album by changing its title, description, or the files it contains:

  ```python
  uploader.edit_album(album_shortcode, file_links, "Updated Album Title", "Updated description")
  ```



  You can delete an album by its shortcode:

  ```python
  uploader.delete_album(album_shortcode)
  ```



  The library comes with built-in exception handling to manage common errors such as timeouts, connection issues, or HTTP errors.



  If the upload takes too long and exceeds the specified timeout, a `TimeoutError` will be raised.

  ```python
  from catbox import CatboxUploader, TimeoutError

  uploader = CatboxUploader(userhash='your_userhash_here')
  try:
      link = uploader.upload_file('path/to/your/file.jpg', timeout=10)
      print(f'Uploaded file: {link}')
  except TimeoutError:
      print("The upload took too long and timed out.")
  ```



  If there's a problem connecting to the **Catbox.moe** or **Litterbox** server, a `ConnectionError` will be raised.

  ```python
  from catbox import CatboxUploader, ConnectionError

  uploader = CatboxUploader(userhash='your_userhash_here')
  try:
      link = uploader.upload_file('path/to/your/file.jpg')
      print(f'Uploaded file: {link}')
  except ConnectionError:
      print("Failed to connect to the server.")
  ```



  In case of HTTP errors (such as 404 or 500), an `HTTPError` will be raised.

  ```python
  from catbox import CatboxUploader, HTTPError

  uploader = CatboxUploader(userhash='your_userhash_here')
  try:
      link = uploader.upload_file('path/to/your/file.jpg')
      print(f'Uploaded file: {link}')
  except HTTPError as he:
      print(f"HTTP error occurred: {he}")
  ```



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


pkgId: 043dedb1b68fa330ec4283ae6ffac1717a000961cb41c841d0052eda2fac9a2e
name: python-categorical-embedder
arch: src
version: 0.1
epoch: 0
release: 1
url: https://github.com/Shivanandroy/CategoricalEmbedder/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-categorical-embedder-0.1-1.src.rpm
checksum_type: sha256
summary:
  Categorical Embedder is a python package that let's you convert your categorical variables into numeric via Neural Networks

description:
   **Categorical Embedder** is a python package that let's you convert your categorical variables into numeric via Neural Networks



  `pip install categorical_embedder`


  ```py
  import categorical_embedder as ce
  from sklearn.model_selection import train_test_split

  df = pd.read_csv('HR_Attrition_Data.csv')
  X = df.drop(['employee_id', 'is_promoted'], axis=1)
  y = df['is_promoted']

  embedding_info = ce.get_embedding_info(X)
  X_encoded,encoders = ce.get_label_encoded_data(X)

  X_train, X_test, y_train, y_test = train_test_split(X_encoded,y)

  embeddings = ce.get_embeddings(X_train, y_train, categorical_embedding_info=embedding_info,
                              is_classification=True, epochs=100,batch_size=256)
  ```
  A more detailed [Jupyter Notebook](http://www.github.com ) can be found here

  > What's inside **Categorical Embedder** ?
  * `ce.get_embedding_info(data,categorical_variables=None)`: This function identifies all categorical variables in the data, determines its embedding size. Embedding size of the categorical variables are determined by minimum of 50 or half of the no. of its unique values i.e. embedding size of a column  = Min(50, # unique values in that column)
  One can pass explicit list of categorical variables in `categorical_variables` parameter. If `None`, this function automatically takes all the variables with data type `object`
  * `ce.get_label_encoded_data(data, categorical_variables=None)`: This function label encodes (integer encoding) all the categorical variables using sklearn.preprocessing.LabelEncoder and returns a label encoded dataframe for training. Keras/tensorflow or any other deep learning library would expect the data to be in this format.
  * `ce.get_embeddings(X_train, y_train, categorical_embedding_info=embedding_info, is_classification=True,                          epochs=100,batch_size=256)`: This function trains a shallow neural networks and returns embeddings of categorical variables. Under the hood, It is a 2 layer neural network architecture with 1000 and 500 neurons with 'ReLU' activation. It takes 4 required inputs -  `X_train`, `y_train`, `categorical_embedding_info`:output of get_embedding_info function and `is_classification`: `True` for classification tasks; `False` for regression tasks.

  For classification: `loss = 'binary_crossentropy'; metrics = 'accuracy'` and for regression: `loss = 'mean_squared_error'; metrics = 'r2'`


  ```numpy
  pandas
  scikit-learn
  tensorflow
  keras
  tqdm
  keras-tqdm
  ```


pkgId: 6b617c42f404f58d6a07d2971fdf88771d337111a015836217b3f6d2e35b484d
name: python-category-encoders
arch: src
version: 2.6.3
epoch: 0
release: 1
summary: A collection of sklearn transformers to encode categorical variables as numeric
url: https://github.com/scikit-learn-contrib/category_encoders
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-category-encoders-2.6.3-1.src.rpm
checksum_type: sha256
description:
  [![Downloads](https://pepy.tech/badge/category-encoders)](https://pepy.tech/project/category-encoders)
  [![Downloads](https://pepy.tech/badge/category-encoders/month)](https://pepy.tech/project/category-encoders)
  ![Test Suite and Linting](https://github.com/scikit-learn-contrib/category_encoders/workflows/Test%20Suite%20and%20Linting/badge.svg)
  [![DOI](https://zenodo.org/badge/47077067.svg)](https://zenodo.org/badge/latestdoi/47077067)
  A set of scikit-learn-style transformers for encoding categorical
  variables into numeric by means of different techniques.


pkgId: cba1713d7386de1b5f252e14c25cfd699630cd49af32642e0085419872d7723f
name: python-catelier
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: atelier Decryption
url: https://github.com/Rin-Wood/catelier
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catelier-1.0.1-1.src.rpm
checksum_type: sha256
description:
  `catelier` is a Python package for decrypting data, using a custom atelier decryption algorithm implemented in C.



  - Provides efficient atelier decryption functionality, based on C implementation.
  - Supports Python 3.6+



  Install the latest version of `catelier` from PyPI:

  ```bash
  pip install catelier
  ```


  ```python
  import catelier
  data = b'...'
  keyBytes = b'...'
  nonceSeed = b'...'
  dec = catelier.decrypt(data, keyBytes, nonceSeed)


pkgId: 434e7d8f3e7f6edc6af61aa1e70d0b3884edceb598ec0e4f72a31aa69a0dd341
name: python-catencfamily
arch: src
version: 0.1.19
epoch: 0
release: 1
summary: A class to generate a family of categorical encoders using network analysis
url: https://github.com/harnalashok/CatEncodersFamily
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catencfamily-0.1.19-1.src.rpm
checksum_type: sha256
description:
  The module provides a way to encode categorical features in multiple but related ways using network analysis. Together, the family of multiple encodings serve as a numerical vector for every level of a categorical feature. The class transforms a group of categorical features into corresponding numerical features which can then be used either in unsupervised learning or in predictive analytics. To assist in unsupervised learning, it has methods to save a categorical feature as network graphs and plot them. The class has methods to extract unit vectors for every level of a categorical feature to help, for example, in understanding relationshsips between various levels. Extracted numerical vectors can directly be used in plotting, for example, in tensorflow's Embedding Projector. Class provides methods to get categories encoded for large datasets; one can, for example, take a sample of data at a time, have categories encoded, then take another sample and have categories similarly encoded. After a number of iterations, take either a mean or median to get final category-wise vectors. As the encodings are calculated using a group of network analysis operations, the family of encodings is extensible. The class provides one way, but a limited one to extend it.



  <code>pip install catencfamily</code>


  <pre><code>
  python >= 3.7
  pandas
  numpy
  networkx
  cdlib
  scikit-learn
  matplotlib
  pathlib</code></pre>




  _MIT License. Any contribution is welcome!


pkgId: 88b7a65e8242c8e76cc3dd6805baf88ea963753da2d8836fe63a01521be6528a
name: python-caterpillar
arch: src
version: 0.15.10
epoch: 0
release: 1
summary: Text retrieval and analytics engine.
url: https://github.com/Kapiche/caterpillar
rpm_license: AGPLv3+
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caterpillar-0.15.10-1.src.rpm
checksum_type: sha256
description:
  Caterpillar is a pure Python text indexing and analytics library. It is aimed at supporting advanced text and other semi-structured analytics applications that bridge Natural Language Processing (NLP), Information Retrieval and Topic Modelling.
  Some features include:
  * pluggable key/value object store for storage (currently only implementation is SQLite)
  * transaction layer for reading/writing (along with associated locking semantics)
  * supports searching indexes with some built in scoring algorithm implementations (including TF/IDF)
  * stores additional data structures for analytics above and beyond traditional information retrieval data structures
  * has a plugin architecture for quickly accessing the data structures and performing custom analytics
  * has 100% test coverage


pkgId: a3a0598bd7f96f80a2820c0851bc00d704616af3c869c6003b15a0cae5b2dd36
name: python-catframes
arch: src
version: 2024.8.3
epoch: 0
release: 1
summary: Concatenate frames.
url: https://itustinov.ru/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catframes-2024.8.3-1.src.rpm
checksum_type: sha256
description:
  It concatenates frames.
  With this software, you can
  * create a timelapse video
  * turn an animation rendered in a PNG sequence into a video
  * compress your selfies
  * compress a sequence of frames from CCTV
  The script takes folders with images and outputs MP4 or WebM.
  It has GUI: `catmanager`

rpm_license:
  © Георгий Устинов, 2022–2024 © Богдан Сыроватский, 2024 © Евгений Окатьев, 2024  This software is provided 'as-is', without any express or implied warranty.  In no event will the authors be held liable for any damages arising from the use of this software.  Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution.


pkgId: e95ddb3e99fef0fcf8779a9b24147b3d2dfc4d4874691a18f67d4d6deb4c22ea
name: python-catmux
arch: src
version: 0.3.6
epoch: 0
release: 1
summary: A tmux orchestration package.
url: https://github.com/fmauch/catmux
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catmux-0.3.6-1.src.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/fmauch/catmux/branch/master/graph/badge.svg?token=bPcdYrOBRK)](https://codecov.io/gh/fmauch/catmux)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


  Catmux is a little helper to run a tmux session with multiple windows and panes with just one
  command. It is inspired and functionally very similar to
  [tmuxinator](https://github.com/tmuxinator/tmuxinator), but without the project management feature
  which is in my opinion kind of an overhead.

  Session configs can be stored anywhere and have to be given as an argument.


  In most of our ROS projects at work we use shell output for almost all nodes to get log information
  during runtime. Having all this in one window where you start your "Start it all"-launchfile makes
  it very hard to follow the log of a specific node. Starting everything in separate windows is quite
  a lot of work and requires documentation overhead in sense of documenting which launchfiles or nodes
  have to be started.

  At a conference I caught the idea to use tmux scripting to orchestrate all this in one tmux session.
  However, quickly I noticed that creating these scripts is a daunting task as you'll have to type in
  a lot of commands over and over again and as soon as you wanted to do things a little different such
  as not starting a particular launchfile if a certain parameter was set, things got complicated.

  I liked the yaml-syntax of [tmuxinator](https://github.com/tmuxinator/tmuxinator), but that tool
  didn't quite hit the spot. I wanted to have something that can be easily integrated into a ROS
  project and I definitely wanted something that saves the config per project and not all configs at
  one central spot on a particular machine.


  Catmux is a pure python package and the installation via `pip3 install --user catmux` is recommended.

  You can also install it by cloning this repository and calling `pip3 install --user .` in the
  repository's root directory. If you use this option, please be aware that some examples behave
  differently if you have installed catmux this way and are calling it from the repository directory.
  Calling them from outside the directory (e.g. after leaving via `cd`) is fine and should result in
  the same behavior as with the recommended installation method.


  Currently, there is no full-blown documentation, but the example config file in
  `catmux/resources/example_session.yaml` gives a detailed insight on possible commands.


  After installation, you can run a simple example by calling the following command:
  ```
  catmux_create_session $(python3 -m catmux.prefix)/example_session.yaml
  ```

  To see further options, simply run it with argument `-h`:
  ```
  $ catmux_create_session -h
  usage: catmux_create_session [-h] [-n SESSION_NAME] [-t TMUX_CONFIG] [-d] [--overwrite OVERWRITE]
                               session_config

  Create a new catmux session

  positional arguments:
    session_config        Session configuration. Should be a yaml-file.

  optional arguments:
    -h, --help            show this help message and exit
    -n SESSION_NAME, --session_name SESSION_NAME
                          Name used for the tmux session
    -t TMUX_CONFIG, --tmux_config TMUX_CONFIG
                          This config will be used for the tmux session
    -d, --detach          Start session in detached mode
    --overwrite OVERWRITE
                          Overwrite a parameter from the session config. Parameters can be specified
                          using a comma-separated list such as '--overwrite param_a=1,param_b=2'.
  ```


  To make use of all catmux features, run the following example command:
  ```
  catmux_create_session $(python3 -m catmux.prefix)/example_session.yaml \
    --tmux_config $(python3 -m catmux.prefix)/tmux_default.conf \
    --session_name example_session \
    --overwrite show_layouts=True,replacement_param="new catmux user"
  ```


  If you are not that familiar with tmux: To kill a session, simply type `tmux kill-session` in any
  terminal window. In the `catmux/resources/tmux_default.conf` there is a key-binding for that, see
  `etc/readme_tmux.txt` for details.


  By default, catmux spawns its own tmux server called `catmux`. Therefore, a simple
  `tmux list-sessions` (or `tmux ls`) will not list the `catmux` session. To list the `catmux`
  session, use `tmux -L catmux list-sessions`. You can change the server's name by specifying the
  `-L <server_name>` parameter to `catmux_create_session`. That mechanism ensures that the environment
  in which `catmux_create_session` is started, will be used inside the catmux session (as long as no
  other session previously exists on that particular tmux server).

  To make things a bit easier, there is a convenience script installed with this
  package: [`catmux`](script/catmux). It is basically a wrapper around `tmux -L
  <server_name>`. For example, you can

  ``` bash
  catmux attach # attach to the latest running catmux session
  catmux ls # list current catmux sessions
  catmux kill-session -t example_session # kill session 'target session'
  ```

  In case you use another tmux server than `catmux`, you can set the environment
  variable `CATMUX_DEFAULT_SERVER` to that name and continue using the `catmux`
  script.


  With the spread of ROS2, the need for a catkin-independent catmux has emerged.
  Catmux is now a plain python package without the ROS integration.
  Therefore, it is installed via pip and no longer needs to be part of a catkin workspace.
  This opens the possibility to easily use catmux outside of robotics application, e.g. for server
  administration or other development tasks.

  Catmux no longer has the `package://<your_package_name>` lookup capabilities.
  To achieve the same outcome, simply use rospack:
  ```
  catmux_create_session $(rospack find <your_package_name>)/path/to/<your_catmux_session_config.yaml>
  ```

  For ROS2, the same is achievable with `ros2 pkg prefix` but the yaml has to be installed (similar
  to, for example, a launch file) and the installation path has to be specified:
  ```
  catmux_create_session $(ros2 pkg prefix <your_package_name>)/path/to/the/installed/<your_catmux_session_config.yaml>


  ```


pkgId: ed21fd8932679589c1fbf41bd17434635ff217653fc5d1901bcaf9badd531fed
name: python-catnekaise.cdk-iam-utilities
arch: src
version: 0.0.33
epoch: 0
release: 1
summary: Experimental utilities intended for AWS CDK IAM
url: https://github.com/catnekaise/cdk-iam-utilities.git
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catnekaise.cdk-iam-utilities-0.0.33-1.src.rpm
checksum_type: sha256
description:
  Example implementation of this library exist in [catnekaise/actions-constructs](https://github.com/catnekaise/actions-constructs).



  The general idea is that the utilities in this library can serve as building blocks for composing other utilities that ideally should aid the existing aws-iam library in certain situations.


pkgId: 939652dde375904c39e5e32e08f7607d8dd9a32e66f6734830e0f89f23a49480
name: python-catnekaise.ghrawel
arch: src
version: 0.0.17
epoch: 0
release: 1
url: https://github.com/catnekaise/ghrawel.git
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catnekaise.ghrawel-0.0.17-1.src.rpm
checksum_type: sha256
summary:
  Use ghrawel to deploy an AWS API Gateway RestAPI capable of returning GitHub App installation access tokens and use AWS IAM to control access to this API.

description:
  [![npm (scoped)](https://img.shields.io/npm/v/@catnekaise/ghrawel?style=flat-square)](https://www.npmjs.com/package/@catnekaise/ghrawel)
  [![Nuget](https://img.shields.io/nuget/v/Catnekaise.CDK.Ghrawel?style=flat-square)](https://www.nuget.org/packages/Catnekaise.CDK.Ghrawel/)
  [![PyPI](https://img.shields.io/pypi/v/catnekaise.ghrawel?style=flat-square)](https://pypi.org/project/catnekaise.ghrawel/)
  [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/catnekaise/ghrawel?sort=semver&style=flat-square)](https://github.com/catnekaise/ghrawel/releases)



  `gh`r`aw`el will aim to provide components that help integrate GitHub and AWS using primarily AWS CDK and minimal application code.



  Use this to deploy an AWS API Gateway RestAPI capable of returning GitHub App installation access tokens and use AWS IAM to control access to this API.



  * [Use Case](#use-case)
  * [When not to use this](#when-not-to-use-this)
  * [How it Works](#how-it-works)
  * [Setup](#setup)

    * [Costs](#costs)
    * [1. GitHub](#1-github)
    * [2. AWS CDK](#2-aws-cdk)
    * [3. Add Private Key in Parameter Store](#3-add-private-key-in-parameter-store)
    * [4. Request a token](#4-request-a-token)
    * [5. Use the token](#5-use-the-token)
    * [6. Test limits of the token](#6-test-limits-of-the-token)
    * [7. Cleanup](#7-cleanup)
  * [Granting Access](#granting-access)
  * [Get Token - cURL](#get-token---curl)
  * [Get Token - GitHub Actions](#get-token---github-actions)
  * [Customize RestAPI and Lambda](#customize-restapi-and-lambda)
  * [Next Steps](#next-steps)

    * [Token Providers](#next-steps)
    * [AWS IAM](#next-steps)
    * [Application](#next-steps)
    * [Usage](#next-steps)
    * [GitHub Actions Attribute-based Access Control](#next-steps)
    * [Infrastructure](#next-steps)
    * [Logging](#next-steps)
  * [Contributions](#contributions)



  The private key belonging to a [GitHub App](https://docs.github.com/en/apps/overview) can be used to [create installation access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app) that only contains a [selection of the permissions](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app) that the GitHub App has been granted and also for a limited number of repositories that the GitHub App has been installed in. This installation access token has a maximum lifetime of an hour and can [revoke](https://docs.github.com/en/rest/apps/installations?apiVersion=2022-11-28#revoke-an-installation-access-token) itself.

  Use ghrawel to control access to sensitive GitHub API credentials within an AWS and GitHub Actions environments, when such requirements exist.



  Creating PATs or GitHub App Private keys is easy and they are simple to use whether stored in AWS or as a GitHub secret. Using this solution introduces new components and complexity that has to be managed and such a thing is not always worth it.



  An application or a GitHub Actions workflow with access to AWS IAM Credentials initiates the sequence of events by signing a HTTP request with those credentials.

  ```mermaid
  sequenceDiagram
      autonumber
      participant HTTP as HTTP Request
      participant App as Application/GHA
      note over App: Has AWS IAM Credentials
      participant API as API Gateway
      participant Authorizer as IAM Authorizer
      participant Lambda as Lambda
      participant GitHub as GitHub API
      App->>HTTP: Create and Sign
      App->>API: Send Request
      API->>Authorizer: Authorization
      alt if not authorized
          API-->>App: 401
      end
      API->>Lambda: Forward Authorized Request
      Lambda->>Lambda: Additional validation
      alt if validation fails
          Lambda-->>API: 400 Bad Request
          API-->>App: 400 Bad Request
      end
      Lambda->>GitHub: Request Token
      Lambda->>API: Token Response
      API->>App: Token Response
      App->>GitHub: Uses token
  ```



  > [!NOTE]
  > The machine deploying will require docker as [catnekaise/ghrawel-tokenprovider-lambda-go](https://github.com/catnekaise/ghrawel-tokenprovider-lambda-go) will be built to run in the lambda function. See [Dockerfile](./lambda/default/Dockerfile) and [application](./docs/token-provider/application.md) for more.

  > [!NOTE]
  > This guide assumes some familiarity with AWS CDK.

  This test setup can be tested with a GitHub App that only has access to a single test repository in GitHub and this repository (and app) can be on your user instead of in your organization.



  Assuming that you make `10 000` requests using this test setup, the cost of lambda and cloudwatch is covered under the free tier. The cost of the API Gateway RestApi will be between free and 0.035$ depending on how old the AWS Account is. Depending on your AWS Environment there could be charges for CloudTrail, Config, other tools and any custom automations that might create additional resources based on the resources deployed. It's best to test this is a sandbox account.

  There are no charges related to GitHub.



  > https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app

  For our testing purposes we need to create a test `repository` and a `GitHub App`. The app being created shall be considered a test app and should not be granted unnecessary permissions or installed anywhere but in repositories used for testing this. The link above provides additional information about working with GitHub Apps.

  1. Create a new empty repository in your organization or on your user which can be used for testing.

     * When creating this repository, initialize the repository so that a default branch with a README.md file is created.
  2. Create a GitHub App in the same organization or user and grant `read & write` on the repository level permissions `contents` and `issues`.

     * Do not add configuration under `Identifying and authorizing users` as this app is not for users
     * Put any url under `Homepage URL` as its a required field
     * Deselect `active` under webhook as no webhook shall be configured for this use-case
     * Keep `only on this account` selected
  3. Note down the `id` of the GitHub App as it will be used later.
  4. Create a new private key for this GitHub App and keep it around as it will be used later.
  5. Install the GitHub App in the single test repository that was created further above



  > [!NOTE]
  > CDK for .NET can also be used to test this but examples below has to be translated.

  ```shell
  cdk init --language typescript
  npm install -s @catnekaise/ghrawel
  ```



  1. Change the value of `defaultAppId` in the example below to match your newly created GitHub App.
  2. Synthesis the stack and review what changes will be made before finally deploying the stack into a sandbox account.

  ```python
  import * as cdk from 'aws-cdk-lib';
  import * as iam from 'aws-cdk-lib/aws-iam';
  import { ManagedGitHubApps, GitHubAppSecretsStorage, TokenProviderApi, PermissionLevel } from '@catnekaise/ghrawel';

  const app = new cdk.App();
  const stack = new cdk.Stack(app, 'TokenProviderStack');

  const apps = new ManagedGitHubApps(stack, 'Apps', {
    // Change this value
    defaultAppId: 1234,
    storage: GitHubAppSecretsStorage.PARAMETER_STORE,
  });

  const tokenProviderApi = new TokenProviderApi(stack, 'TokenProviderApi', {
    apps,
  });

  const provider = tokenProviderApi.newTokenProvider('example-provider', {
    permissions: {
      contents: PermissionLevel.READ,
      issues: PermissionLevel.WRITE,
    },
  });
  ```



  When the stack has completed its deployment a secure string parameter will have been initialized at path `/catnekaise/github-apps/default` in `Systems Manager Parameter Store` with value `placeholder`. Go there and enter the full text value of GitHub App Private Key created earlier inside the value field of this parameter.



  The easiest way to see that this is now working and to request an access token is to head over to the API Gateway in the AWS Console. Examples on how to request a token with [cURL](#get-token---curl) or [GitHub Actions](#get-token---github-actions) can be seen further down, and more in additional [usage docs](./docs/token-provider/usage.md).

  1. Open the API that was created.
  2. Find the single `GET` method created and select it.
  3. Click on the `Test` tab.
  4. Enter the name of the organization or user where the test repository is located in the form field labeled `owner`.
  5. Enter the name of the test repository in the form field labeled `repo`.
  6. Click on the Test button.
  7. If everything was done correctly, the response should look similar to below.

  ![](./docs/images/apigw-console.png)



  In this example cURL is used to create an issue in your test repository. Either use this example or use a tool of your choice with the same input. After Successfully performing this test there should be a new issue in your test repository.

  ```shell


  OWNER="Enter name of organization or user"
  REPO="Enter name of repo"
  TOKEN="Enter token"

  curl -L \
    -X POST \
    -H "Accept: application/vnd.github+json" \
    -H "Authorization: Token ${TOKEN}" \
    -H "X-GitHub-Api-Version: 2022-11-28" \
    "https://api.github.com/repos/${OWNER}/${REPO}/issues" \
    -d '{"title":"Testing using app installation token","body":"Testing using app installation token"}'
  ```



  If a GitHub App was created with the example permissions further above and the token provider was configured the with access `read` or the permission `contents`, then the token shall be able to read contents in the repository but not write content to the repository.



  The following cURL command will fetch the contents of `README.md` and print out body the full JSON body and decode the value of `content` in the body.

  ```shell


  OWNER="Enter name of organization or user"
  REPO="Enter name of repo"
  MY_TOKEN="Enter token Value"

  README_MD=$(curl -s -L \
    -H "Accept: application/vnd.github+json" \
    -H "Authorization: Token ${MY_TOKEN}" \
    -H "X-GitHub-Api-Version: 2022-11-28" \
    "https://api.github.com/repos/${OWNER}/${REPO}/contents/README.md")

  echo "$README_MD"

  echo "$README_MD" | jq -r '.content' | base64 -d
  ```



  Again, assuming setup have been done as example above, the following cURL command shall **fail** to create the file `TEST.md` in the test repositories default branch.

  ```shell


  OWNER="Enter name of organization or user"
  REPO="Enter name of repo"
  MTOKEN="Enter token Value"

  curl --fail-with-body -L \
    -X PUT \
    -H "Accept: application/vnd.github+json" \
    -H "Authorization: Token ${TOKEN}" \
    -H "X-GitHub-Api-Version: 2022-11-28" \
    "https://api.github.com/repos/${OWNER}/${REPO}/contents/TEST.md" \
    -d '{"message":"my commit message","content":"SGVsbG8gZnJvbSBjYXRuZWthaXNlCg=="}'
  ```



  Update the stack by creating a second token provider that is granted `write` for the `contents` permission and re-deploy the stack.

  ```python
  tokenProviderApi.newTokenProvider('example-provider-2', {
    permissions: {
      contents: PermissionLevel.WRITE,
    },
  });
  ```



  After deployment, refresh the page in the web browser where you previously generated a token and find the second `GET` method available under the path `/x/example-provider-2/{owner}/{repo}`. Use this token provider to generate a new token for the same repository and re-run the example below. After successfully performing this test there should be a file named `TEST.md` in the root of your test repository on the default branch.

  ```shell


  OWNER="Enter name of organization or user"
  REPO="Enter name of repo"
  MY_TOKEN="Enter token Value"

  curl --fail-with-body  -L \
    -X PUT \
    -H "Accept: application/vnd.github+json" \
    -H "Authorization: Token ${MY_TOKEN}" \
    -H "X-GitHub-Api-Version: 2022-11-28" \
    "https://api.github.com/repos/${OWNER}/${REPO}/contents/TEST.md" \
    -d '{"message":"my commit message","content":"SGVsbG8gZnJvbSBjYXRuZWthaXNlCg=="}'
  ```



  Either clean up now or test this out some more using `cURL` or `GitHub Actions` before cleaning up. The steps to remove everything that was created.

  1. In GitHub, find the GitHub App and either uninstall, suspend or delete this GitHub App

     * If wanting to test this again at a later date, suspend the installation and next time re-enable and rotate the private key to resume testing.
     * If done, delete the GitHub App
  2. In AWS Console go to CloudFormation and find the Stack that was created and delete it.



  Continue reading [here](./docs/token-provider/aws-iam.md) for more detailed examples.

  ```python
  declare const principal: iam.IPrincipal;

  const role = new iam.Role(stack, 'Role', {
    assumedBy: principal,
  });

  const provider = tokenProviderApi.newTokenProvider('example-provider', {
    permissions: {
      contents: PermissionLevel.READ,
      issues: PermissionLevel.WRITE,
    },
  });

  provider.grantExecute(role);
  ```



  This example shows how to use cURL to sign the request with the AWS IAM credentials. The example assumes the existence of `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_SESSION_TOKEN` in the environment.

  For more usage examples, check out [usage docs](./docs/token-provider/usage.md).

  ```shell
  AWS_REGION="eu-west-1"
  BASE_URL="https://abcd1234.execute-api.${AWS_REGION}.amazonaws.com/dev"
  PROVIDER="example-provider"

  RESPONSE=$(curl "${BASE_URL}/x/${PROVIDER}/catnekaise/example-repo" \
  	--user "${AWS_ACCESS_KEY_ID}":"${AWS_SECRET_ACCESS_KEY}" \
  	-H "x-amz-security-token: ${AWS_SESSION_TOKEN}" \
  	--aws-sigv4 "aws:amz:${AWS_REGION}:execute-api")

  TOKEN=$(echo "$RESPONSE" | jq -r '.token')


  ```



  For more usage examples in GitHub Actions and a re-usable action, check out [GitHub Actions usage docs](./docs/token-provider/github-actions-usage.md).

  ```yaml
  on:
    workflow_dispatch:
  jobs:
    job1:
      runs-on: ubuntu-latest
      permissions:
        id-token: write
        contents: read
      steps:
        - name: "Authenticate"
          uses: aws-actions/configure-aws-credentials@v4
          with:
            aws-region: "eu-west-1"
            role-to-assume: "arn:aws:iam::111111111111:role/role-name"

        - name: "Get Token"
          uses: catnekaise/ghrawel-token@v1
          id: token
          with:
            base-url: "https://abc123d4.execute-api.eu-west-1.amazonaws.com/dev"
            provider-name: "example-provider"
            aws-region: "eu-west-1"
        - name: "Use Token"
          env:
            TOKEN: "${{ steps.token.outputs.token }}"
          run: |
            echo "Utilize the token"
  ```



  Read more in [infrastructure](./docs/token-provider/infrastructure.md) and [application](./docs/token-provider/application.md).

  ```python
  import { ManagedGitHubApps, TokenProviderApi, TokenProviderLambdaCode, ApplicationArchitecture } from '@catnekaise/ghrawel';

  const managedLambda = new lambda.Function(stack, 'Function', {
    code: TokenProviderLambdaCode.dotnet({
      architecture: ApplicationArchitecture.ARM64,
      repository: 'https://github.com/catnekaise/example-fork.git',
      checkout: 'main',
    }),
    handler: 'bootstrap',
    runtime: lambda.Runtime.DOTNET_8,
    // Add name, vpc, etc
  });

  const managedApi = new apigateway.RestApi(stack, 'TokenProviderApi', {
    // Add domain, vpc, etc
  });

  const apps = new ManagedGitHubApps(stack, 'Apps', {
    defaultAppId: 1234,
    storage: GitHubAppSecretsStorage.PARAMETER_STORE,
    additionalApps: [
      GitHubApp.create('another-app', 1111),
      GitHubApp.create('yet-another-app', 2222),
    ],
  });

  const tokenProviderApi = new TokenProviderApi(stack, 'TokenProviderApi', {
    apps,
    lambda: managedLambda,
    api: managedApi,
  });

  tokenProviderApi.newTokenProvider('example-provider', {
    permissions: {
      contents: PermissionLevel.READ,
    },
  });
  ```



  Here're some additional documentation on various topics:

  * [Token Providers](./docs/token-provider/README.md)
  * [AWS IAM](./docs/token-provider/aws-iam.md)
  * [Application](./docs/token-provider/application.md)
  * [Usage](./docs/token-provider/usage.md)

    * [cURL](./docs/token-provider/usage.md)
    * [Go](./docs/token-provider/usage.md)
    * [.NET](./docs/token-provider/usage.md)
    * [TypeScript](./docs/token-provider/usage.md)
  * [GitHub Actions Attribute-based Access Control](./docs/token-provider/github-actions-abac.md)
  * [Infrastructure](./docs/token-provider/infrastructure.md)

    * [Custom Setup](./docs/token-provider/infrastructure.md#custom-setup)
    * [GitHub Apps](./docs/token-provider/infrastructure.md#github-apps)
  * [Logging](./docs/token-provider/logging.md)
  * [Troubleshooting](./docs/token-provider/README.md#internal-server-error)



  Please open issues if having general feedback or if getting stuck on something that was not covered by any documentation. PR's are welcome for bugfixes. For any feature additions, please open an issue for discussion first.


pkgId: 5fdacfcce8ed0c14e6b46b84c0de5aa9f9a6984409b4f54ca4c16b06dd8356ec
name: python-catops
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Highly trained cats for managing servers.
url: https://github.com/bboxx/CatOps
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catops-1.0.0-1.src.rpm
checksum_type: sha256
description:
  <h1 align="center" >CatOps</h1>

  Highly trained cats for managing servers.

  ![Dedicated server support agent.](https://github.com/BBOXX/CatOps/blob/master/docs/catops.jpg)



  CatOps is a very simple NoOps framework for deploying your own ChatOps bot.

  Commands you wish to add to your CatOps implementation are added to a `plugins`
  folder in the same directory, and will then be automatically imported and callable
  using the function name.



  - NoOps.
    - Deploy, rewrite, and redeploy FaaS easily with no worrying about setting up and managing servers.
    - Only charged when CatOps is called.

  - Codify common maintenance procedures.
    - Perform high level actions without intimate low level knowledge.
    - Prevent errors doing complicated but routine tasks.

  - Unify documentation.
    - CatOps can act as a unified go-to location for help, merging/pooling all documentation into one place.

  - Transparency.
    - Team members can see all actions taken by others in solving a problem. Organic learning.
    - No 'go-to' person for certain maintenance tasks.
    - Everyone aware of server changes. No-one surprised that the server is down if they see `/meow restart server` in the chat.
    - Spread knowledge; everyone becomes equally capable of solving problems.
    - Out of date help messages or documentation is more obvious to everyone.

  - Context-aware suggestions, suggest actions and display help depending on context.
    - Docs/procedures/etc are useful, but can be too much to read through, hard to find, not up to date.
    - Reduce clutter when trying to figure out next actions.

  - Reduce context switching.
    - No need for bash, Linux, ssh or VPN to fix most server issues.
    - No checking server logs.
    - Easily accesible and readble output.

  - Control access.
    - Only gives necessary access, no unnecessary ssh-ing into production!



  - Completely NoOps.
  - Easily extensible.
  - Pay per invocation.
  - Provider agnostic.



  1. Install catops `pip install catops`
  2. Run `meow install [--template] [--target-dir]`
  3. Adjust the template according to your needs e.g. add Slack OAuth tokens, adjust service names etc.
  4. Install serverless dependencies `npm install` in the template directory.
  5. Run `serverless deploy`
  6. Configure your Slack app (i.e. set Slash command/Bot endpoint URLs to appropriate URLs)





  Every Lambda function needs a handler, which takes arguments `(event, context)`. In this case, it is necessary to respond instantly to the request with a `200` so the handler below calls the actual functionality asynchronously and then returns a `200` response.



  ```python handler.py
  import json
  from six.moves.urllib.parse import parse_qs
  import requests
  import boto3
  from catops import convert_dispatch


  def respond(event, context):
      """Call handler.main asynchronously and then return instant response."""
      lambda_client = boto3.client('lambda')
      response = {'statusCode':'200'}
      
      lambda_client.invoke(
          FunctionName='CatOps-dev-dispatcher',
          InvocationType='Event',
          Payload=json.dumps(event))
      return response


  def main(event, context):
      """Main lamda function logic, to be called asynchronously."""
      params = parse_qs(event.get('body'))
      payload = convert_dispatch(params)
      username =  params.get('user_name', ['catops'])[0]

      
      response_url = params.get('response_url')
      if type(response_url) is list:
          response_url = response_url[0]
      r = requests.post(response_url, data=json.dumps(payload))
      if not r.ok:
          print(r)
          print(r.reason)
          print(r.text)
      return
  ```



  CatOps works around plugins.

  - Plugins are python files stored in the 'plugins/' directory.
  - CatOps scans this directory for valid functions to import.
  - All files and/or functions starting with `_` are ignored. (`_` means they are private and will not be added to the CatOps dispatcher)
  - Other functions are added to the CatOps dispatcher and can be called via `/catops <functionname> [argv]`
  - All functions need to have the arguments `(argv, params)`
      - argv will contain the arguments passed to the function e.g. for `/catops role --user t.user`, argv will contain `['role', '--user', 't.user']
      - params will contain the parse Lambda event body, which contains all the information from Slack e.g. `{"text": ... , "username": ..., "response_url": ...}`.



  ```python plugins/example.py
  """example.py - example plugin for ChatOps."""
  from catops import create_slack_payload

  def ping(argv, params):
      """Check is working."""
      text = '@{} Meow!'.format(params.get('user_name', ['CatOps'])[0]),
      return create_slack_payload(text=text)
  ```



  ```yaml serverless.yml
  service: CatOps

  package:
    include:
      - handler.py
      - plugins/**

  custom:
    pythonRequirements:
      slim: true

  provider:
    name: aws
    stage: ${opt:stage, 'dev'}
    runtime: python3.6
    profile: serverless
    
    
    
    iamRoleStatements:
      - Effect: Allow
        Action:
          - lambda:InvokeFunction
          - lambda:InvokeAsync
        Resource: "*"

  functions:
    dispatcher:
      handler: handler.main
    respond:
      handler: handler.respond
      events:
        - http:
            path: ping
            method: post

  plugins:
    - serverless-python-requirements
  ```



  ```bash
  serverless deploy
  serverless invoke --function dispatcher --path /path/to/json/data --log
  ```

  See [examples](https://github.com/BBOXX/CatOps/tree/master/examples) and [templates](https://github.com/BBOXX/CatOps/tree/master/catops/templates) for more.



  ```python

  def verify_request(event, slack_secret, timeout=True):
      """Verify that Lambda event came from Slack"""

  def get_user_slack(event, oauth, team_id=None, channel_id=None):
      """Check whether user exists and is in specified team and channel.

      Arguments:
          event       - AWS Lambda event
          oauth       - Slack OAUTH token
          team_id     - Slack team_id (workspace, i.e. BBOXX)
          channel_id  - Channel user must be in
      Returns:
          False, err_msg
          True, user_dict with id, name, team_id, channel_id, email
      """


  def dispatch(command, params=None, plugin_dir='plugins/'):
      """Create Dispatcher object and run parse_command on (command, params)"""


  def get_slack_colour(level):
      """Return Slack colour value based on log level."""

  def get_text(params):
      """Return event_text from parse_qs event.get('body')."""

  def create_slack_attachment(fallback=None,
                              color=None,
                              pretext=None,
                              author_name=None,
                              author_link=None,
                              author_icon=None,
                              title=None,
                              title_link=None,
                              text=None,
                              fields=None,
                              image_url=None,
                              thumb_url=None,
                              footer=None,
                              footer_icon=None,
                              ts=None
      ):
      """Create slack attachment payload
      See https://api.slack.com/docs/message-attachments for more info.

      Arguments:
          fallback - Required plain-text summary of the attachment
          [color] - Colour of the attachment
          [pretext] - Optional text that appears above the attachment block
          [author_name]
          [author_link]
          [author_icon] - URL to author icon
          [title] - Title of the attachment
          [title_link]
          [text] - Optional text that appears inside the attachment
          [fields] - Array of dicts containing more values
          [image_url] - URL to image attached
          [thumb_url] - URL to image thumbnail
          [footer] - Footer message
          [footer_icon] - URL to footer icon
          [ts] - timestamp
      """

  def create_slack_payload(response_type='ephemeral', text="", attachments=None):
      """Create a Slack payload formatted correctly."""

  def convert_dispatch(params, convert_function=None, plugin_dir='plugins/'):
      """Call dispatch and convert the output accordingly into a payload."""



  class SlackHandler(logging.Handler):
      """Logger slack_handler which posts json log body to lambda_url."""



  def install(argv=None):
      """Install catops serverless Slack template."""


  class ArgumentParserError(Exception):
      """Error raised by ArgumentParser"""
      pass


  class CatParser(argparse.ArgumentParser):
      """Overrides error method to throw an error instead of exiting"""
      def error(self, message):
          raise ArgumentParserError(message)

  ```



  ```bash
  sudo apt-get install npm
  sudo npm install -g serverless
  npm install serverless-python-requirements
  pip install catops
  ```

  Install `serverless-python-requirements` in the same dir as `serverless.yml`.



  - Passive rather than active; needs to be triggered (e.g. by Slack slash commands (could run it every command))
  - Limitations of FaaS
    - Max size (256MB for AWS Lambda)
    - Execution time limit (5 minute for AWS Lambda)
    - No state (recommend using a cloud-based database for state e.g. DynamoDB for AWS)
  - No autocomplete inside of Slack.


pkgId: c1fa9d6b93a191d3a1f9ea0e96c7affe354fd8eef29721796e855d951d4658e2
name: python-catppuccin
arch: src
version: 2.3.4
epoch: 0
release: 1
summary: 🐍 Soothing pastel theme for Python.
url: https://pypi.org/project/catppuccin/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catppuccin-2.3.4-1.src.rpm
checksum_type: sha256
description:
  <h3 align="center">
  	<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png" width="100" alt="Logo"/><br/>
  	<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
  	Catppuccin for <a href="https://www.python.org/">Python</a>
  	<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
  </h3>

  <p align="center">
  	<a href="https://github.com/catppuccin/python/stargazers"><img src="https://img.shields.io/github/stars/catppuccin/python?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
  	<a href="https://github.com/catppuccin/python/issues"><img src="https://img.shields.io/github/issues/catppuccin/python?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
  	<a href="https://github.com/catppuccin/python/contributors"><img src="https://img.shields.io/github/contributors/catppuccin/python?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
  </p>



  Install with `pip` or your preferred dependency management tool.

  ```bash
  pip install catppuccin
  ```



  Get access to the palette with the `catppuccin.PALETTE` constant:

  ```python
  from catppuccin import PALETTE

  PALETTE.latte.colors.mauve.hex

  PALETTE.mocha.colors.teal.rgb

  ```

  The `Palette` data structure matches [the palette JSON](https://github.com/catppuccin/palette/blob/main/palette.json).



  Both `Palette` and `FlavorColors` can be iterated to yield flavors and colors respectively:

  ```python
  for flavor in PALETTE:
      print(flavor.name)






  for color in PALETTE.latte.colors:
      print(f"{color.name}: {color.hex}")








  ```



  `Palette`, `Flavor`, `Color` et cetera are all [`dataclasses`](https://docs.python.org/3/library/dataclasses.html),
  so you can also inspect and iterate their fields using methods from the dataclass module.

  For example, to list all color names and their hex codes:

  ```python
  from dataclasses import fields
  from catppuccin import PALETTE

  flavor = PALETTE.frappe
  for field in fields(flavor.colors):
      color = getattr(flavor.colors, field.name)
      print(f"{field.name}: {color.hex}")








  ```



  This package provides a Pygments style for each of the four Catppuccin flavors.

  Install Catppuccin with the `pygments` feature to include the relevant dependencies:

  ```bash
  pip install catppuccin[pygments]
  ```

  The styles are registered as importlib entrypoints, which allows Pygments to
  find them by name:

  ```python
  from pygments.styles import get_style_by_name

  get_style_by_name("catppuccin-frappe")

  ```

  The following style names are available:

   - `catppuccin-latte`
   - `catppuccin-frappe`
   - `catppuccin-macchiato`
   - `catppuccin-mocha`

  They can also be accessed by directly importing them:

  ```python
  from catppuccin.extras.pygments import MacchiatoStyle
  ```



  A minimal configuration:

  ```python
  c.TerminalInteractiveShell.true_color = True
  c.TerminalInteractiveShell.highlighting_style = "catppuccin-mocha"
  ```

  Putting this into your [IPython configuration](https://ipython.readthedocs.io/en/stable/config/intro.html)
  and ensuring `catppuccin[pygments]` is installed in the same environment will
  give you Catppuccin Mocha syntax highlighting in the REPL. See [here](https://github.com/backwardspy/dots/blob/f6991570d6691212e27e266517656192f910ccbf/dot_config/ipython/profile_default/ipython_config.py)
  for an example of a more complete configuration.



  The library tries to register styles and colormaps if `matplotlib` is installed.
  See the examples below for some use cases:

  1. Load a style, using `mpl.style.use`
      ```python
      import catppuccin
      import matplotlib as mpl
      import matplotlib.pyplot as plt

      mpl.style.use(catppuccin.PALETTE.mocha.identifier)
      plt.plot([0,1,2,3], [1,2,3,4])
      plt.show()
      ```
  1. Mix it with different stylesheets!
      ```python
      import catppuccin
      import matplotlib as mpl
      import matplotlib.pyplot as plt

      mpl.style.use(["ggplot", catppuccin.PALETTE.mocha.identifier])
      plt.plot([0,1,2,3], [1,2,3,4])
      plt.show()
      ```
  1. Load individual colors
      ```python
      import matplotlib.pyplot as plt
      import catppuccin
      from catppuccin.extras.matplotlib import load_color

      color = load_color(catppuccin.PALETTE.latte.identifier, "peach")
      plt.plot([0,1,2,3], [1,2,3,4], color=color)
      plt.show()
      ```
  1. Define custom colormaps
      ```python
      import matplotlib.pyplot as plt
      import numpy as np
      import catppuccin
      from catppuccin.extras.matplotlib import get_colormap_from_list

      cmap = get_colormap_from_list(
          catppuccin.PALETTE.frappe.identifier,
          ["red", "peach", "yellow", "green"],
      )
      rng = np.random.default_rng()
      data = rng.integers(2, size=(30, 30))

      plt.imshow(data, cmap=cmap)
      plt.show()
      ```




  If you are looking to contribute, please read through our
  [CONTRIBUTING.md](https://github.com/catppuccin/.github/blob/main/CONTRIBUTING.md)
  first!



  This project is maintained with [Poetry](https://python-poetry.org). If you
  don't have Poetry yet, you can install it using the [installation
  instructions](https://python-poetry.org/docs/#installation).

  Install the project's dependencies including extras:

  ```bash
  poetry install --all-extras
  ```



  [`catppuccin/palette.py`](./catppuccin/palette.py) is generated by a [build script](`./build.py`) based on the contents of [`palette.json`](./palette.json).

  To update after downloading a new palette JSON file:

  ```console
  poetry run python build.py
  ```

  Formatting this file is done manually as with any other file, see [`Code Standards`](#code-standards) below.



  Before committing changes, it is recommended to run the following tools to
  ensure consistency in the codebase.

  ```bash
  ruff format
  ruff check
  mypy .
  pytest --cov catppuccin
  ```

  These tools are all installed as part of the `dev` dependency group with
  Poetry. You can use `poetry shell` to automatically put these tools in your
  path.




  - [backwardspy](https://github.com/backwardspy)
  - [Bram de Wilde](https://github.com/brambozz)
  - [miloth](https://github.com/miloth)

  &nbsp;

  <p align="center">
  	<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" />
  </p>
  <p align="center">
  	Copyright &copy; 2022-present <a href="https://github.com/catppuccin" target="_blank">Catppuccin Org</a>
  </p>
  <p align="center">
  	<a href="https://github.com/catppuccin/catppuccin/blob/main/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a>
  </p>


pkgId: 8d1188cfa1215aeb612fe20c97526240f992f45889de41d99ee283b44e955338
name: python-catscore
arch: src
version: 0.3.5
epoch: 0
release: 1
summary: Core library for crawling and web scraping
url: https://rescala.jp
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catscore-0.3.5-1.src.rpm
checksum_type: sha256
description:
  Cats core is a Python library for [cats project](https://finance.rescala.jp/?page_id=204).



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

  ```bash
  pip install catscore
  ```



  ```python
  tbd = "TBD
  ```


  Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

  Please make sure to update tests as appropriate.


  [MIT](https://choosealicense.com/licenses/mit/)


  If you are failing to install mecab-python3, please check it

  en:  https://github.com/shogun-toolbox/shogun/issues/2930
  jp: https://qiita.com/siraasagi/items/e07e0b271cb7cd679a70



  You need to update swig > 0.3.8
  Please execute yum install swig3


pkgId: 3fb15a6988559deac0ca8176549cf13da7d62a2152d646f27f5ce045f2b3fe31
name: python-catsim
arch: src
version: 0.17.3
epoch: 0
release: 1
summary: Computerized Adaptive Testing Simulator
url: https://pypi.org/project/catsim/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catsim-0.17.3-1.src.rpm
checksum_type: sha256
description:
  [![Unit tests](https://github.com/douglasrizzo/catsim/actions/workflows/test-on-push.yml/badge.svg)](https://github.com/douglasrizzo/catsim/actions/workflows/test-on-push.yml)
  [![Test Coverage](https://coveralls.io/repos/github/douglasrizzo/catsim/badge.svg?branch=master)](https://coveralls.io/github/douglasrizzo/catsim?branch=master)
  [![Latest Version](https://badge.fury.io/py/catsim.svg)](https://badge.fury.io/py/catsim)
  [![Digital Object Identifier](https://zenodo.org/badge/doi/10.5281/zenodo.46420.svg)](http://dx.doi.org/10.5281/zenodo.46420)
  **catsim** is a Python package for computerized adaptive testing (CAT)
  simulations. It provides multiple methods for:
  - [test initialization](https://douglasrizzo.com.br/catsim/initialization.html) (selecting the initial ability of the examinees)
  - [item selection](https://douglasrizzo.com.br/catsim/selection.html)
  - [ability estimation](https://douglasrizzo.com.br/catsim/estimation.html)
  - [test stopping](https://douglasrizzo.com.br/catsim/stopping.html)
  These methods can either be used in a standalone fashion
  [\[1\]](https://douglasrizzo.com.br/catsim/introduction.html#autonomous-usage)
  to power other software or be used with *catsim* to simulate the
  application of computerized adaptive tests
  [\[2\]](https://douglasrizzo.com.br/catsim/introduction.html#running-simulations),
  given a sample of examinees, represented by their ability levels,
  and an item bank, represented by their parameters according to some
  [logistic Item Response Theory
  model](https://douglasrizzo.com.br/catsim/introduction.html#item-response-theory-models).

  Computerized adaptive tests are educational evaluations, usually taken
  by examinees in a computer or some other digital means, in which the
  examinee\'s ability is evaluated after the response of each item.
  The new ability is then used to select a new item, closer to the
  examinee\'s real ability. This method of test application has
  several advantages compared to the traditional paper-and-pencil method
  or even linear tests applied electronically, since high-ability
  examinees are not required to answer all the easy items in a test,
  answering only the items that actually give some information regarding
  his or hers true knowledge of the subject at matter. A similar, but
  inverse effect happens for those examinees of low ability level.
  More information is available [in the
  docs](https://douglasrizzo.com.br/catsim/introduction.html) and over
  at
  [Wikipedia](https://en.wikipedia.org/wiki/Computerized_adaptive_testing).

  Install it using `pip install catsim`.

  **NEW:** there is now [a Colab Notebook](https://colab.research.google.com/drive/14zEWoDudBCXF0NO-qgzoQpWUGBcJ2lPH?usp=sharing) teaching the basics of catsim!
  1.  Have an [item matrix](https://douglasrizzo.com.br/catsim/item_matrix.html);
  2.  Have a sample of examinee proficiencies, or a number of examinees to be generated;
  3.  Create an [initializer](https://douglasrizzo.com.br/catsim/initialization.html),
      an item [selector](https://douglasrizzo.com.br/catsim/selection.html), a
      ability [estimator](https://douglasrizzo.com.br/catsim/estimation.html)
      and a [stopping criterion](https://douglasrizzo.com.br/catsim/stopping.html);
  4.  Pass them to a [simulator](https://douglasrizzo.com.br/catsim/simulation.html)
      and start the simulation.
  5.  Access the simulator\'s properties to get specifics of the results;
  6.  [Plot](https://douglasrizzo.com.br/catsim/plot.html) your results.
  ```python
  from catsim.initialization import RandomInitializer
  from catsim.selection import MaxInfoSelector
  from catsim.estimation import NumericalSearchEstimator
  from catsim.stopping import MaxItemStopper
  from catsim.simulation import Simulator
  from catsim.cat import generate_item_bank
  initializer = RandomInitializer()
  selector = MaxInfoSelector()
  estimator = NumericalSearchEstimator()
  stopper = MaxItemStopper(20)
  Simulator(generate_item_bank(100), 10).simulate(initializer, selector, estimator, stopper)
  ```

  All dependencies are listed on `setup.py` and should be installed
  automatically.
  To run the tests, you\'ll need to install the testing requirements
  `pip install catsim[testing]`.
  To generate the documentation, install the necessary dependencies with `pip install catsim[docs]`.
  To ensure code is valid and formatted before submission, install the necessary development dependencies with `pip install catsim[dev]`.

  *catsim* is compatible and tested against Python 3.5, 3.6, 3.7, 3.8 and 3.9.

  -   Official source code repo: <https://github.com/douglasrizzo/catsim>
  -   HTML documentation (stable release):
      <https://douglasrizzo.com.br/catsim>
  -   Issue tracker: <https://github.com/douglasrizzo/catsim/issues>

  You can cite the package using the following bibtex entry:
  ```bibtex
  @article{catsim,
    author = {Meneghetti, Douglas De Rizzo and Aquino Junior, Plinio Thomaz},
    title = {Application and simulation of computerized adaptive tests through the package catsim},
    year = 2018,
    month = jul,
    archiveprefix = {arXiv},
    eprint = {1707.03012},
    eprinttype = {arxiv},
    journal = {arXiv:1707.03012 [stat]},
    primaryclass = {stat}
  }
  ```

  _catsim_ does not implement item parameter estimation. I have had great joy outsourcing that functionality to the [mirt](https://cran.r-project.org/web//packages/mirt/) R package along the years. However, since many users request packages with item parameter estimation capabilities in the Python ecosystem, here are a few links. While I have not used them personally, specialized packages like these are hard to come by, so I hope these are helpful.
  - [eribean/girth](https://github.com/eribean/girth)
  - [eribean/girth_mcmc](https://github.com/eribean/girth_mcmc)
  - [nd-ball/py-irt](https://github.com/nd-ball/py-irt)

rpm_license:
  GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007  Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.   This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.  0. Additional Definitions.  As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.  "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.  An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.  A "Combined Work" is a work produced by combining or linking an Application with the Library.  The particular version of the Library with which the Combined Work was made is also called the "Linked Version".  The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.  The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.  1. Exception to Section 3 of the GNU GPL.  You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.  2. Conveying Modified Versions.  If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:  a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or  b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.  3. Object Code Incorporating Material from Library Header Files.  The object code form of an Application may incorporate material from a header file that is part of the Library.  You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:  a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.  b) Accompany the object code with a copy of the GNU GPL and this license document.  4. Combined Works.  You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:  a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.  b) Accompany the Combined Work with a copy of the GNU GPL and this license document.  c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.  d) Do one of the following:  0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.  1) Use a suitable shared library mechanism for linking with the Library.  A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.  e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)  5. Combined Libraries.  You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:  a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.  b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.  6. Revised Versions of the GNU Lesser General Public License.  The Free Software Foundation may publish revised and/or new versions of the GNU Lesser 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 Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.  If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.


pkgId: 9959a0c697caa28b6e5e3d2284dddfc0242dfde6636759911e122bca73ce8059
name: python-catsup
arch: src
version: 0.3.11
epoch: 0
release: 1
summary: Catsup: a lightweight static site generator
url: https://github.com/whtsky/Catsup
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catsup-0.3.11-1.src.rpm
checksum_type: sha256
description:
  Catsup is a lightweight static website generator which aims to be simple and elegant.
  Documentation is available at RTFD: https://catsup.readthedocs.org/en/v0.3.11/


pkgId: ec375a607631bcccbb82b274fac712da87d610ad8801f23c16765bf85376fea6
name: python-catt
arch: src
version: 0.12.12
epoch: 0
release: 1
summary: Cast All The Things allows you to send videos from many, many online sources to your Chromecast.
url: https://github.com/skorokithakis/catt
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catt-0.12.12-1.src.rpm
checksum_type: sha256
description:
  [![image](https://img.shields.io/pypi/v/catt.svg)](https://pypi.python.org/pypi/catt)
  [![image](https://img.shields.io/travis/skorokithakis/catt.svg)](https://travis-ci.org/skorokithakis/catt)
  [![image](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/skorokithakis/catt)
  Cast All The Things allows you to send videos from many, many online
  sources (YouTube, Vimeo, and a few hundred others) to your Chromecast.
  It also allows you to cast local files or render websites.


pkgId: d627b94896f480f909779ce17ab60cf56fc182945ae5fb1c333cee23bd743fb3
name: python-cattrs
arch: src
version: 24.1.2
epoch: 0
release: 1
summary: Composable complex class support for attrs and dataclasses.
url: https://catt.rs
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cattrs-24.1.2-1.src.rpm
checksum_type: sha256
description:
  <!-- begin-teaser -->
  **cattrs** is a Swiss Army knife for (un)structuring and validating data in Python.
  In practice, that means it converts **unstructured dictionaries** into **proper classes** and back, while **validating** their contents.
  <!-- end-teaser -->

  <!-- begin-example -->
  _cattrs_ works best with [_attrs_](https://www.attrs.org/) classes, and [dataclasses](https://docs.python.org/3/library/dataclasses.html) where simple (un-)structuring works out of the box, even for nested data, without polluting your data model with serialization details:
  ```python
  >>> from attrs import define
  >>> from cattrs import structure, unstructure
  >>> @define
  >>> instance = structure({'a': 1, 'b': ['x', 'y']}, C)
  >>> instance
  C(a=1, b=['x', 'y'])
  >>> unstructure(instance)
  {'a': 1, 'b': ['x', 'y']}
  ```
  <!-- end-teaser -->
  <!-- end-example -->
  Have a look at [*Why *cattrs*?*](https://catt.rs/en/latest/why.html) for more examples!
  <!-- begin-why -->


  - _attrs_ classes and dataclasses are converted into dictionaries in a way similar to `attrs.asdict()`, or into tuples in a way similar to `attrs.astuple()`.
  - Enumeration instances are converted to their values.
  - Other types are let through without conversion. This includes types such as integers, dictionaries, lists and instances of non-_attrs_ classes.
  - Custom converters for any type can be registered using `register_unstructure_hook`.

  Converts unstructured data into structured data, recursively, according to your specification given as a type.
  The following types are supported:
  - `typing.Optional[T]` and its 3.10+ form, `T | None`.
  - `list[T]`, `typing.List[T]`, `typing.MutableSequence[T]`, `typing.Sequence[T]` convert to a lists.
  - `tuple` and `typing.Tuple` (both variants, `tuple[T, ...]` and `tuple[X, Y, Z]`).
  - `set[T]`, `typing.MutableSet[T]`, and `typing.Set[T]` convert to a sets.
  - `frozenset[T]`, and `typing.FrozenSet[T]` convert to a frozensets.
  - `dict[K, V]`, `typing.Dict[K, V]`, `typing.MutableMapping[K, V]`, and `typing.Mapping[K, V]` convert to a dictionaries.
  - [`typing.TypedDict`](https://docs.python.org/3/library/typing.html#typing.TypedDict), ordinary and generic.
  - [`typing.NewType`](https://docs.python.org/3/library/typing.html#newtype)
  - [PEP 695 type aliases](https://docs.python.org/3/library/typing.html#type-aliases) on 3.12+
  - _attrs_ classes with simple attributes and the usual `__init__`[^simple].
  - All _attrs_ classes and dataclasses with the usual `__init__`, if their complex attributes have type metadata.
  - Unions of supported _attrs_ classes, given that all of the classes have a unique field.
  - Unions of anything, if you provide a disambiguation function for it.
  - Custom converters for any type can be registered using `register_structure_hook`.
  [^simple]: Simple attributes are attributes that can be assigned unstructured data, like numbers, strings, and collections of unstructured data.

  _cattrs_ comes with pre-configured converters for a number of serialization libraries, including JSON (standard library, [_orjson_](https://pypi.org/project/orjson/), [UltraJSON](https://pypi.org/project/ujson/)), [_msgpack_](https://pypi.org/project/msgpack/), [_cbor2_](https://pypi.org/project/cbor2/), [_bson_](https://pypi.org/project/bson/), [PyYAML](https://pypi.org/project/PyYAML/), [_tomlkit_](https://pypi.org/project/tomlkit/) and [_msgspec_](https://pypi.org/project/msgspec/) (supports only JSON at this time).
  For details, see the [cattrs.preconf package](https://catt.rs/en/stable/preconf.html).

  _cattrs_ is based on a few fundamental design decisions:
  - Un/structuring rules are separate from the models.
    This allows models to have a one-to-many relationship with un/structuring rules, and to create un/structuring rules for models which you do not own and you cannot change.
    (_cattrs_ can be configured to use un/structuring rules from models using the [`use_class_methods` strategy](https://catt.rs/en/latest/strategies.html#using-class-specific-structure-and-unstructure-methods).)
  - Invent as little as possible; reuse existing ordinary Python instead.
    For example, _cattrs_ did not have a custom exception type to group exceptions until the sanctioned Python [`exceptiongroups`](https://docs.python.org/3/library/exceptions.html#ExceptionGroup).
    A side-effect of this design decision is that, in a lot of cases, when you're solving _cattrs_ problems you're actually learning Python instead of learning _cattrs_.
  - Resist the temptation to guess.
    If there are two ways of solving a problem, _cattrs_ should refuse to guess and let the user configure it themselves.
  A foolish consistency is the hobgoblin of little minds, so these decisions can and are sometimes broken, but they have proven to be a good foundation.
  <!-- end-why -->

  Major credits to Hynek Schlawack for creating [attrs](https://attrs.org) and its predecessor, [characteristic](https://github.com/hynek/characteristic).
  _cattrs_ is tested with [Hypothesis](http://hypothesis.readthedocs.io/en/latest/), by David R. MacIver.
  _cattrs_ is benchmarked using [perf](https://github.com/haypo/perf) and [pytest-benchmark](https://pytest-benchmark.readthedocs.io/en/latest/index.html).
  This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [`audreyr/cookiecutter-pypackage`](https://github.com/audreyr/cookiecutter-pypackage) project template.


pkgId: a59270d43d2cf6ec893af2daa060992dbfb5c1d4494681458be3aafd214a7480
name: python-cattrs-env
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: A tool for parsing and validating env vars using cattrs
url: https://github.com/henryivesjones/cattrs-env
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cattrs-env-1.0.4-1.src.rpm
checksum_type: sha256
description:
  ![Tests + Linting](https://github.com/henryivesjones/cattrs-env/actions/workflows/checks.yml/badge.svg?branch=main&event=push)
  ![pypi](https://img.shields.io/pypi/v/cattrs-env)
  ![License](https://img.shields.io/pypi/l/cattrs-env)
  ![Downloads](https://img.shields.io/pypi/dm/cattrs-env)


  `cattrs-env` is an Environment Variable parser/validator which utilizes the [`cattrs`](https://github.com/python-attrs/cattrs) library.

  `cattrs-env` parses Environment Variables from `os.environ` and structures them into a [`cattrs` compatible dataclass](https://catt.rs/en/stable/structuring.html#simple-attrs-classes-and-dataclasses). Providing you with easy and type safe environment variables in your project.

  Because `cattrs-env` gets the Environment Variables from `os.environ`, it is fully compatible with any Environment Variable loading library such as [`python-dotenv`](https://github.com/theskumar/python-dotenv).

  ```python
  from dataclasses import dataclass
  from typing import List, Optional
  from cattrs_env import CattrsEnv

  @dataclass
  class Env(CattrsEnv):
      A: int
      C: List[str]
      B: Optional[float] = None

  env = Env.load()

  env.A
  env.C
  env.B
  ```




  ```python
  import os
  from dataclasses import dataclass
  from typing import List, Optional

  from cattrs_env import CattrsEnv


  @dataclass
  class Env(CattrsEnv):
      A: int
      C: List[str]
      B: Optional[float] = None


  if __name__ == "__main__":
      os.environ.update(
          {
              "A": "99",
              "B": "9.9",
              "C": '["a","b","c", 1]',
          }
      )
      env = Env.load()
      print(env)
  ```


  ```python
  import os
  from typing import List, Optional
  import attrs
  from cattrs_env import CattrsEnv


  @attrs.define
  class Config:
      E: str
      F: Optional[int] = None


  @attrs.define
  class Env(CattrsEnv):
      A: int
      C: List[str]
      D: Config
      B: Optional[float] = None


  if __name__ == "__main__":
      os.environ.update(
          {
              "A": "99",
              "B": "9.9",
              "C": '["a","b","c", 1]',
              "D": """{'E':"abcdef"}""",
          }
      )
      env = Env.load()
  ```

  ```python
  from dataclasses import dataclass
  from typing import List, Optional
  import dotenv
  from cattrs_env import CattrsEnv


  @dataclass
  class Env(CattrsEnv):
      A: int
      C: List[str]
      B: Optional[float] = None


  ENV_FILE_CONTENTS = """
  A=1
  B=99.9
  C="['foo', 'bar']"
  """

  if __name__ == "__main__":
      with open(".env", "w") as env_file:
          env_file.write(ENV_FILE_CONTENTS)
      dotenv.load_dotenv()
      env = Env.load()
      print(env)

  ```


pkgId: d0ddc8bffcfaa22e53f21ed726ea0073769a6739868dfc3b14cba35c0101c034
name: python-catvox
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: transcribe your voice to stdout
url: https://pypi.org/project/catvox/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catvox-0.1.3-1.src.rpm
checksum_type: sha256
description:
  Transcribe your voice to stdout, so you can pipe it wherever you like.

  ```shell
  $ pip install catvox
  $ catvox
  If you think the sound of my voice is bad, you wanna try listening to yours
  ```


pkgId: 9248577c00a8e2cc062741b4d38bc7e04378dcc007ab3f598b8f202024ef5bb4
name: python-catwalk-client
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: Client for Catwalk
url: https://pypi.org/project/catwalk-client/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-catwalk-client-1.0.4-1.src.rpm
checksum_type: sha256
description:
  Catwalk is case aggregator for ML solutions where model query/responses can be collected for the later evaluation.
  This is client library helping to perform some common operations on the Catwalk API using python code.



  Run `pip install catwalk-client`



  To send new open cases to the Catwalk instance you can use snippet below.

  User can allow concurrent case collection while creating `CatwalkClient` by setting `concurrent` argument to `True`. The `ThreadPoolExecutor` is created with number of maximum workers passed by `max_workers` argument, by default it's 4 workers.

  ```python
      from catwalk_client import CatwalkClient

      
      client = CatwalkClient(submitter_name="fatman", submitter_version="1.0.0", catwalk_url="http://localhost:9100", concurrent=True, max_workers=2)

      
      client.send({
          "metadata": {"someint": 20},
          "query": [
              {"name": "lokalid", "value": "7386259234132", "type": "string"},
              {"name": "test3", "value": "yup", "type": "string"},
              {"name": "test2", "value": "yup", "type": "string"},
              {"name": "test1", "value": "yup", "type": "string"}
          ],
          "context": [],
          "response": [
              {
                  "name": "predictions",
                  "type": {
                      "name": "prediction",
                      "thresholds": [
                          {"from": 0, "to": 0.02, "label": "NO"},
                          {"from": 0.02, "to": 0.6, "label": "PERHAPS"},
                          {"from": 0.6, "to": 1, "label": "YES"}
                      ]
                  },
                  "value": {
                      "477110": 0.1493704617023468,
                      "477111": 0.3493704617023468,
                      "477112": 0.6493704617023468
                  },
              }
          ]
      })

      
      client.new_case().add_query(
          name="some query key", value="1345243", type="str"
      ).add_query(
          name="other query key", value="1345243", type="str"
      ).add_context(
          name="photo", value="url", type="image"
      ).add_response(
          name="is_valid", value=True, type="bool"
      ).set_metadata(
          caller="esc-1"
      ).send()

  ```



  When a case is successfully collected client should return ID of a collected case.

  In some cases host might response with an error. In this case client will inform user that it ocurred
  and it will display response status, error type and error message.





  To export cases from the Catwalk instance there is `export_cases` generator function available.

  ```python

      
      
      client = CatwalkClient(
          catwalk_url="https://catwalk.ikp-test-c3.kubernilla.dk/api", auth_token="*TOKEN*", insecure=False
      )


      def get_cw_data(client: CatwalkClient, name, version):
          data = []

          for case in client.export_cases(
              from_datetime=datetime(2023, 2, 8),
              to_datetime=datetime(2023, 2, 9),
              submitter_name=name,  # submitter_name is an optional argument,
              submitter_version=version,  # submitter_version is an optional argument,
              max_retries=5,
          ):
              print(case.id)
              data.append(case)

          print("Number of exported cases:", len(data))

          return data


      data = get_cw_data(client, "test", "0.0.1")

  ```



  ```python
      case = client.get_case("test_track_id")
      print(case.dict())
  ```



  ```python
      case_evaluation_results = client.get_case_evaluation_results("test_track_id")
      print([e.dict() for e in case_evaluation_results])
  ```



  Replaces already existing case details with given data.

  ```python
      case_details = {
          "metadata": {"someint": 20},
          "query": [
              {"name": "lokalid", "value": "1234", "type": "number"},
          ],
          "context": [],
          "response": [
              {
                  "name": "response",
                  "type": "bool",
                  "value": True,
              }
          ],
      }

      client.update("test_track_id", case_details)
  ```



  A way of updating a case. It first fetches the case by `track_id` as a `CaseBuilder` object.
  This way it's easy to update `query`, `context`, `response`, or `metadata` of the case by
  using the built-in methods.



  **`set_metadata` method replaces the whole `metadata` property with a given value.**

  ```python
      case = client.alter_case("test_track_id")
      case.add_query("lokalid", "1234", "number")
      case.update()
  ```



  A way of creating a session with cases assigned by track IDs. There are two ways to initiate a session.



  ```python
      session_id = client.create_session(
          session_name,
          session_description,
      )
      client.add_cases_to_session(session_id, track_ids)
      client.start_session(session_id, assign_to=["admin@example.com"])
  ```



  ```python
      client.initiate_session(
          session_name,
          track_ids,
          assign_to=["admin@example.com"],
          description=session_description,
      )
  ```



  Catwalk Client might end up throwing an exception. Here are a few that user can experience:

  - **Connection error**: when the connection between client and host couldn't be established.
    This might occur either when user enters a wrong host address or when the host is offline.
  - **ValidationError** or **TypeError**: when user enters wrongly formatted case.
  - **Authorization Error (403)**: when user doesn't enter the authorization token (or enters one without appropriate permissions).
  - **Other** - when any other error unhandled directly by Catwalk Client occurs it will
    display an exception name.


pkgId: be77e31b7de04ff1ff142dd87ce410a4d50d60e65e0a6dcc3621162814c2fd30
name: python-caty
arch: src
version: 0.2423.2
epoch: 0
release: 1
summary: Nice cat
url: https://pypi.org/project/caty/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-caty-0.2423.2-1.src.rpm
checksum_type: sha256
description:
  Nice cat



  Shows a readable content of a file.

  Like cat, only nicer. :)



      caty FILE
      caty FILE FORMAT
      cat FILE | caty_*




      $ pip install caty


pkgId: e22d99c1a24f6e04223c481256e63d38931cf5b2aa64c6cf013efbbb158847ae
name: python-cauldron-ml
arch: src
version: 0.6.2
epoch: 0
release: 1
summary: A CLI tool for building and deploying Kubeflow Pipelines in GCP Vertex AI
url: https://pypi.org/project/cauldron-ml/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cauldron-ml-0.6.2-1.src.rpm
checksum_type: sha256
description:
  Before you start, we recommend installing a python environment manager. Cauldron uses uv in the build process for it's speed, but you don't need to use it locally. We prefer pyenv for it's user-friendliness and automatic switching between projects.

  If you don't already have one installed, you can install pyenv in one line.



  Cauldron works with unix-based systems like MacOS and Linux. It does not currently work on Windows. For windows users, we recommend installing Windows Subsystem for Linux (WSL) but we have not tested this.



  ```bash
  curl https://pyenv.run | bash
  ```



  Python >=3.10 is supported, although python >=3.12 is recommended as this will allow you to use the latest versions of kubeflow (kfp) and google-cloud-aiplatform.

  Start with a blank folder

  ```bash
  mkdir my-project
  cd my-project
  ```

  Install python 3.12, create a new virtualenv and set it to auto-activate in the current folder

  ```bash
  pyenv install 3.12
  pyenv virtualenv 3.12 my-project
  pyenv local my-project
  ```



  ```bash
  pip install git+https://github.com/dprice80/cauldron-ml.git
  ```



  ```bash
  caul --help
  ```

  Help output should be displayed



  ```bash
  caul init
  ```

  This will create a yaml file called ~/.caulprofile. This file should be modified by the user with the following settings:

  ```yaml
  docker-repo: <repo-address>/subfolder  # no trailing slash
  docker-base-image: python:3.12-slim  # By default, cauldron pipelines work with slim versions of python images (tested with 3.12).
  user-prefix: jbloggs
  production-project-name: foo-bar-prod
  sandbox-project-name: foo-bar-sandbox
  production-service-account: my-sa@foo-bar-prod@iam.gserviceaccount.com
  sandbox-service-account: my-sa@foo-bar-sandbox@iam.gserviceaccount.com
  ```

  Note that ```docker-repo``` should include the namespace where the images are stored. The ```production-project-name``` and ```production-service-account``` can be the same as the sandbox accounts. In that case prod pipelines would run alongside dev pipelines in the same GCP project. However, this setup is not recommended. It is much safer to run a separate prod project, and for the deployment to prod to be executed by an automated workflow such as github actions. We will add examples to this effect shortly.

  Now you are ready to build your first project. Cauldron has a built-in templating system, with one working example. More examples will be added at a later date.

  ```bash
  caul create
  ```

  This will give you a working example template. You should try building, deploying and running this template without modification to ensure installation succeeded and all permissions are set correctly on your account. The template will run with your user-prefix (from ~/.caulprofile).

  CauldronML uses a two stage docker build to save time when making changes to your pipeline. First, build the base image.

  ```bash
  caul build --base
  ```

  Then build the pipeline image.

  ```bash
  caul build
  ```

  NOTE: Running ```caul build``` with no base image present in the local or remote docker repo will trigger the automatic build of the base image.

  Upload the images to your docker repo.

  ```bash
  caul deploy
  ```

  Run the pipeline.

  ```bash
  caul run
  ```

  You should now have a running pipeline.




  Our intention is for users to build their own github actions that trigger when code is pushed to main via a PR. CauldronML works with kaniko to build both the base image and pipeline image. We will add detailed instructions on how to do this shortly.


pkgId: 261c04e4ad670f0b0a1b9728bae30bcbf944b3af1ea4a40ca01678a1e397c354
name: python-causal-curve
arch: src
version: 1.0.6
epoch: 0
release: 1
url: https://github.com/ronikobrosly/causal-curve
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-causal-curve-1.0.6-1.src.rpm
checksum_type: sha256
summary:
  A python library with tools to perform causal inference using         observational data when the treatment of interest is continuous.

description:
  [![build status](http://img.shields.io/travis/ronikobrosly/causal-curve/main.svg?style=flat)](https://travis-ci.org/ronikobrosly/causal-curve)
  [![codecov](https://codecov.io/gh/ronikobrosly/causal-curve/branch/main/graph/badge.svg)](https://codecov.io/gh/ronikobrosly/causal-curve)
  [![DOI](https://zenodo.org/badge/256017107.svg)](https://zenodo.org/badge/latestdoi/256017107)

  Python tools to perform causal inference when the treatment of interest is continuous.


  <p align="center">
  <img src="/imgs/curves.png" align="middle"/>
  </p>





  - [Overview](#overview)
  - [Installation](#installation)
  - [Documentation](#documentation)
  - [Contributing](#contributing)
  - [Citation](#citation)
  - [References](#references)



  (**Version 1.0.0 released in January 2021!**)

  There are many implemented methods to perform causal inference when your intervention of interest is binary,
  but few methods exist to handle continuous treatments.

  This is unfortunate because there are many scenarios (in industry and research) where these methods would be useful.
  For example, when you would like to:

  * Estimate the causal response to increasing or decreasing the price of a product across a wide range.
  * Understand how the number of minutes per week of aerobic exercise causes positive health outcomes.
  * Estimate how decreasing order wait time will impact customer satisfaction, after controlling for confounding effects.
  * Estimate how changing neighborhood income inequality (Gini index) could be causally related to neighborhood crime rate.

  This library attempts to address this gap, providing tools to estimate causal curves (AKA causal dose-response curves).
  Both continuous and binary outcomes can be modeled against a continuous treatment.



  Available via PyPI:

  `pip install causal-curve`

  You can also get the latest version of causal-curve by cloning the repository::

  ```
  git clone -b main https://github.com/ronikobrosly/causal-curve.git
  cd causal-curve
  pip install .
  ```



  [Documentation is available at readthedocs.org](https://causal-curve.readthedocs.io/en/latest/)




  Your help is absolutely welcome! Please do reach out or create a feature branch!



  Kobrosly, R. W., (2020). causal-curve: A Python Causal Inference Package to Estimate Causal Dose-Response Curves. Journal of Open Source Software, 5(52), 2523, [https://doi.org/10.21105/joss.02523](https://doi.org/10.21105/joss.02523)



  Galagate, D. Causal Inference with a Continuous Treatment and Outcome: Alternative
  Estimators for Parametric Dose-Response function with Applications. PhD thesis, 2016.

  Hirano K and Imbens GW. The propensity score with continuous treatments.
  In: Gelman A and Meng XL (eds) Applied bayesian modeling and causal inference
  from incomplete-data perspectives. Oxford, UK: Wiley, 2004, pp.73–84.

  Imai K, Keele L, Tingley D. A General Approach to Causal Mediation Analysis. Psychological
  Methods. 15(4), 2010, pp.309–334.

  Kennedy EH, Ma Z, McHugh MD, Small DS. Nonparametric methods for doubly robust estimation
  of continuous treatment effects. Journal of the Royal Statistical Society, Series B. 79(4), 2017, pp.1229-1245.

  Moodie E and Stephens DA. Estimation of dose–response functions for
  longitudinal data using the generalised propensity score. In: Statistical Methods in
  Medical Research 21(2), 2010, pp.149–166.

  van der Laan MJ and Gruber S. Collaborative double robust penalized targeted
  maximum likelihood estimation. In: The International Journal of Biostatistics 6(1), 2010.

  van der Laan MJ and Rubin D. Targeted maximum likelihood learning. In: ​U.C. Berkeley Division of
  Biostatistics Working Paper Series, 2006.


