# packages

pkgId: 4295a84ab55f311a2917f63898b8c1576d2e60531aaaf87e08567549002f70d5
name: python-cvectors
arch: src
version: 9.1.1
epoch: 0
release: 1
summary: A simple complex vector package.
url: https://gitlab.com/Tom_Fryers/cvectors
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvectors-9.1.1-1.src.rpm
checksum_type: sha256
description:
  Cvectors is a Python package for 2D vectors. It provides a class,
  `Vector`, which uses `complex` internally.

  Usage is as follows:

  ```python
  >>> from cvectors import Vector
  >>> foo = Vector(4, 3)
  >>> foo
  Vector(4.0, 3.0)
  >>> foo.x
  4.0
  >>> foo.y
  3.0
  >>> foo.r
  5.0
  >>> bar = Vector(4, 5)
  >>> foo + bar
  Vector(8.0, 8.0)
  >>> foo.dot(bar)
  31.0
  >>> import math
  >>> foo.rotate(math.pi / 2)
  Vector(-2.9999999999999996, 4.0)
  >>> Vector.from_polar(r=3, theta=5) - Vector.from_polar(r=5, theta=2)
  Vector(2.9317207391253906, -7.423259958117824)
  >>> Vector(5, 6).perp_dot(Vector(-6, 1))
  41.0
  >>> abs(foo)
  5.0
  >>> Vector(1, -9).rec()
  (1.0, -9.0)
  >>> Vector(1, -9).pol()
  (9.055385138137417, -1.460139105621001)
  >>> Vector(3, 2).perp()
  Vector(-2.0, 3.0)
  >>> Vector(3.142, 2.718).round()
  (3, 3)
  >>> Vector(3.142, 2.718).round(1)
  (3.1, 2.7)
  ```


pkgId: 8cac889a6ad5dba1cedd3dbf70f87ecf656a0134b9deaafbb835db09a6abcf14
name: python-cvehound
arch: src
version: 1.2.1
epoch: 0
release: 1
summary: A tool to check linux kernel source dump for known CVEs
url: http://github.com/evdenis/cvehound
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvehound-1.2.1-1.src.rpm
checksum_type: sha256
description:
  [![GitHub Actions status](https://github.com/evdenis/cvehound/workflows/test/badge.svg)](https://github.com/evdenis/cvehound/actions?query=workflow%3Atest)
  [![Supported Versions of Python](https://img.shields.io/pypi/pyversions/cvehound.svg)](https://pypi.org/project/cvehound)
  [![PyPI package version](https://img.shields.io/pypi/v/cvehound.svg)](https://pypi.org/project/cvehound)



  CVEhound is a tool for checking linux sources for known CVEs.
  The tool is based on [coccinelle](https://coccinelle.gitlabpages.inria.fr/website/)
  rules and grep patterns. The tool checks sources for vulnerable
  code patterns of known CVEs and missing fixes for them.

  - **What:** The tool tries to find "unfixed" code of known CVEs;
  - **How:** The tool uses [coccinelle/grep](cvehound/cve) rules with patterns that helps to detect known CVE bugs or their fixes. Thus, sources are checked either for a presence of "unfixed" code pieces (e.g. [CVE-2020-12912](cvehound/cve/CVE-2020-12912.cocci)), or for an absence of a fix (e.g. [CVE-2020-26088](cvehound/cve/CVE-2020-26088.cocci));
  - **Why:** If you have a git log then it's easier to check what CVEs are fixed based on a git history. However, many vendors (samsung, huawei, various iot, routers manufacturers) publish kernel sources as archives without a development log. In most cases their kernels are based on LTS kernels, but versions are far from upstream. Linux version string from Makefile will only give you an information about what CVEs were fixed by kernel developers upto this version. It will not help you to understand what fixes were backported by a vendor itself. In this case it's possible to apply the tool and check "missing" CVE fixes.



  [Linux Security Summit 2021 Presentation (EN)](docs/LSS2021_CVEhound_en.pdf)

  <p align="center">
    <a href="https://www.youtube.com/watch?v=jIDnVeZNUA8">
      <img src="https://img.youtube.com/vi/jIDnVeZNUA8/0.jpg" alt="Linux Security Summit 2021 Presentation"/>
    </a>
  </p>

  [ZeroNights 2021 Presentation (RU)](docs/ZN2021_CVEhound_ru.pdf)

  <p align="center">
    <a href="https://www.youtube.com/watch?v=-QwLkpYzQIk">
      <img src="https://img.youtube.com/vi/-QwLkpYzQIk/0.jpg" alt="ZeroNights 2021 Presentation"/>
    </a>
  </p>



   - CVE-2020-27825 fix [missing backports](https://lkml.org/lkml/2021/1/21/1278) for [5.4, 4.19, 4.14, 4.9, 4.4 kernels](https://www.spinics.net/lists/stable/msg440412.html)
   - CVE-2021-4149 fix [missing backports](https://lore.kernel.org/stable/d1a3f31f-2205-6dce-0f33-6611972e48cd@gmx.com/T/#t) to [4.19, 4.14, 4.9 kernels](https://lore.kernel.org/stable/20220309064748.160978-1-denis.e.efremov@oracle.com/)
   - CVE-2022-26490 fix [missing backports](https://lore.kernel.org/all/20220321174006.47972-1-denis.e.efremov@oracle.com/)
   - CVE-2023-1989 fix missing backports for [6.1, 5.15, 5.10, 5.4, 4.19, 4.14 kernels](https://lore.kernel.org/stable/20230902102200.24474-1-efremov@linux.com/)
   - Similar to CVE-2021-28660 [fix in r8188eu driver](https://lore.kernel.org/all/20220518070052.108287-1-denis.e.efremov@oracle.com/#r)
   - Similar to CVE-2021-28660 [fix in rtl8723bs driver](https://lore.kernel.org/all/20220520035730.5533-1-efremov@linux.com/)
   - Similar to CVE-2022-26490 [fix](https://lore.kernel.org/all/20221122004246.4186422-4-mfaltesek@google.com/) in [st-nci driver](https://lore.kernel.org/all/fc85ff14-70d6-0c3e-247d-eda2284a5f6b@oracle.com/)
   - Security [regression CVE-2020-10781](https://lkml.org/lkml/2023/4/17/744)
   - See [tests exceptions](https://github.com/evdenis/cvehound/blob/master/tests/test_01_on_branch.py#L7) for more examples



  - Python 3 (>=3.5)
  - pip (Python package manager)
  - grep with pcre support (-P flag)
  - coccinelle (>= 1.0.7)

  Install prerequisites:
  ``` shell


  $ sudo add-apt-repository ppa:npalix/coccinelle
  $ sudo apt install python3-pip coccinelle libpython2.7


  $ sudo dnf install python3-pip coccinelle


  $ brew install coccinelle
  ```



  To install the latest stable version just run the following command:

  ``` shell
  $ python3 -m pip install --user cvehound
  ```

  For development purposes you may install cvehound in "editable" mode
  directly from the repository (clone it on your computer beforehand):

  ``` shell
  $ pip install -e .
  ```

  To update the cve rules from github repository:

  ``` shell
  $ cvehound_update_rules
  ```



  The simplest way to start using CVEhound is to run the following command:

  ``` shell
  $ cvehound --kernel ~/linux
  Found: CVE-2020-27830
  Found: CVE-2020-27152
  Found: CVE-2020-29371
  Found: CVE-2020-26088
  ```

  where *dir* should point to linux kernel sources. CVEhound will check the
  sources for all cve patterns that you can find in [cve dir](/cvehound/cve/).
  To check the sources for particular CVEs one can use:

  ``` shell
  $ cvehound --kernel ./linux --kernel-config --cve CVE-2020-27194 CVE-2020-29371
  Checking: CVE-2020-27194
  Found: CVE-2020-27194
  MSG: bpf: Fix scalar32_min_max_or bounds tracking
  CWE: Improper Restriction of Operations within the Bounds of a Memory Buffer
  FIX DATE: 2020-10-08 09:02:53
  https://www.linuxkernelcves.com/cves/CVE-2020-27194
  Affected Files:
   - linux/kernel/bpf/verifier.c: CONFIG_BPF & CONFIG_BPF_SYSCALL
     linux/.config: affected
  Config: ./linux/.config affected

  Checking: CVE-2020-29371
  Found: CVE-2020-29371
  MSG: romfs: fix uninitialized memory leak in romfs_dev_read()
  CWE: Use of Uninitialized Resource
  FIX DATE: 2020-08-21 16:52:53
  https://www.linuxkernelcves.com/cves/CVE-2020-29371
  Affected Files:
   - linux/fs/romfs/storage.c: CONFIG_ROMFS_FS
     linux/.config: not affected
  Config: ./linux/.config not affected
  ```

  Other args:
   - `--report` - will produce json file with found CVEs
     Most of metainformation in generated report is taken from linuxkernelcves.com
   - `--kernel-config` or `--kernel-config <file>` - will infer the kernel configuration required to
     build the affected code (based on Kbuild/Makefiles, ifdefs are not checked) and
     check kernel .config file if there is one
   - `--files`, `--cwe` - will limit the scope of checked cves to the kernel files of
     interest or specific CWE classes
   - `--exploit` - check only for CVEs that are known to be exploitable (according to
     the FSTEC BDU database)



  Python code is licensed under GPLv3. All rules in cvehound/cve folder are licensed under GPLv2.



  I would like to thank the following projects and people behind them:
   - [coccinelle](https://coccinelle.gitlabpages.inria.fr/website/) for the program matching engine
   - [linuxkernelcves.com](https://linuxkernelcves.com/) for information about Linux CVEs
   - [undertaker](https://vamos.informatik.uni-erlangen.de/trac/undertaker) for mapping kernel configs to .c files
   - [sympy](https://www.sympy.org/) for the symbolic logic solver


pkgId: 09d4b263e0edaf658dea35647ec6025de20912e39d7c13e8b3b9e200dd985b0d
name: python-cvhero
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: copy paste pandas
url: https://github.com/stryder-git/cvhero
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvhero-0.3.0-1.src.rpm
checksum_type: sha256
description:
  Still in version 0.

  Copy a pandas object and paste it in readable, nicely formatted code,
  that can recreate the object sufficiently to pass pandas.testing functions.

rpm_license:
  MIT License Copyright (c) 2022 Stryder-Git 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: 50c23bee500f6d04db60ed24bfe1725ef4887a7e03153e47eb032e065815f9f8
name: python-cvmmlst
arch: src
version: 0.3.7
epoch: 0
release: 1
summary: python mlst analysis tool
url: https://github.com/hbucqp/cvmmlst
rpm_license: MIT Licence
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvmmlst-0.3.7-1.src.rpm
checksum_type: sha256
description:
  ```
                                    __     __
    ______   ______ ___  ____ ___  / /____/ /_
   / ___/ | / / __ `__ \/ __ `__ \/ / ___/ __/
  / /__ | |/ / / / / / / / / / / / (__  ) /_
  \___/ |___/_/ /_/ /_/_/ /_/ /_/_/____/\__/


  ```

  cvmmlst is a bacteria mlst analysis tool that could run on Windows, Linux and MAC os. Some of the code ideas in cvmmlst draw on Torsten Seemanns excellent [mlst](https://github.com/tseemann/mlst) tool.







  ```
  pip3 install cvmmlst
  ```





  - BLAST+ >2.7.0

  **you should add BLAST in your PATH**






  Following this tutorial:
  [Add blast into your windows PATH](http://82.157.185.121:22300/shares/BevQrP0j8EXn76p7CwfheA)


  The easyest way to install blast is:

  ```
  conda install -c bioconda blast
  ```







  After finish installation, you should first initialize the reference database using following command
  ```
  cvmmlst init
  ```



  ```
  usage: cvmmlst -i <genome assemble directory> -o <output_directory>

  Author: Qingpo Cui(SZQ Lab, China Agricultural University)

  options:
    -h, --help            show this help message and exit
    -i I                  <input_path>: the PATH to the directory of assembled genome files. Could not use with -f
    -f F                  <input_file>: the PATH of assembled genome file. Could not use with -i
    -o O                  <output_directory>: output PATH
    -scheme SCHEME        <mlst scheme want to use>, cvmmlst show_schemes command could output all available schems
    -minid MINID          <minimum threshold of identity>, default=90
    -mincov MINCOV        <minimum threshold of coverage>, default=60
    -t T                  <number of threads>: default=8
    -v, --version         Display version

  cvmmlst subcommand:
    {init,show_schemes,add_scheme}
      init                <initialize the reference database>
      show_schemes        <show the list of all available schemes>
      add_scheme          <add custome scheme, use cvmmlst add_scheme -h for help>
  ```



  ```
  cvmmlst show_schemes
  ```




  ```
  usage: cvmmlst -i <genome assemble directory> -o <output_directory>

  Author: Qingpo Cui(SZQ Lab, China Agricultural University) add_scheme
         [-h] [-name NAME] [-path PATH]

  optional arguments:
    -h, --help  show this help message and exit
    -name NAME  <the custome scheme name>
    -path PATH  <the path to the files of custome scheme>
  ```

  -name: str -> the scheme name you want to use with -scheme options

  -path: str -> the path of the directory that contains the fasta files of locus in schemes and the profile file


  ```
  cvmmlst add_scheme -name my_scheme -path PATH_TO_my_scheme
  ```

  The structure of scheme directory should looks like:
  ```
  own_scheme
  ├── locus1.fasta
  ├── locus2.fasta
  ├── locus3.fasta
  ├── locus4.fasta
  ├── locus5.fasta
  ├── locus6.fasta
  ├── locus7.fasta
  └── own_scheme.txt
  ```

  The fasta file of corresponding locus is a multifasta file.

  The multifasta file looks like:
  ```
  >locus1_1
  ATGATAGGTGAAGATATACAAAGAGTATTAG
  >locus1_2
  ATGATAGGTGAAGATATACAAAGAGTATTAG
  >locus1_3
  ATGATAGGTGAAGATATACAAAGAGTATTAG
  >locus1_4
  ATGATAGGCGAAGATATACAAAGAGTATTAG
  >alocus1_5
  ATGATAGGCGAAGATATACAAAGAGTATTAG
  >locus1_6
  ATGATAGGTGAAGATATACAAAGAGTATTAG
  ```

  The own_scheme.txt is a tab-delimited text file.

  The profile looks like:


  |ST|locus1|locus2|locus3|locus4|locus5|locus6|locus7|clonal_complex|
  |---|---|---|---|---|---|---|---|---|
  |1|2|1|54|3|4|1|5|ST-21 complex|
  |2|4|7|51|4|1|7|1|ST-45 complex|
  |3|3|2|5|10|11|11|6|ST-49 complex|
  |4|10|11|16|7|10|5|7|ST-403 complex|
  |5|7|2|5|2|10|3|6|ST-353 complex|
  |6|63|34|27|33|45|5|7||
  |7|8|10|2|2|14|12|6|ST-354 complex|




  you will get a text file and a summray file in csv format in the output directory.

  The text file like
  |dat | bglA | cat |ldh |abcZ | dapE | lhkA | ST | Scheme | FILE|
  |---|---|---|---|---|---|---|---|---|---|
  |3 |1 |4| 39 | 12 | 14 | 4 |87 | listeria_2 | 665|

  The content in csv summary file like
  |dat | bglA | cat |ldh |abcZ | dapE | lhkA | ST | Scheme | FILE|
  |---|---|---|---|---|---|---|---|---|---|
  |3 |1 |4| 39 | 12 | 14 | 4 |87 | listeria_2 | sample01|
  |2 |4 |4 |1 |4 |3 |5 |3 |listeria_2 | sample02|
  |6 |6| 8 |37 | 7 |8 |1 |121| listeria_2 | sample03|
  |3 |1 |4| 39 | 12 | 14 | 4 |87 | listeria_2 | sample04|
  |2 |4 |4 |1 |4 |3 |5 |3 |listeria_2 | sample05|
  |6 |6| 8 |37 | 7 |8 |1 |121| listeria_2 | sample06|





  |Date|Content|
  |---|---|
  |2024-08-12|Add three subcommand (init, show_schems, add_scheme)|


pkgId: ff939251eff083465938028058699fae2919f65934ce23ef3e24c5cc91af6f82
name: python-cvpl-tools
arch: src
version: 0.7.4
epoch: 0
release: 1
url: https://github.com/khanlab/cvpl_tools
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvpl-tools-0.7.4-1.src.rpm
checksum_type: sha256
summary:
  A Python package for utilities and classes related to the file I/O, dataset record keeping and visualization for image processing and computer vision.

description:
  [`cvpl_tools` documentation](https://www.khanlab.ca/cvpl_tools/index.html)

  cvpl_tools is a Python package for utilities and classes related to the file I/O, dataset record keeping for image processing and computer vision.

  Functionalities this repository provides for managing datasets using DatasetReference:
  - DatasetReference keeps an ordered array of image file paths
  - Images are assigned unique IDs used to match with their annotation files
  - DatasetReference can be written to disk as json using strenc.py, recording down the image files used in a processing step and their file paths
  - cvpl_tools/fs.py provides interface to turn image files to and write them from numpy arrays
  - reader_from_cmd.py defines a utility function for creating DatasetReference by pattern matching image files to be included in the dataset
  - cvpl_tools/im folder provides an extensible segmentation pipeline that supports Napari visualization and intermediate result caching/checkpointing functionalities


  This repository uses [Poetry](https://python-poetry.org/docs/) to manage dependency.


pkgId: 68ebf4d25753363f6d426fd516d16910b57f21683d647968b472346915a77c89
name: python-cvprac
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: Arista Cloudvision(R) Portal Rest API Client written in python
url: https://github.com/aristanetworks/cvprac
rpm_license: BSD-3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvprac-1.4.0-1.src.rpm
checksum_type: sha256
description:
  [![pypi](https://img.shields.io/pypi/v/cvprac.svg)](https://pypi.python.org/pypi/cvprac)



  - [Arista Cloudvision® Portal RESTful API Client](#arista-cloudvision-portal-restful-api-client)
    - [Table of Contents](#table-of-contents)
    - [Overview](#overview)
      - [Requirements](#requirements)
    - [Installation](#installation)
      - [Development: Run from Source](#development-run-from-source)
        - [Step 1: Clone the cvprac Github repo](#step-1-clone-the-cvprac-github-repo)
        - [Step 2: Check out the desired version or branch](#step-2-check-out-the-desired-version-or-branch)
        - [Step 3: Install cvprac using Pip with -e switch](#step-3-install-cvprac-using-pip-with--e-switch)
        - [Step 4: Install cvprac development requirements](#step-4-install-cvprac-development-requirements)
    - [Getting Started](#getting-started)
      - [Connecting](#connecting)
      - [CVP On Premises](#cvp-on-premises)
      - [CVaaS](#cvaas)
      - [CVP Version Handling](#cvp-version-handling)
      - [Examples](#examples)
    - [Notes for API Class Usage](#notes-for-api-class-usage)
      - [Containers](#containers)
    - [Testing](#testing)
    - [Contact or Questions](#contact-or-questions)
    - [Contributing](#contributing)
      - [Working With Git](#working-with-git)
      - [Submitting Pull Requests](#submitting-pull-requests)
      - [Pull Request Semantics](#pull-request-semantics)
    - [License](#license)



  This module provides a RESTful API client for Cloudvision® Portal (CVP)
  which can be used for building applications that work with Arista CVP.

  When the class is instantiated the logging is configured. Either syslog,
  file logging, both, or none can be enabled. If neither syslog nor
  filename is specified then no logging will be performed.

  This class supports creating a connection to a CVP node and then issuing
  subsequent GET and POST requests to CVP. A GET or POST request will be
  automatically retried on the same node if the request receives a
  requests.exceptions.Timeout or ReadTimeout error. A GET or POST request
  will be automatically retried on the same node if the request receives a
  CvpSessionLogOutError. For this case a login will be performed before
  the request is retried. For either case, the maximum number of times a
  request will be retried on the same node is specified by the class
  attribute NUM\_RETRY\_REQUESTS.

  If more than one CVP node is specified when creating a connection, and a
  GET or POST request that receives a requests.exceptions.ConnectionError,
  requests.exceptions.HTTPError, or a requests.exceptions.TooManyRedirects
  will be retried on the next CVP node in the list. If a GET or POST
  request that receives a requests.exceptions.Timeout or
  CvpSessionLogOutError and the retries on the same node exceed
  NUM\_RETRY\_REQUESTS, then the request will be retried on the next node
  on the list.

  If any of the errors persists across all nodes then the GET or POST
  request will fail and the last error that occurred will be raised.

  The class provides connect, get, and post methods that allow the user to
  make RESTful API calls to CVP. See the example below using the get
  method.

  The class provides a wrapper function around the CVP RESTful API
  operations. Each API method takes the RESTful API parameters as method
  parameters to the operation method. The API class was added to the
  client class because the API functions are required when using the CVP
  RESTful API and placing them in this library avoids duplicating the
  calls in every application that uses this class. See the examples below
  using the API methods.



  - Python 2.7 or later
  - Python logging module
  - Python requests module version 1.0.0 or later



  The source code for cvprac is provided on Github at
  <https://github.com/aristanetworks/cvprac>. All current development is
  done in the develop branch. Stable released versions are tagged in the
  master branch and uploaded to <https://pypi.python.org>.

  If your platform has internet access you can use the Python Package
  manager to install cvprac.

      admin:~ admin$ sudo pip install cvprac

  You can upgrade cvprac

      admin:~ admin$ sudo pip install --upgrade cvprac



  We recommend running cvprac in a virtual environment. For more
  information, read this:
  <http://docs.python-guide.org/en/latest/dev/virtualenvs/>

  These instructions will help you install and run cvprac from source.
  This is useful if you plan on contributing or if you would always like
  to see the latest code in the develop branch. Note that these steps
  require the pip and git commands.



      
      admin:~ admin$ cd ~/projects
      admin:~ admin$ git clone https://github.com/aristanetworks/cvprac
      admin:~ admin$ cd cvprac



      
      admin:~ admin$ cd ~/projects/cvprac

      
      admin:~ admin$ git tag
      admin:~ admin$ git branch

      
      admin:~ admin$ git checkout v1.0.3



      
      admin:~ admin$ cd ~/projects/cvprac

      
      admin:~ admin$ sudo pip install -e ~/projects/cvprac



      
      admin:~ admin$ pip install -r dev-requirements.txt



  Once the package has been installed you can run the following example to
  verify that everything has been installed properly.



  Connecting to CVP will depend on your CVP setup. Several options are
  outlined below.



  CVP On Premises is for users with CVP running on a local server or
  cluster of servers. This is the standard form of connection. Multiple
  examples below demonstrate connecting to CVP On Premises setups.



  CVaaS is CloudVision as a Service. Users with CVaaS must use a REST API
  token (service account tokens) for accessing CVP with REST APIs.

  - In the case where users authenticate with CVP (CVaaS) using Oauth a
  - REST API token is required to be generated and used for running REST
  - APIs. In this case no username/password login is necessary, but the
  - API token (via api\_token parameter) must be provided to cvprac client
  - with the is\_cvaas parameter. In the case that the api\_token is used
  - for REST APIs the username and password will be ignored and the tenant
  - parameter is not needed.

  An example of a CVaaS connection is shown below.

  Note that the token parameter was previously cvaas\_token but this has
  been converted to api\_token because tokens are also available for usage
  with On Prem CVP deployments. The api\_token parameter name is more
  generic in this sense. If you are using the cvaas\_token parameter
  please convert to api\_token because the cvaas\_token parameter will be
  deprecated in the future.

  Please note that the correct regional URL where the CVaaS tenant is deployed must be used. The following are the
  cluster URLs used in production:

  | Region | URL |
  |--------|-----|
  | United States 1a | [www.arista.io](https://www.arista.io) |
  | United States 1c| [www.cv-prod-us-central1-c.arista.io](https://www.cv-prod-us-central1-c.arista.io)|
  | Canada | [www.cv-prod-na-northeast1-b.arista.io](https://www.cv-prod-na-northeast1-b.arista.io)|
  | Europe West 2| [www.cv-prod-euwest-2.arista.io](https://www.cv-prod-euwest-2.arista.io)|
  | Japan| [www.cv-prod-apnortheast-1.arista.io](https://www.cv-prod-apnortheast-1.arista.io)|
  | Australia | [www.cv-prod-ausoutheast-1.arista.io](https://www.cv-prod-ausoutheast-1.arista.io)|

  !!! Warning

      URLs without `www` are not supported.



  The CVP RESTful APIs often change between releases of CVP. Cvprac
  attempts to mask these API changes from the user via making appropriate
  API calls based on the CVP version while attempting to maintain return
  data and not changing function names when possible. This helps maintain
  backward compatibility for users when they upgrade CVP so that any
  custom automation/scripts will continue to work. In some cases
  maintaining return data requires additional API calls so there are cases
  where this comes with the cost of a slight performance hit. Users are
  free to access the clients get(), post() and delete() methods and make
  API calls directly if they want to avoid the potential time delay of
  some API functions. The current API version information handled by
  cvprac is shown below.

  - Current latest API version is 4.0 API version is set to latest
  - available version for CVaaS API version is set to 4.0 for 2020.1.1 and
  - beyond. API version is set to 3.0 for 2019.0.0 through 2020.1.0 API
  - version is set to 2.0 for 2018.2.X API version is set to 1.0 for
  - 2018.1.X and prior



  Example using CVP On Prem client get method directly:

      >>> from cvprac.cvp_client import CvpClient
      >>> clnt = CvpClient()
      >>> clnt.connect(['cvp1', 'cvp2', 'cvp3'], 'cvp_user', 'cvp_word')
      >>> result = clnt.get('/cvpInfo/getCvpInfo.do')
      >>> print result
      {u'version': u'2016.1.0'}
      >>>

  Same example as above using the API method:

      >>> from cvprac.cvp_client import CvpClient
      >>> clnt = CvpClient()
      >>> clnt.connect(['cvp1', 'cvp2', 'cvp3'], 'cvp_user', 'cvp_word')
      >>> result = clnt.api.get_cvp_info()
      >>> print result
      {u'version': u'2016.1.0'}
      >>>

  Same example as above but connecting to CVaaS with a token: Note that
  the username and password parameters are required by the connect
  function but will be ignored when using api\_token:

      >>> from cvprac.cvp_client import CvpClient
      >>> clnt = CvpClient()
      >>> clnt.connect(nodes=['cvaas'], username='', password='', is_cvaas=True, api_token='user token')
      >>> result = clnt.api.get_cvp_info()
      >>> print result
      {u'version': u'cvaas'}
      >>>

  Example using the API method to create a container, wait 5 seconds, then
  delete the container. Before running this example manually create a
  container named DC-1 on your CVP node.

      >>> import time
      >>> from cvprac.cvp_client import CvpClient
      >>> clnt = CvpClient()
      >>> clnt.connect(['cvp1'], 'cvp_user', 'cvp_word')
      >>> parent = clnt.api.search_topology('DC-1')
      >>> clnt.api.add_container('TORs', 'DC-1', parent['containerList'][0]['key'])
      >>> child = clnt.api.search_topology('TORs')
      >>> time.sleep(5)
      >>> result = clnt.api.delete_container('TORs', child['containerList'][0]['key'], 'DC-1', parent['containerList'][0]['key'])
      >>>





  With the API the containers are added for all cases. If you add the
  container to the original root container 'Tenant' then you have to do a
  refresh from the GUI to see the container after it is added or deleted.
  If the root container has been renamed or the parent container is not
  the root container then an add or delete will update the GUI without
  requiring a manual refresh.



  The cvprac module provides system tests. To run the system tests, you
  will need to update the `cvp_nodes.yaml` file found in test/fixtures.

  Requirements for running the system tests:

  - Need one CVP node for test with a test user account. Create the same
    account on the switch used for testing. The user account information
    follows:

          username: CvpRacTest
          password: AristaInnovates

          If switch does not have correct username and/or password then the tests that
          execute tasks will fail with the following error:

          AssertionError: Execution for task id 220 failed and in the test log is the error:

          Failure response received from the netElement : ' Unauthorized User '

  - Test has dedicated access to the CVP node.
  - CVP node contains at least one device in a container.
  - Container or device has at least one configlet applied.

  To run the system tests:

  - run `make tests` from the root of the cvprac source folder.



  Cvprac is developed by Arista EOS+ CS and supported by the Arista EOS+
  community. Support for the code is provided on a best effort basis by
  the Arista EOS+ CS team and the community. You can contact the team that
  develops these modules by sending an email to <eosplus-dev@arista.com>.

  For customers that are looking for a premium level of support, please
  contact your local account team or email <eosplus@arista.com> for help.



  Contributing pull requests are gladly welcomed for this repository. Not only contributing to the code but also we encourage the users to contribute in the form of examples, docs, tutorials, and user guides.

  Please note that all contributions that modify the library behavior
  require corresponding test cases otherwise the pull request will be
  rejected.



  It is recommended to fork the project and then start development on the forked repository's **develop** branch. This can achieved with the below steps:

  - [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the repo then clone your fork,
     and configure the remotes:

          
          git clone https://github.com/<your-username>/cvprac

          
          cd cvprac

          
          git remote add upstream https://github.com/aristanetworks/cvprac.git

  - If you cloned a while ago, get the latest changes from upstream:

          
          git checkout develop

          
          git pull upstream develop

  - Create a new topic branch (off the main project development branch) to
     contain your feature, change, or fix:

         git checkout -b <topic-branch-name>

  - Commit your changes in logical chunks. Please adhere to these [git commit
     message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
     or your code is unlikely to be merged into the main project. Use Git's
     [git rebase](https://docs.github.com/en/get-started/using-git/about-git-rebase)
     feature to tidy up your commits before making them public.

  - Locally merge (or rebase) the upstream development branch into your topic branch every time before pushing it to your fork:

          
          git pull [--rebase] upstream <dev-branch>

  - Push your topic branch up to your fork:

          git push origin <topic-branch-name>

  - [Open a Pull Request](https://github.com/aristanetworks/cvprac/pulls)
      with a clear title, description and explain how to test the feature.



  - It is recommended to open an issue before starting work on a pull request to make sure if the same issue is not reported previously and someone is already working on that. When suggesting a new feature, also make sure it won't conflict with any work that's already in progress.

  - Once the issue is opened either self-assign the issue or ask the maintainer to assign it for you. This will make sure no others are working on the same issue.

  - All new functionality must include relevant tests where applicable.

  - When submitting a pull request, please be sure to work off of the **develop** branch and not from other branches. The **develop** branch is used for ongoing development, while the **master** will hold the last stable version.

  - To automate release-notes creation and make filtering process easier, it is strongly recommended to use [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/#summary) syntax at least for Pull Request (PR) title.

  - All code submissions must follow the below criteria:

    - The issue/PR title should follow the semantic as described [here](#pull-request-semantics)
    - All the tests are updated and are passed successfully
    - Python syntax is valid



  The Pull Request title should start with one of the below to easily segregate if its a feature add or a bug or something related documentation etc.

  It is strongly recommended to use one from the below:

  - ```Feat```: Create a capability e.g. feature, test, dependency
  - ```Fix```: Fix an issue e.g. bug, typo, accident, misstatement
  - ```Doc```: Refactor of documentation, e.g. help files
  - ```Example```: Add a new example or modify an [existing one](docs/labs/)
  - ```Test```: Add or refactor anything regarding test, e.g add a new testCases or missing testCases
  - ```Refactor```: A code change that MUST be just a refactoring
  - ```Bump```: Increase the version of something e.g. dependency
  - ```Revert```: Change back to the previous commit
  - ```Optimize```: Refactor of performance, e.g. speed up code
  - ```CI```: Update CI components, e.g. molecule files or Github Actions
  - ```Cut```: Remove a capability e.g. feature, test, dependency

  For example:

  - Feat: Add support for decommissioning APIs
  - Test: Add missing test cases for change control
  - Doc: Document new examples for change control



  Copyright© 2020, Arista Networks, Inc. All rights reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are
  met:

  - Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
  - Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
  - Neither the name of Arista Networks nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS
  IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARISTA NETWORKS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  THE POSSIBILITY OF SUCH DAMAGE.


pkgId: eac4d2cead3aa9d63e72b229a84589023fee1f4e9bf756c45e62317fb961b122
name: python-cvprocessor
arch: src
version: 1.0.7
epoch: 0
release: 1
summary: CVProcessor is a Python library for processing CV (Curriculum Vitae) or resume documents.
url: https://github.com/fdojurado/CVProcessor
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvprocessor-1.0.7-1.src.rpm
checksum_type: sha256
description:
  **Warning**: This is under development, some features may not work as expected.



  CVProcessor is a Python library for processing CV (Curriculum Vitae) or resume documents. It provides a set of functions and utilities to extract information from CVs, such as personal details, education, work experience, skills, and more.



  - Extract personal details from CVs, including name, contact information, and address.
  - Parse education details, including degrees, institutions, and dates.
  - Extract work experience information, including job titles, companies, and dates.
  - Identify and extract skills mentioned in CVs.
  - Support for xlsx files.



  You can install CVProcessor using pip:

  ```bash
  pip install cvprocessor
  ```



  Here's a simple example of how to use CVProcessor to extract personal details from a CV:

  ```python
  from cvprocessor.cv import CV


  cv_file = "cv.xlsx"
  cv = CV(cv_file)


  print(cv.education)

  print(cv.teaching)
  ```


pkgId: 6d8711b28add660cc20d95f857e8fd71a5fc357fef5ffbd1fb130e1a85585926
name: python-cvpysdk
arch: src
version: 11.36
epoch: 0
release: 1
summary: Commvault SDK for Python
url: https://pypi.org/project/cvpysdk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvpysdk-11.36-1.src.rpm
checksum_type: sha256
description:
  CVPySDK is a Python Package for Commvault Software.
  CVPySDK uses REST APIs to perform CommCell operations.


pkgId: f5e3b45d147b8f27404ddd8b5e2cd487c07a84b7b31c5c7b37656e314a84aab7
name: python-cvr
arch: src
version: 0.2.2
epoch: 0
release: 1
summary: Official Python client for https://cvr.dev
url: https://github.com/cvr-dev/cvr.dev-python
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvr-0.2.2-1.src.rpm
checksum_type: sha256
description:
  ![Tests](https://github.com/cvr-dev/cvr.dev-python/actions/workflows/test.yml/badge.svg?branch=main)

  The official [cvr.dev](https://cvr.dev/) Python client library.

  [cvr.dev](https://cvr.dev/) is a web service that maintains a live-updated cache of the Danish CVR
  registry.

  We aim to provide a much simpler and more modern API compared to
  Virk/CVR's own Elastic Search solution.
  Our focus is on high availability and robustness, making it as easy and
  reliable as possible to retrieve data about Danish companies from the CVR
  database.



  `cvr` currently requires python version 3.5 or above.


  Make sure that you have pip installed, then run the following:

  ```bash
  pip install cvr
  ```



  Make sure that you have pip installed, then run the following in your
  project folder:

  ```bash
  pip install .
  ```



  The HTTP API is available at [docs.cvr.dev](https://docs.cvr.dev/).



  In the [examples/example.py](examples/example.py) dir there's a simple example program that verifies
  that your API key works and fetches different data from the server.

  ```python


  import cvr

  client = cvr.Client(api_key='your api key')
  client.test_api_key()

  for virksomhed in client.cvr.virksomheder(cvr_numre=[10103940]):
      print('Found virksomhed', virksomhed.cvr_nummer)

  for penhed in client.cvr.produktionsenheder(p_numre=[1003388394]):
      print('Found penhed', penhed.p_nummer)
  ```



  This project has two types of tests: live tests and local tests. The live tests
  are run against our live servers and require that you set a valid API key in
  the environment variable CVR_DEV_TEST_API_KEY. Note: the live tests will count
  towards your usage.

  We use the `unittest` module for testing. You should use the following to run
  the tests:

  ```bash


  $ python -m unittest


  $ CVR_DEV_TEST_API_KEY="your key" python -m unittest
  ```



  We want you to have the best experience possible; if for some reason didn't find
  what you were looking for at cvr.dev, reach out to us at kontakt@cvr.dev.

  If you just want to check out the market, these are potential alternatives:

  - [Virk's official integration](https://datacvr.virk.dk/data/cvr-hj%C3%A6lp/indgange-til-cvr/system-til-system-adgang)
  - [cvrapi.dk](https://cvrapi.dk)
  - [risika.dk](https://risika.dk)
  - [roaring.io](https://www.roaring.io/)
  - [eanapi.dk](https://eanapi.dk)


pkgId: cc8336c076f13a83fe40652293c5dff5dc98c3309ba7245f3d203b09579db41c
name: python-cvss
arch: src
version: 3.2
epoch: 0
release: 1
summary: CVSS2/3/4 library with interactive calculator for Python 2 and Python 3
url: https://github.com/RedHatProductSecurity/cvss
rpm_license: LGPLv3+
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvss-3.2-1.src.rpm
checksum_type: sha256
description:
  This Python package contains CVSS v2, v3 and v4 computation utilities and
  interactive calculator (for v2 and v3 only) compatible with both Python 2 and Python 3.
  The library is tested on all currently-supported Python versions available
  via GitHub Actions (with the exception of Python 2.7, which is EOL but
  still tested against), but it is simple enough to run on even older versions.


pkgId: 5b081b17dfe85b79b03a78b76ccda69fd13c8aa6769edd6197e29ed5de136fde
name: python-cvsslib
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: CVSS 2/3 utilities
url: https://github.com/orf/cvsslib/
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvsslib-1.0.0-1.src.rpm
checksum_type: sha256
description:
  A Python 3 library for calculating CVSS v2, CVSS v3 and CVSS v3.1 vectors, with tests. Examples on how to use
  the library is shown below, and there is some documentation on the internals within the `docs` directory. The library
  is designed to be completely extendable, so it is possible to implement your own custom scoring systems (or those of your clients)
  and have it work with the same API, and with the same bells and whistles.

  **Python 3 only**



  It's pretty simple to use. `cvsslib` has a `cvss2`, `cvss3` and `cvss31` sub modules that contains all of the enums
  and calculation code. There are also some functions to manipulate vectors that take these cvss modules
  as arguments. E.G:

  ```python
  from cvsslib import cvss2, cvss31, calculate_vector

  vector_v2 = "AV:L/AC:M/Au:S/C:N/I:P/A:C/E:U/RL:OF/RC:UR/CDP:N/TD:L/CR:H/IR:H/AR:H"
  calculate_vector(vector_v2, cvss2)
  >> (5, 3.5, 1.2)

  vector_v3 = "CVSS:3.0/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:H/MPR:N"
  calculate_vector(vector_v3, cvss31)
  >> (5.8, 5.8, 7.1)
  ```

  You can access every CVSS enum through the `cvss2`, `cvss3` or `cvss31` modules:

  ```python
  from cvsslib import cvss2

  value = cvss2.ReportConfidence.CONFIRMED

  if value != cvss2.ReportConfidence.NOT_DEFINED:
      do_something()
  ```

  There are some powerful mixin functions if you need a class with CVSS members. These functions
  take a cvss version and return a base class you can inherit from. This class hassome utility functions like
  `to_vector()` and `from_vector()` you can use.

  ```python
  from cvsslib import cvss3, class_mixin

  BaseClass = class_mixin(cvss3)  # Can pass cvss2 module instead

  class SomeObject(BaseClass):
      def print_stats(self):
          for item, value in self.enums:
              print("{0} is {1}".format(item, value)

  state = SomeObject()
  print("\n".join(state.debug()))
  print(state.calculate())
  state.from_vector("CVSS:3.0/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:H/MPR:N")
  print("Vector: " + state.to_vector())


  if state.report_confidence == ReportConfidence.NOT_DEFINED:
      do_something()
  ```

  It also supports Django models. Requires the `django-enumfields` package.

  ```python
  from cvsslib.contrib.django_model import django_mixin
  from cvsslib import cvss2
  from django.db import models

  CVSSBase = django_mixin(cvss2)

  class CVSSModel(models.Model, metaclass=CVSSBase)
      pass


  x = CVSSModel()
  x.save()
  x.exploitability
  ```

  If you want it to work with django Migrations you need to give an attribute name to the `django_mixin` function. This
  should match the attribute name it is being assigned to:

  ```python
  CVSSBase = django_mixin(cvss2, attr_name="CVSSBase")
  ```

  And there is a command line tool available:

  ```python
  > cvss CVSS:3.0/AV:L/AC:H/PR:H/UI:N/S:C/C:N/I:H/A:N/E:P/RL:U/RC:U/CR:H/IR:L/AR:H/MAV:L/MUI:R/MS:C/MC:N/MI:L/MA:N
  Base Score:     5.3
  Temporal:       4.6
  Environment:    1.3
  ```



  Creating a new scoring system is very simple. First create a Python file with the correct name, e.g `super_scores.py`.
  Next create some enums with the correct values for your system:

  ```python
   from cvsslib.base_enum import BaseEnum


   class Risk(BaseEnum):
       """
       Vector: S
       """
       HIGH = 1
       MEDIUM = 2
       LOW = 3

   class Difficulty(BaseEnum):
       """
       Vector: D
       """
       DIFFICULT = 1
       MODERATE = 2
       EASY = 3
  ```

  And lastly add a `calculate` function in the module that accepts some vector values and
  returns a result of some kind:

  ```python

  def calculate(difficulty: Difficulty, risk: Risk):
     if difficulty == Difficulty.EASY and risk == Risk.CRITICAL:
         return "oh nuts you're screwed"

     return "You're probs ok m8"
  ```

  Once you define this you can pass your `super_scores` module to any
  cvsslib function like `calculate_vector` or `django_mixin` and it will
  all just work. You can even serialize the data to and from a vector
  if you define the correct `vector: X` in the enum docstrings.


pkgId: 3246868a451dfeb646c89170f8d971be510ca5bc06467aa6b408092ab77ad134
name: python-cvt2utf
arch: src
version: 1.3.2
epoch: 0
release: 1
summary: A one-line command that converts source code files into UTF-8 or UTF-8-BOM.
url: https://github.com/x1angli/cvt2utf
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvt2utf-1.3.2-1.src.rpm
checksum_type: sha256
description:
  A lightweight tool that converts non-UTF-encoded (such as GB2312, BIG5 encoded) files to UTF-8 encoded files.
  It can also add or remove Byte-order-mark (BOM) in UTF-encoded files.


pkgId: a697d5e209d2101665fd13e0a9920bb6d72a4ec8d1113b196a3e886a74360fff
name: python-cvtkit
arch: src
version: 0.0.16
epoch: 0
release: 1
url: https://github.com/nburgdorfer/vision_toolkit
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvtkit-0.0.16-1.src.rpm
checksum_type: sha256
summary:
  A Python library including general functions and operations on various computer vision related structures.

description:
  A collection of some useful computer vision tools.

  Please check out the [documentation](https://nburgdorfer.github.io/cvtkit/) for tutorials, explaination of various topics, and references to the library API.



  building package for distribution:
  ```bash
  python -m build --sdist
  ```

  publishing to Pypi:
  ```bash
  twine upload dist/*
  ```


pkgId: ce3b0d12b3dfaa0b8b46e520fbcb203964eec91ef6f5d2540f08d67e3c538447
name: python-cvvideoplayer
arch: src
version: 1.2.1
epoch: 0
release: 1
summary: moduler multi purpose video player for debugging algorithms in python
url: https://github.com/danieltomer1/CVVideoPlayer
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvvideoplayer-1.2.1-1.src.rpm
checksum_type: sha256
description:
  <div align="center"><img src=https://github.com/user-attachments/assets/88f4e3af-0fd3-41dc-9515-85a58dfdf2fc width="250"></div>


  CV video player is a Python-based customizable video player that helps computer vision practitioners
  develop, analyze, and debug their video-related algorithms and models.

  The video player is made with simplicity in mind to allow users to easily add or remove functionality.
  It is only based OpenCV with no additional GUI frameworks, and
  It's interactivity is based on keyboard presses (no buttons).

  The player is designed as a callback system. When initialized the player receives a
  list of callbacks, each with a `edit_frame` method.
  On runtime the callbacks will run in order as specified in the input list. Each callback can also optionally add
  keyboard shortcuts to change visualization settings in real time.


  `pip install cvvideoplayer`



  ```python
  from cvvideoplayer import create_video_player
  from cvvideoplayer.frame_editors import FrameInfoOverlay, KeyMapOverlay, FitFrameToScreen

  VIDEO_OR_FRAME_FOLDER_PATH = "<add local path here>"


  def run_player():
      video_player = create_video_player(
          video_source=VIDEO_OR_FRAME_FOLDER_PATH,
          frame_edit_callbacks=[
              FitFrameToScreen(),
              FrameInfoOverlay(),
              KeyMapOverlay(),
          ],
          record=True,
      )

      video_player.run()


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

  In this example, we initiate a very basic video player that will play "example_video.mp4" with added basic
  frame edit callbacks:
  - `FitFrameToScreen`: Resizes the frame to fit the screen size
  - `FrameInfoOverlay`: Prints the current frame number and original frame resolution in the top left corner
  - `KeyMapOverlay`: prints all optional shortcuts registered by all callbacks

  Check out the `./demos` folder which shows the use of other cool frame edit callback
  such as `OpticalFlow` and `DetectionCsvPlotter`

  <details>
  <summary>Running frame by frame</summary>

  ![frame_by_frame](https://github.com/danieltomer1/CVVideoPlayer/assets/163285251/7db8cb8c-0075-416c-9901-aa2f4bb49080)
  </details>

  <details>
  <summary>Play/Pause and control play speed and direction</summary>

  ![playpause](https://github.com/danieltomer1/CVVideoPlayer/assets/163285251/fcf38b37-ec9c-4250-8c2f-6f123154c1e4)
  </details>

  <details>
  <summary>Draw bounding boxes and adjust labels</summary>

  ![bboxes](https://github.com/danieltomer1/CVVideoPlayer/assets/163285251/0a6e07de-a015-48b4-b510-2c203e0d69f4)
  </details>


pkgId: 5607d4e6b5acfcef802e0a625d0b58924b29cc8fb1787672ba6874b4b8fa215f
name: python-cvxbson
arch: src
version: 0.0.8
epoch: 0
release: 1
summary: Dealing with json and bson files
url: https://github.com/cvxgrp/cvxbson
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvxbson-0.0.8-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/cvxbson.svg)](https://badge.fury.io/py/cvxbson)
  [![Apache 2.0
  License](https://img.shields.io/badge/License-APACHEv2-brightgreen.svg)](https://github.com/cvxgrp/cvxbson/blob/master/LICENSE)
  [![Downloads](https://static.pepy.tech/personalized-badge/cvxbson?period=month&units=international_system&left_color=black&right_color=orange&left_text=PyPI%20downloads%20per%20month)](https://pepy.tech/project/cvxbson)
  [![Coverage
  Status](https://coveralls.io/repos/github/cvxgrp/cvxbson/badge.png?branch=main)](https://coveralls.io/github/cvxgrp/cvxbson?branch=main)



  IPC stands for InterProcess Communication. It is a mechanism that allows to share
  data between processes. A traditional way to do so is to use json files.
  Json files are rather flexible and can be used to share data between different
  programming languages. However, they are not very efficient.

  Here we use their binary counterpart, bson files. Bson files are much more efficient
  but somewhat lack the flexibility of json files. Here we rely on the [bson](https://pypi.org/project/bson/)
  package to read and write bson files. We are interested in parsing dictionaries
  of numpy arrays, pandas and  polars dataframes as fast as possible.

  There might be faster ways to achieve this goal and we are open to suggestions
  and pull requests.

  We recommend using json files to transfer configurations and small amounts of data.
  Bson files can then be used to transfer large matrices. A coexistence is possible
  and encouraged.



  ```python
  import numpy as np

  from cvx.bson import read_bson, write_bson

  data = {"A": np.random.rand(50,50), "B": np.random.rand(50)}

  write_bson("test.bson", data)
  recovered = read_bson("test.bson")

  assert np.allclose(data["A"], recovered["A"])
  assert np.allclose(data["B"], recovered["B"])
  ```

  We have also implemented the same functionality in for json files but would advise
  against using it. It is much slower and less efficient.

  You may want to avoid the explicit construction of files.
  It is possible to work directly with bson strings. We provide methods for that, too.



  We assume you share already the love for [Poetry](https://python-poetry.org).
  Once you have installed poetry you can perform

  ```bash
  make install
  ```

  to replicate the virtual environment we have defined in [pyproject.toml](pyproject.toml)
  and locked in [poetry.lock](poetry.lock).



  We install [JupyterLab](https://jupyter.org) on fly within the aforementioned
  virtual environment. Executing

  ```bash
  make jupyter
  ```

  will install and start the jupyter lab.


pkgId: 34c916a46825e515bdea9d3aa6c4c6f4cffc4762995d0bb982e5d6c810f3da10
name: python-cvxportfolio
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: Portfolio optimization and back-testing.
url: https://www.cvxportfolio.com
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvxportfolio-1.4.0-1.src.rpm
checksum_type: sha256
description:
  |CVXportfolio on PyPI| |linting: pylint| |Coverage Status|
  |Documentation Status| |GPLv3| |Anaconda-Server Badge|
  `Cvxportfolio <https://cvxportfolio.readthedocs.io>`__ is an object-oriented
  library for portfolio optimization and back-testing. It implements models
  described in the `accompanying paper
  <https://cvxportfolio.readthedocs.io/en/stable/_static/cvx_portfolio.pdf>`_.
  The documentation of the library is at
  `www.cvxportfolio.com <https://www.cvxportfolio.com>`_.
  *News:*
     Since end of 2023 we're running daily `example strategies
     <https://github.com/cvxgrp/cvxportfolio/tree/master/examples/strategies>`_
     using the `development (master) branch
     <https://github.com/cvxgrp/cvxportfolio/tree/master/>`_.; each day we commit
     target weights and initial holdings to the repository. All the code that
     runs them, including the `cron script
     <https://github.com/cvxgrp/cvxportfolio/blob/master/strategies_runner.sh>`_,
     is in the repository.


pkgId: 018449cf5690e39070c8d127885f5f8194df5444d0b1f5cdef2f564c98ba5015
name: python-cvxpygen
arch: src
version: 0.3.6
epoch: 0
release: 1
summary: Code generation with CVXPY
url: https://github.com/cvxgrp/cvxpygen
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvxpygen-0.3.6-1.src.rpm
checksum_type: sha256
description:
  CVXPYgen takes a convex optimization problem family modeled with CVXPY and generates a custom solver implementation in C.
  This generated solver is specific to the problem family and accepts different parameter values.
  In particular, this solver is suitable for deployment on embedded systems.
  In addition, CVXPYgen creates a Python wrapper for prototyping and desktop (non-embedded) applications.

  An overview of CVXPYgen can be found in our [slides and manuscript](https://web.stanford.edu/~boyd/papers/cvxpygen.html).

  CVXPYgen accepts CVXPY problems that are compliant with [Disciplined Convex Programming (DCP)](https://www.cvxpy.org/tutorial/dcp/index.html).
  DCP is a system for constructing mathematical expressions with known curvature from a given library of base functions.
  CVXPY uses DCP to ensure that the specified optimization problems are convex.
  In addition, problems need to be modeled according to [Disciplined Parametrized Programming (DPP)](https://www.cvxpy.org/tutorial/advanced/index.html#disciplined-parametrized-programming).
  Solving a DPP-compliant problem repeatedly for different values of the parameters can be much faster than repeatedly solving a new problem.

  For now, CVXPYgen is a separate module, until it will be integrated into CVXPY.
  As of today, CVXPYgen works with linear, quadratic, and second-order cone programs.

  This package has similar functionality as the package [cvxpy_codegen](https://github.com/moehle/cvxpy_codegen),
  which appears to be unsupported.

  **Important: When generating code with the ECOS solver, the generated code is licensed
  under the [GNU General Public License v3.0](https://github.com/embotech/ecos/blob/develop/COPYING).**



  1. Install `cvxpygen` (on Windows preferably with **Python 3.9**).
      ```
      pip install cvxpygen
      ```


  2. On Linux or Mac, install the [GCC compiler](https://gcc.gnu.org).
     On Windows, install [Microsoft Visual Studio](https://visualstudio.microsoft.com/downloads/)
     with the 'Desktop development with C++' workload.
     CVXPYgen is tested with Visual Studio 2019 and 2022, older versions might work as well.


  3. *Optional:* If you wish to use the example notebooks located in [``examples/``](https://github.com/cvxgrp/cvxpygen/blob/master/examples/),
     install ``ipykernel``, ``jupyter``, ``matplotlib``, and register a new kernel spec with Jupyter.
      ```
     pip install ipykernel jupyter matplotlib
     ipython kernel install --user --name=cvxpygen
     ```

  If you wish to use the `Clarabel` solver, you need to install [`Rust`](https://www.rust-lang.org/tools/install) and [`Eigen`](https://github.com/oxfordcontrol/Clarabel.cpp#installation).



  We define a simple 'nonnegative least squares' problem, generate code for it, and solve the problem with example parameter values.



  Let's step through the first part of [``examples/main.py``](https://github.com/cvxgrp/cvxpygen/blob/master/examples/main.py).
  Define a convex optimization problem the way you are used to with CVXPY.
  Everything that is described as ``cp.Parameter()`` is assumed to be changing between multiple solves.
  For constant properties, use ``cp.Constant()``.

  ```python
  import cvxpy as cp

  m, n = 3, 2
  x = cp.Variable(n, name='x')
  A = cp.Parameter((m, n), name='A', sparsity=[(0, 0), (0, 1), (1, 1)])
  b = cp.Parameter(m, name='b')
  problem = cp.Problem(cp.Minimize(cp.sum_squares(A @ x - b)), [x >= 0])
  ```

  Specify the `name` attribute for variables and parameters to recognize them after generating code.
  The attribute `sparsity` is a list of 2-tuples that indicate the coordinates of nonzero entries of matrix `A`.
  Parameter sparsity is only taken into account for matrices.

  Assign parameter values and test-solve.

  ```python
  import numpy as np

  np.random.seed(0)
  A.value = np.zeros((m, n))
  A.value[0, 0] = np.random.randn()
  A.value[0, 1] = np.random.randn()
  A.value[1, 1] = np.random.randn()
  b.value = np.random.randn(m)
  problem.solve()
  ```

  Generating C code for this problem is as simple as,

  ```python
  from cvxpygen import cpg

  cpg.generate_code(problem, code_dir='nonneg_LS', solver='SCS')
  ```

  where the generated code is stored inside `nonneg_LS` and the `SCS` solver is used.
  Next to the positional argument `problem`, all keyword arguments for the `generate_code()` method are summarized below.

  | Argument         | Meaning       | Type          | Default       |
  | -------------    | ------------- | ------------- | ------------- |
  | `code_dir`       | directory for code to be stored in                                 | String          | `'CPG_code'`  |
  | `solver`         | canonical solver to generate code with                             | String          | CVXPY default |
  | `solver_opts`    | options passed to canonical solver                                 | Dict            | `None`        |
  | `enable_settings`| enabled settings that are otherwise locked by embedded solver      | List of Strings | `[]`          |
  | `unroll`         | unroll loops in canonicalization code                              | Bool            | `False`       |
  | `prefix`         | prefix for unique code symbols when dealing with multiple problems | String          | `''`          |
  | `wrapper`        | compile Python wrapper for CVXPY interface                         | Bool            | `True`        |

  You can find an overview of the code generation result in `nonneg_LS/README.html`.



  As summarized in the second part of [``examples/main.py``](https://github.com/cvxgrp/cvxpygen/blob/master/examples/main.py), after assigning parameter values, you can solve the problem both conventionally and via the generated code, which is wrapped inside the custom CVXPY solve method ``cpg_solve``.

  ```python
  import time
  import sys


  from nonneg_LS.cpg_solver import cpg_solve
  problem.register_solve('CPG', cpg_solve)


  t0 = time.time()
  val = problem.solve(solver='SCS')
  t1 = time.time()
  sys.stdout.write('\nCVXPY\nSolve time: %.3f ms\n' % (1000*(t1-t0)))
  sys.stdout.write('Primal solution: x = [%.6f, %.6f]\n' % tuple(x.value))
  sys.stdout.write('Dual solution: d0 = [%.6f, %.6f]\n' % tuple(problem.constraints[0].dual_value))
  sys.stdout.write('Objective function value: %.6f\n' % val)


  t0 = time.time()
  val = problem.solve(method='CPG', updated_params=['A', 'b'], verbose=False)
  t1 = time.time()
  sys.stdout.write('\nCVXPYgen\nSolve time: %.3f ms\n' % (1000 * (t1 - t0)))
  sys.stdout.write('Primal solution: x = [%.6f, %.6f]\n' % tuple(x.value))
  sys.stdout.write('Dual solution: d0 = [%.6f, %.6f]\n' % tuple(problem.constraints[0].dual_value))
  sys.stdout.write('Objective function value: %.6f\n' % val)
  ```

  The argument `updated_params` specifies which user-defined parameter values are new.
  If the argument is omitted, all parameter values are assumed to be new.
  If only a subset of the user-defined parameters have new values, use this argument to speed up the solver.

  **Most solver settings can be specified as keyword arguments** like without code generation.
  Here, we use `verbose=False` to suppress printing.
  The list of changeable settings differs by solver and is documented in `<code_dir>/README.html` after code generation.

  Comparing the standard and codegen methods for this example, both the solutions and objective values are close.
  Especially for smaller problems like this, the new solve method ``'CPG'`` is significantly faster than solving without code generation.



  In the C code, all of your parameters and variables are stored as vectors via Fortran-style flattening (vertical index moves fastest).
  For example, the `(i, j)`-th entry of the original matrix with height `h` will be the `i+j*h`-th entry of the flattened matrix in C.
  For sparse *parameters*, i.e. matrices, the `k`-th entry of the C array is the `k`-th nonzero entry encountered when proceeding
  through the parameter column by column.

  Before compiling the example executable, make sure that ``CMake 3.5`` or newer is installed.

  On Unix platforms, run the following commands in your terminal to compile and run the program:

  ```bash
  cd nonneg_LS/c/build
  cmake ..
  cmake --build . --target cpg_example
  ./cpg_example
  ```

  On Windows, type:

  ```bash
  cd nonneg_LS\c\build
  cmake ..
  cmake --build . --target cpg_example --config release
  Release\cpg_example
  ```


pkgId: 786e5399509e2dc16340c4a7c783147bfc4e7b5b42fd690378af286c6561b82e
name: python-cvxpylayers
arch: src
version: 0.1.8
epoch: 0
release: 1
summary: Differentiable convex optimization layers
url: https://github.com/cvxgrp/cvxpylayers
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvxpylayers-0.1.8-1.src.rpm
checksum_type: sha256
description:
  ![cvxpylayers logo](cvxpylayers_logo.png)
  [![Build Status](https://travis-ci.org/cvxgrp/cvxpylayers.svg?branch=master)](https://travis-ci.org/cvxgrp/cvxpylayers)
  [![Build Status](https://ci.appveyor.com/api/projects/status/dhtbi9fb96mce56i/branch/master?svg=true)](https://ci.appveyor.com/project/sbarratt/cvxpylayers/branch/master)



  cvxpylayers is a Python library for constructing differentiable convex
  optimization layers in PyTorch, JAX, and TensorFlow using CVXPY.
  A convex optimization layer solves a parametrized convex optimization problem
  in the forward pass to produce a solution.
  It computes the derivative of the solution with respect to
  the parameters in the backward pass.

  This library accompanies our [NeurIPS 2019 paper](https://web.stanford.edu/~boyd/papers/pdf/diff_cvxpy.pdf)
  on differentiable convex optimization layers.
  For an informal introduction to convex optimization layers, see our
  [blog post](https://locuslab.github.io/2019-10-28-cvxpylayers/).

  Our package uses [CVXPY](https://github.com/cvxgrp/cvxpy) for specifying
  parametrized convex optimization problems.

  - [Installation](#installation)
  - [Usage](#usage)
  - [Examples](#examples)
  - [Contributing](#contributing)
  - [Projects using cvxpylayers](#projects-using-cvxpylayers)
  - [License](#contributing)
  - [Citing](#citing)



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

  ```bash
  pip install cvxpylayers
  ```

  Our package includes convex optimization layers for
  PyTorch, JAX, and TensorFlow 2.0;
  the layers are functionally equivalent. You will need to install
  [PyTorch](https://pytorch.org),
  [JAX](https://github.com/google/jax), or
  [TensorFlow](https://www.tensorflow.org)
  separately, which can be done by following the instructions on their websites.

  cvxpylayers has the following dependencies:
  * Python 3
  * [NumPy](https://pypi.org/project/numpy/)
  * [CVXPY](https://github.com/cvxgrp/cvxpy) >= 1.1.a4
  * [PyTorch](https://pytorch.org) >= 1.0, [JAX](https://github.com/google/jax) >= 0.2.12, or [TensorFlow](https://tensorflow.org) >= 2.0
  * [diffcp](https://github.com/cvxgrp/diffcp) >= 1.0.13


  Below are usage examples of our PyTorch, JAX, and TensorFlow layers.
  Note that the parametrized convex optimization problems must be constructed
  in CVXPY, using
  [DPP](https://www.cvxpy.org/tutorial/advanced/index.html#disciplined-parametrized-programming).



  ```python
  import cvxpy as cp
  import torch
  from cvxpylayers.torch import CvxpyLayer

  n, m = 2, 3
  x = cp.Variable(n)
  A = cp.Parameter((m, n))
  b = cp.Parameter(m)
  constraints = [x >= 0]
  objective = cp.Minimize(0.5 * cp.pnorm(A @ x - b, p=1))
  problem = cp.Problem(objective, constraints)
  assert problem.is_dpp()

  cvxpylayer = CvxpyLayer(problem, parameters=[A, b], variables=[x])
  A_tch = torch.randn(m, n, requires_grad=True)
  b_tch = torch.randn(m, requires_grad=True)


  solution, = cvxpylayer(A_tch, b_tch)


  solution.sum().backward()
  ```

  Note: `CvxpyLayer` cannot be traced with `torch.jit`.


  ```python
  import cvxpy as cp
  import jax
  from cvxpylayers.jax import CvxpyLayer

  n, m = 2, 3
  x = cp.Variable(n)
  A = cp.Parameter((m, n))
  b = cp.Parameter(m)
  constraints = [x >= 0]
  objective = cp.Minimize(0.5 * cp.pnorm(A @ x - b, p=1))
  problem = cp.Problem(objective, constraints)
  assert problem.is_dpp()

  cvxpylayer = CvxpyLayer(problem, parameters=[A, b], variables=[x])
  key = jax.random.PRNGKey(0)
  key, k1, k2 = jax.random.split(key, 3)
  A_jax = jax.random.normal(k1, shape=(m, n))
  b_jax = jax.random.normal(k2, shape=(m,))

  solution, = cvxpylayer(A_jax, b_jax)


  dcvxpylayer = jax.grad(lambda A, b: sum(cvxpylayer(A, b)[0]), argnums=[0, 1])
  gradA, gradb = dcvxpylayer(A_jax, b_jax)
  ```

  Note: `CvxpyLayer` cannot be traced with the JAX `jit` or `vmap` operations.


  ```python
  import cvxpy as cp
  import tensorflow as tf
  from cvxpylayers.tensorflow import CvxpyLayer

  n, m = 2, 3
  x = cp.Variable(n)
  A = cp.Parameter((m, n))
  b = cp.Parameter(m)
  constraints = [x >= 0]
  objective = cp.Minimize(0.5 * cp.pnorm(A @ x - b, p=1))
  problem = cp.Problem(objective, constraints)
  assert problem.is_dpp()

  cvxpylayer = CvxpyLayer(problem, parameters=[A, b], variables=[x])
  A_tf = tf.Variable(tf.random.normal((m, n)))
  b_tf = tf.Variable(tf.random.normal((m,)))

  with tf.GradientTape() as tape:
    
    solution, = cvxpylayer(A_tf, b_tf)
    summed_solution = tf.math.reduce_sum(solution)

  gradA, gradb = tape.gradient(summed_solution, [A_tf, b_tf])
  ```

  Note: `CvxpyLayer` cannot be traced with `tf.function`.



  Starting with version 0.1.3, cvxpylayers can also differentiate through log-log convex programs (LLCPs), which generalize geometric programs. Use the keyword argument `gp=True` when constructing a `CvxpyLayer` for an LLCP. Below is a simple usage example

  ```python
  import cvxpy as cp
  import torch
  from cvxpylayers.torch import CvxpyLayer

  x = cp.Variable(pos=True)
  y = cp.Variable(pos=True)
  z = cp.Variable(pos=True)

  a = cp.Parameter(pos=True, value=2.)
  b = cp.Parameter(pos=True, value=1.)
  c = cp.Parameter(value=0.5)

  objective_fn = 1/(x*y*z)
  objective = cp.Minimize(objective_fn)
  constraints = [a*(x*y + x*z + y*z) <= b, x >= y**c]
  problem = cp.Problem(objective, constraints)
  assert problem.is_dgp(dpp=True)

  layer = CvxpyLayer(problem, parameters=[a, b, c],
                     variables=[x, y, z], gp=True)
  a_tch = torch.tensor(a.value, requires_grad=True)
  b_tch = torch.tensor(b.value, requires_grad=True)
  c_tch = torch.tensor(c.value, requires_grad=True)

  x_star, y_star, z_star = layer(a_tch, b_tch, c_tch)
  sum_of_solution = x_star + y_star + z_star
  sum_of_solution.backward()
  ```



  At this time, we support three open-source solvers: [Clarabel](https://github.com/oxfordcontrol/Clarabel.rs),
  [SCS](https://github.com/cvxgrp/scs), and [ECOS](https://github.com/embotech/ecos).
  Clarabel and SCS can be used to solve any problem expressible in CVXPY; ECOS can be used to solve problems that don't use
  the positive semidefinite or exponential cone (this roughly means that if you have positive semidefinite matrices
  or use atoms like `cp.log`, ECOS cannot be used to solve your problem via `cvxpylayers`).
  By default, `cvxpylayers` uses SCS to solve the problem.


  First make sure that you have `cvxpylayers` and `diffcp` up to date,
  by running
  ```
  pip install --upgrade cvxpylayers diffcp
  ```
  Then, to use ECOS, you would pass the `solver_args` argument to the layer:
  ```
  solution = layer(*params, solver_args={"solve_method": "ECOS"})
  ```


  One can pass arguments to both SCS and ECOS by adding the argument as a key-value pair
  in the `solver_args` argument.
  For example, to increase the tolerance of SCS to `1e-8` one would write:
  ```
  layer(*parameters, solver_args={"eps": 1e-8})
  ```
  If SCS is not converging, we highly recommend switching to ECOS (if possible),
  and if not, using the following arguments to `SCS`:
  ```
  solver_args={"eps": 1e-8, "max_iters": 10000, "acceleration_lookback": 0}
  ```


  Our [examples](examples) subdirectory contains simple applications of convex optimization
  layers in IPython notebooks.


  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.

  Please lint the code with `flake8`.
  ```bash
  pip install flake8  # if not already installed
  flake8
  ```



  cvxpylayers uses the `pytest` framework for running tests.
  To install `pytest`, run:
  ```bash
  pip install pytest
  ```

  Execute the tests from the main directory of this repository with:
  ```bash
  pytest cvxpylayers/{torch,jax,tensorflow}
  ```


  Below is  a list of projects using cvxpylayers. If you have used cvxpylayers in a project, you're welcome to make a PR to add it to this list.
  * [Learning Convex Optimization Control Policies](https://web.stanford.edu/~boyd/papers/learning_cocps.html)
  * [Learning Convex Optimization Models](https://web.stanford.edu/~boyd/papers/learning_copt_models.html)


  cvxpylayers carries an Apache 2.0 license.


  If you use cvxpylayers for research, please cite our accompanying [NeurIPS paper](https://web.stanford.edu/~boyd/papers/pdf/diff_cvxpy.pdf):

  ```
  @inproceedings{cvxpylayers2019,
    author={Agrawal, A. and Amos, B. and Barratt, S. and Boyd, S. and Diamond, S. and Kolter, Z.},
    title={Differentiable Convex Optimization Layers},
    booktitle={Advances in Neural Information Processing Systems},
    year={2019},
  }
  ```

  If you use cvxpylayers to differentiate through a log-log convex program, please cite the accompanying [paper](https://web.stanford.edu/~boyd/papers/diff_dgp.html):

  ```
  @article{agrawal2020differentiating,
    title={Differentiating through log-log convex programs},
    author={Agrawal, Akshay and Boyd, Stephen},
    journal={arXiv},
    archivePrefix={arXiv},
    eprint={2004.12553},
    primaryClass={math.OC},
    year={2020},
  }
  ```


pkgId: 745b2b7980f9860a71c09c9dbaabb891ed7fe8963050dce8cc006996dd629605
name: python-cvxreg
arch: src
version: 0.1.13
epoch: 0
release: 1
summary: A Python Package for Convex Regression
url: https://github.com/ConvexRegression/cvxreg
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvxreg-0.1.13-1.src.rpm
checksum_type: sha256
description:
  [![New release](https://img.shields.io/github/v/release/ConvexRegression/cvxreg?display_name=tag&label=Lastest&color=%234B78E6)](https://github.com/ConvexRegression/cvxreg/releases)
  [![Documentation Status](https://readthedocs.org/projects/cvxreg/badge/?version=latest)](https://cvxreg.readthedocs.io/en/latest/?badge=latest)
  [![PyPI downloads](https://img.shields.io/pypi/dm/cvxreg.svg?maxAge=21600)](https://pypistats.org/packages/cvxreg)

  **cvxreg** is a Python package for machine learing with convex regression models built on [`CVXPY`](https://www.cvxpy.org).

  The core aims of this package are:
  * make convex regression models "easy to call" from python,
  * interface with [`CVXPY`](https://www.cvxpy.org),
  * focus on a "machine learning" perspective, i.e.: predictive task, hyper-parameters should be obtained by a data-driven method such as cross-validation.



  The [`cvxreg`](https://pypi.org/project/pycreg) package is now avaiable on PyPI and the latest development version can be installed from the Github repository [`ConvexRegression`](https://github.com/ConvexRegression/cvxreg). Please feel free to download and test it. We welcome any bug reports and feedback.



      pip install cvxreg


pkgId: 32d92f5a84059625cd13c9c8ef58c8bb15f643af22cc2433f67cac3e5425bab6
name: python-cvxrisk
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: Simple riskengine for cvxpy
url: https://github.com/cvxgrp/cvxrisk
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvxrisk-1.2.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/cvxrisk.svg)](https://badge.fury.io/py/cvxrisk)
  [![Apache 2.0 License](https://img.shields.io/badge/License-APACHEv2-brightgreen.svg)](https://github.com/cvxgrp/simulator/blob/master/LICENSE)
  [![Downloads](https://static.pepy.tech/personalized-badge/cvxrisk?period=month&units=international_system&left_color=black&right_color=orange&left_text=PyPI%20downloads%20per%20month)](https://pepy.tech/project/cvxrisk)

  We provide an abstract `Model` class.
  The class is designed to be used in conjunction with [cvxpy](https://github.com/cvxpy/cvxpy).
  Using this class, we can formulate a function computing a standard minimum
  risk portfolio as

  ```python
  import cvxpy as cp

  from cvx.risk import Model


  def minimum_risk(w: cp.Variable, risk_model: Model, **kwargs) -> cp.Problem:
      """Constructs a minimum variance portfolio.

      Args:
          w: cp.Variable representing the portfolio weights.
          risk_model: A risk model.

      Returns:
          A convex optimization problem.
      """
      return cp.Problem(
          cp.Minimize(risk_model.estimate(w, **kwargs)),
          [cp.sum(w) == 1, w >= 0] + risk_model.constraints(w, **kwargs)
      )
  ```

  The risk model is injected into the function.
  The function is not aware of the precise risk model used.
  All risk models are required to implement the `estimate` method.

  Note that factor risk models work with weights for the assets but also with
  weights for the factors.
  To stay flexible we are applying the `**kwargs` pattern to the function above.



  A first example is a risk model based on the sample covariance matrix.
  We construct the risk model as follows

  ```python
  import numpy as np
  import cvxpy as cp

  from cvx.risk.sample import SampleCovariance

  riskmodel = SampleCovariance(num=2)
  w = cp.Variable(2)
  problem = minimum_risk(w, riskmodel)

  riskmodel.update(cov=np.array([[1.0, 0.5], [0.5, 2.0]]))
  problem.solve()
  print(w.value)
  ```

  The risk model and the actual optimization problem are decoupled.
  This is good practice and keeps the code clean and maintainable.

  In a backtest we don't have to reconstruct the problem in every iteration.
  We can simply update the risk model with the new data and solve the problem
  again. The implementation of the risk models is flexible enough to deal with
  changing dimensions of the underlying weight space.





  We offer a `SampleCovariance` class as seen above.



  Factor risk models use the projection of the weight vector into a lower
  dimensional subspace, e.g. each asset is the linear combination of $k$ factors.

  ```math
  r_i = \sum_{j=1}^k f_j \beta_{ji} + \epsilon_i
  ```

  The factor time series are $f_1, \ldots, f_k$. The loadings are the coefficients
  $\beta_{ji}$.
  The residual returns $\epsilon_i$ are assumed to be uncorrelated with the f
  actors.

  Any position $w$ in weight space projects to a position $y = \beta^T w$ in
  factor space. The variance for a position $w$ is the sum of the variance of the
  systematic returns explained by the factors and the variance of the
  idiosyncratic returns.

  ```math
  Var(r) = Var(\beta^T w) + Var(\epsilon w)
  ```

  We assume the residual returns are uncorrelated and hence

  ```math
  Var(r) = y^T \Sigma_f y + \sum_i w_i^2 Var(\epsilon_i)
  ```

  where $\Sigma_f$ is the covariance matrix of the factors and $Var(\epsilon_i)$
  is the variance of the idiosyncratic returns.

  Factor risk models are widely used in practice. Usually two scenarios are
  distinguished. A first route is to rely on estimates for the factor covariance
  matrix $\Sigma_f$, the loadings $\beta$ and the volatilities of the
  idiosyncratic returns $\epsilon_i$. Usually those quantities are provided by
  external parties, e.g. Barra or Axioma.

  An alternative would be to start with the estimation of factor time series
  $f_1, \ldots, f_k$.
  Usually they are estimated via a principal component analysis (PCA) of the
  asset returns.  It is then a simple linear regression to compute the loadings
  $\beta$. The volatilities of the idiosyncratic returns $\epsilon_i$ are computed
  as the standard deviation of the observed residuals.
  The factor covariance matrix $\Sigma_f$ may even be diagonal in this case as the
  factors are orthogonal.

  We expose a method to compute the first $k$ principal components.



  We currently also support the conditional value at risk (CVaR) as a risk
  measure.



  We assume you share already the love for [Poetry](https://python-poetry.org).
  Once you have installed poetry you can perform

  ```bash
  make install
  ```

  to replicate the virtual environment we have defined in [pyproject.toml](pyproject.toml)
  and locked in [poetry.lock](poetry.lock).



  We install [JupyterLab](https://jupyter.org) on fly within the aforementioned
  virtual environment. Executing

  ```bash
  make jupyter
  ```

  will install and start the jupyter lab.


pkgId: 409e2b84f5fb845c7246764a05ba9480a24ba7431b85bbf4f33e67ec9e67cd34
name: python-cvxsimulator
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Simple simulator for investors
url: https://github.com/cvxgrp/simulator
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvxsimulator-1.0.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/cvxsimulator.svg)](https://badge.fury.io/py/cvxsimulator)
  [![Apache 2.0 License](https://img.shields.io/badge/License-APACHEv2-brightgreen.svg)](https://github.com/cvxgrp/simulator/blob/master/LICENSE)
  [![Downloads](https://static.pepy.tech/personalized-badge/cvxsimulator?period=month&units=international_system&left_color=black&right_color=orange&left_text=PyPI%20downloads%20per%20month)](https://pepy.tech/project/cvxsimulator)
  [![Coverage Status](https://coveralls.io/repos/github/cvxgrp/simulator/badge.png?branch=main)](https://coveralls.io/github/cvxgrp/simulator?branch=main)

  [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/cvxgrp/simulator)

  Given a universe of $m$ assets we are given prices for each of them at
  time $t_1, t_2, \ldots t_n$, e.g. we operate using an $n \times m$ matrix where
  each column corresponds to a particular asset.

  In a backtest we iterate in time (e.g. row by row) through the matrix and
  allocate positions to all or some of the assets. This tool shall help to
  simplify the accounting. It keeps track of the available cash,
  the profits achieved, etc.

  ![Analytics](https://raw.githubusercontent.com/cvxgrp/simulator/main/newplot.png)



  It is possible to install cvxsimulator with the quantstats extra

  ```bash
  pip install cvxsimulator[quantstats]
  ```

  or without it

  ```bash
  pip install cvxsimulator
  ```



  The simulator shall be completely agnostic as to the trading policy/strategy.
  Our approach follows a rather common pattern:

  * [Create the builder object](#create-the-builder-object)
  * [Loop through time](#loop-through-time)
  * [Build the portfolio](#build-the-portfolio)

  We demonstrate those steps with somewhat silly policies.
  They are never good strategies, but are always valid ones.



  The user defines a builder object by loading prices
  and initialize the amount of cash used in an experiment:

  ```python
  import pandas as pd
  from cvx.simulator import Builder

  prices = pd.read_csv("prices.csv", index_col=0, parse_dates=True, header=0)
  b = Builder(prices=prices, initial_aum=1e6)
  ```

  Prices have to be valid, there may be NaNs only at the beginning and the end of
  each column in frame.
  There can be no NaNs hiding in the middle of any time series.

  It is also possible to specify a model for trading costs.
  The builder helps to fill up the frame of positions. Only once done
  we construct the actual portfolio.



  We have overloaded the `__iter__` and `__setitem__` methods to create a custom loop.
  Let's start with a first strategy. Each day we choose two names from the
  universe at random.
  Buy one (say 0.1 of your portfolio wealth) and short one the same amount.

  ```python
  for t, state in b:
      
      pair = np.random.choice(state.assets, 2, replace=False)
      
      units = pd.Series(index=state.assets, data=0.0)
      units[pair] = [state.nav, -state.nav] / state.prices[pair].values
      
      b.position = 0.1 * units
      
      b.aum = state.aum
  ```

  Here t is the growing list of timestamps, e.g. in the first iteration
  t is $t1$, in the second iteration it will be $t1, t2$ etc.

  A lot of magic is hidden in the state variable.
  The state gives access to the currently available cash, the current prices
  and the current valuation of all holdings.

  Here's a slightly more realistic loop. Given a set of $4$ assets we want to
  implemenent the popular $1/n$ strategy.

  ```python
  for t, state in b:
      
      b.position = 0.25 * state.nav / state.prices
      b.aum = state.aum
  ```

  Note that we update the position at the last element in the t list
  using a series of actual units rather than weights or cashpositions.
  The builder class also exposes setters for such alternative conventions.

  ```python
  for t, state in b:
      
      b.weights = np.ones(4)*0.25
      b.aum = state.aum
  ```



  Once finished it is possible to build the portfolio object

  ```python
  portfolio = b.build()
  ```



  The portfolio object supports further analysis and exposes
  a number of properties, e.g.

  ```python
  portfolio.nav
  portfolio.cash
  portfolio.equity
  ```

  It is possible to perform

  ```python
  portfolio.snapshot()
  ```

  We have also integrated the [quantstats](https://github.com/ranaroussi/quantstats)
  package as an optional extra for further analysis. It is usually enough to inject
  the `portfolio.nav` into the many functions exposed by this package.



  We assume you share already the love for [Poetry](https://python-poetry.org).
  Once you have installed poetry you can perform

  ```bash
  make install
  ```

  to replicate the virtual environment we have defined in pyproject.toml.



  We install [JupyterLab](https://jupyter.org) on the fly within the aforementioned
  virtual environment. Executing

  ```bash
  make jupyter
  ```

  will install and start the jupyter lab.


pkgId: 4e254da686451848614a846665a6ad65538660042c6dfb3cee2954d6b252b1bc
name: python-cvxsimulator
arch: src
version: 1.3.0
epoch: 0
release: 1
summary: Simple simulator for investors
url: https://pypi.org/project/cvxsimulator/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cvxsimulator-1.3.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/cvxsimulator.svg)](https://badge.fury.io/py/cvxsimulator)
  [![Apache 2.0 License](https://img.shields.io/badge/License-APACHEv2-brightgreen.svg)](https://github.com/cvxgrp/simulator/blob/master/LICENSE)
  [![Downloads](https://static.pepy.tech/personalized-badge/cvxsimulator?period=month&units=international_system&left_color=black&right_color=orange&left_text=PyPI%20downloads%20per%20month)](https://pepy.tech/project/cvxsimulator)
  [![Coverage Status](https://coveralls.io/repos/github/cvxgrp/simulator/badge.png?branch=main)](https://coveralls.io/github/cvxgrp/simulator?branch=main)

  [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/cvxgrp/simulator)

  Given a universe of $m$ assets we are given prices for each of them at
  time $t_1, t_2, \ldots t_n$, e.g. we operate using an $n \times m$ matrix where
  each column corresponds to a particular asset.

  In a backtest we iterate in time (e.g. row by row) through the matrix and
  allocate positions to all or some of the assets. This tool shall help to
  simplify the accounting. It keeps track of the available cash,
  the profits achieved, etc.

  ![Analytics](https://raw.githubusercontent.com/cvxgrp/simulator/main/newplot.png)



  It is possible to install cvxsimulator with the quantstats extra

  ```bash
  pip install cvxsimulator[quantstats]
  ```

  or without it

  ```bash
  pip install cvxsimulator
  ```



  The simulator shall be completely agnostic as to the trading policy/strategy.
  Our approach follows a rather common pattern:

  * [Create the builder object](#create-the-builder-object)
  * [Loop through time](#loop-through-time)
  * [Build the portfolio](#build-the-portfolio)

  We demonstrate those steps with somewhat silly policies.
  They are never good strategies, but are always valid ones.



  The user defines a builder object by loading prices
  and initialize the amount of cash used in an experiment:

  ```python
  import pandas as pd
  from cvx.simulator import Builder

  prices = pd.read_csv("prices.csv", index_col=0, parse_dates=True, header=0)
  b = Builder(prices=prices, initial_aum=1e6)
  ```

  Prices have to be valid, there may be NaNs only at the beginning and the end of
  each column in frame.
  There can be no NaNs hiding in the middle of any time series.

  It is also possible to specify a model for trading costs.
  The builder helps to fill up the frame of positions. Only once done
  we construct the actual portfolio.



  We have overloaded the `__iter__` and `__setitem__` methods to create a custom loop.
  Let's start with a first strategy. Each day we choose two names from the
  universe at random.
  Buy one (say 0.1 of your portfolio wealth) and short one the same amount.

  ```python
  for t, state in b:
      
      pair = np.random.choice(state.assets, 2, replace=False)
      
      units = pd.Series(index=state.assets, data=0.0)
      units[pair] = [state.nav, -state.nav] / state.prices[pair].values
      
      b.position = 0.1 * units
      
      b.aum = state.aum
  ```

  Here t is the growing list of timestamps, e.g. in the first iteration
  t is $t1$, in the second iteration it will be $t1, t2$ etc.

  A lot of magic is hidden in the state variable.
  The state gives access to the currently available cash, the current prices
  and the current valuation of all holdings.

  Here's a slightly more realistic loop. Given a set of $4$ assets we want to
  implemenent the popular $1/n$ strategy.

  ```python
  for t, state in b:
      
      b.position = 0.25 * state.nav / state.prices
      b.aum = state.aum
  ```

  Note that we update the position at the last element in the t list
  using a series of actual units rather than weights or cashpositions.
  The builder class also exposes setters for such alternative conventions.

  ```python
  for t, state in b:
      
      b.weights = np.ones(4)*0.25
      b.aum = state.aum
  ```



  Once finished it is possible to build the portfolio object

  ```python
  portfolio = b.build()
  ```



  The portfolio object supports further analysis and exposes
  a number of properties, e.g.

  ```python
  portfolio.nav
  portfolio.cash
  portfolio.equity
  ```

  It is possible to perform

  ```python
  portfolio.snapshot()
  ```

  We have also integrated the [quantstats](https://github.com/ranaroussi/quantstats)
  package as an optional extra for further analysis. It is usually enough to inject
  the `portfolio.nav` into the many functions exposed by this package.



  Starting with

  ```bash
  make install
  ```

  will install [uv](https://github.com/astral-sh/uv) and create
  the virtual environment defined in
  pyproject.toml and locked in uv.lock.



  We install [marimo](https://marimo.io) on the fly within the aforementioned
  virtual environment. Executing

  ```bash
  make marimo
  ```

  will install and start marimo.


pkgId: 664f276522506d4a99dc2ed0ffdf8c2ee343da249f3a93b45cce07bd20db16d2
name: python-cwcwidth
arch: src
version: 0.1.9
epoch: 0
release: 1
summary: Python bindings for wc(s)width
url: https://github.com/sebastinas/cwcwidth
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cwcwidth-0.1.9-1.src.rpm
checksum_type: sha256
description:
  `cwcwidth` provides Python bindings for `wcwidth` and `wcswidth` functions defined in POSIX.1-2001
  and POSIX.1-2008 based on [Cython](https://cython.org/). These functions compute the printable
  length of a unicode character/string on a terminal. The module provides the same functions as
  [wcwidth](https://pypi.org/project/wcwidth/) and its behavior is compatible.

  On systems not conforming to POSIX.1-2001 and POSIX.1-2008, Markus Kuhn's
  [implementation](https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c) is used to provide the
  functionality.



  * `Cython >= 0.28` (optional, only for building). If Cython is not available, the C files are not
    regenerated from their source.



  `cwcwidth` can be installed via `pip`:
  ```sh
  pip install cwcwidth
  ```
  or by running:
  ```sh
  python3 setup.py install
  ```



  ```python3
  >>> import cwcwidth
  >>> cwcwidth.wcwidth("a")
  1
  >>> cwcwidth.wcswidth("コ")
  2
  >>> cwcwidth.wcswidth("コンニチハ, セカイ!")
  19
  >>> cwcwidth.wcswidth("コンニチハ, セカイ!", 5)
  10
  ```



  ```python3
  >>> import wcwidth, cwcwidth, timeit
  >>> timeit.timeit(lambda: wcwidth.wcswidth("コンニチハ, セカイ!"))
  19.14463168097427
  >>> timeit.timeit(lambda: cwcwidth.wcswidth("コンニチハ, セカイ!"))
  0.16294104099506512
  ```



  The code is licensed under the MIT license.


pkgId: 6584da9fca75616e5ba054c178343164c039a45adcfa4fd40de27befb59c1933
name: python-cwhy
arch: src
version: 0.4.7
epoch: 0
release: 1
summary: Explains and proposes fixes for compile-time errors for many programming languages.
url: https://github.com/plasma-umass/cwhy
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cwhy-0.4.7-1.src.rpm
checksum_type: sha256
description:
  by [Emery Berger](https://emeryberger.com),
  [Nicolas van Kempen](https://nvankempen.com/),
  and [Bryce Adelstein Lelbach](https://twitter.com/blelbach).

  [![PyPI](https://img.shields.io/pypi/v/cwhy.svg)](https://pypi.org/project/cwhy/)
  [![downloads](https://static.pepy.tech/badge/cwhy)](https://pepy.tech/project/cwhy)
  [![downloads/month](https://static.pepy.tech/badge/cwhy/month)](https://pepy.tech/project/cwhy)

  ("See why")

  Explains and suggests fixes for compiler error messages for a wide range of programming languages, including C, C++, C#,
  Go, Java, LaTeX, PHP, Python, Ruby, Rust, Swift, and TypeScript.



   >  **Note**
   >
   >  CWhy needs to be connected to an [OpenAI account](https://openai.com/api/) or an Amazon Web Services account.
   >  _Your account will need to have a positive balance for this to work_
   >  ([check your OpenAI balance](https://platform.openai.com/usage)).
   >  [Get an OpenAI key here](https://platform.openai.com/api-keys).
   >
   >  CWhy currently defaults to GPT-4, and falls back to GPT-3.5-turbo if a request error occurs. For the newest and best
   >  model (GPT-4) to work, you need to have purchased  at least $1 in credits (if your API account was created before
   >  August 13, 2023) or $0.50 (if you have a newer API account).
   >
   >  Once you have an API key, set it as an environment variable called `OPENAI_API_KEY`.
   >
   >  ```bash
   >  # On Linux/MacOS:
   >  export OPENAI_API_KEY=<your-api-key>
   >
   >  # On Windows:
   >  $env:OPENAI_API_KEY=<your-api-key>
   >  ```
   >
   >  **New**: CWhy now has alpha support for Amazon Bedrock, using the Claude model.
   >  To use Bedrock, you need to set three environment variables.
   >
   >  ```bash
   >  # On Linux/MacOS:
   >  export AWS_ACCESS_KEY_ID=<your-access-key>
   >  export AWS_SECRET_ACCESS_KEY=<your-secret-key>
   >  export AWS_REGION_NAME=<your-region>
   >  ```
   >
   >  CWhy will automatically select which AI service to use (OpenAI or AWS Bedrock) when it detects that the appropriate
   >  environment variables have been set.

  ```
  python3 -m pip install cwhy
  ```





  The wrapper mode is now default and mandatory, with a slightly modified interface.
  CWhy can either be used standalone by passing the full command after the triple dashes `---`, or as part of a build tool
  by creating a short executable script wrapping the compiler command.

  ```bash

  % cwhy --- g++ mycode.cpp


  % cwhy --timeout 180 --- javac MyCode.java


  % CXX=`cwhy --llm=gpt-3.5-turbo --wrapper --- c++` make


  % CWHY_DISABLE=1 cmake -DCMAKE_CXX_COMPILER=`cwhy --llm=gpt-4 --wrapper --- clang++` ...
  ```

  Configuration tools such as CMake or Autoconf will occasionally invoke the compiler to check for features, which will
  fail and invoke CWhy unnecessarily if not available on the machine. To circumvent this, `CWHY_DISABLE` can be set in
  the environment to disable CWhy at configuration time.

  ```bash
  % CWHY_DISABLE='ON' cmake -DCMAKE_CXX_COMPILER=`cwhy --wrapper --- c++` ...
  ```



  Windows support has been tested using Powershell. On the command line, using Ninja is required as MSBuild / `.vcxproj`
  will override any option set.

  ```bash
  % $env:CWHY_DISABLE='ON'
  % cmake -G Ninja -DCMAKE_CXX_COMPILER="$(python -m cwhy --wrapper --- cl)"  ...
  % $env:CWHY_DISABLE=''
  ```



  CI using GitHub actions is straightforward on both Linux and MacOs. On Windows, Ninja is not installed by default on the
  image, and `cl` is not bound to the compiler. We recommend using `choco install ninja` and
  [ilammy/msvc-dev-cmd](https://github.com/ilammy/msvc-dev-cmd) to work around these two issues.

  An example action YAML file covering all three platforms
  [can be found here](https://github.com/nicovank/litterer/blob/master/.github/workflows/ci.yml).

  **Important**: Set the `CWHY_DISABLE` environment variable at configure-time to save money and cycles.



  These options can be displayed with `cwhy --help`.

   -  `--llm`: pick a specific OpenAI LLM. CWhy has been tested with `gpt-3.5-turbo` and `gpt-4`.
   -  `--timeout`: pick a different timeout than the default for API calls.
   -  `--show-prompt` (debug): print prompts before calling the API.





  This highlighted example is [missing-hash.cpp](tests/c++/missing-hash.cpp), which is one of the first cases we
  experimented with.

  <details>
  <summary>
  Expand to see the original (pretty obscure) error message:
  </summary>

  ```
  % clang++ --std=c++20 -c missing-hash.cpp
  missing-hash.cpp:13:45: error: call to implicitly-deleted default constructor of 'std::unordered_set<std::pair<int, int>>'
      std::unordered_set<std::pair<int, int>> visited;
                                              ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/unordered_set.h:135:7: note: explicitly defaulted function was implicitly deleted here
        unordered_set() = default;
        ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/unordered_set.h:100:18: note: default constructor of 'unordered_set<std::pair<int, int>>' is implicitly deleted because field '_M_h' has a deleted default constructor
        _Hashtable _M_h;
                   ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable.h:451:7: note: explicitly defaulted function was implicitly deleted here
        _Hashtable() = default;
        ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable.h:174:7: note: default constructor of '_Hashtable<std::pair<int, int>, std::pair<int, int>, std::allocator<std::pair<int, int>>, std::__detail::_Identity, std::equal_to<std::pair<int, int>>, std::hash<std::pair<int, int>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>>' is implicitly deleted because base class '__detail::_Hashtable_base<pair<int, int>, pair<int, int>, _Identity, equal_to<pair<int, int>>, hash<pair<int, int>>, _Mod_range_hashing, _Default_ranged_hash, _Hashtable_traits<true, true, true>>' has a deleted default constructor
      : public __detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal,
        ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable_policy.h:1791:5: note: explicitly defaulted function was implicitly deleted here
      _Hashtable_base() = default;
      ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable_policy.h:1726:5: note: default constructor of '_Hashtable_base<std::pair<int, int>, std::pair<int, int>, std::__detail::_Identity, std::equal_to<std::pair<int, int>>, std::hash<std::pair<int, int>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, true, true>>' is implicitly deleted because base class '_Hash_code_base<pair<int, int>, pair<int, int>, _Identity, hash<pair<int, int>>, _Mod_range_hashing, _Default_ranged_hash, _Hashtable_traits<true, true, true>::__hash_cached::value>' has a deleted default constructor
    : public _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash,
      ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable_policy.h:1368:7: note: explicitly defaulted function was implicitly deleted here
        _Hash_code_base() = default;
        ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable_policy.h:1344:7: note: default constructor of '_Hash_code_base<std::pair<int, int>, std::pair<int, int>, std::__detail::_Identity, std::hash<std::pair<int, int>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>' is implicitly deleted because base class '_Hashtable_ebo_helper<1, hash<pair<int, int>>>' has a deleted default constructor
        private _Hashtable_ebo_helper<1, _H1>,
        ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable_policy.h:1112:7: note: explicitly defaulted function was implicitly deleted here
        _Hashtable_ebo_helper() = default;
        ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable_policy.h:1110:7: note: default constructor of '_Hashtable_ebo_helper<1, std::hash<std::pair<int, int>>, true>' is implicitly deleted because base class 'std::hash<std::pair<int, int>>' has a deleted default constructor
      : private _Tp
        ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/functional_hash.h:101:19: note: default constructor of 'hash<std::pair<int, int>>' is implicitly deleted because base class '__hash_enum<pair<int, int>>' has no default constructor
      struct hash : __hash_enum<_Tp>
                    ^
  In file included from missing-hash.cpp:1:
  In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/functional:61:
  In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/unordered_map:46:
  In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable.h:35:
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable_policy.h:1377:2: error: static assertion failed due to requirement 'std::__is_invocable<const std::hash<std::pair<int, int>> &, const std::pair<int, int> &>{}': hash function must be invocable with an argument of key type
          static_assert(__is_invocable<const _H1&, const _Key&>{},
          ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable.h:1675:29: note: in instantiation of member function 'std::__detail::_Hash_code_base<std::pair<int, int>, std::pair<int, int>, std::__detail::_Identity, std::hash<std::pair<int, int>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>::_M_hash_code' requested here
          __hash_code __code = this->_M_hash_code(__k);
                                     ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable.h:788:11: note: in instantiation of function template specialization 'std::_Hashtable<std::pair<int, int>, std::pair<int, int>, std::allocator<std::pair<int, int>>, std::__detail::_Identity, std::equal_to<std::pair<int, int>>, std::hash<std::pair<int, int>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>>::_M_emplace<const std::pair<int, int> &>' requested here
          { return _M_emplace(__unique_keys(), std::forward<_Args>(__args)...); }
                   ^
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/unordered_set.h:377:16: note: in instantiation of function template specialization 'std::_Hashtable<std::pair<int, int>, std::pair<int, int>, std::allocator<std::pair<int, int>>, std::__detail::_Identity, std::equal_to<std::pair<int, int>>, std::hash<std::pair<int, int>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>>::emplace<const std::pair<int, int> &>' requested here
          { return _M_h.emplace(std::forward<_Args>(__args)...); }
                        ^
  missing-hash.cpp:20:44: note: in instantiation of function template specialization 'std::unordered_set<std::pair<int, int>>::emplace<const std::pair<int, int> &>' requested here
          const auto [_, inserted] = visited.emplace(n->position);
                                             ^
  In file included from missing-hash.cpp:1:
  In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/functional:61:
  In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/unordered_map:46:
  In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable.h:35:
  /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/hashtable_policy.h:1379:9: error: type 'const std::hash<std::pair<int, int>>' does not provide a call operator
          return _M_h1()(__k);
                 ^~~~~~~
  3 errors generated.
  ```
  </details>

  And here's the English-language explanation from `cwhy`:

  ````
  % cwhy --- clang++ --std=c++20 -c missing-hash.cpp
  The problem is that you are attempting to use `std::unordered_set`
  with `std::pair<int, int>` as the key type. However, the standard
  library does not provide a hash function specialization for
  `std::pair` out of the box, so the default constructor of the
  unordered set is deleted.

  To resolve this, you'll need to provide a custom hash function for
  `std::pair<int, int>`. Here's an example of how you can define one:

  ```cpp
  struct PairHash {
      template <typename T1, typename T2>
      std::size_t operator()(const std::pair<T1, T2>& pair) const {
          std::hash<T1> hash1;
          std::hash<T2> hash2;
          return hash1(pair.first) ^ (hash2(pair.second) << 1);
      }
  };
  ```

  Then, when instantiating the `std::unordered_set`, you can specify the
  custom hash function:

  ```cpp
  std::unordered_set<std::pair<int, int>, PairHash> visited;
  ```

  With this change, the code should now compile and work as expected.
  ````




  ```
  % cwhy --- cargo build
  There are three issues:  1. There are two unused variables `x` in the
  code.  2. The variable `x` is used after it has already been moved in
  the call to `f(x)`, which takes ownership of `x`. 3. The function
  `f(x)` takes ownership of `x`, which may not be necessary and could be
  changed to borrow the value instead.
  ```


pkgId: b04b8313df416500f74b7ab15548a855c55a86c5a51b8b67029a2ab0b7922cd8
name: python-cwl-eval
arch: src
version: 1.0.12
epoch: 0
release: 1
url: https://github.com/ireval/cwl
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cwl-eval-1.0.12-1.src.rpm
checksum_type: sha256
summary:
  An information retrieval evaluation script based on the C/W/L framework that is TREC Compatible and provides a replacement for INST_EVAL, RBP_EVAL, TBG_EVAL, UMeasure and TREC_EVAL scripts. All measurements are reported in the same units making all metrics directly comparable.

description:
  Please consider citing the following paper when using our code for your evaluations:
          @inproceedings{azzopardi2019cwl,
              author = {Azzopardi, Leif and Thomas, Paul and Moffat, Alistair},
              title = {cwl\_eval: An Evaluation Tool for Information Retrieval},
              booktitle = {Proc. of the 42nd International ACM SIGIR Conference},
              series = {SIGIR '19},
              year = {2019}
          }


pkgId: c7318033ba0bae29e49ee21b59eb0852dd91c076cc47bfa43b4dafb469790455
name: python-cwl-utils
arch: src
version: 0.34
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://www.commonwl.org
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cwl-utils-0.34-1.src.rpm
checksum_type: sha256
description:
  Python Utilities and Autogenerated Classes for loading and parsing `CWL
  v1.0 <https://github.com/common-workflow-language/cwl-utils/blob/main/cwl_utils/parser/v1_0.py>`__,
  `CWL
  v1.1 <https://github.com/common-workflow-language/cwl-utils/blob/main/cwl_utils/parser/v1_1.py>`__,
  and `CWL
  v1.2 <https://github.com/common-workflow-language/cwl-utils/blob/main/cwl_utils/parser/v1_2.py>`__
  documents.
  Requires Python 3.8+


pkgId: 24b978c7c0c3ce0562dbb21d573317439bb39f4c87f7047d889a2ad722c50961
name: python-cwlref-runner
arch: src
version: 1.0
epoch: 0
release: 1
summary: Common workflow language reference implementation
url: http://www.commonwl.org
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cwlref-runner-1.0-1.src.rpm
checksum_type: sha256
description:
  This an optional companion package to "cwltool" which provides provides an
  additional entry point under the alias "cwl-runner", which is the
  implementation-agnostic name for the default CWL interpreter installed on a
  host.


pkgId: 9c19393644982c7653cb76e905d2892999dca7e11a3ab9dd2da79801a1c4c235
name: python-cwltest
arch: src
version: 2.5.20240906231108
epoch: 0
release: 1
summary: Common Workflow Language testing framework
url: https://github.com/common-workflow-language/cwltest
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cwltest-2.5.20240906231108-1.src.rpm
checksum_type: sha256
description:
  Common Workflow Language testing framework


  |Linux Build Status| |Code coverage|

  PyPI: |PyPI Version| |PyPI Downloads Month| |Total PyPI Downloads|

  Conda: |Conda Version| |Conda Installs|

  .. |Linux Build Status| image:: https://github.com/common-workflow-language/cwltest/actions/workflows/ci-tests.yml/badge.svg?branch=main
     :target: https://github.com/common-workflow-language/cwltest/actions/workflows/ci-tests.yml
  .. |Code coverage| image:: https://codecov.io/gh/common-workflow-language/cwltest/branch/master/graph/badge.svg
     :target: https://codecov.io/gh/common-workflow-language/cwltest

  .. |PyPI Version| image:: https://badge.fury.io/py/cwltest.svg
     :target: https://badge.fury.io/py/cwltest

  .. |PyPI Downloads Month| image:: https://pepy.tech/badge/cwltest/month
     :target: https://pepy.tech/project/cwltest

  .. |Total PyPI Downloads| image:: https://static.pepy.tech/personalized-badge/cwltest?period=total&units=international_system&left_color=black&right_color=orange&left_text=Total%20PyPI%20Downloads
     :target: https://pepy.tech/project/cwltest

  .. |Conda Version| image:: https://anaconda.org/bioconda/cwltest/badges/version.svg
     :target: https://anaconda.org/bioconda/cwltest

  .. |Conda Installs| image:: https://anaconda.org/bioconda/cwltest/badges/downloads.svg
     :target: https://anaconda.org/bioconda/cwltest

  This is a testing tool for checking the output of Tools and Workflows described
  with the Common Workflow Language.  Among other uses, it is used to run the CWL
  conformance tests.

  This is written and tested for Python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13.

  .. contents:: Table of Contents
     :local:

  *******
  Install
  *******

  Installing the official package from PyPi

  .. code:: bash

    pip install cwltest

  Or from bioconda

  .. code:: bash

    conda install -c bioconda cwltest

  Or from source

  .. code:: bash

    git clone https://github.com/common-workflow-language/cwltest.git
    cd cwltest && pip install  .

  ***********************
  Run on the command line
  ***********************

  Simple command::

    cwltest --test test-descriptions.yml --tool cwl-runner

  *****************************************
  Generate conformance badges using cwltest
  *****************************************

  To make badges that show the results of the conformance test,
  you can generate JSON files for https://badgen.net by using --badgedir option

  To generate JSON files::

    cwltest --test test-descriptions.yml --tool cwl-runner --badgedir badges
    ...
    $ cat badges/command_line_tool.json | jq .
    {
      "subject": "command_line_tool",
      "status": "100%",
      "color": "green"
    }

  Once you upload JSON file to a server, you make a badge by using a link like https://badgen.net/https/path/to/generated/json or https://flat.badgen.net/https/path/to/generated/json (for flat badges).

  Here is an example of markdown to add a badge::

    ![test result](https://flat.badgen.net/https/path/to/generated/json?icon=commonwl)


pkgId: 34c2c8b93d51a9023bb09b4ff468879a717261bdb66ba63edddef7fc7fbb41dd
name: python-cwltool
arch: src
version: 3.1.20240909164951
epoch: 0
release: 1
summary: Common workflow language reference implementation
url: https://github.com/common-workflow-language/cwltool
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cwltool-3.1.20240909164951-1.src.rpm
checksum_type: sha256
description:
  Your operating system may offer cwltool directly. For `Debian <https://tracker.debian.org/pkg/cwltool>`_, `Ubuntu <https://launchpad.net/ubuntu/+source/cwltool>`_,
  and similar Linux distribution try
     sudo apt-get install cwltool
  If you encounter an error, first try to update package information by using
     sudo apt-get update
  If you are running macOS X or other UNIXes and you want to use packages prepared by the conda-forge project, then
  please follow the install instructions for `conda-forge <https://conda-forge.org/#about>`_ (if you haven't already) and then
     conda install -c conda-forge cwltool
  All of the above methods of installing ``cwltool`` use packages that might contain bugs already fixed in newer versions or be missing desired features.
  If the packaged version of ``cwltool`` available to you is too old, then we recommend installing using ``pip`` and ``venv``
     python3 -m venv env      # Create a virtual environment named 'env' in the current directory
     source env/bin/activate  # Activate environment before installing `cwltool`
  Then install the latest ``cwlref-runner`` package from PyPi (which will install the latest ``cwltool`` package as
  well)
    pip install cwlref-runner
  If installing alongside another CWL implementation (like ``toil-cwl-runner`` or ``arvados-cwl-runner``) then instead run
    pip install cwltool


pkgId: ec4e1592f559294efb44587e514601abfbb6a002dc1830ba3d97c323d30aae99
name: python-cwt
arch: src
version: 2.7.5
epoch: 0
release: 1
summary: A Python implementation of CWT/COSE.
url: https://github.com/dajiaji/python-cwt
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cwt-2.7.5-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/cwt.svg)](https://badge.fury.io/py/cwt)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cwt)
  [![Documentation Status](https://readthedocs.org/projects/python-cwt/badge/?version=latest)](https://python-cwt.readthedocs.io/en/latest/?badge=latest)
  ![Github CI](https://github.com/dajiaji/python-cwt/actions/workflows/python-package.yml/badge.svg)
  [![codecov](https://codecov.io/gh/dajiaji/python-cwt/branch/main/graph/badge.svg?token=QN8GXEYEP3)](https://codecov.io/gh/dajiaji/python-cwt)


  Python CWT is a CBOR Web Token (CWT) and CBOR Object Signing and Encryption (COSE)
  implementation compliant with:
  - [RFC9052: CBOR Object Signing and Encryption (COSE): Structures and Process](https://www.rfc-editor.org/rfc/rfc9052.html)
  - [RFC9053: CBOR Object Signing and Encryption (COSE): Initial Algorithms](https://www.rfc-editor.org/rfc/rfc9053.html)
  - [RFC9338: CBOR Object Signing and Encryption (COSE): Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html) - experimental
  - [RFC8392: CWT (CBOR Web Token)](https://tools.ietf.org/html/rfc8392)
  - [draft-07: Use of HPKE with COSE](https://www.ietf.org/archive/id/draft-ietf-cose-hpke-07.html) - experimental
  - [draft-06: CWT Claims in COSE Headers](https://www.ietf.org/archive/id/draft-ietf-cose-cwt-claims-in-headers-06.html) - experimental
  - and related various specifications. See [Referenced Specifications](#referenced-specifications).

  It is designed to make users who already know about [JWS](https://tools.ietf.org/html/rfc7515)/[JWE](https://tools.ietf.org/html/rfc7516)/[JWT](https://tools.ietf.org/html/rfc7519)
  be able to use it in ease. Little knowledge of [CBOR](https://tools.ietf.org/html/rfc7049)/[COSE](https://tools.ietf.org/html/rfc8152)/[CWT](https://tools.ietf.org/html/rfc8392)
  is required to use it.

  You can install Python CWT with pip:


  ```sh
  $ pip install cwt
  ```

  And then, you can use it as follows:

  **COSE API**

  ```py
  from cwt import COSE, COSEKey

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      mac_key,
      protected={"alg": "HS256"},
      unprotected={"kid": "01"},
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, mac_key)




  ```

  **CWT API**

  ```py
  import cwt
  from cwt import COSEKey, CWTClaims

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  token = encode(
      {
          CWTClaims.ISS: "coaps://as.example",
          CWTClaims.SUB: "dajiaji",
          CWTClaims.CTI: b"123",
      },
      mac_key,
  )


  decoded = decode(token, mac_key)








  ```

  Various usage examples are shown in this README.

  See [Documentation](https://python-cwt.readthedocs.io/en/stable/) for details of the APIs.



  - [Installation](#installation)
  - [COSE Usage Examples](#cose-usage-examples)
      - [COSE MAC0](#cose-mac0)
          - [MAC with HMAC with SHA256](#mac-with-hmac-with-sha256)
          - [Countersign (MAC0)](#countersign-mac0)
      - [COSE MAC](#cose-mac)
          - [Direct Key Distribution](#direct-key-distribution-for-mac)
          - [Direct Key with KDF](#direct-key-with-kdf-for-mac)
          - [AES Key Wrap](#aes-key-wrap-for-mac)
          - [Direct key Agreement](#direct-key-agreement-for-mac)
          - [Key Agreement with Key Wrap](#key-agreement-with-key-wrap-for-mac)
          - [Countersign (MAC)](#countersign-mac)
          - [COSE-HPKE (MAC)](#cose-hpke-mac)
      - [COSE Encrypt0](#cose-encrypt0)
          - [Encryption with ChaCha20/Poly1305](#encryption-with-chacha20-poly1305)
          - [Countersign (Encrypt0)](#countersign-encrypt0)
          - [COSE-HPKE (Encrypt0)](#cose-hpke-encrypt0)
      - [COSE Encrypt](#cose-encrypt)
          - [Direct Key Distribution](#direct-key-distribution-for-encryption)
          - [Direct Key with KDF](#direct-key-with-kdf-for-encryption)
          - [AES Key Wrap](#aes-key-wrap-for-encryption)
          - [Direct key Agreement](#direct-key-agreement-for-encryption)
          - [Key Agreement with Key Wrap](#key-agreement-with-key-wrap-for-encryption)
          - [Countersign (Encrypt)](#countersign-encrypt)
          - [COSE-HPKE (Encrypt)](#cose-hpke-encrypt)
      - [COSE Signature1](#cose-signature1)
          - [Sign1 with EC P-256](#sign1-with-ec-p-256)
          - [Countersign (Sign1)](#countersign-sign1)
      - [COSE Signature](#cose-signature)
          - [Sign with EC P-256](#sign-with-ec-p-256)
          - [Countersign (Sign)](#countersign-sign)
  - [CWT Usage Examples](#cwt-usage-examples)
      - [MACed CWT](#maced-cwt)
      - [Signed CWT](#signed-cwt)
      - [Encrypted CWT](#encrypted-cwt)
      - [Nested CWT](#nested-cwt)
      - [CWT with User Settings (e.g., expires\_in)](#cwt-with-user-settings)
      - [CWT with User-Defined Claims](#cwt-with-user-defined-claims)
      - [CWT with CWT claims in COSE headers](#cwt-with-cwt-claims-in-cose-headers)
      - [CWT with PoP Key](#cwt-with-pop-key)
      - [CWT with Private CA](#cwt-with-private-ca)
      - [CWT for EUDCC (EU Digital COVID Certificate)](#cwt-for-eudcc-eu-digital-covid-certificate)
  - [API Reference](#api-reference)
  - [Supported CWT Claims](#supported-cwt-claims)
  - [Supported COSE Algorithms](#supported-cose-algorithms)
  - [Referenced Specifications](#referenced-specifications)
  - [Tests](#tests)
  - [Contributing](#contributing)



  Install with pip:

  ```
  pip install cwt
  ```



  Followings are typical and basic examples which encode various types of COSE messages and decode them.

  See [API Reference](https://python-cwt.readthedocs.io/en/stable/api.html#cwt.COSE).





  Create a COSE MAC0 message, verify and decode it as follows:

  ```py
  from cwt import COSE, COSEKey

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      mac_key,
      protected={"alg": "HS256"},
      unprotected={"kid": "01"},
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, mac_key)
  ```

  Following two samples are other ways of writing the above example.

  CBOR object can be used for `protected` and `unprotected` header parameters as follows:

  ```py
  from cwt import COSE, COSEHeaders, COSEKey

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      mac_key,
      protected={COSEHeaders.ALG: 5},
      unprotected={COSEHeaders.KID: b"01"},
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, mac_key)
  ```

  `alg_auto_inclusion` and `kid_auto_inclusion` can be used to omit to specify `alg` and `kid` header parameters respectively as follows:

  ```py
  from cwt import COSE, COSEKey

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      mac_key,
      
      
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, mac_key)
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to a MACed COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.

  ```py
  from cwt import COSE, COSEKey, COSEMessage

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", mac_key)


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(countersigned, mac_key)
  try:
      sig = COSEMessage.loads(countersigned).counterverify(pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```





  The direct key distribution shares a MAC key between the sender and the recipient that is used directly.
  The follwing example shows the simplest way to make a COSE MAC message, verify and decode it with the direct
  key distribution method.

  ```py
  from cwt import COSE, COSEKey, Recipient

  mac_key = COSEKey.generate_symmetric_key(alg="HS512", kid="01")


  r = Recipient.new(unprotected={"alg": "direct", "kid": mac_key.kid})

  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!", mac_key, protected={"alg": "HS512"}, recipients=[r]
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, mac_key)
  ```




  ```py
  from secrets import token_bytes
  from cwt import COSE, COSEKey, Recipient

  shared_material = token_bytes(32)
  shared_key = COSEKey.from_symmetric_key(shared_material, kid="01")


  r = Recipient.new(
      unprotected={
          "alg": "direct+HKDF-SHA-256",
          "salt": "aabbccddeeffgghh",
      },
      context={"alg": "HS256"},
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      shared_key,
      recipients=[r],
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(
      encoded, shared_key, context={"alg": "HS256"}
  )
  ```



  The AES key wrap algorithm can be used to wrap a MAC key as follows:

  ```py
  from cwt import COSE, COSEKey, Recipient

  enc_key = COSEKey.from_jwk(
      {
          "kty": "oct",
          "kid": "01",
          "alg": "A128KW",
          "k": "hJtXIZ2uSN5kbQfbtTNWbg",  # A shared wrapping key
      }
  )


  mac_key = COSEKey.generate_symmetric_key(alg="HS512")
  r = Recipient.new(unprotected={"alg": "A128KW"}, sender_key=enc_key)
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", mac_key, recipients=[r])


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, enc_key)
  ```



  The direct key agreement methods can be used to create a shared secret. A KDF (Key Distribution Function) is then
  applied to the shared secret to derive a key to be used to protect the data.
  The follwing example shows a simple way to make a COSE Encrypt message, verify and decode it with the direct key
  agreement methods.

  ```py
  from cwt import COSE, COSEKey, Recipient



  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
      }
  )
  r = Recipient.new(
      unprotected={"alg": "ECDH-ES+HKDF-256"},
      recipient_key=pub_key,
      context={"alg": "HS256"},
  )
  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      protected={"alg": "HS256"},
      recipients=[r],
  )



  priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "alg": "ECDH-ES+HKDF-256",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
          "d": "r_kHyZ-a06rmxM3yESK84r1otSg-aQcVStkRhA-iCM8",
      }
  )
  recipient = COSE.new()



  assert b"Hello world!" == recipient.decode(encoded, priv_key, context={"alg": "HS256"})
  ```




  ```py
  from cwt import COSE, COSEKey, Recipient


  mac_key = COSEKey.generate_symmetric_key(alg="HS256")
  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "alg": "ECDH-ES+A128KW",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
      }
  )
  r = Recipient.new(
      unprotected={"alg": "ECDH-ES+A128KW"},
      recipient_key=pub_key,
      context={"alg": "HS256"},
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      mac_key,
      recipients=[r],
  )


  recipient = COSE.new()
  priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "alg": "ECDH-ES+A128KW",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
          "d": "r_kHyZ-a06rmxM3yESK84r1otSg-aQcVStkRhA-iCM8",
      }
  )
  assert b"Hello world!" == recipient.decode(encoded, priv_key, context={"alg": "HS256"})
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to a MACed COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.


  ```py
  from cwt import COSE, COSEKey, COSEMessage, Recipient

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  r = Recipient.new(unprotected={"alg": "direct", "kid": mac_key.kid})
  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!", mac_key, protected={"alg": "HS256"}, recipients=[r]
  )


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(countersigned, mac_key)
  try:
      sig = COSEMessage.loads(countersigned).counterverify(pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```




  **Experimental Implementation. DO NOT USE for production.**

  Create a COSE-HPKE MAC message, verify and decode it as follows:

  ```py
  from cwt import COSE, COSEAlgs, COSEHeaders, COSEKey, Recipient


  mac_key = COSEKey.generate_symmetric_key(alg="HS256")
  rpk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  r = Recipient.new(
      protected={
          COSEHeaders.ALG: COSEAlgs.HPKE_BASE_P256_SHA256_AES128GCM,
      },
      unprotected={
          COSEHeaders.KID: b"01",  # kid: "01"
      },
      recipient_key=rpk,
  )
  sender = COSE.new()
  encoded = sender.encode(
      b"This is the content.",
      mac_key,
      protected={COSEHeaders.ALG: COSEAlgs.HS256},
      recipients=[r],
  )


  rsk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      }
  )
  recipient = COSE.new()
  assert b"This is the content." == recipient.decode(encoded, rsk)
  ```





  Create a COSE Encrypt0 message and decrypt it as follows:

  ```py
  from cwt import COSE, COSEKey

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")


  nonce = enc_key.generate_nonce()
  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", enc_key, unprotected={COSEHeaders.IV: nonce})


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, enc_key)
  ```

  The following sample is another way of writing the above:

  ```py
  from cwt import COSE, COSEKey

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")


  nonce = enc_key.generate_nonce()
  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      enc_key,
      protected={"alg": "ChaCha20/Poly1305"},
      unprotected={"kid": "01", "iv": nonce},
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, enc_key)
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to an encrypted COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.

  ```py
  from cwt import COSE, COSEKey, COSEMessage

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")


  nonce = enc_key.generate_nonce()
  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", enc_key, unprotected={COSEHeaders.IV: nonce})


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(countersigned, enc_key)
  try:
      sig = COSEMessage.loads(countersigned).counterverify(pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```



  **Experimental Implementation. DO NOT USE for production.**

  Create a COSE-HPKE Encrypt0 message and decrypt it as follows:

  ```py
  from cwt import COSE, COSEAlgs, COSEHeaders, COSEKey


  rpk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )

  sender = COSE.new()
  encoded = sender.encode(
      b"This is the content.",
      rpk,
      protected={
          COSEHeaders.ALG: COSEAlgs.HPKE_BASE_P256_SHA256_AES128GCM,
      },
      unprotected={
          COSEHeaders.KID: b"01",  # kid: "01"
      },
  )


  rsk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      }
  )
  recipient = COSE.new()
  assert b"This is the content." == recipient.decode(encoded, rsk)
  ```





  The direct key distribution shares a MAC key between the sender and the recipient that is used directly.
  The follwing example shows the simplest way to make a COSE MAC message, verify and decode it with the direct
  key distribution method.

  ```py
  from cwt import COSE, COSEHeaders, COSEKey, Recipient

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")


  nonce = enc_key.generate_nonce()
  r = Recipient.new(unprotected={"alg": "direct"})


  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      enc_key,
      protected={"alg": "ChaCha20/Poly1305"},
      
      unprotected={"kid": enc_key.kid, "iv": nonce},
      
      recipients=[r],
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, enc_key)
  ```




  ```py
  from cwt import COSE, COSEKey, Recipient

  shared_material = token_bytes(32)
  shared_key = COSEKey.from_symmetric_key(shared_material, kid="01")


  r = Recipient.new(
      unprotected={
          "alg": "direct+HKDF-SHA-256",
          "salt": "aabbccddeeffgghh",
      },
      context={"alg": "A256GCM"},
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      shared_key,
      recipients=[r],
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(
      encoded, shared_key, context={"alg": "A256GCM"}
  )
  ```



  The AES key wrap algorithm can be used to wrap a MAC key as follows:

  ```py
  from cwt import COSE, COSEKey, Recipient

  wrapping_key = COSEKey.from_jwk(
      {
          "kty": "oct",
          "alg": "A128KW",
          "kid": "01",
          "k": "hJtXIZ2uSN5kbQfbtTNWbg",  # A shared wrapping key
      }
  )


  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305")
  r = Recipient.new(
      unprotected={"alg": "A128KW"},
      sender_key=wrapping_key,
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", key=enc_key, recipients=[r])


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, wrapping_key)
  ```



  The direct key agreement methods can be used to create a shared secret. A KDF (Key Distribution Function) is then
  applied to the shared secret to derive a key to be used to protect the data.
  The follwing example shows a simple way to make a COSE Encrypt message, verify and decode it with the direct key
  agreement methods.

  ```py
  from cwt import COSE, COSEKey, Recipient


  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
      }
  )
  r = Recipient.new(
      unprotected={"alg": "ECDH-ES+HKDF-256"},
      recipient_key=pub_key,
      context={"alg": "A128GCM"},
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      recipients=[r],
  )


  recipient = COSE.new()
  priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "alg": "ECDH-ES+HKDF-256",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
          "d": "r_kHyZ-a06rmxM3yESK84r1otSg-aQcVStkRhA-iCM8",
      }
  )
  assert b"Hello world!" == recipient.decode(
      encoded, priv_key, context={"alg": "A128GCM"}
  )
  ```



  ```py
  from cwt import COSE, COSEKey, Recipient


  enc_key = COSEKey.generate_symmetric_key(alg="A128GCM")
  nonce = enc_key.generate_nonce()
  r_pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "crv": "P-256",
          "kid": "meriadoc.brandybuck@buckland.example",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
      }
  )
  s_priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "crv": "P-256",
          "alg": "ECDH-SS+A128KW",
          "x": "7cvYCcdU22WCwW1tZXR8iuzJLWGcd46xfxO1XJs-SPU",
          "y": "DzhJXgz9RI6TseNmwEfLoNVns8UmvONsPzQDop2dKoo",
          "d": "Uqr4fay_qYQykwcNCB2efj_NFaQRRQ-6fHZm763jt5w",
      }
  )
  r = Recipient.new(
      unprotected={"alg": "ECDH-SS+A128KW"},
      sender_key=s_priv_key,
      recipient_key=r_pub_key,
      context={"alg": "A128GCM"},
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      key=enc_key,
      unprotected={COSEHeaders.IV: nonce},
      recipients=[r],
  )


  recipient = COSE.new()
  r_priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "crv": "P-256",
          "alg": "ECDH-SS+A128KW",
          "kid": "meriadoc.brandybuck@buckland.example",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
          "d": "r_kHyZ-a06rmxM3yESK84r1otSg-aQcVStkRhA-iCM8",
      }
  )
  assert b"Hello world!" == recipient.decode(
      encoded, r_priv_key, context={"alg": "A128GCM"}
  )
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to an encrypted COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.

  ```py
  from cwt import COSE, COSEKey, COSEMessage, Recipient

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")


  nonce = enc_key.generate_nonce()
  r = Recipient.new(unprotected={"alg": "direct"})

  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      enc_key,
      protected={"alg": "ChaCha20/Poly1305"},
      unprotected={"kid": enc_key.kid, "iv": nonce},
      recipients=[r],
  )


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(countersigned, enc_key)

  try:
      sig = COSEMessage.loads(countersigned).counterverify(pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```



  **Experimental Implementation. DO NOT USE for production.**

  Create a COSE-HPKE Encrypt message and decrypt it as follows:

  ```py
  from cwt import COSE, COSEAlgs, COSEHeaders, COSEKey, Recipient


  enc_key = COSEKey.generate_symmetric_key(alg="A128GCM")
  rpk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  r = Recipient.new(
      protected={
          COSEHeaders.ALG: COSEAlgs.HPKE_BASE_P256_SHA256_AES128GCM,
      },
      unprotected={
          COSEHeaders.KID: b"01",  # kid: "01"
      },
      recipient_key=rpk,
  )
  sender = COSE.new()
  encoded = sender.encode(
      b"This is the content.",
      enc_key,
      protected={
          COSEHeaders.ALG: 1,  # alg: "A128GCM"
      },
      recipients=[r],
  )


  rsk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      }
  )
  recipient = COSE.new()
  assert b"This is the content." == recipient.decode(encoded, rsk)
  ```





  Create a COSE Signature1 message, verify and decode it as follows:

  ```py
  from cwt import COSE, COSEKey, Signer


  priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      }
  )
  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", priv_key)


  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, pub_key)
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to a signed COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.

  ```py
  from cwt import COSE, COSEKey, COSEMessage


  priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      }
  )
  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", priv_key)


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  notary_pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(countersigned, pub_key)
  try:
      sig = COSEMessage.loads(countersigned).counterverify(notary_pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```





  Create a COSE Signature message, verify and decode it as follows:

  ```py
  from cwt import COSE, COSEKey, Signer


  signer = Signer.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      },
  )
  sender = COSE.new()
  encoded = sender.encode(b"Hello world!", signers=[signer])


  recipient = COSE.new()
  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  assert b"Hello world!" == recipient.decode(encoded, pub_key)
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to a signed COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.

  ```py
  from cwt import COSE, COSEKey, COSEMessage, Signer


  signer = Signer.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      },
  )
  sender = COSE.new()
  encoded = sender.encode(b"Hello world!", signers=[signer])


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  notary_pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, pub_key)

  try:
      sig = COSEMessage.loads(countersigned).counterverify(notary_pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```



  Followings are typical and basic examples which encode various types of CWTs, verify and decode them.

  [CWT API](https://python-cwt.readthedocs.io/en/stable/api.html) in the examples are built
  on top of [COSE API](https://python-cwt.readthedocs.io/en/stable/api.html#cwt.COSE).

  See [API Reference](https://python-cwt.readthedocs.io/en/stable/api.html).



  Create a MACed CWT with `HS256`, verify and decode it as follows:

  ```py
  import cwt
  from cwt import Claims, COSEKey

  try:
      key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")
      token = cwt.encode(
          {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, key
      )
      decoded = cwt.decode(token, key)

      
      readable = Claims.new(decoded)
      assert readable.iss == "coaps://as.example"
      assert readable.sub == "dajiaji"
      assert readable.cti == "123"
      
      
      

  except Exception as err:
      
      
      
      
      
      
      print(err)
  ```

  A raw CWT structure (Dict[int, Any]) can also be used as follows:

  ```py
  import cwt
  from cwt import COSEKey, CWTClaims

  key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")
  token = cwt.encode(
      {
          CWTClaims.ISS: "coaps://as.example",
          CWTClaims.SUB: "dajiaji",
          CWTClaims.CTI: b"123",
      },
      key,
  )
  decoded = cwt.decode(token, key)
  ```

  MAC algorithms other than `HS256` are listed in
  [Supported COSE Algorithms](https://python-cwt.readthedocs.io/en/stable/algorithms.html).



  Create an `Ed25519` key pair:

  ```sh
  $ openssl genpkey -algorithm ed25519 -out private_key.pem
  $ openssl pkey -in private_key.pem -pubout -out public_key.pem
  ```

  Create a Signed CWT with `Ed25519`, verify and decode it with the key pair as follows:

  ```py
  import cwt
  from cwt import COSEKey


  with open("./private_key.pem") as key_file:
      private_key = COSEKey.from_pem(key_file.read(), kid="01")
  token = cwt.encode(
      {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, private_key
  )


  with open("./public_key.pem") as key_file:
      public_key = COSEKey.from_pem(key_file.read(), kid="01")
  decoded = cwt.decode(token, public_key)
  ```

  JWKs can also be used instead of the PEM-formatted keys as follows:

  ```py
  import cwt
  from cwt import COSEKey


  private_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "key_ops": ["sign"],
          "alg": "EdDSA",
          "crv": "Ed25519",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      }
  )
  token = cwt.encode(
      {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, private_key
  )


  public_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "key_ops": ["verify"],
          "crv": "Ed25519",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      }
  )
  decoded = cwt.decode(token, public_key)
  ```

  Signing algorithms other than `Ed25519` are listed in
  [Supported COSE Algorithms](https://python-cwt.readthedocs.io/en/stable/algorithms.html).



  Create an encrypted CWT with `ChaCha20/Poly1305` and decrypt it as follows:

  ```py
  import cwt
  from cwt import COSEKey

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")
  token = cwt.encode(
      {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, enc_key
  )
  decoded = cwt.decode(token, enc_key)
  ```

  Encryption algorithms other than `ChaCha20/Poly1305` are listed in
  [Supported COSE Algorithms](https://python-cwt.readthedocs.io/en/stable/algorithms.html).



  Create a signed CWT and encrypt it, and then decrypt and verify the nested CWT as follows.

  ```py
  import cwt
  from cwt import COSEKey


  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="enc-01")


  with open("./private_key.pem") as key_file:
      private_key = COSEKey.from_pem(key_file.read(), kid="sig-01")
  token = cwt.encode(
      {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, private_key
  )


  nested = cwt.encode(token, enc_key)


  with open("./public_key.pem") as key_file:
      public_key = COSEKey.from_pem(key_file.read(), kid="sig-01")
  decoded = cwt.decode(nested, [enc_key, public_key])
  ```



  The `cwt` in `cwt.encode()` and `cwt.decode()` above is a global `CWT` class instance created
  with default settings in advance. The default settings are as follows:
  - `expires_in`: `3600` seconds. This is the default lifetime in seconds of CWTs.
  - `leeway`: `60` seconds. This is the default leeway in seconds for validating `exp` and `nbf`.

  If you want to change the settings, you can create your own `CWT` class instance as follows:

  ```py
  from cwt import COSEKey, CWT

  key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")
  mycwt = CWT.new(expires_in=3600 * 24, leeway=10)
  token = mycwt.encode({"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, key)
  decoded = mycwt.decode(token, key)
  ```



  You can use your own claims as follows:

  Note that such user-defined claim's key should be less than -65536.

  ```py
  import cwt
  from cwt import COSEKey, CWTClaims


  with open("./private_key.pem") as key_file:
      private_key = COSEKey.from_pem(key_file.read(), kid="01")
  token = cwt.encode(
      {
          CWTClaims.ISS: "coaps://as.example",  # iss
          CWTClaims.SUB: "dajiaji",  # sub
          CWTClaims.CTI: b"123",  # cti
          -70001: "foo",
          -70002: ["bar"],
          -70003: {"baz": "qux"},
          -70004: 123,
      },
      private_key,
  )


  with open("./public_key.pem") as key_file:
      public_key = COSEKey.from_pem(key_file.read(), kid="01")
  raw = cwt.decode(token, public_key)
  assert raw[-70001] == "foo"
  assert raw[-70002][0] == "bar"
  assert raw[-70003]["baz"] == "qux"
  assert raw[-70004] == 123

  readable = Claims.new(raw)
  assert readable.get(-70001) == "foo"
  assert readable.get(-70002)[0] == "bar"
  assert readable.get(-70003)["baz"] == "qux"
  assert readable.get(-70004) == 123
  ```

  User-defined claims can also be used with JSON-based claims as follows:

  ```py
  import cwt
  from cwt import Claims, COSEKey

  with open("./private_key.pem") as key_file:
      private_key = COSEKey.from_pem(key_file.read(), kid="01")

  my_claim_names = {
      "ext_1": -70001,
      "ext_2": -70002,
      "ext_3": -70003,
      "ext_4": -70004,
  }

  set_private_claim_names(my_claim_names)
  token = cwt.encode(
      {
          "iss": "coaps://as.example",
          "sub": "dajiaji",
          "cti": b"123",
          "ext_1": "foo",
          "ext_2": ["bar"],
          "ext_3": {"baz": "qux"},
          "ext_4": 123,
      },
      private_key,
  )

  with open("./public_key.pem") as key_file:
      public_key = COSEKey.from_pem(key_file.read(), kid="01")

  raw = cwt.decode(token, public_key)
  readable = Claims.new(
      raw,
      private_claims_names=my_claim_names,
  )
  assert readable.get("ext_1") == "foo"
  assert readable.get("ext_2")[0] == "bar"
  assert readable.get("ext_3")["baz"] == "qux"
  assert readable.get("ext_4") == 123
  ```




  Python CWT supports [CWT Claims in COSE Headers](https://www.ietf.org/archive/id/draft-ietf-cose-cwt-claims-in-headers-06.html)  experimentally.

  If a CWT message has a CWT Claims header parameter in its protected header, `cwt.decode()` checks whether the values of the claims included in that parameter match the values of the corresponding claims in the payload. If they do not match, `VerifyError` is raised.

  ```py
  from cwt import COSE, COSEHeaders, COSEKey, CWT, CWTClaims

  enc_key = COSEKey.from_symmetric_key(alg="A128GCM", kid="01")


  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  payload = cbor2.dumps(
      {
          CWTClaims.ISS: "coap://as.example.com",
          CWTClaims.SUB: "erikw",
          CWTClaims.AUD: "coap://light.example.com",
          CWTClaims.EXP: now() + 3600,
          CWTClaims.NBF: now(),
          CWTClaims.IAT: now(),
          CWTClaims.CTI: bytes.fromhex("0b71"),
      },
  )
  protected = {
      COSEHeaders.CWT_CLAIMS: {  # 13
          CWTClaims.ISS: "coap://as.example.com",
      }
  }
  token = sender.encode(payload, enc_key, protected)


  recipient = CWT.new()

  decoded = recipient.decode(token, enc_key)
  assert decoded[CWTClaims.ISS] == "coap://as.example.com"
  assert decoded[CWTClaims.SUB] == "erikw"
  ```



  Python CWT supports [Proof-of-Possession Key Semantics for CBOR Web Tokens (CWTs)](https://tools.ietf.org/html/rfc8747).
  A CWT can include a PoP key as follows:

  On the issuer side:

  ```py
  import cwt
  from cwt import COSEKey


  with open("./private_key_of_issuer.pem") as key_file:
      private_key = COSEKey.from_pem(key_file.read(), kid="issuer-01")


  token = cwt.encode(
      {
          "iss": "coaps://as.example",
          "sub": "dajiaji",
          "cti": "123",
          "cnf": {
              "jwk": {  # Provided by the CWT presenter.
                  "kty": "OKP",
                  "use": "sig",
                  "crv": "Ed25519",
                  "kid": "presenter-01",
                  "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
                  "alg": "EdDSA",
              },
          },
      },
      private_key,
  )


  ```

  On the CWT presenter side:

  ```py
  import cwt
  from cwt import COSEKey


  with open("./private_pop_key.pem") as key_file:
      pop_key_private = COSEKey.from_pem(key_file.read(), kid="presenter-01")


  msg = b"could-you-sign-this-message?"  # Provided by recipient.


  sig = pop_key_private.sign(msg)


  ```

  On the CWT recipient side:

  ```py
  import cwt
  from cwt import Claims, COSEKey


  with open("./public_key_of_issuer.pem") as key_file:
      public_key = COSEKey.from_pem(key_file.read(), kid="issuer-01")


  raw = cwt.decode(token, public_key)
  decoded = Claims.new(raw)


  extracted_pop_key = COSEKey.new(decoded.cnf)  # = raw[8][1]



  extracted_pop_key.verify(msg, sig)
  ```

  [Usage Examples](https://python-cwt.readthedocs.io/en/stable/cwt_usage.html#cwt-with-pop-key)
  shows other examples which use other confirmation methods for PoP keys.



  Python CWT supports the case of using an arbitrary private CA as a root of trust.
  In this case, a COSE message sender needs to specify the trust relationship chaining up to the root CA by using `x5chain` header parameter.
  On the other hand, a COSE message receiver needs to specify trusted root CAs by using `ca_certs` parameter of CWT/COSE constructor (`CWT.new()` or `COSE.new()`).

  ```py
  import cwt
  from cwt import Claims, COSEKey


  with open("./private_key_of_cert.pem") as f:
      private_key = COSEKey.from_pem(f.read(), kid="01")

  token = cwt.encode(
      {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, private_key
  )


  public_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "use": "sig",
          "crv": "P-256",
          "kid": "P-256-01",
          "x": "oONCv1QoiajIbcW21Dqy6EnGvBTuF26GU7dy6JzOfXk",
          "y": "sl6k77K0TS36FW-TyEGLHY14ovZfdZ9DZWsbA8BTHGc",
          "x5c": [
              
              "MIIClDCCAXygAwIBAgIBBDANBgkqhkiG9w0BAQsFADBmMQswCQYDVQQGEwJKUDEOMAwGA1UECAwFVG9reW8xEDAOBgNVBAoMB2RhamlhamkxEzARBgNVBAMMCnB5dGhvbi1jd3QxIDAeBgkqhkiG9w0BCQEWEWRhamlhamlAZ21haWwuY29tMB4XDTIxMTAwMzEzMDE1MFoXDTMxMTAwMTEzMDE1MFowZDELMAkGA1UEBhMCSlAxDjAMBgNVBAgMBVRva3lvMQ0wCwYDVQQKDAR0ZXN0MRUwEwYDVQQDDAx0ZXN0LmV4YW1wbGUxHzAdBgkqhkiG9w0BCQEWEHRlc3RAZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASg40K_VCiJqMhtxbbUOrLoSca8FO4XboZTt3LonM59ebJepO-ytE0t-hVvk8hBix2NeKL2X3WfQ2VrGwPAUxxnoxowGDAJBgNVHRMEAjAAMAsGA1UdDwQEAwIE8DANBgkqhkiG9w0BAQsFAAOCAQEAZFfvFbaDk_DmG2cPGTwqwnFok1QnH2Tzkjk7p4vs1ycWzEDltkhyzcJxTSHoQGdykf7fG8NCrEqfi1G3hOyAtGxVIVcqsI-KIJCESp43zrNz5HsbwEY8l5rvcwohKGlE_idIFt5IuDTv7vsg_FaCIDeruw0NrXAACnLTwksawsxaCvtY12U0wsI2aC2Sb6V3HL-OLgcN6ZWzZ054L88JllckYnqJB8wCVBzzX2K2sZH3yeS39oRWZOVG6fwXsX4k0fHFx-Fn6KlrBU15pbjMLMn0ow0X3Y8e7FOgfkkph-N7e2SxceXNjrLiumOdclPm9yGSWoGsOJdId53dPvqAsQ",
              
              "MIIDrzCCApegAwIBAgIUIK_CYzdq4BLLVXqSclNBgXy6mgswDQYJKoZIhvcNAQELBQAwZjELMAkGA1UEBhMCSlAxDjAMBgNVBAgMBVRva3lvMRAwDgYDVQQKDAdkYWppYWppMRMwEQYDVQQDDApweXRob24tY3d0MSAwHgYJKoZIhvcNAQkBFhFkYWppYWppQGdtYWlsLmNvbTAgFw0yMTEwMDIyMzU0NTZaGA8yMDcxMDkyMDIzNTQ1NlowZjELMAkGA1UEBhMCSlAxDjAMBgNVBAgMBVRva3lvMRAwDgYDVQQKDAdkYWppYWppMRMwEQYDVQQDDApweXRob24tY3d0MSAwHgYJKoZIhvcNAQkBFhFkYWppYWppQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANFg4sw-uPWbPBbkJuohXc89O0gaqG1H2i1wzxxka32XNKIdwrxOJvsB2eALo3q7dTqLKCgzrjdd5N07gi0KzqjoIXIXqKpV5tm0fP5gCzEOWgxySCfBJOJyyvO6WvYXdvukEBnL-48D8RSjQH9fQEju5RG0taFZE-0nQ7n3P0J-Q-OfBUEoRiHvCd8oUx0s-fBpKdfhMAbD1sGAQ9CokUFeWc49em8inNqia5xljBtSYo6_2Zx9eb7B53wvBC0EmtS4SRyksR2emlr6GxMj_EZW7hcTfZCM4V2JYXliuAEdxA0sB7q-WqLg4OvltBQxCBgTTEXRCzxj3XXZy7QyUacCAwEAAaNTMFEwHQYDVR0OBBYEFA9id2cL_Chjv6liRN3HD849TARsMB8GA1UdIwQYMBaAFA9id2cL_Chjv6liRN3HD849TARsMA8GA1UdEwEB_wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAArIej5eJN1OmD3l3ef9QzosCxKThNwqNY55CoSSC3IRl-IAXy9Lvx7cgiliwBgCv99RbXZ1ZnptTHC_1kzMzPhPg9pGKDowFP-rywaB9-NTuHTWQ4hkKDsru5dpf75ILNI5PTUi1iiBM7TdgSerpEVroUWZiOpGAdlKkmE1h4gkR6eQY9Q0IvVXwagy_PPoQ1XO1i5Hyg3aXeDZBgkE7AuW9uxtYQHzg8JG2TNko_yp497yf_Ew4t6KzGDhSa8L1euMPtclALDWFhgl6WmYsHOqAOsyZOLwpsifWa533wI9mtTvLEg8TFKMOdU0sbAoQSbrrI9m4QS7mzDLchngj3E",
          ],
          "alg": "ES256",
      }
  )


  decoder = CWT.new(ca_certs="/path/to/cacerts.pem")
  decoded = decoder.decode(token, public_key)
  assert 1 in decoded and decoded[1] == "coaps://as.example"
  ```



  Python CWT supports [Electronic Health Certificate Specification](https://github.com/ehn-dcc-development/hcert-spec/blob/main/hcert_spec.md)
  and [EUDCC (EU Digital COVID Certificate)](https://ec.europa.eu/info/live-work-travel-eu/coronavirus-response/safe-covid-19-vaccines-europeans/eu-digital-covid-certificate_en) compliant with [Technical Specifications for Digital Green Certificates Volume 1](https://ec.europa.eu/health/sites/default/files/ehealth/docs/digital-green-certificates_v1_en.pdf)

  A following example shows how to verify an EUDCC:

  ```py
  import cwt
  from cwt import load_pem_hcert_dsc




  dsc = "-----BEGIN CERTIFICATE-----\nMIIBvTCCAWOgAwIBAgIKAXk8i88OleLsuTAKBggqhkjOPQQDAjA2MRYwFAYDVQQDDA1BVCBER0MgQ1NDQSAxMQswCQYDVQQGEwJBVDEPMA0GA1UECgwGQk1TR1BLMB4XDTIxMDUwNTEyNDEwNloXDTIzMDUwNTEyNDEwNlowPTERMA8GA1UEAwwIQVQgRFNDIDExCzAJBgNVBAYTAkFUMQ8wDQYDVQQKDAZCTVNHUEsxCjAIBgNVBAUTATEwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASt1Vz1rRuW1HqObUE9MDe7RzIk1gq4XW5GTyHuHTj5cFEn2Rge37+hINfCZZcozpwQKdyaporPUP1TE7UWl0F3o1IwUDAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0OBBYEFO49y1ISb6cvXshLcp8UUp9VoGLQMB8GA1UdIwQYMBaAFP7JKEOflGEvef2iMdtopsetwGGeMAoGCCqGSM49BAMCA0gAMEUCIQDG2opotWG8tJXN84ZZqT6wUBz9KF8D+z9NukYvnUEQ3QIgdBLFSTSiDt0UJaDF6St2bkUQuVHW6fQbONd731/M4nc=\n-----END CERTIFICATE-----"



  eudcc = bytes.fromhex(
      "d2844da20448d919375fc1e7b6b20126a0590133a4041a61817ca0061a60942ea001624154390103a101a4617681aa62646e01626d616d4f52472d3130303033303231356276706a313131393334393030376264746a323032312d30322d313862636f624154626369783155524e3a555643493a30313a41543a31303830373834334639344145453045453530393346424332353442443831332342626d706c45552f312f32302f31353238626973781b4d696e6973747279206f66204865616c74682c20417573747269616273640262746769383430353339303036636e616da463666e74754d5553544552465241553c474f455353494e47455262666e754d7573746572667261752d47c3b6c39f696e67657263676e74684741425249454c4562676e684761627269656c656376657265312e302e3063646f626a313939382d30322d323658405812fce67cb84c3911d78e3f61f890d0c80eb9675806aebed66aa2d0d0c91d1fc98d7bcb80bf00e181806a9502e11b071325901bd0d2c1b6438747b8cc50f521"
  )

  public_key = load_pem_hcert_dsc(dsc)
  decoded = cwt.decode(eudcc, keys=[public_key])
  claims = Claims.new(decoded)

























  ```



  See [Documentation](https://python-cwt.readthedocs.io/en/stable/api.html).



  See [Documentation](https://python-cwt.readthedocs.io/en/stable/claims.html).



  See [Documentation](https://python-cwt.readthedocs.io/en/stable/algorithms.html).



  Python CWT is (partially) compliant with following specifications:

  - [RFC9052: CBOR Object Signing and Encryption (COSE): Structures and Process](https://www.rfc-editor.org/rfc/rfc9052.html)
  - [RFC9053: CBOR Object Signing and Encryption (COSE): Initial Algorithms](https://www.rfc-editor.org/rfc/rfc9053.html)
  - [RFC9338: CBOR Object Signing and Encryption (COSE): Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html) - experimental
  - [RFC8812: COSE and JOSE Registrations for Web Authentication (WebAuthn) Algorithms](https://tools.ietf.org/html/rfc8812)
  - [RFC8747: Proof-of-Possession Key Semantics for CBOR Web Tokens (CWTs)](https://tools.ietf.org/html/rfc8747)
  - [RFC8392: CWT (CBOR Web Token)](https://tools.ietf.org/html/rfc8392)
  - [RFC8230: Using RSA Algorithms with COSE Messages](https://tools.ietf.org/html/rfc8230)
  - [RFC9459: CBOR Object Signing and Encryption (COSE): AES-CTR and AES-CBC](https://www.rfc-editor.org/rfc/rfc9459.html) - experimental
  - [RFC8152: CBOR Object Signing and Encryption (COSE)](https://tools.ietf.org/html/rfc8152)
  - [draft-07: Use of HPKE with COSE](https://www.ietf.org/archive/id/draft-ietf-cose-hpke-07.html) - experimental
  - [draft-06: CWT Claims in COSE Headers](https://www.ietf.org/archive/id/draft-ietf-cose-cwt-claims-in-headers-06.html) - experimental
  - [Electronic Health Certificate Specification](https://github.com/ehn-dcc-development/hcert-spec/blob/main/hcert_spec.md)
  - [Technical Specifications for Digital Green Certificates Volume 1](https://ec.europa.eu/health/sites/default/files/ehealth/docs/digital-green-certificates_v1_en.pdf)



  You can run tests from the project root after cloning with:

  ```sh
  $ tox
  ```



  We welcome all kind of contributions, filing issues, suggesting new features or sending PRs.


pkgId: 2e6174ae42757fc5bfe2628fdb51006c39d609b06e45902fa231cd28c28610f3
name: python-cwt
arch: src
version: 2.8.0
epoch: 0
release: 1
summary: A Python implementation of CWT/COSE.
url: https://github.com/dajiaji/python-cwt
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cwt-2.8.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/cwt.svg)](https://badge.fury.io/py/cwt)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cwt)
  [![Documentation Status](https://readthedocs.org/projects/python-cwt/badge/?version=latest)](https://python-cwt.readthedocs.io/en/latest/?badge=latest)
  ![Github CI](https://github.com/dajiaji/python-cwt/actions/workflows/ci.yml/badge.svg)
  [![codecov](https://codecov.io/gh/dajiaji/python-cwt/branch/main/graph/badge.svg?token=QN8GXEYEP3)](https://codecov.io/gh/dajiaji/python-cwt)


  Python CWT is a CBOR Web Token (CWT) and CBOR Object Signing and Encryption (COSE)
  implementation compliant with:
  - [RFC9052: CBOR Object Signing and Encryption (COSE): Structures and Process](https://www.rfc-editor.org/rfc/rfc9052.html)
  - [RFC9053: CBOR Object Signing and Encryption (COSE): Initial Algorithms](https://www.rfc-editor.org/rfc/rfc9053.html)
  - [RFC9338: CBOR Object Signing and Encryption (COSE): Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html) - experimental
  - [RFC8392: CWT (CBOR Web Token)](https://tools.ietf.org/html/rfc8392)
  - [draft-07: Use of HPKE with COSE](https://www.ietf.org/archive/id/draft-ietf-cose-hpke-07.html) - experimental
  - [draft-06: CWT Claims in COSE Headers](https://www.ietf.org/archive/id/draft-ietf-cose-cwt-claims-in-headers-06.html) - experimental
  - and related various specifications. See [Referenced Specifications](#referenced-specifications).

  It is designed to make users who already know about [JWS](https://tools.ietf.org/html/rfc7515)/[JWE](https://tools.ietf.org/html/rfc7516)/[JWT](https://tools.ietf.org/html/rfc7519)
  be able to use it in ease. Little knowledge of [CBOR](https://tools.ietf.org/html/rfc7049)/[COSE](https://tools.ietf.org/html/rfc8152)/[CWT](https://tools.ietf.org/html/rfc8392)
  is required to use it.

  You can install Python CWT with pip:


  ```sh
  $ pip install cwt
  ```

  And then, you can use it as follows:

  **COSE API**

  ```py
  from cwt import COSE, COSEKey

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      mac_key,
      protected={"alg": "HS256"},
      unprotected={"kid": "01"},
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, mac_key)




  ```

  **CWT API**

  ```py
  import cwt
  from cwt import COSEKey, CWTClaims

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  token = encode(
      {
          CWTClaims.ISS: "coaps://as.example",
          CWTClaims.SUB: "dajiaji",
          CWTClaims.CTI: b"123",
      },
      mac_key,
  )


  decoded = decode(token, mac_key)








  ```

  Various usage examples are shown in this README.

  See [Documentation](https://python-cwt.readthedocs.io/en/stable/) for details of the APIs.



  - [Installation](#installation)
  - [COSE Usage Examples](#cose-usage-examples)
      - [COSE MAC0](#cose-mac0)
          - [MAC with HMAC with SHA256](#mac-with-hmac-with-sha256)
          - [Countersign (MAC0)](#countersign-mac0)
      - [COSE MAC](#cose-mac)
          - [Direct Key Distribution](#direct-key-distribution-for-mac)
          - [Direct Key with KDF](#direct-key-with-kdf-for-mac)
          - [AES Key Wrap](#aes-key-wrap-for-mac)
          - [Direct key Agreement](#direct-key-agreement-for-mac)
          - [Key Agreement with Key Wrap](#key-agreement-with-key-wrap-for-mac)
          - [Countersign (MAC)](#countersign-mac)
          - [COSE-HPKE (MAC)](#cose-hpke-mac)
      - [COSE Encrypt0](#cose-encrypt0)
          - [Encryption with ChaCha20/Poly1305](#encryption-with-chacha20-poly1305)
          - [Countersign (Encrypt0)](#countersign-encrypt0)
          - [COSE-HPKE (Encrypt0)](#cose-hpke-encrypt0)
      - [COSE Encrypt](#cose-encrypt)
          - [Direct Key Distribution](#direct-key-distribution-for-encryption)
          - [Direct Key with KDF](#direct-key-with-kdf-for-encryption)
          - [AES Key Wrap](#aes-key-wrap-for-encryption)
          - [Direct key Agreement](#direct-key-agreement-for-encryption)
          - [Key Agreement with Key Wrap](#key-agreement-with-key-wrap-for-encryption)
          - [Countersign (Encrypt)](#countersign-encrypt)
          - [COSE-HPKE (Encrypt)](#cose-hpke-encrypt)
      - [COSE Signature1](#cose-signature1)
          - [Sign1 with EC P-256](#sign1-with-ec-p-256)
          - [Countersign (Sign1)](#countersign-sign1)
      - [COSE Signature](#cose-signature)
          - [Sign with EC P-256](#sign-with-ec-p-256)
          - [Countersign (Sign)](#countersign-sign)
  - [CWT Usage Examples](#cwt-usage-examples)
      - [MACed CWT](#maced-cwt)
      - [Signed CWT](#signed-cwt)
      - [Encrypted CWT](#encrypted-cwt)
      - [Nested CWT](#nested-cwt)
      - [CWT with User Settings (e.g., expires\_in)](#cwt-with-user-settings)
      - [CWT with User-Defined Claims](#cwt-with-user-defined-claims)
      - [CWT with CWT claims in COSE headers](#cwt-with-cwt-claims-in-cose-headers)
      - [CWT with PoP Key](#cwt-with-pop-key)
      - [CWT with Private CA](#cwt-with-private-ca)
      - [CWT for EUDCC (EU Digital COVID Certificate)](#cwt-for-eudcc-eu-digital-covid-certificate)
  - [API Reference](#api-reference)
  - [Supported CWT Claims](#supported-cwt-claims)
  - [Supported COSE Algorithms](#supported-cose-algorithms)
  - [Referenced Specifications](#referenced-specifications)
  - [Tests](#tests)
  - [Contributing](#contributing)



  Install with pip:

  ```
  pip install cwt
  ```



  Followings are typical and basic examples which encode various types of COSE messages and decode them.

  See [API Reference](https://python-cwt.readthedocs.io/en/stable/api.html#cwt.COSE).





  Create a COSE MAC0 message, verify and decode it as follows:

  ```py
  from cwt import COSE, COSEKey

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      mac_key,
      protected={"alg": "HS256"},
      unprotected={"kid": "01"},
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, mac_key)
  ```

  Following two samples are other ways of writing the above example.

  CBOR object can be used for `protected` and `unprotected` header parameters as follows:

  ```py
  from cwt import COSE, COSEHeaders, COSEKey

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      mac_key,
      protected={COSEHeaders.ALG: 5},
      unprotected={COSEHeaders.KID: b"01"},
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, mac_key)
  ```

  `alg_auto_inclusion` and `kid_auto_inclusion` can be used to omit to specify `alg` and `kid` header parameters respectively as follows:

  ```py
  from cwt import COSE, COSEKey

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      mac_key,
      
      
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, mac_key)
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to a MACed COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.

  ```py
  from cwt import COSE, COSEKey, COSEMessage

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", mac_key)


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(countersigned, mac_key)
  try:
      sig = COSEMessage.loads(countersigned).counterverify(pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```





  The direct key distribution shares a MAC key between the sender and the recipient that is used directly.
  The follwing example shows the simplest way to make a COSE MAC message, verify and decode it with the direct
  key distribution method.

  ```py
  from cwt import COSE, COSEKey, Recipient

  mac_key = COSEKey.generate_symmetric_key(alg="HS512", kid="01")


  r = Recipient.new(unprotected={"alg": "direct", "kid": mac_key.kid})

  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!", mac_key, protected={"alg": "HS512"}, recipients=[r]
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, mac_key)
  ```




  ```py
  from secrets import token_bytes
  from cwt import COSE, COSEKey, Recipient

  shared_material = token_bytes(32)
  shared_key = COSEKey.from_symmetric_key(shared_material, kid="01")


  r = Recipient.new(
      unprotected={
          "alg": "direct+HKDF-SHA-256",
          "salt": "aabbccddeeffgghh",
      },
      context={"alg": "HS256"},
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      shared_key,
      recipients=[r],
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(
      encoded, shared_key, context={"alg": "HS256"}
  )
  ```



  The AES key wrap algorithm can be used to wrap a MAC key as follows:

  ```py
  from cwt import COSE, COSEKey, Recipient

  enc_key = COSEKey.from_jwk(
      {
          "kty": "oct",
          "kid": "01",
          "alg": "A128KW",
          "k": "hJtXIZ2uSN5kbQfbtTNWbg",  # A shared wrapping key
      }
  )


  mac_key = COSEKey.generate_symmetric_key(alg="HS512")
  r = Recipient.new(unprotected={"alg": "A128KW"}, sender_key=enc_key)
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", mac_key, recipients=[r])


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, enc_key)
  ```



  The direct key agreement methods can be used to create a shared secret. A KDF (Key Distribution Function) is then
  applied to the shared secret to derive a key to be used to protect the data.
  The follwing example shows a simple way to make a COSE Encrypt message, verify and decode it with the direct key
  agreement methods.

  ```py
  from cwt import COSE, COSEKey, Recipient



  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
      }
  )
  r = Recipient.new(
      unprotected={"alg": "ECDH-ES+HKDF-256"},
      recipient_key=pub_key,
      context={"alg": "HS256"},
  )
  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      protected={"alg": "HS256"},
      recipients=[r],
  )



  priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "alg": "ECDH-ES+HKDF-256",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
          "d": "r_kHyZ-a06rmxM3yESK84r1otSg-aQcVStkRhA-iCM8",
      }
  )
  recipient = COSE.new()



  assert b"Hello world!" == recipient.decode(encoded, priv_key, context={"alg": "HS256"})
  ```




  ```py
  from cwt import COSE, COSEKey, Recipient


  mac_key = COSEKey.generate_symmetric_key(alg="HS256")
  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "alg": "ECDH-ES+A128KW",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
      }
  )
  r = Recipient.new(
      unprotected={"alg": "ECDH-ES+A128KW"},
      recipient_key=pub_key,
      context={"alg": "HS256"},
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      mac_key,
      recipients=[r],
  )


  recipient = COSE.new()
  priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "alg": "ECDH-ES+A128KW",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
          "d": "r_kHyZ-a06rmxM3yESK84r1otSg-aQcVStkRhA-iCM8",
      }
  )
  assert b"Hello world!" == recipient.decode(encoded, priv_key, context={"alg": "HS256"})
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to a MACed COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.


  ```py
  from cwt import COSE, COSEKey, COSEMessage, Recipient

  mac_key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")


  r = Recipient.new(unprotected={"alg": "direct", "kid": mac_key.kid})
  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!", mac_key, protected={"alg": "HS256"}, recipients=[r]
  )


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(countersigned, mac_key)
  try:
      sig = COSEMessage.loads(countersigned).counterverify(pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```




  **Experimental Implementation. DO NOT USE for production.**

  Create a COSE-HPKE MAC message, verify and decode it as follows:

  ```py
  from cwt import COSE, COSEAlgs, COSEHeaders, COSEKey, Recipient


  mac_key = COSEKey.generate_symmetric_key(alg="HS256")
  rpk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  r = Recipient.new(
      protected={
          COSEHeaders.ALG: COSEAlgs.HPKE_BASE_P256_SHA256_AES128GCM,
      },
      unprotected={
          COSEHeaders.KID: b"01",  # kid: "01"
      },
      recipient_key=rpk,
  )
  sender = COSE.new()
  encoded = sender.encode(
      b"This is the content.",
      mac_key,
      protected={COSEHeaders.ALG: COSEAlgs.HS256},
      recipients=[r],
  )


  rsk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      }
  )
  recipient = COSE.new()
  assert b"This is the content." == recipient.decode(encoded, rsk)
  ```





  Create a COSE Encrypt0 message and decrypt it as follows:

  ```py
  from cwt import COSE, COSEKey

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")


  nonce = enc_key.generate_nonce()
  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", enc_key, unprotected={COSEHeaders.IV: nonce})


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, enc_key)
  ```

  The following sample is another way of writing the above:

  ```py
  from cwt import COSE, COSEKey

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")


  nonce = enc_key.generate_nonce()
  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      enc_key,
      protected={"alg": "ChaCha20/Poly1305"},
      unprotected={"kid": "01", "iv": nonce},
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, enc_key)
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to an encrypted COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.

  ```py
  from cwt import COSE, COSEKey, COSEMessage

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")


  nonce = enc_key.generate_nonce()
  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", enc_key, unprotected={COSEHeaders.IV: nonce})


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(countersigned, enc_key)
  try:
      sig = COSEMessage.loads(countersigned).counterverify(pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```



  **Experimental Implementation. DO NOT USE for production.**

  Create a COSE-HPKE Encrypt0 message and decrypt it as follows:

  ```py
  from cwt import COSE, COSEAlgs, COSEHeaders, COSEKey


  rpk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )

  sender = COSE.new()
  encoded = sender.encode(
      b"This is the content.",
      rpk,
      protected={
          COSEHeaders.ALG: COSEAlgs.HPKE_BASE_P256_SHA256_AES128GCM,
      },
      unprotected={
          COSEHeaders.KID: b"01",  # kid: "01"
      },
  )


  rsk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      }
  )
  recipient = COSE.new()
  assert b"This is the content." == recipient.decode(encoded, rsk)
  ```





  The direct key distribution shares a MAC key between the sender and the recipient that is used directly.
  The follwing example shows the simplest way to make a COSE MAC message, verify and decode it with the direct
  key distribution method.

  ```py
  from cwt import COSE, COSEHeaders, COSEKey, Recipient

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")


  nonce = enc_key.generate_nonce()
  r = Recipient.new(unprotected={"alg": "direct"})


  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      enc_key,
      protected={"alg": "ChaCha20/Poly1305"},
      
      unprotected={"kid": enc_key.kid, "iv": nonce},
      
      recipients=[r],
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, enc_key)
  ```




  ```py
  from cwt import COSE, COSEKey, Recipient

  shared_material = token_bytes(32)
  shared_key = COSEKey.from_symmetric_key(shared_material, kid="01")


  r = Recipient.new(
      unprotected={
          "alg": "direct+HKDF-SHA-256",
          "salt": "aabbccddeeffgghh",
      },
      context={"alg": "A256GCM"},
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      shared_key,
      recipients=[r],
  )


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(
      encoded, shared_key, context={"alg": "A256GCM"}
  )
  ```



  The AES key wrap algorithm can be used to wrap a MAC key as follows:

  ```py
  from cwt import COSE, COSEKey, Recipient

  wrapping_key = COSEKey.from_jwk(
      {
          "kty": "oct",
          "alg": "A128KW",
          "kid": "01",
          "k": "hJtXIZ2uSN5kbQfbtTNWbg",  # A shared wrapping key
      }
  )


  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305")
  r = Recipient.new(
      unprotected={"alg": "A128KW"},
      sender_key=wrapping_key,
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", key=enc_key, recipients=[r])


  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, wrapping_key)
  ```



  The direct key agreement methods can be used to create a shared secret. A KDF (Key Distribution Function) is then
  applied to the shared secret to derive a key to be used to protect the data.
  The follwing example shows a simple way to make a COSE Encrypt message, verify and decode it with the direct key
  agreement methods.

  ```py
  from cwt import COSE, COSEKey, Recipient


  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
      }
  )
  r = Recipient.new(
      unprotected={"alg": "ECDH-ES+HKDF-256"},
      recipient_key=pub_key,
      context={"alg": "A128GCM"},
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      recipients=[r],
  )


  recipient = COSE.new()
  priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "alg": "ECDH-ES+HKDF-256",
          "kid": "01",
          "crv": "P-256",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
          "d": "r_kHyZ-a06rmxM3yESK84r1otSg-aQcVStkRhA-iCM8",
      }
  )
  assert b"Hello world!" == recipient.decode(
      encoded, priv_key, context={"alg": "A128GCM"}
  )
  ```



  ```py
  from cwt import COSE, COSEKey, Recipient


  enc_key = COSEKey.generate_symmetric_key(alg="A128GCM")
  nonce = enc_key.generate_nonce()
  r_pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "crv": "P-256",
          "kid": "meriadoc.brandybuck@buckland.example",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
      }
  )
  s_priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "crv": "P-256",
          "alg": "ECDH-SS+A128KW",
          "x": "7cvYCcdU22WCwW1tZXR8iuzJLWGcd46xfxO1XJs-SPU",
          "y": "DzhJXgz9RI6TseNmwEfLoNVns8UmvONsPzQDop2dKoo",
          "d": "Uqr4fay_qYQykwcNCB2efj_NFaQRRQ-6fHZm763jt5w",
      }
  )
  r = Recipient.new(
      unprotected={"alg": "ECDH-SS+A128KW"},
      sender_key=s_priv_key,
      recipient_key=r_pub_key,
      context={"alg": "A128GCM"},
  )
  sender = COSE.new(alg_auto_inclusion=True)
  encoded = sender.encode(
      b"Hello world!",
      key=enc_key,
      unprotected={COSEHeaders.IV: nonce},
      recipients=[r],
  )


  recipient = COSE.new()
  r_priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "crv": "P-256",
          "alg": "ECDH-SS+A128KW",
          "kid": "meriadoc.brandybuck@buckland.example",
          "x": "Ze2loSV3wrroKUN_4zhwGhCqo3Xhu1td4QjeQ5wIVR0",
          "y": "HlLtdXARY_f55A3fnzQbPcm6hgr34Mp8p-nuzQCE0Zw",
          "d": "r_kHyZ-a06rmxM3yESK84r1otSg-aQcVStkRhA-iCM8",
      }
  )
  assert b"Hello world!" == recipient.decode(
      encoded, r_priv_key, context={"alg": "A128GCM"}
  )
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to an encrypted COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.

  ```py
  from cwt import COSE, COSEKey, COSEMessage, Recipient

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")


  nonce = enc_key.generate_nonce()
  r = Recipient.new(unprotected={"alg": "direct"})

  sender = COSE.new()
  encoded = sender.encode(
      b"Hello world!",
      enc_key,
      protected={"alg": "ChaCha20/Poly1305"},
      unprotected={"kid": enc_key.kid, "iv": nonce},
      recipients=[r],
  )


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(countersigned, enc_key)

  try:
      sig = COSEMessage.loads(countersigned).counterverify(pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```



  **Experimental Implementation. DO NOT USE for production.**

  Create a COSE-HPKE Encrypt message and decrypt it as follows:

  ```py
  from cwt import COSE, COSEAlgs, COSEHeaders, COSEKey, Recipient


  enc_key = COSEKey.generate_symmetric_key(alg="A128GCM")
  rpk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  r = Recipient.new(
      protected={
          COSEHeaders.ALG: COSEAlgs.HPKE_BASE_P256_SHA256_AES128GCM,
      },
      unprotected={
          COSEHeaders.KID: b"01",  # kid: "01"
      },
      recipient_key=rpk,
  )
  sender = COSE.new()
  encoded = sender.encode(
      b"This is the content.",
      enc_key,
      protected={
          COSEHeaders.ALG: 1,  # alg: "A128GCM"
      },
      recipients=[r],
  )


  rsk = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      }
  )
  recipient = COSE.new()
  assert b"This is the content." == recipient.decode(encoded, rsk)
  ```





  Create a COSE Signature1 message, verify and decode it as follows:

  ```py
  from cwt import COSE, COSEKey, Signer


  priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      }
  )
  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", priv_key)


  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, pub_key)
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to a signed COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.

  ```py
  from cwt import COSE, COSEKey, COSEMessage


  priv_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      }
  )
  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  encoded = sender.encode(b"Hello world!", priv_key)


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  notary_pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(countersigned, pub_key)
  try:
      sig = COSEMessage.loads(countersigned).counterverify(notary_pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```





  Create a COSE Signature message, verify and decode it as follows:

  ```py
  from cwt import COSE, COSEKey, Signer


  signer = Signer.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      },
  )
  sender = COSE.new()
  encoded = sender.encode(b"Hello world!", signers=[signer])


  recipient = COSE.new()
  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  assert b"Hello world!" == recipient.decode(encoded, pub_key)
  ```



  `python-cwt` supports [RFC9338: COSE Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html).
  The notary below adds a countersignature to a signed COSE message.
  The recipinet has to call `counterverify` to verify the countersignature explicitly.

  ```py
  from cwt import COSE, COSEKey, COSEMessage, Signer


  signer = Signer.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
          "d": "V8kgd2ZBRuh2dgyVINBUqpPDr7BOMGcF22CQMIUHtNM",
      },
  )
  sender = COSE.new()
  encoded = sender.encode(b"Hello world!", signers=[signer])


  notary = Signer.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      },
  )
  countersigned = COSEMessage.loads(encoded).countersign(notary).dumps()


  pub_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "kid": "01",
          "crv": "P-256",
          "x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
          "y": "IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",
      }
  )
  notary_pub_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      },
  )
  recipient = COSE.new()
  assert b"Hello world!" == recipient.decode(encoded, pub_key)

  try:
      sig = COSEMessage.loads(countersigned).counterverify(notary_pub_key)
  except Exception as err:
      pytest.fail(f"failed to verify: {err}")
  countersignature = COSEMessage.from_cose_signature(sig)
  assert countersignature.protected[1] == -8  # alg: "EdDSA"
  assert countersignature.unprotected[4] == b"01"  # kid: b"01"
  ```



  Followings are typical and basic examples which encode various types of CWTs, verify and decode them.

  [CWT API](https://python-cwt.readthedocs.io/en/stable/api.html) in the examples are built
  on top of [COSE API](https://python-cwt.readthedocs.io/en/stable/api.html#cwt.COSE).

  See [API Reference](https://python-cwt.readthedocs.io/en/stable/api.html).



  Create a MACed CWT with `HS256`, verify and decode it as follows:

  ```py
  import cwt
  from cwt import Claims, COSEKey

  try:
      key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")
      token = cwt.encode(
          {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, key
      )
      decoded = cwt.decode(token, key)

      
      readable = Claims.new(decoded)
      assert readable.iss == "coaps://as.example"
      assert readable.sub == "dajiaji"
      assert readable.cti == "123"
      
      
      

  except Exception as err:
      
      
      
      
      
      
      print(err)
  ```

  A raw CWT structure (Dict[int, Any]) can also be used as follows:

  ```py
  import cwt
  from cwt import COSEKey, CWTClaims

  key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")
  token = cwt.encode(
      {
          CWTClaims.ISS: "coaps://as.example",
          CWTClaims.SUB: "dajiaji",
          CWTClaims.CTI: b"123",
      },
      key,
  )
  decoded = cwt.decode(token, key)
  ```

  MAC algorithms other than `HS256` are listed in
  [Supported COSE Algorithms](https://python-cwt.readthedocs.io/en/stable/algorithms.html).



  Create an `Ed25519` key pair:

  ```sh
  $ openssl genpkey -algorithm ed25519 -out private_key.pem
  $ openssl pkey -in private_key.pem -pubout -out public_key.pem
  ```

  Create a Signed CWT with `Ed25519`, verify and decode it with the key pair as follows:

  ```py
  import cwt
  from cwt import COSEKey


  with open("./private_key.pem") as key_file:
      private_key = COSEKey.from_pem(key_file.read(), kid="01")
  token = cwt.encode(
      {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, private_key
  )


  with open("./public_key.pem") as key_file:
      public_key = COSEKey.from_pem(key_file.read(), kid="01")
  decoded = cwt.decode(token, public_key)
  ```

  JWKs can also be used instead of the PEM-formatted keys as follows:

  ```py
  import cwt
  from cwt import COSEKey


  private_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "key_ops": ["sign"],
          "alg": "EdDSA",
          "crv": "Ed25519",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
          "d": "L8JS08VsFZoZxGa9JvzYmCWOwg7zaKcei3KZmYsj7dc",
      }
  )
  token = cwt.encode(
      {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, private_key
  )


  public_key = COSEKey.from_jwk(
      {
          "kid": "01",
          "kty": "OKP",
          "key_ops": ["verify"],
          "crv": "Ed25519",
          "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
      }
  )
  decoded = cwt.decode(token, public_key)
  ```

  Signing algorithms other than `Ed25519` are listed in
  [Supported COSE Algorithms](https://python-cwt.readthedocs.io/en/stable/algorithms.html).



  Create an encrypted CWT with `ChaCha20/Poly1305` and decrypt it as follows:

  ```py
  import cwt
  from cwt import COSEKey

  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="01")
  token = cwt.encode(
      {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, enc_key
  )
  decoded = cwt.decode(token, enc_key)
  ```

  Encryption algorithms other than `ChaCha20/Poly1305` are listed in
  [Supported COSE Algorithms](https://python-cwt.readthedocs.io/en/stable/algorithms.html).



  Create a signed CWT and encrypt it, and then decrypt and verify the nested CWT as follows.

  ```py
  import cwt
  from cwt import COSEKey


  enc_key = COSEKey.generate_symmetric_key(alg="ChaCha20/Poly1305", kid="enc-01")


  with open("./private_key.pem") as key_file:
      private_key = COSEKey.from_pem(key_file.read(), kid="sig-01")
  token = cwt.encode(
      {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, private_key
  )


  nested = cwt.encode(token, enc_key)


  with open("./public_key.pem") as key_file:
      public_key = COSEKey.from_pem(key_file.read(), kid="sig-01")
  decoded = cwt.decode(nested, [enc_key, public_key])
  ```



  The `cwt` in `cwt.encode()` and `cwt.decode()` above is a global `CWT` class instance created
  with default settings in advance. The default settings are as follows:
  - `expires_in`: `3600` seconds. This is the default lifetime in seconds of CWTs.
  - `leeway`: `60` seconds. This is the default leeway in seconds for validating `exp` and `nbf`.

  If you want to change the settings, you can create your own `CWT` class instance as follows:

  ```py
  from cwt import COSEKey, CWT

  key = COSEKey.generate_symmetric_key(alg="HS256", kid="01")
  mycwt = CWT.new(expires_in=3600 * 24, leeway=10)
  token = mycwt.encode({"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, key)
  decoded = mycwt.decode(token, key)
  ```



  You can use your own claims as follows:

  Note that such user-defined claim's key should be less than -65536.

  ```py
  import cwt
  from cwt import COSEKey, CWTClaims


  with open("./private_key.pem") as key_file:
      private_key = COSEKey.from_pem(key_file.read(), kid="01")
  token = cwt.encode(
      {
          CWTClaims.ISS: "coaps://as.example",  # iss
          CWTClaims.SUB: "dajiaji",  # sub
          CWTClaims.CTI: b"123",  # cti
          -70001: "foo",
          -70002: ["bar"],
          -70003: {"baz": "qux"},
          -70004: 123,
      },
      private_key,
  )


  with open("./public_key.pem") as key_file:
      public_key = COSEKey.from_pem(key_file.read(), kid="01")
  raw = cwt.decode(token, public_key)
  assert raw[-70001] == "foo"
  assert raw[-70002][0] == "bar"
  assert raw[-70003]["baz"] == "qux"
  assert raw[-70004] == 123

  readable = Claims.new(raw)
  assert readable.get(-70001) == "foo"
  assert readable.get(-70002)[0] == "bar"
  assert readable.get(-70003)["baz"] == "qux"
  assert readable.get(-70004) == 123
  ```

  User-defined claims can also be used with JSON-based claims as follows:

  ```py
  import cwt
  from cwt import Claims, COSEKey

  with open("./private_key.pem") as key_file:
      private_key = COSEKey.from_pem(key_file.read(), kid="01")

  my_claim_names = {
      "ext_1": -70001,
      "ext_2": -70002,
      "ext_3": -70003,
      "ext_4": -70004,
  }

  set_private_claim_names(my_claim_names)
  token = cwt.encode(
      {
          "iss": "coaps://as.example",
          "sub": "dajiaji",
          "cti": b"123",
          "ext_1": "foo",
          "ext_2": ["bar"],
          "ext_3": {"baz": "qux"},
          "ext_4": 123,
      },
      private_key,
  )

  with open("./public_key.pem") as key_file:
      public_key = COSEKey.from_pem(key_file.read(), kid="01")

  raw = cwt.decode(token, public_key)
  readable = Claims.new(
      raw,
      private_claims_names=my_claim_names,
  )
  assert readable.get("ext_1") == "foo"
  assert readable.get("ext_2")[0] == "bar"
  assert readable.get("ext_3")["baz"] == "qux"
  assert readable.get("ext_4") == 123
  ```




  Python CWT supports [CWT Claims in COSE Headers](https://www.ietf.org/archive/id/draft-ietf-cose-cwt-claims-in-headers-06.html)  experimentally.

  If a CWT message has a CWT Claims header parameter in its protected header, `cwt.decode()` checks whether the values of the claims included in that parameter match the values of the corresponding claims in the payload. If they do not match, `VerifyError` is raised.

  ```py
  from cwt import COSE, COSEHeaders, COSEKey, CWT, CWTClaims

  enc_key = COSEKey.from_symmetric_key(alg="A128GCM", kid="01")


  sender = COSE.new(alg_auto_inclusion=True, kid_auto_inclusion=True)
  payload = cbor2.dumps(
      {
          CWTClaims.ISS: "coap://as.example.com",
          CWTClaims.SUB: "erikw",
          CWTClaims.AUD: "coap://light.example.com",
          CWTClaims.EXP: now() + 3600,
          CWTClaims.NBF: now(),
          CWTClaims.IAT: now(),
          CWTClaims.CTI: bytes.fromhex("0b71"),
      },
  )
  protected = {
      COSEHeaders.CWT_CLAIMS: {  # 13
          CWTClaims.ISS: "coap://as.example.com",
      }
  }
  token = sender.encode(payload, enc_key, protected)


  recipient = CWT.new()

  decoded = recipient.decode(token, enc_key)
  assert decoded[CWTClaims.ISS] == "coap://as.example.com"
  assert decoded[CWTClaims.SUB] == "erikw"
  ```



  Python CWT supports [Proof-of-Possession Key Semantics for CBOR Web Tokens (CWTs)](https://tools.ietf.org/html/rfc8747).
  A CWT can include a PoP key as follows:

  On the issuer side:

  ```py
  import cwt
  from cwt import COSEKey


  with open("./private_key_of_issuer.pem") as key_file:
      private_key = COSEKey.from_pem(key_file.read(), kid="issuer-01")


  token = cwt.encode(
      {
          "iss": "coaps://as.example",
          "sub": "dajiaji",
          "cti": "123",
          "cnf": {
              "jwk": {  # Provided by the CWT presenter.
                  "kty": "OKP",
                  "use": "sig",
                  "crv": "Ed25519",
                  "kid": "presenter-01",
                  "x": "2E6dX83gqD_D0eAmqnaHe1TC1xuld6iAKXfw2OVATr0",
                  "alg": "EdDSA",
              },
          },
      },
      private_key,
  )


  ```

  On the CWT presenter side:

  ```py
  import cwt
  from cwt import COSEKey


  with open("./private_pop_key.pem") as key_file:
      pop_key_private = COSEKey.from_pem(key_file.read(), kid="presenter-01")


  msg = b"could-you-sign-this-message?"  # Provided by recipient.


  sig = pop_key_private.sign(msg)


  ```

  On the CWT recipient side:

  ```py
  import cwt
  from cwt import Claims, COSEKey


  with open("./public_key_of_issuer.pem") as key_file:
      public_key = COSEKey.from_pem(key_file.read(), kid="issuer-01")


  raw = cwt.decode(token, public_key)
  decoded = Claims.new(raw)


  extracted_pop_key = COSEKey.new(decoded.cnf)  # = raw[8][1]



  extracted_pop_key.verify(msg, sig)
  ```

  [Usage Examples](https://python-cwt.readthedocs.io/en/stable/cwt_usage.html#cwt-with-pop-key)
  shows other examples which use other confirmation methods for PoP keys.



  Python CWT supports the case of using an arbitrary private CA as a root of trust.
  In this case, a COSE message sender needs to specify the trust relationship chaining up to the root CA by using `x5chain` header parameter.
  On the other hand, a COSE message receiver needs to specify trusted root CAs by using `ca_certs` parameter of CWT/COSE constructor (`CWT.new()` or `COSE.new()`).

  ```py
  import cwt
  from cwt import Claims, COSEKey


  with open("./private_key_of_cert.pem") as f:
      private_key = COSEKey.from_pem(f.read(), kid="01")

  token = cwt.encode(
      {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, private_key
  )


  public_key = COSEKey.from_jwk(
      {
          "kty": "EC",
          "use": "sig",
          "crv": "P-256",
          "kid": "P-256-01",
          "x": "oONCv1QoiajIbcW21Dqy6EnGvBTuF26GU7dy6JzOfXk",
          "y": "sl6k77K0TS36FW-TyEGLHY14ovZfdZ9DZWsbA8BTHGc",
          "x5c": [
              
              "MIIClDCCAXygAwIBAgIBBDANBgkqhkiG9w0BAQsFADBmMQswCQYDVQQGEwJKUDEOMAwGA1UECAwFVG9reW8xEDAOBgNVBAoMB2RhamlhamkxEzARBgNVBAMMCnB5dGhvbi1jd3QxIDAeBgkqhkiG9w0BCQEWEWRhamlhamlAZ21haWwuY29tMB4XDTIxMTAwMzEzMDE1MFoXDTMxMTAwMTEzMDE1MFowZDELMAkGA1UEBhMCSlAxDjAMBgNVBAgMBVRva3lvMQ0wCwYDVQQKDAR0ZXN0MRUwEwYDVQQDDAx0ZXN0LmV4YW1wbGUxHzAdBgkqhkiG9w0BCQEWEHRlc3RAZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASg40K_VCiJqMhtxbbUOrLoSca8FO4XboZTt3LonM59ebJepO-ytE0t-hVvk8hBix2NeKL2X3WfQ2VrGwPAUxxnoxowGDAJBgNVHRMEAjAAMAsGA1UdDwQEAwIE8DANBgkqhkiG9w0BAQsFAAOCAQEAZFfvFbaDk_DmG2cPGTwqwnFok1QnH2Tzkjk7p4vs1ycWzEDltkhyzcJxTSHoQGdykf7fG8NCrEqfi1G3hOyAtGxVIVcqsI-KIJCESp43zrNz5HsbwEY8l5rvcwohKGlE_idIFt5IuDTv7vsg_FaCIDeruw0NrXAACnLTwksawsxaCvtY12U0wsI2aC2Sb6V3HL-OLgcN6ZWzZ054L88JllckYnqJB8wCVBzzX2K2sZH3yeS39oRWZOVG6fwXsX4k0fHFx-Fn6KlrBU15pbjMLMn0ow0X3Y8e7FOgfkkph-N7e2SxceXNjrLiumOdclPm9yGSWoGsOJdId53dPvqAsQ",
              
              "MIIDrzCCApegAwIBAgIUIK_CYzdq4BLLVXqSclNBgXy6mgswDQYJKoZIhvcNAQELBQAwZjELMAkGA1UEBhMCSlAxDjAMBgNVBAgMBVRva3lvMRAwDgYDVQQKDAdkYWppYWppMRMwEQYDVQQDDApweXRob24tY3d0MSAwHgYJKoZIhvcNAQkBFhFkYWppYWppQGdtYWlsLmNvbTAgFw0yMTEwMDIyMzU0NTZaGA8yMDcxMDkyMDIzNTQ1NlowZjELMAkGA1UEBhMCSlAxDjAMBgNVBAgMBVRva3lvMRAwDgYDVQQKDAdkYWppYWppMRMwEQYDVQQDDApweXRob24tY3d0MSAwHgYJKoZIhvcNAQkBFhFkYWppYWppQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANFg4sw-uPWbPBbkJuohXc89O0gaqG1H2i1wzxxka32XNKIdwrxOJvsB2eALo3q7dTqLKCgzrjdd5N07gi0KzqjoIXIXqKpV5tm0fP5gCzEOWgxySCfBJOJyyvO6WvYXdvukEBnL-48D8RSjQH9fQEju5RG0taFZE-0nQ7n3P0J-Q-OfBUEoRiHvCd8oUx0s-fBpKdfhMAbD1sGAQ9CokUFeWc49em8inNqia5xljBtSYo6_2Zx9eb7B53wvBC0EmtS4SRyksR2emlr6GxMj_EZW7hcTfZCM4V2JYXliuAEdxA0sB7q-WqLg4OvltBQxCBgTTEXRCzxj3XXZy7QyUacCAwEAAaNTMFEwHQYDVR0OBBYEFA9id2cL_Chjv6liRN3HD849TARsMB8GA1UdIwQYMBaAFA9id2cL_Chjv6liRN3HD849TARsMA8GA1UdEwEB_wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAArIej5eJN1OmD3l3ef9QzosCxKThNwqNY55CoSSC3IRl-IAXy9Lvx7cgiliwBgCv99RbXZ1ZnptTHC_1kzMzPhPg9pGKDowFP-rywaB9-NTuHTWQ4hkKDsru5dpf75ILNI5PTUi1iiBM7TdgSerpEVroUWZiOpGAdlKkmE1h4gkR6eQY9Q0IvVXwagy_PPoQ1XO1i5Hyg3aXeDZBgkE7AuW9uxtYQHzg8JG2TNko_yp497yf_Ew4t6KzGDhSa8L1euMPtclALDWFhgl6WmYsHOqAOsyZOLwpsifWa533wI9mtTvLEg8TFKMOdU0sbAoQSbrrI9m4QS7mzDLchngj3E",
          ],
          "alg": "ES256",
      }
  )


  decoder = CWT.new(ca_certs="/path/to/cacerts.pem")
  decoded = decoder.decode(token, public_key)
  assert 1 in decoded and decoded[1] == "coaps://as.example"
  ```



  Python CWT supports [Electronic Health Certificate Specification](https://github.com/ehn-dcc-development/hcert-spec/blob/main/hcert_spec.md)
  and [EUDCC (EU Digital COVID Certificate)](https://ec.europa.eu/info/live-work-travel-eu/coronavirus-response/safe-covid-19-vaccines-europeans/eu-digital-covid-certificate_en) compliant with [Technical Specifications for Digital Green Certificates Volume 1](https://ec.europa.eu/health/sites/default/files/ehealth/docs/digital-green-certificates_v1_en.pdf)

  A following example shows how to verify an EUDCC:

  ```py
  import cwt
  from cwt import load_pem_hcert_dsc




  dsc = "-----BEGIN CERTIFICATE-----\nMIIBvTCCAWOgAwIBAgIKAXk8i88OleLsuTAKBggqhkjOPQQDAjA2MRYwFAYDVQQDDA1BVCBER0MgQ1NDQSAxMQswCQYDVQQGEwJBVDEPMA0GA1UECgwGQk1TR1BLMB4XDTIxMDUwNTEyNDEwNloXDTIzMDUwNTEyNDEwNlowPTERMA8GA1UEAwwIQVQgRFNDIDExCzAJBgNVBAYTAkFUMQ8wDQYDVQQKDAZCTVNHUEsxCjAIBgNVBAUTATEwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASt1Vz1rRuW1HqObUE9MDe7RzIk1gq4XW5GTyHuHTj5cFEn2Rge37+hINfCZZcozpwQKdyaporPUP1TE7UWl0F3o1IwUDAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0OBBYEFO49y1ISb6cvXshLcp8UUp9VoGLQMB8GA1UdIwQYMBaAFP7JKEOflGEvef2iMdtopsetwGGeMAoGCCqGSM49BAMCA0gAMEUCIQDG2opotWG8tJXN84ZZqT6wUBz9KF8D+z9NukYvnUEQ3QIgdBLFSTSiDt0UJaDF6St2bkUQuVHW6fQbONd731/M4nc=\n-----END CERTIFICATE-----"



  eudcc = bytes.fromhex(
      "d2844da20448d919375fc1e7b6b20126a0590133a4041a61817ca0061a60942ea001624154390103a101a4617681aa62646e01626d616d4f52472d3130303033303231356276706a313131393334393030376264746a323032312d30322d313862636f624154626369783155524e3a555643493a30313a41543a31303830373834334639344145453045453530393346424332353442443831332342626d706c45552f312f32302f31353238626973781b4d696e6973747279206f66204865616c74682c20417573747269616273640262746769383430353339303036636e616da463666e74754d5553544552465241553c474f455353494e47455262666e754d7573746572667261752d47c3b6c39f696e67657263676e74684741425249454c4562676e684761627269656c656376657265312e302e3063646f626a313939382d30322d323658405812fce67cb84c3911d78e3f61f890d0c80eb9675806aebed66aa2d0d0c91d1fc98d7bcb80bf00e181806a9502e11b071325901bd0d2c1b6438747b8cc50f521"
  )

  public_key = load_pem_hcert_dsc(dsc)
  decoded = cwt.decode(eudcc, keys=[public_key])
  claims = Claims.new(decoded)

























  ```



  See [Documentation](https://python-cwt.readthedocs.io/en/stable/api.html).



  See [Documentation](https://python-cwt.readthedocs.io/en/stable/claims.html).



  See [Documentation](https://python-cwt.readthedocs.io/en/stable/algorithms.html).



  Python CWT is (partially) compliant with following specifications:

  - [RFC9052: CBOR Object Signing and Encryption (COSE): Structures and Process](https://www.rfc-editor.org/rfc/rfc9052.html)
  - [RFC9053: CBOR Object Signing and Encryption (COSE): Initial Algorithms](https://www.rfc-editor.org/rfc/rfc9053.html)
  - [RFC9338: CBOR Object Signing and Encryption (COSE): Countersignatures](https://www.rfc-editor.org/rfc/rfc9338.html) - experimental
  - [RFC8812: COSE and JOSE Registrations for Web Authentication (WebAuthn) Algorithms](https://tools.ietf.org/html/rfc8812)
  - [RFC8747: Proof-of-Possession Key Semantics for CBOR Web Tokens (CWTs)](https://tools.ietf.org/html/rfc8747)
  - [RFC8392: CWT (CBOR Web Token)](https://tools.ietf.org/html/rfc8392)
  - [RFC8230: Using RSA Algorithms with COSE Messages](https://tools.ietf.org/html/rfc8230)
  - [RFC9459: CBOR Object Signing and Encryption (COSE): AES-CTR and AES-CBC](https://www.rfc-editor.org/rfc/rfc9459.html) - experimental
  - [RFC8152: CBOR Object Signing and Encryption (COSE)](https://tools.ietf.org/html/rfc8152)
  - [draft-07: Use of HPKE with COSE](https://www.ietf.org/archive/id/draft-ietf-cose-hpke-07.html) - experimental
  - [draft-06: CWT Claims in COSE Headers](https://www.ietf.org/archive/id/draft-ietf-cose-cwt-claims-in-headers-06.html) - experimental
  - [Electronic Health Certificate Specification](https://github.com/ehn-dcc-development/hcert-spec/blob/main/hcert_spec.md)
  - [Technical Specifications for Digital Green Certificates Volume 1](https://ec.europa.eu/health/sites/default/files/ehealth/docs/digital-green-certificates_v1_en.pdf)



  You can run tests from the project root after cloning with:

  ```sh
  $ tox
  ```



  We welcome all kind of contributions, filing issues, suggesting new features or sending PRs.


pkgId: 2943e515062cc1cdd183c382602ae133e5979c08557627731bda89831c067d8c
name: python-cx-Freeze
arch: src
version: 7.2.1
epoch: 0
release: 1
summary: Create standalone executables from Python scripts
url: https://pypi.org/project/cx-Freeze/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cx-Freeze-7.2.1-1.src.rpm
checksum_type: sha256
description:
  **cx\_Freeze** creates standalone executables from Python scripts, with the
  same performance, is cross-platform and should work on any platform that Python
  itself works on.



  [![PyPI version](https://img.shields.io/pypi/v/cx_Freeze)](https://pypi.org/project/cx-freeze/)
  [![PyPi Downloads](https://img.shields.io/pypi/dm/cx_Freeze)](https://pypistats.org/packages/cx-freeze)
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cx_freeze.svg)](https://anaconda.org/conda-forge/cx_freeze)
  [![Conda Downloads](https://anaconda.org/conda-forge/cx_freeze/badges/downloads.svg)](https://anaconda.org/conda-forge/cx_freeze)
  [![Python](https://img.shields.io/pypi/pyversions/cx-freeze)](https://www.python.org/)
  [![Actions status](https://github.com/marcelotduarte/cx_Freeze/workflows/CI/badge.svg)](https://github.com/marcelotduarte/cx_Freeze/actions/workflows/ci.yml)
  [![CodeQL](https://github.com/marcelotduarte/cx_Freeze/workflows/CodeQL/badge.svg)](https://github.com/marcelotduarte/cx_Freeze/actions/workflows/codeql.yml)
  [![Coverage](https://img.shields.io/codecov/c/github/marcelotduarte/cx_Freeze/main.svg?logo=codecov&logoColor=white)](https://codecov.io/gh/marcelotduarte/cx_Freeze)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
  [![Documentation Status](https://readthedocs.org/projects/cx-freeze/badge/?version=stable)](https://cx-freeze.readthedocs.io/en/stable/?badge=stable)



  In a virtual environment, install by issuing the command:

  ```
  pip install --upgrade cx_Freeze
  ```

  To install the latest development build:

  ```
  pip install --force --no-cache --pre --extra-index-url https://marcelotduarte.github.io/packages/ cx_Freeze
  ```

  Please check the
  [installation](https://cx-freeze.readthedocs.io/en/latest/installation.html)
  for more information and how to install in other environments such as pipenv,
  conda-forge, etc.



  The official documentation is available
  [here](https://cx-freeze.readthedocs.io).

  If you need help you can also ask on the
  [discussion](https://github.com/marcelotduarte/cx_Freeze/discussions) channel.


  - Improved bdist_dmg
  - Add license for msi (bdist_msi)
  - Minor improvements in bdist_appimage
  - Drop rpm2_mode in bdist_rpm
  - Use an optimized mode as default for pip installations of selected packages
  - hooks: support numpy 2.0, rasterio, multiprocess (a multiprocessing fork), etc
  - Regression fixes, bug fixes and improvements


  - Added new option --zip-filename in build_exe
  - Bug fixes and improvements


  - Added support for [pyproject.toml](https://cx-freeze.readthedocs.io/en/stable/setup_script.html)
  - Create Linux AppImage format: [bdist_appimage](https://cx-freeze.readthedocs.io/en/stable/bdist_appimage.html)
  - Create an DEB distribution: [bdist_deb](https://cx-freeze.readthedocs.io/en/stable/bdist_deb.html)
  - Improved bdist_mac
  - New and updated hooks, including support for QtWebengine on macOS
  - Python 3.12 support.
  - Improved tests and coverage ( >80% ).
  - Bug fixes and improvements



  cx\_Freeze uses a license derived from the
  [Python Software Foundation License](https://www.python.org/psf/license).
  You can read the cx\_Freeze license in the
  [documentation](https://cx-freeze.readthedocs.io/en/stable/license.html)
  or in the [source repository](LICENSE.md).

rpm_license:
  # Licensing  -   Copyright © 2020-2024, Marcelo Duarte. -   Copyright © 2007-2019, Anthony Tuininga. -   Copyright © 2001-2006, Computronix (Canada) Ltd., Edmonton, Alberta, Canada. -   All rights reserved.  NOTE: This license is derived from the Python Software Foundation License which can be found at <https://docs.python.org/3/license.html#psf-license-agreement-for-python-release>  ## License for cx_Freeze  1.  This LICENSE AGREEMENT is between the copyright holders and the Individual or Organization (\"Licensee\") accessing and otherwise using cx_Freeze software in source or binary form and its associated documentation. 2.  Subject to the terms and conditions of this License Agreement, the copyright holders hereby grant Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use cx_Freeze alone or in any derivative version, provided, however, that this License Agreement and this notice of copyright are retained in cx_Freeze alone or in any derivative version prepared by Licensee. 3.  In the event Licensee prepares a derivative work that is based on or incorporates cx_Freeze or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to cx_Freeze. 4.  The copyright holders are making cx_Freeze available to Licensee on an \"AS IS\" basis. THE COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, THE COPYRIGHT HOLDERS MAKE NO AND DISCLAIM ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF CX_FREEZE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5.  THE COPYRIGHT HOLDERS SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF CX_FREEZE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING CX_FREEZE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6.  This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7.  Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between the copyright holders and Licensee. This License Agreement does not grant permission to use copyright holder\'s trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8.  By copying, installing or otherwise using cx_Freeze, Licensee agrees to be bound by the terms and conditions of this License Agreement.  Computronix® is a registered trademark of Computronix (Canada) Ltd.


pkgId: 4ab1a11629da0f861f3b9c29f228dbe28824f6650a95df341fead5a155b50ae0
name: python-cx-Freeze
arch: src
version: 7.2.6
epoch: 0
release: 1
summary: Create standalone executables from Python scripts
url: https://pypi.org/project/cx-Freeze/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cx-Freeze-7.2.6-1.src.rpm
checksum_type: sha256
description:
  **cx\_Freeze** creates standalone executables from Python scripts, with the
  same performance, is cross-platform and should work on any platform that Python
  itself works on.



  [![PyPI version](https://img.shields.io/pypi/v/cx_Freeze)](https://pypi.org/project/cx-freeze/)
  [![PyPi Downloads](https://img.shields.io/pypi/dm/cx_Freeze)](https://pypistats.org/packages/cx-freeze)
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cx_freeze.svg)](https://anaconda.org/conda-forge/cx_freeze)
  [![Conda Downloads](https://anaconda.org/conda-forge/cx_freeze/badges/downloads.svg)](https://anaconda.org/conda-forge/cx_freeze)
  [![Python](https://img.shields.io/pypi/pyversions/cx-freeze)](https://www.python.org/)
  [![Actions status](https://github.com/marcelotduarte/cx_Freeze/workflows/CI/badge.svg)](https://github.com/marcelotduarte/cx_Freeze/actions/workflows/ci.yml)
  [![CodeQL](https://github.com/marcelotduarte/cx_Freeze/workflows/CodeQL/badge.svg)](https://github.com/marcelotduarte/cx_Freeze/actions/workflows/codeql.yml)
  [![Coverage](https://img.shields.io/codecov/c/github/marcelotduarte/cx_Freeze/main.svg?logo=codecov&logoColor=white)](https://codecov.io/gh/marcelotduarte/cx_Freeze)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
  [![Documentation Status](https://readthedocs.org/projects/cx-freeze/badge/?version=stable)](https://cx-freeze.readthedocs.io/en/stable/?badge=stable)



  In a virtual environment, install by issuing the command:

  ```
  pip install --upgrade cx_Freeze
  ```

  To install the latest development build:

  ```
  pip uninstall cx_Freeze
  pip install --extra-index-url https://test.pypi.org/simple/ cx_Freeze --pre --no-cache
  ```

  Please check the
  [installation](https://cx-freeze.readthedocs.io/en/latest/installation.html)
  for more information and how to install in other environments.



  The official documentation is available
  [here](https://cx-freeze.readthedocs.io).

  If you need help you can also ask on the
  [discussion](https://github.com/marcelotduarte/cx_Freeze/discussions) channel.


  - Improved bdist_dmg
  - Add license for msi (bdist_msi)
  - Minor improvements in bdist_appimage
  - Drop rpm2_mode in bdist_rpm
  - Use an optimized mode as default for pip installations of selected packages
  - hooks: support numpy 2.0, rasterio, multiprocess (a multiprocessing fork), etc
  - Regression fixes, bug fixes and improvements


  - Added new option --zip-filename in build_exe
  - Bug fixes and improvements


  - Added support for [pyproject.toml](https://cx-freeze.readthedocs.io/en/stable/setup_script.html)
  - Create Linux AppImage format: [bdist_appimage](https://cx-freeze.readthedocs.io/en/stable/bdist_appimage.html)
  - Create an DEB distribution: [bdist_deb](https://cx-freeze.readthedocs.io/en/stable/bdist_deb.html)
  - Improved bdist_mac
  - New and updated hooks, including support for QtWebengine on macOS
  - Python 3.12 support.
  - Improved tests and coverage ( >80% ).
  - Bug fixes and improvements



  cx\_Freeze uses a license derived from the
  [Python Software Foundation License](https://www.python.org/psf/license).
  You can read the cx\_Freeze license in the
  [documentation](https://cx-freeze.readthedocs.io/en/stable/license.html)
  or in the [source repository](LICENSE.md).

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


pkgId: 35c37ad9eb0fab33bda3ee524ba5570a7570f1205aef15729308e28af18a778d
name: python-cx-Logging
arch: src
version: 3.2.0
epoch: 0
release: 1
summary: Python and C interfaces for logging
url: https://github.com/anthony-tuininga/cx_Logging
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cx-Logging-3.2.0-1.src.rpm
checksum_type: sha256
description:
  Open Source Python Utility - cx_Logging

  cx_Logging is a Python extension module which operates in a fashion similar to
  the logging module that ships with Python 2.3 and higher. It also has a C
  interface which allows applications to perform logging independently of Python.

  This project is being released to the public since other projects that are
  available publicly depend on this module.

  Please see the included documentation for additional information. Note that
  the documentation is a work in progress. It is currently only suitable as
  reference material but I intend to supplement this documentation over time.


pkgId: 1f3c8ba5caf65298b9323d61c36a591163d46dfb6c26527a6246f68c6e53228f
name: python-cxsystem2
arch: src
version: 2.1.2.0
epoch: 0
release: 1
summary: A cerebral cortex simulation framework
url: https://github.com/VisualNeuroscience-UH/CxSystem2
rpm_license: GPL v3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cxsystem2-2.1.2.0-1.src.rpm
checksum_type: sha256
description:
  <a href="https://github.com/VisualNeuroscience-UH/CxSystem2/blob/master/README.md"><img src="https://github.com/VisualNeuroscience-UH/CxSystem2/blob/master/data_config/icon/cxsystem_logo.png?sanitize=true" width="50%"></a>


  > Warning: CxSystem2 BUI is developed for using in a local environment and should not be installed on a publicly accessible server unless extra security measures are added on top of it

  [![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/VisualNeuroscience-UH/CxSystem2/blob/master/LICENSE)
  [![Github Issues](http://img.shields.io/github/issues/VisualNeuroscience-UH/CxSystem2/bug.svg)](https://github.com/VisualNeuroscience-UH/CxSystem2/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
  [![Github Issues](http://img.shields.io/github/issues/VisualNeuroscience-UH/CxSystem2/enhancement.svg)](https://github.com/VisualNeuroscience-UH/CxSystem2/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement)
  [![Github Issues](http://img.shields.io/github/issues-pr/VisualNeuroscience-UH/CxSystem2.svg)](https://github.com/VisualNeuroscience-UH/CxSystem2/pulls)
  [![Documentation Status](https://readthedocs.org/projects/cxsystem2/badge/?version=latest)](https://cxsystem2.readthedocs.io/en/latest/?badge=latest)
  [![PyPI version](https://badge.fury.io/py/cxsystem2.svg)](https://badge.fury.io/py/cxsystem2)
  [![Build Status](https://travis-ci.org/VisualNeuroscience-UH/CxSystem2.svg?branch=master)](https://travis-ci.org/VisualNeuroscience-UH/CxSystem2)



  - [Synopsis](#synopsis)
  - [Installation](#installation)
      * [Windows](#windows)
      * [Linux/Mac](#linuxmac)
      * [Development](#development)
  - [Interfaces](#interfaces)
      * [Browser User Interface (BUI)](#browser-user-interface-bui)
      * [Command Line Interface (CLI)](#command-line-interface-cli)
  - [Documentation](#documentation)
  - [Citation](#citation)
  - [Support](#support)
  - [Team](#team)
  - [License](#license)



  CxSystem is a cerebral cortex simulation framework, which operates on personal computers. We have tested the simulation software with a simplified version of a comprehensive cortical microcircuit model [1], which is available as configuration file.

  The CxSystem aims at easy testing and buildup of diverse models at single cell resolution.  Implemented on the top of the Python-based [Brian2 simulator](https://github.com/brian-team/brian2), CxSystem supports the main goal of Brian, i.e. minimizing development time, by providing the user with a simplified interface.

  The preliminary version of this software has been developed at Aalto University 2012-2015 [2], and the full version at the Hospital District of Helsinki and Uusimaa and University of Helsinki 2013-2017. The software is distributed under the terms of the GNU General Public License, Copyright 2017 Vafa Andalibi, Henri Hokkanen and Simo Vanni.




  We highly recommend installing `CxSystem2` on a virtual environment. Use the following commands to install a Python3 virtual environment and install CxSystem:



   Make sure you have python 3.5 or above. To create activate a `venv` in windows at `~/CX2` (you can deactivate the environment with the command `deactivate` and reactivate later by running the second command):

  ```shell
  C:\> python --version
  Python 3.7.4
  C:\> python3 -m venv %userprofile%\CX2
  C:\> %userprofile%\CX2\Scripts\activate
  (CX2) C:\> pip install --upgrade setuptools
  (CX2) C:\> pip install -U cxsystem2
  ```

  Moreover, to use the C++ standalone device on Windows, install the [Visual C++ Build Tools 2015](https://www.microsoft.com/en-us/download/details.aspx?id=48159).



  Make sure you have python 3.5 or above. To create activate a `venv` in Linux/Mac at `~/CX2` (you can deactivate the environment with the command `deactivate` and reactivate later by running the second command):

  ```shell
  $ python --version
  Python 3.7.4
  $ python3 -m venv ~/CX2
  $ source ~/CX2/bin/activate
  (CX2) $ pip install --upgrade setuptools
  (CX2) $ pip install -U cxsystem2
  ```



  To develop `CxSystem2`, after cloning the repository install it with the following commands:

  ```shell
  (CX2) $ git clone https://github.com/VisualNeuroscience-UH/CxSystem2
  (CX2) $ cd CxSystem2
  (CX2) $ pip install --upgrade setuptools
  (CX2) $ pip install -r requirements.txt
  (CX2) $ pip install -U -e .
  ```

  With this method any change to the code will be reflected on the package immediately.



  `CxSystem2` comes with two interfaces:



  CxSystem's BUI is built to provide users with an interactive environment for changing the parameters for simulations.



  Beside the BUI, Some of the main functionalities of the `CxSystem2` are available in terminal, including the BUI itself. All of the following commands have built-in documentations available with `-h` or `--help` flags:



  This command (all in lower letters and case sensitive) can be used to run a simulation locally using anatomy and physiology configuration files.



  This command will run the `CxSystem2` BUI django server.



  CxSystem2 supports `csv` and `json` for importing/exporting configuration files. To convert the configuration files, use the `cxconfig` and pass the path to the configuration file path as its argument. This command recognizes the file type and convert it to the alternative extension.



  Use `cxcluster` to download the results from the cluster. `cxcluster` takes in one argument which is the path to the metadata file saved as a result of cluster-run submission. For convenience, at the end of a cluster-run job submission, `CxSystem2` prints the command that should be run to retrieve the result.



  This command can be used to visualize the result of the simulation using `visimpl` visualizer. ViSimpl binaries are available at the Modeling and Virtual Reality Group [download page](https://vg-lab.es/visimpl/) at  Universidad Rey Juan Carlos and Universidad Politécnica de Madrid. This command can also be used to generate a pdf of rasterplots from a set of simulations.





  You can access the documentation of the CxSystem2 at [cxsystem2.readthedocs.io](https://cxsystem2.readthedocs.io).



  If you use CxSystem2 for your work, we kindly ask you to cite any of our related articles:

  ```
  Andalibi, V., Hokkanen, H., Vanni, S., Controlling complexity of cerebral cortex simulations—I: CxSystem, a flexible cortical simulation framework, 2019, Neural computation
  ```
  <br>

  ```
  Hokkanen, H., Andalibi, V., Vanni, S., Controlling complexity of cerebral cortex simulations—II: Streamlined microcircuits, 2019, Neural computation
  ```



  You are encouraged to use <a href="https://github.com/VisualNeuroscience-UH/CxSystem2/issues" target="_blank">Github's Issues</a> to report bugs, or request enhancements or new features.



  - [Vafa Andalibi](https://www.andalibi.me)
  - [Henri Hokkanen](https://github.com/henhok)
  - [Simo Vanni](https://scholar.google.fi/citations?user=nRiUf30AAAAJ&hl=en)



  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

  - **[GPL-3-Clause](https://www.gnu.org/licenses/gpl-3.0.en.html)**
  - Copyright 2019 © <a href="http://www.helsinki.fi/visualneuroscience/" target="_blank">HUS Helsinki University Hospital</a>.

  ***
  <sub>[1] Markram, H., Muller, E., Ramaswamy, S., Reimann, M. W., Abdellah, M., Sanchez, C. A., … Schürmann, F. (2015). Reconstruction and Simulation of Neocortical Microcircuitry. Cell, 163(2), 456–492. http://doi.org/10.1016/j.cell.2015.09.029</sub>

  <sub>[2]Heikkinen, H., Sharifian, F., Vigário, R., & Vanni, S. (2015). Feedback to distal dendrites links fMRI signals to neural receptive fields in a spiking network model of the visual cortex. Journal of Neurophysiology, 114(1), 57–69. http://doi.org/10.1152/jn.00169.2015</sub>


pkgId: f0683e20785c7a1ef60b87ff89796160a98d687b00658d70715a3240b1da64d2
name: python-cxxheaderparser
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: Parse C++ header files and generate a data structure representing the class
url: https://github.com/robotpy/cxxheaderparser
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cxxheaderparser-1.4.0-1.src.rpm
checksum_type: sha256
description:
  A pure python C++ header parser that parses C++ headers in a mildly naive
  manner that allows it to handle many C++ constructs, including many modern
  (C++11 and beyond) features.
  This is a complete rewrite of the `CppHeaderParser` library. `CppHeaderParser`
  is really useful for some tasks, but it's implementation is a truly terrible
  ugly hack built on top of other terrible hacks. This rewrite tries to learn
  from `CppHeaderParser` and leave its ugly baggage behind.
  Goals:
  * Parse syntatically valid C++ and provide a useful (and documented!) pure
    python API to work with the parsed data
  * Process incomplete headers (doesn't need to process includes)
  * Provide enough information for binding generators to wrap C++ code
  * Handle common C++ features, but it may struggle with obscure or overly
    complex things (feel free to make a PR to fix it!)
  Non-goals:
  * **Does not produce a full AST**, use Clang if you need that
  * **Not intended to validate C++**, which means this will not reject all
    invalid C++ headers! Use a compiler if you need that
  * **No C preprocessor substitution support implemented**. If you are parsing
    headers that contain macros, you should preprocess your code using the
    excellent pure python preprocessor [pcpp](https://github.com/ned14/pcpp)
    or your favorite compiler
    * See `cxxheaderparser.preprocessor` for how to use
  * Probably won't be able to parse most IOCCC entries
  There are two APIs available:
  * A visitor-style interface to build up your own custom data structures
  * A simple visitor that stores everything in a giant data structure


pkgId: d9178a880968694db33eec0c2b6336cb0e77462c2f42596ab21a80d1befcb0ce
name: python-cxxtea
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: cxxtea is a simple block cipher implemented in C
url: https://github.com/Rin-Wood/cxxtea
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cxxtea-1.0.4-1.src.rpm
checksum_type: sha256
description:
  `cxxtea` is a Python package for decrypting data, using a custom XXTEA decryption algorithm implemented in C.



  - Provides efficient XXTEA decryption functionality, based on C implementation.
  - Supports Python 3.6+



  Install the latest version of `cxxtea` from PyPI:

  ```bash
  pip install cxxtea
  ```


  Here's how to use `cxxtea` for decryption:

  ```python
  import cxxtea

  data = b'...your encrypted data...'
  sign = b'...your encryption sign...'
  key = b'...your encryption key...'

  dec = cxxtea.decrypt(data, sign, key)


pkgId: 5ae7f3c0be731789130c467dfef24ed9b5ffb01000beb74e6c0cad1af216ab2e
name: python-cy-rwlock
arch: src
version: 1.9.1
epoch: 0
release: 1
summary: RwLock: Reader-Writer lock
url: https://github.com/cy-arduino/cy_rwlock
rpm_license: LGPL
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cy-rwlock-1.9.1-1.src.rpm
checksum_type: sha256
description:
  [![Python Version](https://img.shields.io/pypi/pyversions/cy_rwlock.svg)](https://pypi.org/project/cy-rwlock/)
  [![Pypi Version](https://img.shields.io/pypi/v/cy_rwlock.svg)](https://pypi.org/project/cy-rwlock/)
  [![Code size in bytes](https://img.shields.io/github/languages/code-size/cy-arduino/cy_rwlock.svg)](https://pypi.org/project/cy-rwlock/#files)

  ![Upload Python Package](https://github.com/cy-arduino/cy_rwlock/workflows/Upload%20Python%20Package/badge.svg)

  [![Coverage](https://codecov.io/gh/cy-arduino/cy_rwlock/branch/master/graph/badge.svg)](https://codecov.io/gh/cy-arduino/cy_rwlock)

  [![License](https://img.shields.io/pypi/l/cy_rwlock.svg)](https://github.com/cy-arduino/cy_rwlock/blob/master/LICENSE)






  We can simply protect a shared resource by a lock. But the performance is not
  good because each reader should run one-by-one.

  A Reader-Writer lock can improve the performance by let readers running
  simultaneously.

  By the way, a writer should wait until all readers done.
  In a frequently read situation, a new reader after the writer can also increase
  the read count, let read count never decrease to 0.
  This will starve writer.

  RwLock:
  1. Let readers running simultaneously.
  1. Exclude "multiple readers" and each writer.
  1. provide a flag "write_first" to prevent starve writer.

  After 1.6.0, RwLock can support multi-thread(default) and multi-process.
  For multi-process scenario, use `rwlock = RwLock(cross_process=True)`



  * cy-rwlock XX.YY.ZZ
      1. XX.YY match the latest git tag.
      1. ZZ will increase automatically when new commit appear in master branch.
      1. XX: Update when change architecture
      1. YY: Update when add or modify some features
      1. ZZ: Update when bugfix or minor changes.




  1. `pip install cy_rwlock`
  1. download latest version from https://pypi.org/project/cy_rwlock/#files


  <pre><code>
  from rwlock import RwLock

  rwlock = RwLock()


  rwlock.acquire_r()

  rwlock.release_r()


  with rwlock.lock_r():
      


  rwlock.acquire_w()

  rwlock.release_w()


  with rwlock.lock_w():
      
  </code></pre>


  * local(windows)
      * run `scripts\run.bat`
  * github
      * auto run when push


  * PyPI version
      * convertd from git tag
          * see [setup.py](https://github.com/cy-arduino/cy_rwlock/blob/master/setup.py): convert_version()
  * local(windows)
      * run `scripts\deploy.bat`
  * github -> PyPI
      * When release in github


pkgId: 8f22130923fc97b7e221833a84daf9133cb76fa899da52e1bfc2b4757095b72a
name: python-cyapi
arch: src
version: 1.0.20
epoch: 0
release: 1
summary: Python bindings for Cylance Console and MTC
url: https://github.com/cylance/python-cyapi
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyapi-1.0.20-1.src.rpm
checksum_type: sha256
description:
  This Library provides python bindings to interact with the Cylance API. Examples have been created for you in the Examples/ directory, and provide a majority of the common code you'll need to get setup. In order to utilize this Library, you will need an API token from the API Integrations tab inside of the Cylance Console.


  * Python 2.7 & Python 3 Compatible
  * Windows
  * Mac
  * Linux



  ```
  pip install cyapi
  ```



  Please note there are a number of example scripts in the examples directory. These are valuable for initial authentication as well as some basic interactions with the library. The example scripts include:
  Single Tenant
  > simple_setup.py
  > find_stale_devices.py
  > safelist_trusted_local.py
  > time_getting_all_detection_detail.py

  Multi-Tenant Console (MTC)
  > simple_MTC_setup.py
  > MTC_tenants_loop.py

  This example will create a connection to the API and return all devices that have registered.

  ```
  from cyapi.cyapi import CyAPI
  from pprint import pprint
  API = CyAPI(tid=your_id, aid=your_aid, ase=your_ase)
  API.create_conn()
  devices = API.get_devices()
  print("Successful: {}".format(devices.is_success))
  pprint(devices.data[0]) # Print info about a single device.
  ```

  If you have lots of devices/threats/zones/etc, and you'd like to see a progress bar, pass the `disable_progress` parameter:

  ```
  devices = API.get_devices(disable_progress=False)
  pprint(devices.data[0])
  ```

  Additionally you can copy examples/simple_setup.py to your_new_file.py and begin hacking away from there.



  You can create a file that will store your api credentials instead of passing them in via the command line. The creds file should look like the following:

  For a standard tenant:
  creds.json:
  ```
  {
      "tid": "123456-55555-66666-888888888",
      "app_id": "11111111-222222-33333-44444444",
      "app_secret": "555555-666666-222222-444444",
      "region": "NA"
  }
  ```

  For a Multi-Tenant Console (MTC)
  ```
  {
      "tid": "Not Used for MTC Auth",
      "app_id": "11111111-222222-33333-44444444",
      "app_secret": "555555-666666-222222-444444",
      "region": "NA",
      "mtc": "True"
  }
  ```
  The creds json file can then be passed in by passing -c path/to/creds.json to any of the examples



  Tenant User API Guide - https://docs.blackberry.com/content/dam/docs-blackberry-com/release-pdfs/en/cylance-products/api-and-developer-guides/Cylance%20User%20API%20Guide%20v2.0%20rev24.pdf
  Tenant User API Release Notes - https://docs.blackberry.com/en/unified-endpoint-security/cylance--products/cylance-api-release-notes/BlackBerry-Cylance-API-release-notes
  Multi-Tenant API - https://dev-admin.cylance.com/documentation/api.html



  See [CONTRIBUTING.md](CONTRIBUTING.md)


pkgId: bd6f0f5a738c0b30c5c444e6226b75792a4308289dca362e00e2327f3db36023
name: python-cyaron
arch: src
version: 0.6.0
epoch: 0
release: 1
url: https://pypi.org/project/cyaron/
rpm_license: LGPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyaron-0.6.0-1.src.rpm
checksum_type: sha256
summary:
  CYaRon: Yet Another Random Olympic-iNformatics test data generator, A library for automatically generating test data for Online Judge, Olympic Informatics or automatic application testing

description:
  **CYaRon** **Y**et **A**nother **R**andom **O**lympic-i**N**formatics test data generator

  **By Luogu** 项目地址: [https://github.com/luogu-dev/cyaron](https://github.com/luogu-dev/cyaron)


  [![](https://travis-ci.org/luogu-dev/cyaron.svg?branch=master)](https://travis-ci.org/luogu-dev/cyaron)

  你是否遇到以下情况：
  - 希望在5分钟内写出一组随机数据，并方便地使用它们对拍几个程序
  - 希望生成一个合适的随机图或者树，且有一定强度
  - 希望生成一组随机数列或者向量，且不能重复。

  那么，你可以借助 CYaRon 和 Python ，来快速生成一组数据。目前支持的特性有：

  - 建一个随机图（简单图或者非简单图，有向图或无向图，带权图或者无权图）
  - 建一个随机树（链状、随机树、或者菊花图，而且可以设定树的强弱）
  - 生成一组允许相同或者互相不同的多维向量（可以较快速度生成10^6组、范围到10^9的向量或者数列）
  - 根据函数解析式生成数列
  - 生成一些随机多边形，并且可以求面积、周长等
  - 从字典生成随机字符串、单词、句子、段落
  - 使用以上功能生成的数据和您其他地方下载的测试数据方便地进行程序对拍

  **快速上手指南**

  稳定版本可以从pip获取: `pip install cyaron`，在此之前，需要准备好Python。

  最新开发版可以克隆GitHub源代码: `git clone https://github.com/luogu-dev/cyaron.git`

  请您查看[CYaRon文档](https://github.com/luogu-dev/cyaron/wiki)和[CYaRon基本入门](https://github.com/luogu-dev/cyaron/wiki/%E5%9F%BA%E6%9C%AC%E5%85%A5%E9%97%A8)来学习如何使用CYaRon。

  若您发现文档中有缺漏，请提出Issue并暂时根据`examples`和源代码进行YY。

  CYaRon基于Python。若您对Python不熟悉，可看[快速入门教程](https://github.com/luogu-dev/cyaron/wiki/Python-30%E5%88%86%E9%92%9F%E5%85%A5%E9%97%A8%E6%8C%87%E5%8D%97)。

  之后计划实现云Generator，即只需提供写好的脚本以及std，上传到服务器，即可下载一个测试数据的压缩包，真正实现5分钟生成一个测试数据！

  希望各位大佬一起来协助改进这个项目。希望这个项目可以帮助大家节省时间！

  **使用范例**
  ```python


  from cyaron import * # 引入CYaRon的库

  _n = ati([0, 7, 50, 1E4]) # ati函数将数组中的每一个元素转换为整形，方便您可以使用1E4一类的数来表示数据大小
  _m = ati([0, 11, 100, 1E4])


  for i in range(1, 4): # 即在[1, 4)范围内循环，也就是从1到3
      test_data = IO(file_prefix="heat", data_id=i) # 生成 heat[1|2|3].in/out 三组测试数据

      n = _n[i] # 点数
      m = _m[i] # 边数
      s = randint(1, n) # 源点，随机选取一个
      t = randint(1, n) # 汇点，随机选取一个
      test_data.input_writeln(n, m, s, t) # 写入到输入文件里，自动以空格分割并换行

      graph = Graph.graph(n, m, weight_limit=5) # 生成一个n点，m边的随机图，边权限制为5
      test_data.input_writeln(graph) # 自动写入到输入文件里，默认以一行一组u v w的形式输出

      test_data.output_gen("D:\\std_binary.exe") # 标程编译后的可执行文件，不需要freopen等，CYaRon自动给该程序输入并获得输出作为.out
  ```

  **贡献**

  所有的贡献者请查看[光荣榜](https://github.com/luogu-dev/cyaron/wiki/光荣榜)页面，衷心感谢他们对CYaRon项目的付出。

  欢迎您对 CYaRon 做出贡献。若您有希望加入的功能，可以给我们提出 Issue ，或者自己动手实现，然后发起 Pull Request。

  有关于如何做出贡献的更详细内容，请查看[如何做出贡献](https://github.com/luogu-dev/cyaron/wiki/%E5%A6%82%E4%BD%95%E5%81%9A%E5%87%BA%E8%B4%A1%E7%8C%AE)。


pkgId: 40216ba0e867182255e66af68efc843d32726f142cdbf6b71218b8e29aaa6b59
name: python-cybee-grove
arch: src
version: 1.6.0
epoch: 0
release: 1
summary: A Software as a Service (SaaS) log collection framework.
url: https://pypi.org/project/cybee-grove/
rpm_license: MPL-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cybee-grove-1.6.0-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
      <br /><br />
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/hashicorp-forge/grove/main/docs/static/grove-logo-small-light.png?raw=True">
        <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/hashicorp-forge/grove/main/docs/static/grove-logo-small.png?raw=True">
        <img src="https://raw.githubusercontent.com/hashicorp-forge/grove/main/docs/static/grove-logo-small.png?raw=True" alt="Grove logo">
      </picture>
      <br /><br />
  </p>

  Grove is a Software as a Service (SaaS) log collection framework, designed to support
  collection of logs from services which do not natively support log streaming.

  Grove enables teams to collect security related events from their vendors in a reliable
  and consistent way. This data may then be stored and analyzed with a team's _existing_
  tooling in order to support threat detection and compliance programmes.

  Out of the box, Grove provides:

  * 🪵 Reliable and periodic collection of logs.
  * ☁️ Support a large number of widely used SaaS applications and services.
  * 🧱 Plugin based "connectors" to enable support for new applications and services.
  * 🧳 "Bring your own" caching, output, configuration, and secrets backends.

  Grove was created and is currently maintained by the HashiCorp security team.

  **Please note**: While this is not an official HashiCorp project, security is still very
  important to us! If you have found a potential security issue with Grove, please contact
  us via email at security@hashicorp.com, rather than filing a GitHub issue.



  <p align="center">
      <br /><br />
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/hashicorp-forge/grove/main/docs/static/grove-support-light.png?raw=True">
        <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/hashicorp-forge/grove/main/docs/static/grove-support.png?raw=True">
        <img src="https://raw.githubusercontent.com/hashicorp-forge/grove/main/docs/static/grove-support.png?raw=True" alt="Overview of supported services, also listed below" >
      </picture>
      <br />
  </p>

  Currently the following log sources are supported by Grove out of the box. If a source
  isn't listed here, support can be added by creating a custom connector!

  * Atlassian audit events (e.g. Confluence, Jira)
  * GitHub audit logs
  * GSuite alerts
  * GSuite activity logs
  * Okta system logs
  * Oomnitza activity logs
  * 1Password sign-in attempt logs
  * 1Password item usage event logs
  * 1Password audit logs
  * PagerDuty audit records
  * SalesForce Cloud event logs
  * SalesForce Marketing Cloud audit event logs
  * SalesForce Marketing Cloud security event logs
  * Slack audit logs
  * Snowflake login history
  * Snowflake query history
  * Snowflake session history
  * Stripe events
  * Tines audit logs
  * Terraform Cloud audit trails
  * Torq activity logs
  * Torq audit logs
  * Twilio monitor events
  * Twilio message logs
  * Workday activity logs
  * Zoom activity logs
  * Zoom operation logs



  Please see the [Grove documentation](https://hashicorp-forge.github.io/grove/) for full
  documentation, information about Grove's internals, and API information.



  To run Grove for the first time using [Docker](https://docs.docker.com/get-docker/),
  ensure `docker` is installed and run:

  ```sh
  git clone https://github.com/hashicorp-forge/grove
  cd grove
  docker compose up
  ```

  This should see log messages from a "heartbeat" connector every 5 seconds. For more
  detailed examples and information, please see the [Grove documentation](https://hashicorp-forge.github.io/grove/).


pkgId: 72c6ab4df7f9efed768f48ec1cb72af312178fb40085e3f1159eae84a06b6f05
name: python-cyberchipped
arch: src
version: 2.1.0
epoch: 0
release: 1
summary: Build AI Assistants Fast
url: https://github.com/truemagic-coder/cyberchipped
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberchipped-2.1.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI - Version](https://img.shields.io/pypi/v/cyberchipped)](https://pypi.org/project/cyberchipped/)

  ![CyberChipped Logo](https://cyberchipped.com/375.png)

  CyberChipped is a Python library that provides an AI-powered conversation interface using OpenAI's Assistant API. It supports both text and audio-based interactions, with features like thread management, message persistence, and custom tool integration.



  - Streaming text-based conversations with AI
  - Audio transcription and streaming text-to-speech conversion
  - Thread management for maintaining conversation context
  - Message persistence using SQLite or MongoDB
  - Custom tool integration for extending AI capabilities



  You can install CyberChipped using pip:

  ```bash
  pip install cyberchipped
  ```



  Here's a basic example of how to use CyberChipped:

  ```python
  from cyberchipped.ai import AI, SQLiteDatabase

  async def main():
      database = SQLiteDatabase("conversations.db")
      async with AI("your_openai_api_key", "AI Assistant", "Your instructions here", database) as ai:
          user_id = "user123"
          response = await ai.text(user_id, "Hello, AI!")
          async for chunk in response:
              print(chunk, end="", flush=True)
          print()


  import asyncio
  asyncio.run(main())
  ```



  Contributions to CyberChipped are welcome! Please feel free to submit a Pull Request.



  This project is licensed under the MIT License - see the LICENSE file for details.


pkgId: b36ea7609b8266ece39cedc265bf4a32610b71ef31a1bd83a29707cb56993d23
name: python-cyberchipped
arch: src
version: 2.1.10
epoch: 0
release: 1
summary: Build AI Assistants Fast
url: https://github.com/truemagic-coder/cyberchipped
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberchipped-2.1.10-1.src.rpm
checksum_type: sha256
description:
  [![PyPI - Version](https://img.shields.io/pypi/v/cyberchipped)](https://pypi.org/project/cyberchipped/)

  ![CyberChipped Logo](https://cyberchipped.com/375.png)

  CyberChipped is a Python library that provides an AI-powered conversation interface using OpenAI's Assistant API. It supports both text and audio-based interactions, with features like thread management, message persistence, and custom tool integration.



  - Streaming text-based conversations with AI
  - Audio transcription and streaming text-to-speech conversion
  - Thread management for maintaining conversation context
  - Message persistence using SQLite or MongoDB
  - Custom tool integration for extending AI capabilities



  You can install CyberChipped using pip:

  ```bash
  pip install cyberchipped
  ```



  Here's a basic example of how to use CyberChipped:

  ```python
  from cyberchipped import AI, SQLiteDatabase

  async def main():
      database = SQLiteDatabase("conversations.db")
      async with AI("your_openai_api_key", "AI Assistant", "Your instructions here", database) as ai:
          user_id = "user123"
          response = await ai.text(user_id, "Hello, AI!")
          async for chunk in response:
              print(chunk, end="", flush=True)
          print()


  import asyncio
  asyncio.run(main())
  ```



  Contributions to CyberChipped are welcome! Please feel free to submit a Pull Request.



  This project is licensed under the MIT License - see the LICENSE file for details.


pkgId: 8564632b1bec049da9aad2107efb119cae579db130631ac416f2605cd956276e
name: python-cyberdrop-dl
arch: src
version: 5.3.31
epoch: 0
release: 1
summary: Bulk downloader for multiple file hosts
url: https://github.com/Jules-WinnfieldX/CyberDropDownloader
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberdrop-dl-5.3.31-1.src.rpm
checksum_type: sha256
description:
  **Bulk downloader for multiple file hosts**

  [![PyPI version](https://badge.fury.io/py/cyberdrop-dl.svg)](https://badge.fury.io/py/cyberdrop-dl)
  [![Downloads](https://static.pepy.tech/badge/cyberdrop-dl)](https://pepy.tech/project/cyberdrop-dl)
  [![Downloads](https://static.pepy.tech/badge/cyberdrop-dl/month)](https://pepy.tech/project/cyberdrop-dl)
  [![Downloads](https://static.pepy.tech/badge/cyberdrop-dl/week)](https://pepy.tech/project/cyberdrop-dl)

  [![Discord Banner 3](https://discordapp.com/api/guilds/1070206871564197908/widget.png?style=banner3)](https://discord.com/invite/kbZCxz22Qp)

  Brand new and improved! Cyberdrop-DL now has an updated paint job, fantastic new look. It's now easier to use than ever before!

  ![Screenshot 2023-12-03 190747](https://github.com/Jules-WinnfieldX/CyberDropDownloader/assets/61347133/aa6b7e21-a039-42e9-9308-ca62750a49cf)



  bunkr, bunkrr, celebforum, coomer, cyberdrop, cyberfile, e-hentai, erome, fapello, f95zone, gofile, hotpic, ibb.co, imageban, imgbox, imgur, img.kiwi, jpg.church, jpg.homes, jpg.fish, jpg.fishing, jpg.pet, jpeg.pet, jpg1.su, jpg2.su, jpg3.su, jpg4.su, host.church, kemono, leakedmodels, mediafire, nudostar.com, nudostar.tv, omegascans, pimpandhost, pixeldrain, postimg, realbooru, reddit, redd.it, redgifs, rule34.xxx, rule34.xyz, rule34vault, saint, scrolller, simpcity, socialmediagirls, toonily, xbunker, xbunkr



  Read the [Wiki!](https://jules-winnfieldx.gitbook.io/cyberdrop-dl/)

  You can find how to install the program and how to use it there. You can also find a list of supported hosts, and frequently asked questions.


pkgId: 5c11a6910c4e1b11e52260cecc03ecf915b98e58a1b63fd1672162f59df60436
name: python-cyberdrop-dl-patched
arch: src
version: 5.6.52
epoch: 0
release: 1
summary: Bulk downloader for multiple file hosts
url: https://github.com/jbsparrow/CyberDropDownloader
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberdrop-dl-patched-5.6.52-1.src.rpm
checksum_type: sha256
description:
  **Bulk downloader for multiple file hosts**

  [![PyPI version](https://badge.fury.io/py/cyberdrop-dl-patched.svg)](https://badge.fury.io/py/cyberdrop-dl-patched)
  [![Downloads](https://static.pepy.tech/badge/cyberdrop-dl-patched)](https://pepy.tech/project/cyberdrop-dl-patched)
  [![Downloads](https://static.pepy.tech/badge/cyberdrop-dl-patched/month)](https://pepy.tech/project/cyberdrop-dl-patched)
  [![Downloads](https://static.pepy.tech/badge/cyberdrop-dl-patched/week)](https://pepy.tech/project/cyberdrop-dl-patched)

  [![Discord Banner 3](https://discordapp.com/api/guilds/1070206871564197908/widget.png?style=banner3)](https://discord.com/invite/kbZCxz22Qp)

  Brand new and improved! Cyberdrop-DL now has an updated paint job, fantastic new look. It's now easier to use than ever before!

  ![Screenshot 2023-12-03 190747](https://github.com/Jules-WinnfieldX/CyberDropDownloader/assets/61347133/aa6b7e21-a039-42e9-9308-ca62750a49cf)


  <details>
    <summary><h2>Supported Sites</h2></summary>

    - bunkr
    - bunkrr
    - celebforum
    - coomer
    - cyberdrop
    - cyberfile
    - e-hentai
    - erome
    - fapello
    - f95zone
    - gofile
    - hotpic
    - ibb.co
    - imageban
    - imgbox
    - imgur
    - img.kiwi
    - jpg.church
    - jpg.homes
    - jpg.fish
    - jpg.fishing
    - jpg.pet
    - jpeg.pet
    - jpg1.su
    - jpg2.su
    - jpg3.su
    - jpg4.su
    - jpg5.su
    - host.church
    - kemono
    - leakedmodels
    - mediafire
    - nudostar.com
    - nudostar.tv
    - omegascans
    - pimpandhost
    - pixeldrain
    - postimg
    - realbooru
    - reddit
    - redd.it
    - redgifs
    - rule34.xxx
    - rule34.xyz
    - rule34vault
    - saint
    - scrolller
    - socialmediagirls
    - toonily
    - xbunker
    - xbunkr
  </details>



  Read the [Wiki!](https://script-ware.gitbook.io/cyberdrop-dl)

  You can find how to install the program and how to use it there. You can also find a list of supported hosts, and frequently asked questions.


pkgId: 034db788114bc24096687f07378bcafa6802dde3286a7560538f0c4ace4e4097
name: python-cyberdrop-dl-patched
arch: src
version: 5.7.1
epoch: 0
release: 1
summary: Bulk downloader for multiple file hosts
url: https://github.com/jbsparrow/CyberDropDownloader
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberdrop-dl-patched-5.7.1-1.src.rpm
checksum_type: sha256
description:
  **Bulk downloader for multiple file hosts**

  [![PyPI version](https://badge.fury.io/py/cyberdrop-dl-patched.svg)](https://badge.fury.io/py/cyberdrop-dl-patched)
  [![Downloads](https://static.pepy.tech/badge/cyberdrop-dl-patched)](https://pepy.tech/project/cyberdrop-dl-patched)
  [![Downloads](https://static.pepy.tech/badge/cyberdrop-dl-patched/month)](https://pepy.tech/project/cyberdrop-dl-patched)
  [![Downloads](https://static.pepy.tech/badge/cyberdrop-dl-patched/week)](https://pepy.tech/project/cyberdrop-dl-patched)

  [![Discord Banner 3](https://discordapp.com/api/guilds/1070206871564197908/widget.png?style=banner3)](https://discord.com/invite/kbZCxz22Qp)

  Brand new and improved! Cyberdrop-DL now has an updated paint job, fantastic new look. It's now easier to use than ever before!

  ![Screenshot 2023-12-03 190747](https://github.com/Jules-WinnfieldX/CyberDropDownloader/assets/61347133/aa6b7e21-a039-42e9-9308-ca62750a49cf)


  <details>
    <summary><h2>Supported Sites</h2></summary>

    - bunkr
    - bunkrr
    - celebforum
    - coomer
    - cyberdrop
    - cyberfile
    - e-hentai
    - erome
    - fapello
    - f95zone
    - gofile
    - hotpic
    - ibb.co
    - imageban
    - imgbox
    - imgur
    - img.kiwi
    - jpg.church
    - jpg.homes
    - jpg.fish
    - jpg.fishing
    - jpg.pet
    - jpeg.pet
    - jpg1.su
    - jpg2.su
    - jpg3.su
    - jpg4.su
    - jpg5.su
    - host.church
    - kemono
    - leakedmodels
    - mediafire
    - nekohouse
    - nudostar.com
    - nudostar.tv
    - omegascans
    - pimpandhost
    - pixeldrain
    - postimg
    - realbooru
    - reddit
    - redd.it
    - redgifs
    - rule34.xxx
    - rule34.xyz
    - rule34vault
    - saint
    - scrolller
    - socialmediagirls
    - toonily
    - tokyomotion.net
    - xbunker
    - xbunkr
    - xxxbunker
  </details>



  Read the [Wiki!](https://script-ware.gitbook.io/cyberdrop-dl)

  You can find how to install the program and how to use it there. You can also find a list of supported hosts, and frequently asked questions.


pkgId: 0889d0079f04746db7c1c39b2584314706717c9bee2737aa05f20044a94458df
name: python-cyberdrop-dl-patched
arch: src
version: 5.7.2
epoch: 0
release: 1
summary: Bulk downloader for multiple file hosts
url: https://github.com/jbsparrow/CyberDropDownloader
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberdrop-dl-patched-5.7.2-1.src.rpm
checksum_type: sha256
description:
  <div align="center">


  *Bulk asynchronous downloader for multiple file hosts*

  [![PyPI - Version](https://img.shields.io/pypi/v/cyberdrop-dl-patched)](https://pypi.org/project/cyberdrop-dl-patched/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cyberdrop-dl-patched)](https://pypi.org/project/cyberdrop-dl-patched/)
  [![Docs](https://img.shields.io/badge/docs-wiki-blue?link=https%3A%2F%2Fscript-ware.gitbook.io%2Fcyberdrop-dl)](https://script-ware.gitbook.io/cyberdrop-dl)
  [![GitHub License](https://img.shields.io/github/license/jbsparrow/CyberDropDownloader)](https://github.com/jbsparrow/CyberDropDownloader/blob/master/LICENSE)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/cyberdrop-dl-patched)](https://pypistats.org/packages/cyberdrop-dl-patched)

  [![Discord](https://discordapp.com/api/guilds/1070206871564197908/widget.png?style=banner2)](https://discord.com/invite/P5nsbKErwy)


  Brand new and improved! Cyberdrop-DL now has an updated paint job, fantastic new look. It's now easier to use than ever before!

  ![Cyberdrop-DL TUI Preview](docs/.gitbook/assets/cyberdrop-dl_tui_preview.png)

  </div>



  See the [list of supported sites](https://script-ware.gitbook.io/cyberdrop-dl/reference/supported-websites) on the official wiki




  Follow the [quickstart guide](https://script-ware.gitbook.io/cyberdrop-dl/quick-start) for instructions on how to install and configure Cyberdrop-DL



  If there is a feature you want, you've discovered a bug, or if you have other general feedback, please create an issue for it!

  See [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on [opening an Issue](CONTRIBUTING.md#submitting-an-issue). If you want to submit code to the project, follow the [guidelines on how to contribute](CONTRIBUTING.md#submitting-a-pull-request-pr).


pkgId: 5ff01f6778f14f44789195e7b9130035c9727973bcd5d4a992a85a11ba5f34b9
name: python-cyberjake
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: Common Python utilities for Cyb3r-Jak3 projects
url: https://pypi.org/project/cyberjake/
rpm_license: MPL-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberjake-0.2.1-1.src.rpm
checksum_type: sha256
description:
  [![Documentation Status](https://readthedocs.org/projects/cyb3rjak3-common/badge/?version=latest)](https://common-py.cyberjake.xyz/en/latest/?badge=latest) [![Python Checking](https://github.com/Cyb3r-Jak3/common-python/actions/workflows/python.yml/badge.svg)](https://github.com/Cyb3r-Jak3/common-python/actions/workflows/python.yml)

  This is common python code that I use between my programs. I also have [common-go](https://github.com/Cyb3r-Jak3/common-go) for common go code.
  Documentation is available via [readthedocs](https://common-py.docs.jwhite.network)

  To make this smaller there are no requirements but certain functions will require other modules and will raise ModuleNotFoundError if a function is used


pkgId: 08f412a317e294daa4bc13b1ba0f18a8055752aa80e3bbb3517ebcb10a2a836b
name: python-cyberonix
arch: src
version: 3.0.6
epoch: 0
release: 1
summary: Cyberonix is a complete resource hub for Cyber Security Community.
url: https://github.com/TeamDefronix/Cyberonix
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberonix-3.0.6-1.src.rpm
checksum_type: sha256
description:
  **[<kbd> <br> Install <br> </kbd>][Install]** 
  **[<kbd> <br> Usage <br> </kbd>][Usage]** 
  **[<kbd> <br> Categories <br> </kbd>][Categories]** 
  **[<kbd> <br> ScreenShots <br> </kbd>][ScreenShots]** 


pkgId: e4b03e3d6f4474c5bd0fce717f3cde3d9937adf62ff0512f15f82eeb9cc68721
name: python-cyberpunk-theme
arch: src
version: 0.0.14
epoch: 0
release: 1
summary: Dark theme for Python desktop apps
url: https://github.com/pyrustic/cyberpunk-theme
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberpunk-theme-0.0.14-1.src.rpm
checksum_type: sha256
description:
  <!-- Image -->
  <div align="center">
      <img src="https://raw.githubusercontent.com/pyrustic/misc/master/media/cyberpunk-cover.png" alt="Figure" width="970">
      <p align="center">
      <i> Cyberpunk theme made with TkStyle </i>
      </p>
  </div>


  <!-- Intro Text -->

  <b> A Dark Theme for your Tkinter Python apps </b>

  This project is part of the [Pyrustic Open Ecosystem](https://pyrustic.github.io).

  <!-- Quick Links -->
  [Installation](#installation) | [Reference](https://github.com/pyrustic/cyberpunk-theme/tree/master/docs/reference#readme) | [TkStyle](https://github.com/pyrustic/tkstyle)



  Thanks to [TkStyle](https://github.com/pyrustic/tkstyle), the `cyberpunk-theme` is both flexible and easy to use.



  ```python
  import tkinter as tk
  from cyberpunk_theme import Cyberpunk



  root = tk.Tk()


  cyberpunk_theme = Cyberpunk()
  cyberpunk_theme.target(root)







  root.mainloop()


  ```

  What if you want to customize the style of a specific widget ?


  Each generic widget has a default style which can be retrieved via a function named `get_{widget-name}_style_1'`.

  Some generic widgets like the `Button` widget have multiple styles.

  ```python
  import tkinter as tk
  from cyberpunk_theme.widget.button import get_button_dark_style


  root = tk.Tk()


  button = tk.Button(root, text="Click")
  button.pack()


  button_style_1 = get_button_dark_style()
  button_style_1.target(button)


  root.mainloop()
  ```
  The generic `Button` widget has up to ten styles.

  The package [megawidget](https://github.com/pyrustic/megawidget) contains a collection of useful custom widgets built with the standard tkinter widgets.

  You can set specific styles to `megawidgets` too !


  ```python
  import tkinter as tk
  from megawidget.table import Table
  from cyberpunk_theme.megawidget.table import get_table_style_1


  root = tk.Tk()


  titles = ("Name", "Age")
  data = [("Jack", 39), ("Jane", 42)]
  table = Table(root, titles=titles, data=data)
  table.pack()


  table_style_1 = get_table_style_1()
  table_style_1.target(table)


  root.mainloop()
  ```


  You can create your own theme or style, or modify the `cyberpunk-theme` as you wish.

  Check out [TkStyle](https://github.com/pyrustic/tkstyle) !



  ```bash
  $ pip install cyberpunk-theme
  ```


pkgId: 36ed9a4e1ef7cbb83d74eb68dae47263d7b0a20d5ecfb893cc0e5e80e1f964d8
name: python-cyberpy
arch: src
version: 1.0.9
epoch: 0
release: 1
summary: Tools for Cyber wallet management, offline transaction signing and broadcasting
url: https://github.com/SaveTheAles/cyberpy
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberpy-1.0.9-1.src.rpm
checksum_type: sha256
description:
  > Version 1.0.9

  > Tools for Cyber wallet management and offline transaction signing

  > Bostrom network release





  ```bash
  pip install cyberpy
  ```



  ```bash
  git clone https://github.com/SaveTheAles/cyberpy
  cd cyberpy
  pip3 install .
  ```





  ```python
  from cyberpy import generate_wallet
  wallet = generate_wallet()
  ```

  The value assigned to `wallet` will be a dictionary just like:

  ```python
  {
      "seed": "arch skill acquire abuse frown reject front second album pizza hill slogan guess random wonder benefit industry custom green ill moral daring glow elevator",
      "derivation_path": "m/44'/118'/0'/0/0",
      "private_key": b'\xbb\xec^\xf6\xdcg\xe6\xb5\x89\xed\x8cG\x05\x03\xdf0:\xc9\x8b \x85\x8a\x14\x12\xd7\xa6a\x01\xcd\xf8\x88\x93',
      "public_key": b"\x03h\x1d\xae\xa7\x9eO\x8e\xc5\xff\xa3sAw\xe6\xdd\xc9\xb8b\x06\x0eo\xc5a%z\xe3\xff\x1e\xd2\x8e5\xe7",
      "address": "bostrom1uuhna3psjqfxnw4msrfzsr0g08yuyfxesqggqd",
  }
   ```





  ```python
  from cyberpy import seed_to_privkey
  seed = "teach there dream chase fatigue abandon lava super senior artefact close upgrade"
  privkey = seed_to_privkey(seed, path="m/44'/118'/0'/0/0")
   ```



  ```python
  from cyberpy import privkey_to_pubkey
  privkey = bytes.fromhex("6dcd05d7ac71e09d3cf7da666709ebd59362486ff9e99db0e8bc663570515afa")
  pubkey = privkey_to_pubkey(privkey)
   ```



  ```python
  from cyberpy import pubkey_to_address
  pubkey = bytes.fromhex("03e8005aad74da5a053602f86e3151d4f3214937863a11299c960c28d3609c4775")
  addr = pubkey_to_address(pubkey)
   ```



  ```python
  from cyberpy import privkey_to_address
  privkey = bytes.fromhex("6dcd05d7ac71e09d3cf7da666709ebd59362486ff9e99db0e8bc663570515afa")
  addr = privkey_to_address(privkey)
   ```



  ```python
  from cyberpy import address_to_address
  addr = address_to_address(address, prefix)
   ```





  ```python
  from cyberpy import Transaction
  tx = Transaction(
      privkey=bytes.fromhex("26d167d549a4b2b66f766b0d3f2bdbe1cd92708818c338ff453abde316a2bd59"),
      account_num=11335,
      sequence=0,
      fee=0,
      gas=200000,
      memo="",
      chain_id="bostrom-testnet-1",
      sync_mode="broadcast_tx_sync", # "broadcast_tx_sync", "broadcast_tx_async", "broadcast_tx_commit"
  )
  tx.add_transfer(recipient="bostrom103l758ps7403sd9c0y8j6hrfw4xyl70j4mmwkf", amount=387000)
  tx.add_transfer(recipient="bostrom1lzumfk6xvwf9k9rk72mqtztv867xyem393um48", amount=123)
  ```

  One or more token transfers can be added to a transaction by calling the `add_transfer` method.



  ```python
  from cyberpy import Transaction
  tx = Transaction(
      privkey=bytes.fromhex("26d167d549a4b2b66f766b0d3f2bdbe1cd92708818c338ff453abde316a2bd59"),
      account_num=11335,
      sequence=0,
      fee=0,
      gas=200000,
      memo="",
      chain_id=bostrom-testnet-1",
      sync_mode="broadcast_tx_sync", # "broadcast_tx_sync", "broadcast_tx_async", "broadcast_tx_commit"
  )
  tx.add_cyberlink(cid_from="QmceNpj6HfS81PcCaQXrFMQf7LR5FTLkdG9sbSRNy3UXoZ", cid_to="QmRX8qYgeZoYM3M5zzQaWEpVFdpin6FvVXvp6RPQK3oufV")
  tx.add_cyberlink(cid_from="QmXsJKAog3tTNEGfHNmSYjdiLYFkq4URrxDpMQpwfBRUtP", cid_to="QmTiXybNXEYbfVEy6bhBSw67u6NHXsB2h36xhwPcCQyRgp")
  ```

  One or more cyberlink messages can be added to a transaction by calling the `add_cyberlink` method.

  When the transaction is fully prepared, calling `get_pushable` will return a signed transaction in the form of a JSON string.

  ```python
  pushable_tx = tx.get_pushable()
  ```

   This can be used as request body when calling endpoint of the `https://grpc_api:26657`, more detailes [here](https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_sync)

  ```python
  import requests

  res = requests.post(url=<grpc_api>, data=pushable_tx)
  ```

  Or you can call `broadcast(grps: str)` method and it will make a signed transaction and POST it with defined gRPC_api.

  ```python
  res = tx.broadcast(url=<gRPC_api>)
  ```



  Offchain signing transaction-like according to [ADR 036](https://docs.cosmos.network/master/architecture/adr-036-arbitrary-signature.html)

  string message signing:

  ```python
  from cyberpy._message_signer import Message
  from cyberpy._wallet import seed_to_privkey


  seed = "arch skill acquire abuse frown reject front second album pizza hill slogan guess random wonder benefit industry custom green ill moral daring glow elevator"

  msg = Message(
      privkey=seed_to_privkey(seed)
  )

  msg.add_message('some_string_here', 'prefix') // as prefix it should be bostrom, cosmos, osmo etc.

  signed_msg = msg.get_signed_message()
  ```

  list of strings message signing:


  ```python
  from cyberpy._message_signer import Message
  from cyberpy._wallet import seed_to_privkey


  seed = "arch skill acquire abuse frown reject front second album pizza hill slogan guess random wonder benefit industry custom green ill moral daring glow elevator"

  msg = Message(
      privkey=seed_to_privkey(seed)
  )

  strings_list = ['some', 'string', 'here'] // will have : separated string

  msg.add_message_custom(strings_list, 'prefix')

  signed_msg = msg.get_signed_message()
  ```

  the output like:

  ```json
  {
      "pub_key": "A+MXFp7YeLMvoVlAU66Uu0z3Wtc9Cuwq0eocUhtNOmnw",
      "signature": "9O89CUdRRZj011BphnTs5JnYM9/0O0ch+XLG2DNiWqtYnA4xA5B0wmFQDOQogOxL5xKWILVMnv1IA/7s05QsIA=="
  }
  ```


pkgId: 2b36ac7ff61f21765d0c009860f89dae79fde10e8e2554aed56468f8152a100b
name: python-cyberscript
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: An AI web browsing framework focused on simplicity and extensibility.
url: https://pypi.org/project/cyberscript/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyberscript-0.0.1-1.src.rpm
checksum_type: sha256
description:
  - [Intro](#intro)
  - [Getting Started](#getting-started)
  - [API Reference](#api-reference)
    - [act()](#act)
    - [extract()](#extract)
    - [observe()](#observe)
  - [Model Support](#model-support)
  - [How It Works](#how-it-works)
  - [Stagehand vs Playwright](#stagehand-vs-playwright)
  - [Prompting Tips](#prompting-tips)
  - [Roadmap](#roadmap)
  - [Contributing](#contributing)
  - [Acknowledgements](#acknowledgements)
  - [License](#license)
  > [!NOTE] > `Cyberscript` is currently available as an early release, and we're actively seeking feedback from the community. Please join our [Slack community](https://join.slack.com/t/cyberscript-dev/shared_invite/zt-2tdncfgkk-fF8y5U0uJzR2y2_M9c9OJA) to stay updated on the latest developments and provide feedback.

  Cyberscript is the AI-powered successor to [Playwright](https://github.com/microsoft/playwright), offering three simple APIs (`act`, `extract`, and `observe`) that provide the building blocks for natural language driven web automation.
  The goal of Cyberscript is to provide a lightweight, configurable framework, without overly complex abstractions, as well as modular support for different models and model providers. It's not going to order you a pizza, but it will help you reliably automate the web.
  Each Cyberscript function takes in an atomic instruction, such as `act("click the login button")` or `extract("find the red shoes")`, generates the appropriate Playwright code to accomplish that instruction, and executes it.
  Instructions should be atomic to increase reliability, and step planning should be handled by the higher level agent. You can use `observe()` to get a suggested list of actions that can be taken on the current page, and then use those to ground your step planning prompts.
  Cyberscript is [open source](#license) and maintained by the [MultiOn](https://multion.ai) team. We believe that by enabling more developers to build reliable web automations, we'll expand the market of developers who benefit from our headless browser infrastructure. This is the framework that we wished we had while tinkering on our own applications, and we're excited to share it with you.


  We also install zod to power typed extraction
  ```bash
  npm install cyberscript zod
  ```

  You'll need to provide your API Key for the model provider you'd like to use. The default model provider is OpenAI, but you can also use Anthropic or others. More information on supported models can be found in the [API Reference](#api-reference).
  Ensure that an OpenAI API Key or Anthropic API key is accessible in your local environment.
  ```
  export OPENAI_API_KEY=sk-...
  export ANTHROPIC_API_KEY=sk-...
  ```

  If you plan to run the browser locally, you'll also need to install Playwright's browser dependencies.
  ```bash
  npm exec playwright install
  ```
  Then you can create a Cyberscript instance like so:
  ```javascript
  import { Cyberscript } from "cyberscript";
  import { z } from "zod";
  const cyberscript = new Cyberscript({
    env: "LOCAL",
  });
  ```
  If you plan to run the browser remotely, you'll need to set a Browserbase API Key and Project ID.
  ```bash
  export BROWSERBASE_API_KEY=...
  export BROWSERBASE_PROJECT_ID=...
  ```
  ```javascript
  import { Cyberscript } from "cyberscript";
  import { z } from "zod";
  const cyberscript = new Cyberscript({
    env: "BROWSERBASE",
    enableCaching: true,
  });
  ```

  ```javascript
  await cyberscript.init();
  await cyberscript.page.goto("https://github.com/browserbase/cyberscript");
  await cyberscript.act({ action: "click on the contributors" });
  const contributor = await cyberscript.extract({
    instruction: "extract the top contributor",
    schema: z.object({
      username: z.string(),
      url: z.string(),
    }),
  });
  console.log(`Our favorite contributor is ${contributor.username}`);
  ```
  This simple snippet will open a browser, navigate to the Cyberscript repo, and log the top contributor.


  This constructor is used to create an instance of Cyberscript.
  - **Arguments:**
    - `env`: `'LOCAL'` or `'BROWSERBASE'`. Defaults to `'BROWSERBASE'`.
    - `modelName`: (optional) an `AvailableModel` string to specify the default model to use.
    - `modelClientOptions`: (optional) configuration options for the model client.
    - `enableCaching`: a `boolean` that enables caching of LLM responses. When set to `true`, the LLM requests will be cached on disk and reused for identical requests. Defaults to `false`.
    - `headless`: a `boolean` that determines if the browser runs in headless mode. Defaults to `false`. When the env is set to `BROWSERBASE`, this will be ignored.
    - `domSettleTimeoutMs`: an `integer` that specifies the timeout in milliseconds for waiting for the DOM to settle. Defaults to 30000 (30 seconds).
    - `apiKey`: (optional) your Browserbase API key. Defaults to `BROWSERBASE_API_KEY` environment variable.
    - `projectId`: (optional) your Browserbase project ID. Defaults to `BROWSERBASE_PROJECT_ID` environment variable.
    - `browserBaseSessionCreateParams`: configuration options for creating new Browserbase sessions.
    - `browserbaseResumeSessionID`: ID of an existing Browserbase session to resume.
    - `logger`: a function that handles log messages. Useful for custom logging implementations.
    - `verbose`: an `integer` that enables several levels of logging during automation:
      - `0`: limited to no logging
      - `1`: SDK-level logging
      - `2`: LLM-client level logging (most granular)
    - `debugDom`: a `boolean` that draws bounding boxes around elements presented to the LLM during automation.
  - **Returns:**
    - An instance of the `Cyberscript` class configured with the specified options.
  - **Example:**
    ```javascript
    // Basic usage
    const cyberscript = new Cyberscript();
    // Custom configuration
    const cyberscript = new Cyberscript({
      env: "LOCAL",
      verbose: 1,
      headless: true,
      enableCaching: true,
      logger: (logLine) => {
        console.log(`[${logLine.category}] ${logLine.message}`);
      },
    });
    // Resume existing Browserbase session
    const cyberscript = new Cyberscript({
      env: "BROWSERBASE",
      browserbaseResumeSessionID: "existing-session-id",
    });
    ```


  `init()` asynchronously initializes the Cyberscript instance. It should be called before any other methods.
  - **Arguments:**
    - `modelName`: (optional) an `AvailableModel` string to specify the model to use. This will be used for all other methods unless overridden.
    - `modelClientOptions`: (optional) configuration options for the model client
    - `domSettleTimeoutMs`: (optional) timeout in milliseconds for waiting for the DOM to settle
  - **Returns:**
    - A `Promise` that resolves to an object containing:
      - `debugUrl`: a `string` representing the URL for live debugging. This is only available when using a Browserbase browser.
      - `sessionUrl`: a `string` representing the session URL. This is only available when using a Browserbase browser.
  - **Example:**
    ```javascript
    await cyberscript.init({ modelName: "gpt-4o" });
    ```

  `act()` allows Cyberscript to interact with a web page. Provide an `action` like `"search for 'x'"`, or `"select the cheapest flight presented"` (small atomic goals perform the best).
  - **Arguments:**
    - `action`: a `string` describing the action to perform
    - `modelName`: (optional) an `AvailableModel` string to specify the model to use
    - `modelClientOptions`: (optional) configuration options for the model client
    - `useVision`: (optional) a `boolean` or `"fallback"` to determine if vision-based processing should be used. Defaults to `"fallback"`
    - `variables`: (optional) a `Record<string, string>` of variables to use in the action. Variables in the action string are referenced using `%variable_name%`
    - `domSettleTimeoutMs`: (optional) timeout in milliseconds for waiting for the DOM to settle
  - **Returns:**
    - A `Promise` that resolves to an object containing:
      - `success`: a `boolean` indicating if the action was completed successfully.
      - `message`: a `string` providing details about the action's execution.
      - `action`: a `string` describing the action performed.
  - **Example:**
    ```javascript
    // Basic usage
    await cyberscript.act({ action: "click on add to cart" });
    // Using variables
    await cyberscript.act({
      action: "enter %username% into the username field",
      variables: {
        username: "john.doe@example.com",
      },
    });
    // Multiple variables
    await cyberscript.act({
      action: "fill in the form with %username% and %password%",
      variables: {
        username: "john.doe",
        password: "secretpass123",
      },
    });
    ```

  `extract()` grabs structured text from the current page using [zod](https://github.com/colinhacks/zod). Given instructions and `schema`, you will receive structured data. Unlike some extraction libraries, cyberscript can extract any information on a page, not just the main article contents.
  - **Arguments:**
    - `instruction`: a `string` providing instructions for extraction
    - `schema`: a `z.AnyZodObject` defining the structure of the data to extract
    - `modelName`: (optional) an `AvailableModel` string to specify the model to use
    - `modelClientOptions`: (optional) configuration options for the model client
    - `domSettleTimeoutMs`: (optional) timeout in milliseconds for waiting for the DOM to settle
  - **Returns:**
    - A `Promise` that resolves to the structured data as defined by the provided `schema`.
  - **Example:**
    ```javascript
    const price = await cyberscript.extract({
      instruction: "extract the price of the item",
      schema: z.object({
        price: z.number(),
      }),
    });
    ```

  > [!NOTE]
  > `observe()` currently only evaluates the first chunk in the page.
  `observe()` is used to get a list of actions that can be taken on the current page. It's useful for adding context to your planning step, or if you unsure of what page you're on.
  If you are looking for a specific element, you can also pass in an instruction to observe via: `observe({ instruction: "{your instruction}"})`.
  - **Arguments:**
    - `instruction`: (optional) a `string` providing instructions for the observation. Defaults to "Find actions that can be performed on this page."
    - `modelName`: (optional) an `AvailableModel` string to specify the model to use
    - `modelClientOptions`: (optional) configuration options for the model client
    - `useVision`: (optional) a `boolean` to determine if vision-based processing should be used. Defaults to `false`
    - `domSettleTimeoutMs`: (optional) timeout in milliseconds for waiting for the DOM to settle
  - **Returns:**
    - A `Promise` that resolves to an array of objects containing:
      - `selector`: a `string` representing the element selector
      - `description`: a `string` describing the possible action
  - **Example:**
    ```javascript
    const actions = await cyberscript.observe();
    ```

  `page` and `context` are instances of Playwright's `Page` and `BrowserContext` respectively. Use these methods to interact with the Playwright instance that Cyberscript is using. Most commonly, you'll use `page.goto()` to navigate to a URL.
  - **Example:**
    ```javascript
    await cyberscript.page.goto("https://github.com/agi-inc/cyberscript");
    ```

  `log()` is used to print a message to the browser console. These messages will be persisted in the Browserbase session logs, and can be used to debug sessions after they've completed.
  Make sure the log level is above the verbose level you set when initializing the Cyberscript instance.
  - **Example:**
    ```javascript
    cyberscript.log("Hello, world!");
    ```

  Cyberscript leverages a generic LLM client architecture to support various language models from different providers. This design allows for flexibility, enabling the integration of new models with minimal changes to the core system. Different models work better for different tasks, so you can choose the model that best suits your needs.

  Cyberscript currently supports the following models from OpenAI and Anthropic:
  - **OpenAI Models:**
    - `gpt-4o`
    - `gpt-4o-mini`
    - `gpt-4o-2024-08-06`
  - **Anthropic Models:**
    - `claude-3-5-sonnet-latest`
    - `claude-3-5-sonnet-20240620`
    - `claude-3-5-sonnet-20241022`
  These models can be specified when initializing the `Cyberscript` instance or when calling methods like `act()` and `extract()`.

  The SDK has two major phases:
  1. Processing the DOM (including chunking - _see below_).
  2. Taking LLM powered actions based on the current state of the DOM.

  Cyberscript uses a combination of techniques to prepare the DOM.
  The DOM Processing steps look as follows:
  1. Via Playwright, inject a script into the DOM accessible by the SDK that can run processing.
  2. Crawl the DOM and create a list of candidate elements.
     - Candidate elements are either leaf elements (DOM elements that contain actual user facing substance), or are interactive elements.
     - Interactive elements are determined by a combination of roles and HTML tags.
  3. Candidate elements that are not active, visible, or at the top of the DOM are discarded.
     - The LLM should only receive elements it can faithfully act on on behalf of the agent/user.
  4. For each candidate element, an xPath is generated. this guarantees that if this element is picked by the LLM, we'll be able to reliably target it.
  5. Return both the list of candidate elements, as well as the map of elements to xPath selectors across the browser back to the SDK, to be analyzed by the LLM.

  While LLMs will continue to increase context window length and reduce latency, giving any reasoning system less stuff to think about should make it more reliable. As a result, DOM processing is done in chunks in order to keep the context small per inference call. In order to chunk, the SDK considers a candidate element that starts in a section of the viewport to be a part of that chunk. In the future, padding will be added to ensure that an individual chunk does not lack relevant context. See this diagram for how it looks:
  ![](./docs/media/chunks.png)

  The `act()` and `observe()` methods can take a `useVision` flag. If this is set to `true`, the LLM will be provided with a annotated screenshot of the current page to identify which elements to act on. This is useful for complex DOMs that the LLM has a hard time reasoning about, even after processing and chunking. By default, this flag is set to `"fallback"`, which means that if the LLM fails to successfully identify a single element, Cyberscript will retry the attempt using vision.

  Now we have a list of candidate elements and a way to select them. We can present those elements with additional context to the LLM for extraction or action. While untested on a large scale, presenting a "numbered list of elements" guides the model to not treat the context as a full DOM, but as a list of related but independent elements to operate on.
  In the case of action, we ask the LLM to write a playwright method in order to do the correct thing. In our limited testing, playwright syntax is much more effective than relying on built in javascript APIs, possibly due to tokenization.
  Lastly, we use the LLM to write future instructions to itself to help manage it's progress and goals when operating across chunks.

  Below is an example of how to extract a list of companies from the AI Grant website using both Stagehand and Playwright.
  ![](./docs/media/stagehand-playwright.png)

  Prompting Cyberscript is more literal and atomic than other higher level frameworks, including agentic frameworks. Here are some guidelines to help you craft effective prompts:

  - **Use specific and concise actions**
  ```javascript
  await cyberscript.act({ action: "click the login button" });
  const productInfo = await cyberscript.extract({
    instruction: "find the red shoes",
    schema: z.object({
      productName: z.string(),
      price: z.number(),
    }),
  });
  ```
  - **Break down complex tasks into smaller, atomic steps**
  Instead of combining actions:
  ```javascript
  // Avoid this
  await cyberscript.act({ action: "log in and purchase the first item" });
  ```
  Split them into individual steps:
  ```javascript
  await cyberscript.act({ action: "click the login button" });
  // ...additional steps to log in...
  await cyberscript.act({ action: "click on the first item" });
  await cyberscript.act({ action: "click the purchase button" });
  ```
  - **Use `observe()` to get actionable suggestions from the current page**
  ```javascript
  const actions = await cyberscript.observe();
  console.log("Possible actions:", actions);
  ```

  - **Use broad or ambiguous instructions**
  ```javascript
  // Too vague
  await cyberscript.act({ action: "find something interesting on the page" });
  ```
  - **Combine multiple actions into one instruction**
  ```javascript
  // Avoid combining actions
  await cyberscript.act({ action: "fill out the form and submit it" });
  ```
  - **Expect cyberscript to perform high-level planning or reasoning**
  ```javascript
  // Outside cyberscript's scope
  await cyberscript.act({ action: "book the cheapest flight available" });
  ```
  By following these guidelines, you'll increase the reliability and effectiveness of your web automations with Cyberscript. Remember, Cyberscript excels at executing precise, well-defined actions so keeping your instructions atomic will lead to the best outcomes.
  We leave the agentic behaviour to higher-level agentic systems which can use Cyberscript as a tool.

  At a high level, we're focused on improving reliability, speed, and cost in that order of priority.
  You can see the roadmap [here](./ROADMAP.md). Looking to contribute? Read on!

  > [!NOTE]
  > We highly value contributions to cyberscript! For support or code review, please join our [Slack community](https://join.slack.com/t/cyberscript-dev/shared_invite/zt-2tdncfgkk-fF8y5U0uJzR2y2_M9c9OJA).
  First, clone the repo
  ```bash
  git clone git@github.com:agi-inc/cyberscript.git
  ```
  Then install dependencies
  ```bash
  npm install
  ```
  Ensure you have the `.env` file as documented above in the Getting Started section.
  Then, run the example script `npm run example`.

  A good development loop is:
  1. Try things in the example file
  2. Use that to make changes to the SDK
  3. Write evals that help validate your changes
  4. Make sure you don't break existing evals!
  5. Open a PR and get it reviewed by the team.

  You'll need a Braintrust API key to run evals
  ```.env
  BRAINTRUST_API_KEY=""
  ```
  After that, you can run the eval using `npm run evals`

  Running all evals can take some time. We have a convenience script `example.ts` where you can develop your new single eval before adding it to the set of all evals.
  You can run `npm run example` to execute and iterate on the eval you are currently developing.

  To add a new model to Cyberscript, follow these steps:
  1. **Define the Model**: Add the new model name to the `AvailableModel` type in the `LLMProvider.ts` file. This ensures that the model is recognized by the system.
  2. **Map the Model to a Provider**: Update the `modelToProviderMap` in the `LLMProvider` class to associate the new model with its corresponding provider. This mapping is crucial for determining which client to use.
  3. **Implement the Client**: If the new model requires a new client, implement a class that adheres to the `LLMClient` interface. This class should define all necessary methods, such as `createChatCompletion`.
  4. **Update the `getClient` Method**: Modify the `getClient` method in the `LLMProvider` class to return an instance of the new client when the new model is requested.

  Cyberscript uses [tsup](https://github.com/egoist/tsup) to build the SDK and vanilla `esbuild` to build scripts that run in the DOM.
  1. run `npm run build`
  2. run `npm pack` to get a tarball for distribution


  Licensed under the MIT License.
  Copyright 2024 MultiOn, Inc.


pkgId: c7bf6f0975001af2e2bbadf0035a3647a3843e95f586e43ad854c4d8bff7cb82
name: python-cybersentry
arch: src
version: 1.4.1
epoch: 0
release: 1
summary: Advanced Cybersecurity Intelligence Tool
url: https://github.com/Lxsanto/cybersentry
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cybersentry-1.4.1-1.src.rpm
checksum_type: sha256
description:
  CyberSentry is an Advanced Cybersecurity Intelligence Tool designed for comprehensive domain analysis and threat assessment.



  1. Ensure you have Python 3.6 or later installed.

  2. It's recommended to use a virtual environment:

  ```bash
  python -m venv cybersentry-env
  source cybersentry-env/bin/activate  # On Windows use `cybersentry-env\Scripts\activate`
  ```

  3. Install CyberSentry:

  ```bash
  pip install cybersentry
  ```

  If you're installing from the source:

  ```bash
  git clone https://github.com/Lxsanto/cybersentry.git
  cd cybersentry
  pip install -e .
  ```

  This will install CyberSentry and all its dependencies.



  ```bash
  cybersentry example.com
  ```



  - Intelligent Subdomain Discovery
  - Deep Web Crawling and Analysis
  - Sensitive Directory and File Detection
  - Comprehensive DNS Record Analysis
  - Advanced IP Intelligence Gathering
  - Strategic Port Vulnerability Scanning
  - In-depth SSL Certificate Verification
  - Automated Email and Phone Number Extraction
  - Progress Bar for Real-time Analysis Updates
  - JSON and CSV Output



  Some features require API keys. Create a `.env` file in the project root with the following content:

  ```
  BEVIGIL_API_KEY=your_bevigil_api_key
  VIRUSTOTAL_API_KEY=your_virustotal_api_key

  ```



  CyberSentry is a powerful tool intended for authorized security professionals and ethical hackers. Always obtain explicit permission before analyzing any domain or network you do not own or have the right to test.



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



  Contributions are welcome! Please feel free to submit a Pull Request.



  If you encounter any issues with missing dependencies, try updating pip and reinstalling:

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

  If problems persist, please open an issue on the GitHub repository.



  * **Luca Lorenzi** - *Initial work* - [Lxsanto](https://github.com/Lxsanto)



  * Hat tip to anyone whose code was used
  * Inspiration
  * etc


pkgId: feddf743c91da2f2b5b3c634c5ae4d5b927072d9aeda021ebe9cb26d05d9a335
name: python-cybershuttle-tune
arch: src
version: 0.1.19
epoch: 0
release: 1
summary: Parameter Tunning Library for CyberShuttle
url: https://github.com/cyber-shuttle/cybershuttle-tune
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cybershuttle-tune-0.1.19-1.src.rpm
checksum_type: sha256
description:
  Parameter Sweeping Library and Command line Interface for CyberShuttle Project


  ```
  pip install cybershuttle-tune
  ```

  Refer to examples for further usage information


  ```
  python3.10 -m venv venv  ## Use python 3.10.6 or higher
  source venv/bin/activate
  pip install poetry
  poetry shell

  poetry install
  poetry publish --build
  ```


pkgId: 03bedf57b2157205edb65fc5d011c482c687dc441004f3b49e91407ab2588478
name: python-cyborgmarina-litellm
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: Fork of BerriAI's litellm library to easily interface with LLM API providers
url: https://pypi.org/project/cyborgmarina-litellm/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyborgmarina-litellm-0.0.1-1.src.rpm
checksum_type: sha256
description:
  <h1 align="center">
          🚅 LiteLLM
      </h1>
      <p align="center">
          <p align="center">
          <a href="https://render.com/deploy?repo=https://github.com/BerriAI/litellm" target="_blank" rel="nofollow"><img src="https://render.com/images/deploy-to-render-button.svg" alt="Deploy to Render"></a>
          <a href="https://railway.app/template/HLP0Ub?referralCode=jch2ME">
            <img src="https://railway.app/button.svg" alt="Deploy on Railway">
          </a>
          </p>
          <p align="center">Call all LLM APIs using the OpenAI format [Bedrock, Huggingface, VertexAI, TogetherAI, Azure, OpenAI, Groq etc.]
          <br>
      </p>
  <h4 align="center"><a href="https://docs.litellm.ai/docs/simple_proxy" target="_blank">LiteLLM Proxy Server (LLM Gateway)</a> | <a href="https://docs.litellm.ai/docs/hosted" target="_blank"> Hosted Proxy (Preview)</a> | <a href="https://docs.litellm.ai/docs/enterprise"target="_blank">Enterprise Tier</a></h4>
  <h4 align="center">
      <a href="https://pypi.org/project/litellm/" target="_blank">
          <img src="https://img.shields.io/pypi/v/litellm.svg" alt="PyPI Version">
      </a>
      <a href="https://dl.circleci.com/status-badge/redirect/gh/BerriAI/litellm/tree/main" target="_blank">
          <img src="https://dl.circleci.com/status-badge/img/gh/BerriAI/litellm/tree/main.svg?style=svg" alt="CircleCI">
      </a>
      <a href="https://www.ycombinator.com/companies/berriai">
          <img src="https://img.shields.io/badge/Y%20Combinator-W23-orange?style=flat-square" alt="Y Combinator W23">
      </a>
      <a href="https://wa.link/huol9n">
          <img src="https://img.shields.io/static/v1?label=Chat%20on&message=WhatsApp&color=success&logo=WhatsApp&style=flat-square" alt="Whatsapp">
      </a>
      <a href="https://discord.gg/wuPM9dRgDw">
          <img src="https://img.shields.io/static/v1?label=Chat%20on&message=Discord&color=blue&logo=Discord&style=flat-square" alt="Discord">
      </a>
  </h4>

  LiteLLM manages:

  - Translate inputs to provider's `completion`, `embedding`, and `image_generation` endpoints
  - [Consistent output](https://docs.litellm.ai/docs/completion/output), text responses will always be available at `['choices'][0]['message']['content']`
  - Retry/fallback logic across multiple deployments (e.g. Azure/OpenAI) - [Router](https://docs.litellm.ai/docs/routing)
  - Set Budgets & Rate limits per project, api key, model [LiteLLM Proxy Server (LLM Gateway)](https://docs.litellm.ai/docs/simple_proxy)

  [**Jump to LiteLLM Proxy (LLM Gateway) Docs**](https://github.com/BerriAI/litellm?tab=readme-ov-file#openai-proxy---docs) <br>
  [**Jump to Supported LLM Providers**](https://github.com/BerriAI/litellm?tab=readme-ov-file#supported-providers-docs)

  🚨 **Stable Release:** Use docker images with the `-stable` tag. These have undergone 12 hour load tests, before being published.

  Support for more providers. Missing a provider or LLM Platform, raise a [feature request](https://github.com/BerriAI/litellm/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.yml&title=%5BFeature%5D%3A+).



  > [!IMPORTANT]
  > LiteLLM v1.0.0 now requires `openai>=1.0.0`. Migration guide [here](https://docs.litellm.ai/docs/migration)
  > LiteLLM v1.40.14+ now requires `pydantic>=2.0.0`. No changes required.

  <a target="_blank" href="https://colab.research.google.com/github/BerriAI/litellm/blob/main/cookbook/liteLLM_Getting_Started.ipynb">
    <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
  </a>

  ```shell
  pip install litellm
  ```

  ```python
  from litellm import completion
  import os


  os.environ["OPENAI_API_KEY"] = "your-openai-key"
  os.environ["COHERE_API_KEY"] = "your-cohere-key"

  messages = [{ "content": "Hello, how are you?","role": "user"}]


  response = completion(model="gpt-3.5-turbo", messages=messages)


  response = completion(model="command-nightly", messages=messages)
  print(response)
  ```

  Call any model supported by a provider, with `model=<provider_name>/<model_name>`. There might be provider-specific details here, so refer to [provider docs for more information](https://docs.litellm.ai/docs/providers)



  ```python
  from litellm import acompletion
  import asyncio

  async def test_get_response():
      user_message = "Hello, how are you?"
      messages = [{"content": user_message, "role": "user"}]
      response = await acompletion(model="gpt-3.5-turbo", messages=messages)
      return response

  response = asyncio.run(test_get_response())
  print(response)
  ```



  liteLLM supports streaming the model response back, pass `stream=True` to get a streaming iterator in response.
  Streaming is supported for all models (Bedrock, Huggingface, TogetherAI, Azure, OpenAI, etc.)

  ```python
  from litellm import completion
  response = completion(model="gpt-3.5-turbo", messages=messages, stream=True)
  for part in response:
      print(part.choices[0].delta.content or "")


  response = completion('claude-2', messages, stream=True)
  for part in response:
      print(part.choices[0].delta.content or "")
  ```



  LiteLLM exposes pre defined callbacks to send data to Lunary, Langfuse, DynamoDB, s3 Buckets, Helicone, Promptlayer, Traceloop, Athina, Slack, MLflow

  ```python
  from litellm import completion


  os.environ["LUNARY_PUBLIC_KEY"] = "your-lunary-public-key"
  os.environ["HELICONE_API_KEY"] = "your-helicone-auth-key"
  os.environ["LANGFUSE_PUBLIC_KEY"] = ""
  os.environ["LANGFUSE_SECRET_KEY"] = ""
  os.environ["ATHINA_API_KEY"] = "your-athina-api-key"

  os.environ["OPENAI_API_KEY"]


  litellm.success_callback = ["lunary", "langfuse", "athina", "helicone"] # log input/output to lunary, langfuse, supabase, athina, helicone etc


  response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}])
  ```



  Track spend + Load Balance across multiple projects

  [Hosted Proxy (Preview)](https://docs.litellm.ai/docs/hosted)

  The proxy provides:

  1. [Hooks for auth](https://docs.litellm.ai/docs/proxy/virtual_keys#custom-auth)
  2. [Hooks for logging](https://docs.litellm.ai/docs/proxy/logging#step-1---create-your-custom-litellm-callback-class)
  3. [Cost tracking](https://docs.litellm.ai/docs/proxy/virtual_keys#tracking-spend)
  4. [Rate Limiting](https://docs.litellm.ai/docs/proxy/users#set-rate-limits)






  ```shell
  pip install 'litellm[proxy]'
  ```



  ```shell
  $ litellm --model huggingface/bigcode/starcoder


  ```




  > [!IMPORTANT]
  > 💡 [Use LiteLLM Proxy with Langchain (Python, JS), OpenAI SDK (Python, JS) Anthropic SDK, Mistral SDK, LlamaIndex, Instructor, Curl](https://docs.litellm.ai/docs/proxy/user_keys)

  ```python
  import openai # openai v1.0.0+
  client = openai.OpenAI(api_key="anything",base_url="http://0.0.0.0:4000") # set proxy to base_url

  response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [
      {
          "role": "user",
          "content": "this is a test request, write a short poem"
      }
  ])

  print(response)
  ```



  Connect the proxy with a Postgres DB to create proxy keys

  ```bash

  git clone https://github.com/BerriAI/litellm


  cd litellm


  echo 'LITELLM_MASTER_KEY="sk-1234"' > .env





  echo 'LITELLM_SALT_KEY="sk-1234"' > .env

  source .env


  docker-compose up
  ```


  UI on `/ui` on your proxy server
  ![ui_3](https://github.com/BerriAI/litellm/assets/29436595/47c97d5e-b9be-4839-b28c-43d7f4f10033)

  Set budgets and rate limits across multiple projects
  `POST /key/generate`



  ```shell
  curl 'http://0.0.0.0:4000/key/generate' \
  --header 'Authorization: Bearer sk-1234' \
  --header 'Content-Type: application/json' \
  --data-raw '{"models": ["gpt-3.5-turbo", "gpt-4", "claude-2"], "duration": "20m","metadata": {"user": "ishaan@berri.ai", "team": "core-infra"}}'
  ```



  ```shell
  {
      "key": "sk-kdEXbIqZRwEeEiHwdg7sFA", # Bearer token
      "expires": "2023-11-19T01:38:25.838000+00:00" # datetime object
  }
  ```



  | Provider                                                                            | [Completion](https://docs.litellm.ai/docs/#basic-usage) | [Streaming](https://docs.litellm.ai/docs/completion/stream#streaming-responses) | [Async Completion](https://docs.litellm.ai/docs/completion/stream#async-completion) | [Async Streaming](https://docs.litellm.ai/docs/completion/stream#async-streaming) | [Async Embedding](https://docs.litellm.ai/docs/embedding/supported_embedding) | [Async Image Generation](https://docs.litellm.ai/docs/image_generation) |
  |-------------------------------------------------------------------------------------|---------------------------------------------------------|---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------|-------------------------------------------------------------------------|
  | [openai](https://docs.litellm.ai/docs/providers/openai)                             | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 | ✅                                                                             | ✅                                                                       |
  | [azure](https://docs.litellm.ai/docs/providers/azure)                               | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 | ✅                                                                             | ✅                                                                       |
  | [aws - sagemaker](https://docs.litellm.ai/docs/providers/aws_sagemaker)             | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 | ✅                                                                             |                                                                         |
  | [aws - bedrock](https://docs.litellm.ai/docs/providers/bedrock)                     | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 | ✅                                                                             |                                                                         |
  | [google - vertex_ai](https://docs.litellm.ai/docs/providers/vertex)                 | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 | ✅                                                                             | ✅                                                                       |
  | [google - palm](https://docs.litellm.ai/docs/providers/palm)                        | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [google AI Studio - gemini](https://docs.litellm.ai/docs/providers/gemini)          | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [mistral ai api](https://docs.litellm.ai/docs/providers/mistral)                    | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 | ✅                                                                             |                                                                         |
  | [cloudflare AI Workers](https://docs.litellm.ai/docs/providers/cloudflare_workers)  | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [cohere](https://docs.litellm.ai/docs/providers/cohere)                             | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 | ✅                                                                             |                                                                         |
  | [anthropic](https://docs.litellm.ai/docs/providers/anthropic)                       | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [empower](https://docs.litellm.ai/docs/providers/empower)                    | ✅                                                      | ✅                                                                              | ✅                                                                                  | ✅                                                                                |
  | [huggingface](https://docs.litellm.ai/docs/providers/huggingface)                   | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 | ✅                                                                             |                                                                         |
  | [replicate](https://docs.litellm.ai/docs/providers/replicate)                       | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [together_ai](https://docs.litellm.ai/docs/providers/togetherai)                    | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [openrouter](https://docs.litellm.ai/docs/providers/openrouter)                     | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [ai21](https://docs.litellm.ai/docs/providers/ai21)                                 | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [baseten](https://docs.litellm.ai/docs/providers/baseten)                           | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [vllm](https://docs.litellm.ai/docs/providers/vllm)                                 | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [nlp_cloud](https://docs.litellm.ai/docs/providers/nlp_cloud)                       | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [aleph alpha](https://docs.litellm.ai/docs/providers/aleph_alpha)                   | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [petals](https://docs.litellm.ai/docs/providers/petals)                             | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [ollama](https://docs.litellm.ai/docs/providers/ollama)                             | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 | ✅                                                                             |                                                                         |
  | [deepinfra](https://docs.litellm.ai/docs/providers/deepinfra)                       | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [perplexity-ai](https://docs.litellm.ai/docs/providers/perplexity)                  | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [Groq AI](https://docs.litellm.ai/docs/providers/groq)                              | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [Deepseek](https://docs.litellm.ai/docs/providers/deepseek)                         | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [anyscale](https://docs.litellm.ai/docs/providers/anyscale)                         | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [IBM - watsonx.ai](https://docs.litellm.ai/docs/providers/watsonx)                  | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 | ✅                                                                             |                                                                         |
  | [voyage ai](https://docs.litellm.ai/docs/providers/voyage)                          |                                                         |                                                                                 |                                                                                     |                                                                                   | ✅                                                                             |                                                                         |
  | [xinference [Xorbits Inference]](https://docs.litellm.ai/docs/providers/xinference) |                                                         |                                                                                 |                                                                                     |                                                                                   | ✅                                                                             |                                                                         |
  | [FriendliAI](https://docs.litellm.ai/docs/providers/friendliai)                              | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |
  | [Galadriel](https://docs.litellm.ai/docs/providers/galadriel)                              | ✅                                                       | ✅                                                                               | ✅                                                                                   | ✅                                                                                 |                                                                               |                                                                         |

  [**Read the Docs**](https://docs.litellm.ai/docs/)



  To contribute: Clone the repo locally -> Make a change -> Submit a PR with the change.

  Here's how to modify the repo locally:
  Step 1: Clone the repo

  ```
  git clone https://github.com/BerriAI/litellm.git
  ```

  Step 2: Navigate into the project, and install dependencies:

  ```
  cd litellm
  poetry install -E extra_proxy -E proxy
  ```

  Step 3: Test your change:

  ```
  cd litellm/tests # pwd: Documents/litellm/litellm/tests
  poetry run flake8
  poetry run pytest .
  ```

  Step 4: Submit a PR with your changes! 🚀

  - push your fork to your GitHub repo
  - submit a PR from there



  Follow these instructions if you want to build / run the LiteLLM Docker Image yourself.

  Step 1: Clone the repo

  ```
  git clone https://github.com/BerriAI/litellm.git
  ```

  Step 2: Build the Docker Image

  Build using Dockerfile.non_root
  ```
  docker build -f docker/Dockerfile.non_root -t litellm_test_image .
  ```

  Step 3: Run the Docker Image

  Make sure config.yaml is present in the root directory. This is your litellm proxy config file.
  ```
  docker run \
      -v $(pwd)/proxy_config.yaml:/app/config.yaml \
      -e DATABASE_URL="postgresql://xxxxxxxx" \
      -e LITELLM_MASTER_KEY="sk-1234" \
      -p 4000:4000 \
      litellm_test_image \
      --config /app/config.yaml --detailed_debug
  ```


  For companies that need better security, user management and professional support

  [Talk to founders](https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat)

  This covers:
  - ✅ **Features under the [LiteLLM Commercial License](https://docs.litellm.ai/docs/proxy/enterprise):**
  - ✅ **Feature Prioritization**
  - ✅ **Custom Integrations**
  - ✅ **Professional Support - Dedicated discord + slack**
  - ✅ **Custom SLAs**
  - ✅ **Secure access with Single Sign-On**



  - [Schedule Demo 👋](https://calendly.com/d/4mp-gd3-k5k/berriai-1-1-onboarding-litellm-hosted-version)
  - [Community Discord 💭](https://discord.gg/wuPM9dRgDw)
  - Our numbers 📞 +1 (770) 8783-106 / ‭+1 (412) 618-6238‬
  - Our emails ✉️ ishaan@berri.ai / krrish@berri.ai



  - **Need for simplicity**: Our code started to get extremely complicated managing & translating calls between Azure, OpenAI and Cohere.



  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
  <!-- prettier-ignore-start -->
  <!-- markdownlint-disable -->

  <!-- markdownlint-restore -->
  <!-- prettier-ignore-end -->

  <!-- ALL-CONTRIBUTORS-LIST:END -->

  <a href="https://github.com/BerriAI/litellm/graphs/contributors">
    <img src="https://contrib.rocks/image?repo=BerriAI/litellm" />
  </a>


pkgId: 7055bc1648198ad5f74ed553e7ff4a6bacd1508002f3afdb99b010267fcc238e
name: python-cybotrade
arch: src
version: 1.4.31
epoch: 0
release: 1
url: https://app.cybotrade.rs
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cybotrade-1.4.31-1.src.rpm
checksum_type: sha256
summary:
  This library contains Cybotrade's core runtime, integrations with Exchanges API, historical and live market data collector and wrap them into a simple, easy-to-use Python SDK.

description:
  This is the Client SDK for building automated trading strategies on [Cybotrade](https://app.cybotrade.rs). This library provides the core runtime, integration with Exchanges API, historical and live market data collector and wrap them into a simple, easy-to-use and easy-to-learn Python SDK as a foundation users' strategies.



  The documentation for the Cybotrade SDK can be found [here](https://docs.cybotrade.rs).



  ```bash
  pip install cybotrade
  ```



  The following example shows how to create a simple strategy that buys 0.01 BTC when the price goes up and sells 0.01 BTC when the price goes down.

  For a more advanced usage, please refer to the [documentation](https://docs.cybotrade.rs).

  ```python
  from cybotrade.strategy import Strategy as BaseStrategy
  from cybotrade.models import (
      OrderParams,
      OrderSide,
      RuntimeMode,
      RuntimeConfig,
      Exchange,
  )
  from datetime import datetime, timedelta, timezone

  import asyncio

  class Strategy(BaseStrategy):
      async def on_candle_closed(self, strategy, topic, symbol, data_map):
          
          candles = data_map[topic]

          if candles[-1].close > candles[-2].close:
              
              await strategy.open(
                  side=OrderSide.Buy,
                  take_profit=None,
                  stop_loss=None,
                  quantity=0.01,
                  limit=None
              )
          else:
              
              await strategy.open(
                  side=OrderSide.Sell,
                  take_profit=None,
                  stop_loss=None,
                  quantity=0.01,
                  limit=None
              )

  async def main():
      runtime = await Runtime.connect(
          RuntimeConfig(
              mode=RuntimeMode.Backtest,
              exchange=Exchange.BybitLinear,
              datasource_topics=[],
              candle_topics=["candles-1h-BTC/USDT-bybit"],
              start_time=datetime.now(timezone.utc) - timedelta(minutes=10000),
              end_time=datetime.now(timezone.utc),
              api_key="YOUR_CYBOTRADE_API_KEY",
              api_secret="YOUR_CYBOTRAD_API_SECRET",
              data_count=100
          ),
          Strategy(),
      )

      await runtime.start()

  asyncio.run(main())
  ```


pkgId: 1d7d01b4f191cfff42934932505be97db52871ae9c84a741ac9216b626a8c5c6
name: python-cybox
arch: src
version: 2.1.0.21
epoch: 0
release: 1
summary: A Python library for parsing and generating CybOX content.
url: https://cyboxproject.github.io/
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cybox-2.1.0.21-1.src.rpm
checksum_type: sha256
description:
  A Python library for parsing, manipulating, and generating `Cyber Observable eXpression (CybOX™) <https://cyboxproject.github.io/>`_ v2.1.0 content.
  |travis_badge| |landscape_io_badge| |version_badge|


pkgId: 9b9c0b42d3c67596fc8539d0be06c6019e6844876dbb47d8d4224720d90e254b
name: python-cybrex
arch: src
version: 1.12.10
epoch: 0
release: 1
summary: Researching AI
url: https://github.com/nexus-stc/stc
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cybrex-1.12.10-1.src.rpm
checksum_type: sha256
description:
  Cybrex AI integrates several strategies to use AI for facilitating navigation through science. Shortly, Cybrex accept your query, retrieve scholarly publications and books from STC and answer your query using AI and collected documents.

  More technical description:
  - IPFS is utilized to access the Standard Template Construct (STC).
  - STC provides the raw documents for Cybrex.
  - Embedding Model constructs embeddings for these documents and Cybrex stores these embeddings in the vector database.
  - These embeddings are then used to retrieve relevant documents, and then they are sent to LLM for Q&A and summarization.



  You should have [installed IPFS](https://libstc.cc/#/help/install-ipfs)

  Then, you should install cybrex package
  ```bash
  ultranymous@nevermore:~ pip install cybrex
  ```

  and launch qdrant database for storing vectors:

  ```bash
  ultranymous@nevermore:~ docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
  ```

  Upon its initial launch, `cybrex` will create a `~/.cybrex` directory containing a `config.yaml` file and a `chroma` directory.
  You can edit the config file to point to different IPFS addresses.



  **Attention!** STC does not contain every book or publication in the world. We are constantly increasing coverage but there is still a lot to do.
  STC contains metadata for the most of the items, but `links` or `content` fields may be absent.

  ```console



  ultranymous@nevermore:~ geck --ipfs-http-base-url 127.0.0.1:8080 - serve
  ```

  Now we should initialize Cybrex and choose which models will be used:

  ```console
  ultranymous@nevermore:~ cybrex - write-config --force

  ultranymous@nevermore:~ export OPENAI_API_KEY=...
  ultranymous@nevermore:~ cybrex - write-config -l openai --force

  ultranymous@nevermore:~ cybrex - write-config --device cuda --force


  ultranymous@nevermore:~ cybrex - sum-doc doi:10.1155/2022/7138756

  Document: doi:10.1155/2022/7138756
  Summarization: Resveratrol is a natural compound found in various plants and has been studied for
  its anti-inflammatory and antiviral properties. Resveratrol has been shown to regulate miR-223-3p/NLRP3
  pathways, inhibit downstream caspase-1 activation, reduce the expression of chemokines, and decrease
  the levels of calcium strength, pro-inflammatory cytokines, and MDA in an acute bacterial meningitis model.
  It can also regulate the PI3K/Akt/mTOR signaling pathway, reduce NF-κB/p65 and pro-inflammatory cytokines,
  and increase nitric oxide, sialic acid, gastric tissue, and vitamin C concentrations. Resveratrol has been
  found to inhibit viral replication and have antiviral activity against Zika Virus, Pseudorabies virus,
  and HSV-1. The exact mechanisms of action of resveratrol are still not fully understood, but it is believed
  to activate the host's immune defences, affect the TLRs/NF-κB signalling pathway, and directly inhibit
  viral gene expression.


  ultranymous@nevermore:~ cybrex - chat-doc doi:10.1155/2022/7138756 \
    --query "What is the antivirus effect of resveratrol?"

  Q: What is the antivirus effect of resveratrol?
  A: Resveratrol has been found to have antiviral effects, primarily through its ability to inhibit viral
  entry and replication. It has been reported to inhibit the replication of multiple viruses, including
  human immunodeficiency virus (HIV), herpes simplex virus (HSV), hepatitis C virus (HCV), and
  Zika virus (ZIKV). Resveratrol appears to block the activities of the TIR-domain-containing
  adapter-inducing interferon-β (TRIF) complex, suggesting that resveratrol would also inhibit NF-κB
  transcription induced by TRIF. Additionally, it has been reported to reduce the activity of respiratory
  syncytial virus (RSV) and to stimulate the secretion of higher levels of TNF-α, promoting cell death
  and RSV clearance.


  ultranymous@nevermore:~ cybrex - chat-sci "What is the antivirus effect of resveratrol?" --n-chunks 4 --n-documents 10

  Q: What is the antivirus effect of resveratrol?
  A: Resveratrol has been found to possess antiviral activity against a variety of viruses, including herpes simplex virus, human immunodeficiency virus, and hepatitis C virus. It has been shown to inhibit the replication of several viruses, including HIV, herpes simplex virus, and influenza virus, and to regulate TLR3 expression, thus affecting the recruitment of downstream related factors and finally affecting the regulation process of related signal pathways. It has also been studied for its antiviral activity against Reoviridae, and for its potential to inhibit Zika virus cytopathy effect. It has been active against Epstein virus, rotavirus, and vesicular stomatitis virus, and has been reported to alleviate virus-induced reproductive failure and to promote RSV clearance in the body more quickly.

  ```


pkgId: 8803bce37cd7b58b5ad449369e9a1afd777622e29702159a3fb8c7064aca9ea3
name: python-cybsi-sdk
arch: src
version: 2.14.0
epoch: 0
release: 1
summary: Cybsi development kit
url: https://pypi.org/project/cybsi-sdk/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cybsi-sdk-2.14.0-1.src.rpm
checksum_type: sha256
description:
  Библиотека для взаимодействия с API Threat Analyzer. Позволяет:
  * Настраивать продукт
  * Расширять возможности продукта пользовательскими источниками данных
  * Выгружать и загружать Threat Intelligence в различных форматах
  Библиотека имеет как синхронный, так и асинхронный интерфейс.
  [![Supported Versions](https://img.shields.io/pypi/pyversions/cybsi-sdk.svg)](https://pypi.org/project/cybsi-sdk/)
  [![Documentation Status](https://readthedocs.org/projects/cybsi-sdk/badge/?version=latest)](https://cybsi-sdk.readthedocs.io/en/latest/?badge=latest)


pkgId: 4b11b6d9ba51f64f53381c6030dadb151758f793eae5c63f22269f626f319aa7
name: python-cyclarity-in-vehicle-sdk
arch: src
version: 1.0.5
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cyclarity-in-vehicle-sdk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclarity-in-vehicle-sdk-1.0.5-1.src.rpm
checksum_type: sha256
description:
  This package provides the In-Vehicle SDK, offering a range of functionalities to support communication and operations with in-vehicle systems.



  The In-Vehicle SDK package includes the following interfaces and implementations:

  1. **CommunicatorBase**: Provides the capability to send and receive byte data over various protocols. The following implementations are available:
      * `TcpCommunicator`
      * `MulticastCommunicator`
      * `IsoTpCommunicator`
      * `DoipCommunicator`

  2. **RawSocketCommunicatorBase**: Offers send, receive, and srp (send and receive answer) operations for `py_pcapplusplus.Packet` types. The following implementations are available:
      * `Layer2RawSocket`
      * `Layer3RawSocket`

  3. **CanCommunicatorBase**: Exposes the python-can functionality, offering operations like send, receive, sniff, and more. The following implementation is available:
      * `CanCommunicatorSocketCan` - A specific implementation for the socketcan driver

  4. **DoipUtils**: A utility library for performing Diagnostic over IP (DoIP) operations, such as vehicle identity requests, routing activation, and more.

  5. **UdsUtilsBase**: Used for performing Unified Diagnostic Services (UDS) operations, such as ECU reset, read DIDs, session change, and more. The following implementation is available:
      * `UdsUtils` - Can be initialized to work over DoIP/ISO-TP

  6. **IDeviceShell**: Allows for the execution of shell commands. The following implementations are available:
      * `AdbDeviceShell`
      * `SerialDeviceShell`
      * `SshDeviceShell`



  You can install the In-Vehicle SDK package using pip:
  `pip install cyclarity-in-vehicle-sdk`


pkgId: 3b3ab31e107fe3070ca20e4cfb73dce8c50170329af68aeb566ab28fcf87307e
name: python-cyclarity-sdk
arch: src
version: 1.0.58
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cyclarity-sdk/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclarity-sdk-1.0.58-1.src.rpm
checksum_type: sha256
description:
  Project description
  CyClarity SDK

  Introduction

  CyClarity SDK is a Python package that provides an interface for interacting with the CyClarity platform. It includes classes and methods for creating, managing, and interacting with various resources on the platform.

  Installation

  You can install the CyClarity SDK using poetry in your poetry project:

  ```bash
    poetry add cyclarity-sdk
  ```

  To create a poetry project use this docs: https://python-poetry.org/docs/

  You can download your sdk-usage-example using cyclarity git hub example : https://github.com/cyclarity/cyclarity-sdk-usage-examples
  Usage

  Here are examples of how to use the classes in the CyClarity SDK. Runnable The Runnable class is a base class for creating objects that can be run with setup and teardown phases. It has setup, run, and teardown methods that need to be implemented.

  This is the structure of a runnable:
  ```python
  from cyclarity_sdk.runnable import Runnable, BaseResultsModel
  from cyclarity_sdk.sdk_models.findings import PTFinding
  import cyclarity_sdk.sdk_models.findings.types import FindingStatus , FindingType , AssessmentCategory
  import cyclarity_sdk.sdk_models.findings.types as PTFindingTypes
  class MyResult(BaseResultsModel):
      res_str: str

  class MyRunnable(Runnable[MyResult]):
      desc: str
      cli_args: str
      
      def setup(self):
          self.logger.info("Setting up")
      
      def run(self):
          self.logger.info("Running")
          self.platform_api.send_test_report_description("This is a test description")
          self.platform_api.send_finding(PTFinding(
              topic='hello world',
              status=PTFindingTypes.FindingStatus.FINISHED,
              type=PTFindingTypes.FindingType.FINDING,
              assessment_category=PTFindingTypes.AssessmentCategory.FUNCTIONAL_TEST,
              assessment_technique=PTFindingTypes.AssessmentTechnique.OTHER_EXPLORATION,
              purpose='Snippet example',
              description='This is an example snippet on how to user platform_api'))
          for percentage in range(101):
              self.platform_api.report_test_progress(percentage=percentage)
              time.sleep(0.01)
          return MyResult(res_str="success!")

      def teardown(self, exception_type, exception_value, traceback):
          self.logger.info("Tearing down")
  ```


  The PlatformApi class provides methods for interacting with the CyClarity platform. It is used within a Runnable instance through the self.platform_api attribute.
  ```python

  from cyclarity_sdk.platform_api.Iplatform_connector import IPlatformConnectorApi as IPlatformConnectorApi
  from cyclarity_sdk.sdk_models.findings import PTFinding as PTFinding

  class PlatformApi:
      def __init__(self, platform_connector: IPlatformConnectorApi | None = None) -> None: ...
      def send_test_report_description(self, description: str): ...
      def send_finding(self, pt_finding: PTFinding): ...
      def report_test_progress(self, percentage: int): ...

  ```

  description: str (expects a description)

  Gets PTfinding object and sends it to be visible on the website (See [PTFinding](#ptfinding))

  percentage: int (expects a percentage , example above)


  ```python
  from pydantic import BaseModel, Field, computed_field, field_validator
  from enum import Enum
  from cyclarity_sdk.sdk_models.findings.types import FindingStatus, FindingType, AssessmentCategory, AssessmentTechnique
  from cyclarity_sdk.sdk_models import ExecutionMetadata, MessageType

  class PTFinding(BaseModel):
      topic: str
      status: FindingStatus
      type: FindingType
      assessment_category: AssessmentCategory
      assessment_technique: AssessmentTechnique
      purpose: str
      description: str

  class FindingStatus(str, Enum):
      FINISHED = 'Finished'
      PARTIALLY_PERFORMED = 'Partially Performed'
      NOT_PERFORMED = 'Not Performed'

  class FindingType(str, Enum):
      FINDING = 'Finding'
      NON_FINDING = 'Non Finding'
      INSIGHT = 'Insight'
      ADDITIONAL_INFORMATION = 'Additional Information'

  class AssessmentCategory(str, Enum):
      FUNCTIONAL_TEST = 'functional test'
      PENTEST = 'pentest'
      VULNERABILITY_ANALYSIS = 'vulnerability analysis'
      INCIDENT = 'incident'
      CODE_REVIEW = 'code review'
      UNKNOWN = 'unknown'

  class AssessmentTechnique(str, Enum):
      SPEC_BASED_TEST_CASE = 'specification-based test case'
      HARDWARE_ANALYSIS = 'hardware analysis'
      BINARY_ANALYSIS = 'binary analysis'
      INTERFACE_ANALYSIS = 'interface analysis'
      NETWORK_ANALYSIS = 'network analysis'
      CODE_REVIEW = 'code review'
      SPECIFICATION_REVIEW = 'specification review'
      CVE_SEARCH = 'CVE search'
      OTHER_EXPLORATION = 'other exploration'
      UNKNOWN = 'unknown'
  ```


pkgId: 52f8ee282ed3b1062b956843c5d7178c09b45d7f390766bb5c58304c93e18cc0
name: python-cyclebane
arch: src
version: 24.10.0
epoch: 0
release: 1
summary: Transform directed acyclic graphs using map-reduce and groupby operations
url: https://pypi.org/project/cyclebane/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclebane-24.10.0-1.src.rpm
checksum_type: sha256
description:
  [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
  [![PyPI badge](http://img.shields.io/pypi/v/cyclebane.svg)](https://pypi.python.org/pypi/cyclebane)
  [![Anaconda-Server Badge](https://anaconda.org/scipp/cyclebane/badges/version.svg)](https://anaconda.org/scipp/cyclebane)
  [![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE)





  Transform directed acyclic graphs using map-reduce and groupby operations

  This library is an attempt to merge the concepts of directed acyclic graphs (DAG) with array-like objects such as NumPy arrays, Pandas DataFrames, or Xarray/Scipp DataArrays.
  This could be useful for describing tasks graphs, e.g., when a series of tasks is applied to chunks of an array.
  These tasks also have an array structure.
  After an reduction operation of chunks, the graph loses this structure, i.e., only a subset of the graph's nodes has array structure.
  What if we could work with this structure, even though only parts of the graph follows it?
  And what if we could use the power of array slicing with named dimensions, or select by label?
  This is what Cyclebane tries to do.

  Our initial goal is to support:

  - `map` operations of a DAG's source nodes over an array-like (https://docs.dask.org/en/latest/high-level-graphs.html).
    Cyclebane will effectively copy all descendants of those nodes, once for each array element.
    Cyclebane will support joint mappings of multiple source nodes by mapping over, e.g., a DataFrame with multiple columns, as well as chaining independent map operations at different source nodes.
    In the latter case this will effectively broadcast at descendant nodes that depend on multiple such source nodes.
  - `reduce` operations at descendants of mapped nodes.
    This will add a new node with edges to all copies of the mapped node being reduced.
    Cyclebane will support reducing only individual axes or all axes, similar to Numpy.
  - `groupby` operations similar to Pandas and Xarray (albeit more limited).
  - Positional and label-based indexing.
    Cyclebane will support selecting branches that were creating during `map` (or `groupby`) operations based on their indices.
    The graph structure will be left untouched, i.e., nodes after a `reduce` operation will be preserved, but fewer edges will lead to the reduce node.

  See also Dask's [High Level Graphs](https://docs.dask.org/en/latest/high-level-graphs.html) for a related concept (without the direct support for any such operations).



  ```sh
  python -m pip install cyclebane
  ```

rpm_license:
  BSD 3-Clause License  Copyright (c) 2024, Scipp contributors (https://github.com/scipp) All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


pkgId: c038897a8e6c8e6026c70583766543a2df2edcbbc4251114715a00a200293ec4
name: python-cycleformers
arch: src
version: 0.1.0
epoch: 0
release: 1
url: https://pypi.org/project/cycleformers/
rpm_license: Attribution 4.0 International
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cycleformers-0.1.0-1.src.rpm
checksum_type: sha256
summary:
  A comprehensive implementation of the cycle-consistency training paradigm, extending the Huggingface Transformers trainer API to accommodate arbitrary combinations of generative models.

description:
  <div align="center">

  [![Python](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/)
  [![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)
  <!-- ![Coverage](.github/badges/coverage.svg) -->
  <!-- [![Build Status](https://github.com/wrmthorne/cycleformers/workflows/CI-Pipeline/badge.svg)](https://github.com/wrmthorne/cycleformers/actions) -->

  </div>

  A Python library for efficient cycle-consistency training of transformer models. Cycleformers simplifies iterative back-translation with support for both causal and seq2seq architectures. We also implement Multi-Adapter Cycle-Consistency Training (MACCT), enabling training of LoRA adapters on a frozen base model for `7.5x` larger model capacity for the same memory footprint.



  - 🤗 Seamless integration with Hugging Face Transformers
  - 🚀 PEFT/LoRA support for memory-efficient training
  - 🤖 Compatible with both causal and seq2seq models
  - 🔥 Optimized for various hardware configurations






  ```bash
  pip install cycleformers
  ```



  The `CycleTrainer` class is an extension but significant redesign of the 🤗 Transformers trainer, designed to abstract away the specifics of training while remaining configurable. Both Seq2Seq and Causal architectures are supported, each able to train via PEFT adapter swapping for memory efficient configurations. Check the [docs] for [usage] details and [examples].

  To train using two identical models the following sample code can be used along with two datasets:

  ```python
  from cycleformers import CycleTrainer, CycleTrainingArguments

  model = AutoModelForCausalLM.from_pretrained("gpt2", device_map="auto")
  tokenizer = AutoTokenizer.from_pretrained("gpt2")

  args = CycleTrainingArguments(output_dir="gpt2-cct")
  trainer = CycleTrainer(
      args,
      models = model
      tokenizers = tokenizer
      train_dataset_A = dataset_A,
      train_dataset_B = dataset_B
  )
  trainer.train()
  ```

  Any two models (🚧 currently both seq2seq or both causal) can be combined together for completely customisable training:

  ```python
  model_A = AutoModelForCausalLM.from_pretrained("gpt2", device_map="auto")
  model_B = AutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-base", device_map="auto")
  tokenizer_A = AutoTokenizer.from_pretrained("gpt2")
  tokenizer_B = AutoTokenizer.from_pretrained("google/flan-t5-small")

  trainer = CycleTrainer(
      args,
      models = {
          "A": model_A,
          "B": model_B
      }
      tokenizers = {
          "A": tokenizer_A,
          "B": tokenizer_B
      }
      train_dataset_A = dataset_A,
      train_dataset_B = dataset_B
  )
  ```



  The `CycleTrainer` class is also setup to accept a single base model and train two PEFT adapters ontop of it, switching between them to emulate the two model setup. This allows for the training of `7.5x larger models` for the same memory footprint:

  ```python
  peft_config = PeftConfig(
      task_type="CAUSAL_LM",
      r=16,
      lora_alpha=32,
      target_modules="all-linear",
      inference_mode=False,
      bias="none"
  )

  args = CycleTrainingArguments(output_dir="gpt2-macct")
  trainer = CycleTrainer(
      args,
      model = model,
      tokenizer = tokenizer,
      peft_configs = peft_config # Or same A, B dict
  )
  ```





  If you use Cycleformers in your research, please cite:

  ```bibtex
  add once zenodo/paper citation is available
  ```


pkgId: 21493e039f97bb5a0c5f2f91fe4f9ee789332879f98568b963b98322e1525c8a
name: python-cycleops
arch: src
version: 0.8.0
epoch: 0
release: 1
summary: The official command line interface for Cycleops
url: https://pypi.org/project/cycleops/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cycleops-0.8.0-1.src.rpm
checksum_type: sha256
description:
  This is the official command line interface for the Cycleops API.



  To run the Cycleops CLI either Python 3.11 or newer, or Docker is required.





  The Cycleops CLI is available as a Python package on PyPI:

  ```console
  pip install cycleops
  CYCLEOPS_API_KEY=your-api-key cycleops --help
  ```



  If your system is running Docker, you can also use Cycleops directly its Docker image:

  ```console
  docker run -e CYCLEOPS_API_KEY=your-api-key ghcr.io/stackmasters/cycleops --help
  ```





  To authenticate with the Cycleops CLI, you need to provide an API key. Documentation on how to create an API key is available at https://cycleops.io/docs/api-keys/create-a-new-api-key.



  Set the `CYCLEOPS_API_KEY` environment variable to your API key.

  ```console
  export CYCLEOPS_API_KEY=<cycleops_api_key>
  ```



  Configure the Cycleops client through the command line interface.

  ```console
  cycleops --api-key=<cycleops_api_key> services update <service_id> --variable <key>=<value>
  ```

  *Note: If both the environment variable and command line option are set, the command line option will be used by default.*





  ```
  cycleops units list
  ```





  ```
  cycleops environments list
  ```






  ```
  cycleops hosts list
  ```



  ```
  cycleops hosts retrieve <host_name>|<host_id>
  ```



  ```
  cycleops hosts create --name <host_name> --ip <host_ip> --environment-id <environment_id> --jump-host true|false --hostgroup-id <hostgroup_id> ... --hostgroup-id <hostgroup_id>
  ```



  ```
  cycleops hosts update <host_name>|<host_id> --name <host_name> --ip <host_ip> --environment-id <environment_id> --jump-host true|false --hostgroup-id <hostgroup_id> ... --hostgroup-id <hostgroup_id>
  ```



  ```
  cycleops hosts delete <host_name>|<host_id>
  ```






  ```
  cycleops services list
  ```



  ```
  cycleops services retrieve <service_name>|<service_id>
  ```



  ```
  cycleops services create --name <service_name> --unit-id <unit_id>
  ```



  ```
  cycleops services update <service_name>|<service_id> --name <service_name> --description <service_description --unit-id <unit_id> --variable <key_1>=<value_1> --variable <key_2>=<value_2> ... --variable <key_n>=<value_n>
  ```



  ```
  cycleops services delete <service_name>|<service_id>
  ```



  ```
  cycleops services create-container <service_name>|<service_id> <container_name> --image <image_name>:<image_tag> --ports <ports>,<ports> --volumes <volume>,<volume>,<volume> --env-file <env_file_path> --command <command>
  ```



  ```
  cycleops services update-container <service_name>|<service_id> <container_name> --name <new_container_name> --image <image_name>:<image_tag> --ports <ports>,<ports> --volumes <volume>,<volume>,<volume> --env-file <env_file_path> --command <command>
  ```





  ```
  cycleops stacks list
  ```



  ```
  cycleops stacks retrieve <stack_name>|<stack_id>
  ```



  ```
  cycleops stacks create --name <stack_name>
  ```



  ```
  cycleops stacks update <stack_name>|<stack_id> --name <stack_name> --description <stack_description> --unit-id <unit_id> ... --unit-id <unit_id>
  ```



  ```
  cycleops stacks delete <stack_name>|<stack_id>
  ```





  ```
  cycleops setups list
  ```



  ```
  cycleops setups retrieve <setup_name>|<setup_id>
  ```



  ```
  cycleops setups create --name <setup_name>
  ```



  ```
  cycleops setups update <setup_name>|<setup_id> --name <setup_name> --stack-id <stack_id> --environment-id <environment_id> --host-id <host_id> ... --host-id <host_id> --hostgroup-id <hostgroup_id> ... --hostgroup-id <hostgroup_id> --service-id <service_id> ... --service-id <service_id>
  ```



  ```
  cycleops setups delete <setup_name>|<setup_id>
  ```



  ```
  cycleops setups deploy <setup_name>|<setup_id> --wait
  ```

  Use `--wait` to wait for the deployment job to complete and display deployment logs.



  ```
  cycleops setups destroy <setup_name>|<setup_id>
  ```

  Terminates all running containers associated with the specified setup.

  **Note:** Use `delete` to only remove the setup from Cycleops without terminating any running containers.



  You can use Cycleops with your GitHub Actions to deploy a setup right from GitHub. For example this is how you could update the Docker image of a service and deploy a setup:

  ```yml
   deploy:
      runs-on: ubuntu-latest
      env:
        CYCLEOPS_API_KEY: ${{ secrets.CYCLEOPS_API_KEY }}
      steps:
        - uses: actions/checkout@v4
        - uses: actions/setup-python@v4
          with:
            python-version: "3.11"
        - name: Install Cycleops
          run: pip install cycleops
        - name: Update Cycleops services
          run: cycleops services update-container <service_name> <container_name> --image <image_name>:<image_tag>
        - name: Deploy Cycleops setups
          run: cycleops setups deploy <setup_name>
  ```



  You can update a service's image and deploy a setup as follows:

  ```console
  $ cycleops services update default-container-ngnix --variable containers.0.image=nginx:1.23
  $ cycleops setups deploy default-container-ngnix
  ```



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


pkgId: b57e23780da7ceec37a9e6a7f0c970d867abefe91505a86856f62cacfe41e554
name: python-cycleosmdata
arch: src
version: 0.0.2.4
epoch: 0
release: 1
summary: A small package to download structured bike infrastructure data from Open Street Map (OSM).
url: https://pypi.org/project/cycleosmdata/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cycleosmdata-0.0.2.4-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/cycleosm.svg)](https://pypi.org/project/cycleosm/)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

  The purpose of CycleOSM is to download structured bike infrastructure data from Open Street Map (OSM).

  Now on [PyPi](https://pypi.org/project/cycleosm/)

  This package is easy to use. You can get started by installing the package:
  ```
  pip install cycleosm
  ```

  Then import the BikeOSM module.
  ```
  from cycleosm.bikeosm import BikeOSM
  ```

  Next define the output directory and the .pbf url
  ```
  output_path = r'/Users/danielpatterson/Documents/GitHub/ExtractOSM/src/output'
  urls = {'District of Columbia': 'http://download.geofabrik.de/north-america/us/district-of-columbia-latest.osm.pbf'}
  ```

  Finally, extract the pbf
  ```
  BikeOSM(urls, output_path).handle_pbfs()
  ```

  ![Denver Bike Facs](https://user-images.githubusercontent.com/22425199/218263077-a6554521-5697-40fa-824e-1051c4b46009.png)

  ![image](https://user-images.githubusercontent.com/22425199/218263087-fe33097f-ae0b-4449-9c7d-3e9585d0d560.png)


pkgId: 2545f2a8adcf50b82268c1c4631a3ceb602acc719f0cd2c957ce52f3e242350c
name: python-cycless
arch: src
version: 0.4.2
epoch: 0
release: 1
summary: A collection of algorithms for cycles in a graph.
url: https://pypi.org/project/cycless/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cycless-0.4.2-1.src.rpm
checksum_type: sha256
description:
  A collection of algorithms to analyze a graph as a set of cycles.

  Some codes come from [https://github.com/vitroid/Polyhed](vitroid/Polyhed) and [https://github.com/vitroid/countrings](vitroid/countrings) are integrated and improved.



  API manual is [here](https://vitroid.github.io/cycless).




  A simple algorithm to enumerate all irreducible cycles of n-members and smaller in an undirected graph. [Matsumoto 2007]

  ```python
  import cycless.cycles as cy
  import networkx as nx

  g = nx.cubical_graph()

  for cycle in cy.cycles_iter(g, maxsize=6):
      print(cycle)
  ```



  An algorithm to enumerate the directed cycles of a size in a dircted graph. [Matsumoto 2021]

  ```python
  from genice2.genice import GenIce
  from genice2.plugin import Lattice, Format, Molecule
  import cycless.dicycles as dc


  lattice = Lattice("1h")
  formatter = Format("raw", stage=(3,))
  raw = GenIce(lattice, signature="ice 1h", rep=[2, 2, 2]).generate_ice(formatter)

  for cycle in dc.dicycles_iter(raw["digraph"], size=6):
      print(cycle)
  ```



  An algorithm to enumerate the quasi-polyhedral hull made of cycles in an undirected graph. A quasi-polyhedral hull (vitrite) obeys the following conditions: [Matsumoto 2007]

  1. The surface of the hull is made of irreducible cycles.
  2. Two or three cycles shares a vertex of the hull.
  3. Two cycles shares an edge of the hull.
  4. Its Euler index (F-E+V) is two.

  ```python
  import cycless.cycles as cy
  import cycless.polyhed as ph
  import networkx as nx

  g = nx.dodecahedral_graph()

  cycles = [cycle for cycle in cy.cycles_iter(g, maxsize=6)]
  for polyhed in ph.polyhedra_iter(cycles):
      print(polyhed)
  ```



  Enumerate triangle, tetrahedral, and octahedral subgraphs found in the given graph.



  1. M. Matsumoto, A. Baba, and I. Ohmine, Topological building blocks of hydrogen bond network in water, J. Chem. Phys. 127, 134504 (2007). http://doi.org/10.1063/1.2772627
  2. Matsumoto, M., Yagasaki, T. & Tanaka, H. On the anomalous homogeneity of hydrogen-disordered ice and its origin. J. Chem. Phys. 155, 164502 (2021). https://doi.org/10.1063/5.0065215


pkgId: bc9df7e2e7e4c962ecf40dc44d0976db7dc6f3cdfc8aed97ad53b76399561527
name: python-cyclic
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Handle cyclic relations
url: https://github.com/neurobin/cyclic
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclic-1.0.0-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://travis-ci.org/neurobin/cyclic.svg?branch=release)](https://travis-ci.org/neurobin/cyclic)

  Handle cyclic relation compared by value.



  Install from Pypi:

  ```bash
  pip install cyclic
  ```



  ```python
  from cyclic import Cyclic

  cy = Cyclic()


  cy.add(B, A)


  cy.add(C, B)


  cy.add(A, C)



  print(cy.is_cyclic(C)) # True

  ```


pkgId: daae2c027a07af41d043abee577e1dab4ab0d2979c76eaed53b599c38a9f2bb7
name: python-cyclicpeptide
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: A python package for cyclic peptides drug design
url: https://github.com/Willow0316/cyclicpeptide/tree/master
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclicpeptide-1.4.0-1.src.rpm
checksum_type: sha256
description:
  Detailed documentation for the cyclicpeptide(https://willow0316.github.io/cyclicpeptide-doc/index.html).



  To install the project, you can use pip:

      pip install cyclicpeptide



  from cyclicpeptide import module

  **module**: PropertyAnalysis/Sequence2Structure/Structure2Sequence/GraphAlignment/StructureTransformer/SequenceTransformer

  ```python

  from cyclicpeptide import PropertyAnalysis as pa

  exmaple = [('Ctopa(CP00005)',
              'CC(C1C(=O)NC(C(SSCC(C(=O)NC(C(=O)NC(C(=O)NC(C(=O)N1)CCCN)CC2=CNC3=CC=CC=C32)CC4=CC=C(C=C4)O)NC(=O)C(CC5=CC=CC=C5)N)(C)C)C(=O)NC(C(C)O)C(=O)N)O',
              'FCYWATCT'),
             ('alpha-Amanitine(CP01656)',
              'CC[C@H](C)[C@H]1C(=O)NCC(=O)N[C@H]2C[S@@](=O)C3=C(C[C@@H](C(=O)NCC(=O)N1)NC(=O)[C@@H](NC(=O)[C@@H]4C[C@H](CN4C(=O)[C@@H](NC2=O)CC(=O)N)O)[C@@H](C)[C@H](CO)O)C5=C(N3)C=C(C=C5)O',
              'ATPTTT'),
             ('Anidulafungin(CP00145)',
              'CCCCCOC1=CC=C(C=C1)C2=CC=C(C=C2)C3=CC=C(C=C3)C(=O)NC4CC(C(NC(=O)C5C(C(CN5C(=O)C(NC(=O)C(NC(=O)C6CC(CN6C(=O)C(NC4=O)C(C)O)O)C(C(C7=CC=C(C=C7)O)O)O)C(C)O)C)O)O)O',
              'AA')]

  smiles = exmaple[0][1]
  sequence = exmaple[0][2]
  print(pa.chemial_physical_properties_from_smiles(smiles))
  ```


pkgId: 5b8af70efdd895aabd14826efc7eaef74da72e3d32bf275c24923b6aa9a809cd
name: python-cyclonedx-conan
arch: src
version: 0.4.1
epoch: 0
release: 1
summary: Creates CycloneDX Software Bill of Materials (SBOM) documents for C/C++ projects using Conan
url: https://github.com/CycloneDX/cyclonedx-conan#readme
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclonedx-conan-0.4.1-1.src.rpm
checksum_type: sha256
description:
  CycloneDX support for Conan2 is available as an [offical Conan2 extension](https://github.com/conan-io/conan-extensions#readme).


pkgId: df13bba2b4af1c98f93acda70da40c31ea006feaf70e62aacef02ec70acb875b
name: python-cyclonedx-editor-validator
arch: src
version: 0.20.1
epoch: 0
release: 1
summary: Tool for creating, modifying and validating CycloneDX SBOMs.
url: https://pypi.org/project/cyclonedx-editor-validator/
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclonedx-editor-validator-0.20.1-1.src.rpm
checksum_type: sha256
description:
  [![build and test](https://github.com/Festo-se/cyclonedx-editor-validator/actions/workflows/main.yml/badge.svg)](https://github.com/Festo-se/cyclonedx-editor-validator/actions/workflows/main.yml)
  [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
  [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
  [![Static Badge](https://img.shields.io/badge/CycloneDX-v1.2%2C1.3%2C1.4%2C1.5%2C1.6-blue?link=https%3A%2F%2Fcyclonedx.org%2Fdocs%2F1.6%2Fjson%2F%23)](https://cyclonedx.org/docs/1.6/json/)



  This command-line tool performs various actions on [CycloneDX](https://cyclonedx.org/) SBOMs. It allows you to modify, merge and validate your Software Bill of Materials (SBOM).

  The tool is built with automation in mind, i.e. usage within CI/CD. We try to be as scriptable as possible with various command-line flags, avoiding interactive prompts, providing multiple output options and fine-grained exit codes.



  |   Command | Description |
  | :-- | :-- |
  | [amend](https://festo-se.github.io/cyclonedx-editor-validator/usage/amend.html) | Accepts a single input file and will apply one or multiple *operations* to it. Each operation modifies certain aspects of the SBOM. These modifications cannot be targeted at individual components in the SBOM which sets the *amend* command apart from [*set*](https://festo-se.github.io/cyclonedx-editor-validator/usage/set.html). Its use-case is ensuring an SBOM fulfils certain requirements in an automated fashion. |
  | [build-public](https://festo-se.github.io/cyclonedx-editor-validator/usage/build-public.html) | Creates a redacted version of an SBOM fit for publication. |
  | [init-sbom](https://festo-se.github.io/cyclonedx-editor-validator/usage/init-sbom.html) | Provides a first draft of an SBOM for manual completion. |
  | [list](https://festo-se.github.io/cyclonedx-editor-validator/usage/list.html) | Lists content of the SBOM. |
  | [merge](https://festo-se.github.io/cyclonedx-editor-validator/usage/merge.html) | Merges two or more CycloneDX documents into one. |
  | [merge-vex](https://festo-se.github.io/cyclonedx-editor-validator/usage/merge-vex.html) | *[Deprecated]* Merges the *vex* information in two or more CycloneDX documents into one. |
  | [set](https://festo-se.github.io/cyclonedx-editor-validator/usage/set.html) | Sets properties on specified components to specified values. If a component in an SBOM is missing a particular property or the property is present but has a wrong value, this command can be used to modify just the affected properties without changing the rest of the SBOM. |
  | [validate](https://festo-se.github.io/cyclonedx-editor-validator/usage/validate.html) | Validate the SBOM against a built-in or user-provided JSON schema. |



  This tool is published on [PyPi](https://pypi.org/project/cyclonedx-editor-validator/).

  For detailed installation and usage guides, please refer to our [official documentation](https://festo-se.github.io/cyclonedx-editor-validator).



  See our [contribution guidelines](https://festo-se.github.io/cyclonedx-editor-validator/CONTRIBUTING/).



  This software is made available under the GNU General Public License v3 (GPL-3.0-or-later).


pkgId: 88623e964d39af53fbc16849e80940d1722cb83b2b32823623ca2d53e49743ce
name: python-cyclonedx-lint
arch: src
version: 2022.7.17
epoch: 0
release: 1
summary: Experimental CycloneDX baseline validator.
url: https://github.com/sthagen/cyclonedx-lint
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclonedx-lint-2022.7.17-1.src.rpm
checksum_type: sha256
description:
  Experimental CycloneDX baseline validator.

  [License: MIT](https://github.com/sthagen/cyclonedx-lint/blob/default/LICENSE)

  [![version](https://img.shields.io/pypi/v/cyclonedx-lint.svg?style=flat)](https://pypi.python.org/pypi/cyclonedx-lint/)
  [![downloads](https://pepy.tech/badge/cyclonedx-lint/month)](https://pepy.tech/project/cyclonedx-lint)
  [![wheel](https://img.shields.io/pypi/wheel/cyclonedx-lint.svg?style=flat)](https://pypi.python.org/pypi/cyclonedx-lint/)
  [![supported-versions](https://img.shields.io/pypi/pyversions/cyclonedx-lint.svg?style=flat)](https://pypi.python.org/pypi/cyclonedx-lint/)
  [![supported-implementations](https://img.shields.io/pypi/implementation/cyclonedx-lint.svg?style=flat)](https://pypi.python.org/pypi/cyclonedx-lint/)

  TODO: Third party dependencies are documented in the folder [third-party](third-party/README.md).



  Experimental.

  **Note**: The default branch is `default`.


pkgId: 3850c210f792fbe4c1986b46e5a7328214f11d09ed7ebbcd8abf7641998f34ee
name: python-cyclonedx-py
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: Alias for package 'cyclonedx-bom'
url: https://pypi.org/project/cyclonedx-py/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclonedx-py-1.0.1-1.src.rpm
checksum_type: sha256
description:
  <!-- This file doubles as the readme of published alias packages. -->

  The package `cyclonedx-bom` may use a script entrypoint that does not match the package's name on PyPI.
  To prevent unexpected existence of a package on PyPI that could cause confusion, some alias package is published.

  Instead of relying on this very package, you should require the actual tool:
  * [`cyclonedx-bom`](https://pypi.org/project/cyclonedx-bom/)


pkgId: 928409444e4fd19408e9c79ede78dd845367671c92c669dc114591872f89457e
name: python-cyclonedx-python-lib
arch: src
version: 7.6.2
epoch: 0
release: 1
summary: Python library for CycloneDX
url: https://github.com/CycloneDX/cyclonedx-python-lib/#readme
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclonedx-python-lib-7.6.2-1.src.rpm
checksum_type: sha256
description:
  OWASP [CycloneDX][link_website] is a full-stack Bill of Materials (BOM) standard
  that provides advanced supply chain capabilities for cyber risk reduction.
  This Python package provides data models, validators and more,
  to help you create/render/read CycloneDX documents.
  **This package is not designed for standalone use. It is a software library.**
  As of version `3.0.0`, the internal data model was adjusted to allow CycloneDX VEX documents to be produced as per
  [official examples](https://cyclonedx.org/capabilities/bomlink/#linking-external-vex-to-bom-inventory) linking VEX to a separate CycloneDX document.
  If you're looking for a CycloneDX tool to run to generate (SBOM) software bill-of-materials documents, why not checkout
  [CycloneDX Python][cyclonedx-python] or [Jake][jake].

  View the documentation [here](https://cyclonedx-python-library.readthedocs.io/).

  We endeavour to support all functionality for all [current actively supported Python versions](https://www.python.org/downloads/).
  However, some features may not be possible/present in older Python versions due to their lack of support.

  See our [CHANGELOG][chaneglog_file].

  Feel free to open issues, bugreports or pull requests.
  See the [CONTRIBUTING][contributing_file] file for details.

  CycloneDX Python Lib is Copyright (c) OWASP Foundation. All Rights Reserved.
  Permission to modify and redistribute is granted under the terms of the Apache 2.0 license.
  See the [LICENSE][license_file] file for the full license.
  [cyclonedx-python]: https://github.com/CycloneDX/cyclonedx-python
  [jake]: https://github.com/sonatype-nexus-community/jake
  [license_file]: https://github.com/CycloneDX/cyclonedx-python-lib/blob/master/LICENSE
  [chaneglog_file]: https://github.com/CycloneDX/cyclonedx-python-lib/blob/master/CHANGELOG.md
  [contributing_file]: https://github.com/CycloneDX/cyclonedx-python-lib/blob/master/CONTRIBUTING.md
  [shield_gh-workflow-test]: https://img.shields.io/github/actions/workflow/status/CycloneDX/cyclonedx-python-lib/python.yml?branch=main&logo=GitHub&logoColor=white "build"
  [shield_coverage]: https://img.shields.io/codacy/coverage/1f9d451e9cdc49ce99c2a1247adab341?logo=Codacy&logoColor=white "test coverage"
  [shield_ossf-best-practices]: https://img.shields.io/cii/percentage/7956?label=OpenSSF%20best%20practices "OpenSSF best practices"
  [shield_pypi-version]: https://img.shields.io/pypi/v/cyclonedx-python-lib?logo=pypi&logoColor=white&label=PyPI "PyPI"
  [shield_conda-forge-version]: https://img.shields.io/conda/vn/conda-forge/cyclonedx-python-lib?logo=anaconda&logoColor=white&label=conda-forge "conda-forge"
  [shield_rtfd]: https://img.shields.io/readthedocs/cyclonedx-python-library?logo=readthedocs&logoColor=white "Read the Docs"
  [shield_license]: https://img.shields.io/github/license/CycloneDX/cyclonedx-python-lib?logo=open%20source%20initiative&logoColor=white "license"
  [shield_website]: https://img.shields.io/badge/https://-cyclonedx.org-blue.svg "homepage"
  [shield_slack]: https://img.shields.io/badge/slack-join-blue?logo=Slack&logoColor=white "slack join"
  [shield_groups]: https://img.shields.io/badge/discussion-groups.io-blue.svg "groups discussion"
  [shield_twitter-follow]: https://img.shields.io/badge/Twitter-follow-blue?logo=Twitter&logoColor=white "twitter follow"
  [link_gh-workflow-test]: https://github.com/CycloneDX/cyclonedx-python-lib/actions/workflows/python.yml?query=branch%3Amain
  [link_pypi]: https://pypi.org/project/cyclonedx-python-lib/
  [link_conda-forge]: https://anaconda.org/conda-forge/cyclonedx-python-lib
  [link_rtfd]: https://cyclonedx-python-library.readthedocs.io/en/latest/
  [link_codacy]: https://app.codacy.com/gh/CycloneDX/cyclonedx-python-lib
  [link_ossf-best-practices]: https://www.bestpractices.dev/projects/7956
  [link_website]: https://cyclonedx.org/
  [link_slack]: https://cyclonedx.org/slack/invite
  [link_discussion]: https://groups.io/g/CycloneDX
  [link_twitter]: https://twitter.com/CycloneDX_Spec
  [PEP-508]: https://www.python.org/dev/peps/pep-0508/


pkgId: dd08af10ccecc49a68a3701e081e84a5370e1e32a7cb3c1802da7f72b9998eb4
name: python-cyclonefw
arch: src
version: 1.0.23
epoch: 0
release: 1
summary: A package to simplify the creation of MAX models
url: https://github.com/wenlaizhou/cyclonefw
rpm_license: Apache
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclonefw-1.0.23-1.src.rpm
checksum_type: sha256
description:
  * [flask-restx](https://pypi.org/project/flask-restx/0.1.1/)
  * [flask-cors](https://pypi.org/project/Flask-Cors/)



  ```shell script
  pip install -U cyclonefw
  ```



  ```python



  from cyclonefw import MAXApp

  app = MAXApp()
  app.run()


  ```


pkgId: f9af3eda9e9c3d617039a96422fa9daf85e292e68e2c286c180d1317d7f84309
name: python-cyclophaser
arch: src
version: 1.9.4
epoch: 0
release: 1
summary: Determine phases from extratropical cyclone life cycle
url: https://pypi.org/project/cyclophaser/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cyclophaser-1.9.4-1.src.rpm
checksum_type: sha256
description:
  [![Documentation Status](https://readthedocs.org/projects/cyclophaser/badge/?version=latest)](https://cyclophaser.readthedocs.io/en/latest/?badge=latest)
  [![PyPI version](https://badge.fury.io/py/cyclophaser.svg)](https://badge.fury.io/py/cyclophaser)
  [![PyPI Downloads](https://pepy.tech/badge/cyclophaser)](https://pepy.tech/project/cyclophaser)
  [![CircleCI](https://circleci.com/gh/daniloceano/CycloPhaser.svg?style=shield)](https://circleci.com/gh/daniloceano/CycloPhaser)
  [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
  [![Python Versions](https://img.shields.io/pypi/pyversions/cyclophaser)](https://pypi.org/project/cyclophaser/)

  CycloPhaser is a package designed to automate and improve the accuracy of detecting and categorizing cyclone life cycle phases, including intensification, maturation, and decay. Understanding these phases is crucial for analyzing cyclone behavior and the dynamic processes that drive their development. This knowledge supports both operational forecasters and researchers focused on improving cyclone representation in numerical models, ultimately enhancing forecast accuracy. Traditionally, phase identification requires manual analysis, which introduces subjectivity and limits the feasibility of analyzing large datasets. CycloPhaser addresses these challenges by offering an efficient, objective approach, compatible with high-resolution reanalysis data and real-time observations alike. With CycloPhaser, users gain a powerful tool for cyclone life cycle classification, supporting both advanced meteorological research and practical forecasting applications.

  CycloPhaser is described in detail in the paper by de Souza et al. (under review) and has been used to generate results presented by de Souza et al. (2024).

  ![CycloPhaser Example Plot](https://github.com/daniloceano/CycloPhaser/raw/master/docs/_images/test_custom.png)

  **Important Note**: CycloPhaser requires cyclone tracking data as input but does not perform cyclone tracking itself. There are various cyclone tracking algorithms available in the literature. Walker et al. (2020) provide a discussion on these methods, while open-source tracking tools, such as [CyTRACK](https://github.com/apalarcon/CyTRACK) by Pérez-Alarcón et al. (2024), are publicly accessible. Additionally, cyclone track databases, like the [Atlantic extratropical cyclone tracks database]((https://data.mendeley.com/datasets/kwcvfr52hp/4)) by Gramcianinov et al. (2020), are available for use.




  1. Install using pip

     ```
     pip install cyclophaser




  For detailed documentation, visit the [CycloPhaser Documentation](https://cyclophaser.readthedocs.io/en/latest/). This includes function parameters, module descriptions, and more.



  For support, feature requests, or any queries, please open an issue on the GitHub repository.



  This project is licensed under the GNU General Public License v3.0. You may obtain a copy of the license at https://www.gnu.org/licenses/gpl-3.0.html.




  - de Souza, D. C., da Silva Dias, P. L., Gramcianinov, C. B., & de Camargo, R. (under review). *CycloPhaser: A Python Package for Detecting Extratropical Cyclone Life Cycles*. Journal of Open Source Software.

  - de Souza, D. C., da Silva Dias, P. L., Gramcianinov, C. B., da Silva, M. B. L., & de Camargo, R. (2024). New perspectives on South Atlantic storm track through an automatic method for detecting extratropical cyclones' lifecycle. *International Journal of Climatology*, 44(10), 3568-3588.

  - Gramcianinov, C. B., Campos, R. M., de Camargo, R., Hodges, K. I., Guedes Soares, C., & da Silva Dias, P. L. (2020). Atlantic extratropical cyclone tracks in 41 years of ERA5 and CFSR/CFSv2 databases. *Mendeley Data*, 4, 108111.

  - Pérez-Alarcón, A., Coll-Hidalgo, P., Trigo, R. M., Nieto, R., & Gimeno, L. (2024). CyTRACK: An open-source and user-friendly Python toolbox for detecting and tracking cyclones. *Environmental Modelling & Software*, 176, 106027.

  - Walker, E., Mitchell, D. M., & Seviour, W. J. (2020). The numerous approaches to tracking extratropical cyclones and the challenges they present. *Weather*, 75(11), 336-341.


pkgId: 7e703b9c418950d1d153be5910872c8b9a955de871ef09945b37fa237138820c
name: python-cycode
arch: src
version: 1.11.0
epoch: 0
release: 1
summary: Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning.
url: https://github.com/cycodehq/cycode-cli
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cycode-1.11.0-1.src.rpm
checksum_type: sha256
description:
  The Cycode Command Line Interface (CLI) is an application you can install on your local machine which can scan your locally stored repositories for any secrets or infrastructure as code misconfigurations.

  This guide will guide you through both installation and usage.



  1. [Prerequisites](#prerequisites)
  2. [Installation](#installation)
      1. [Install Cycode CLI](#install-cycode-cli)
          1. [Using the Auth Command](#using-the-auth-command)
          2. [Using the Configure Command](#using-the-configure-command)
          3. [Add to Environment Variables](#add-to-environment-variables)
              1. [On Unix/Linux](#on-unixlinux)
              2. [On Windows](#on-windows)
      2. [Install Pre-Commit Hook](#install-pre-commit-hook)
  3. [Cycode Command](#cycode-cli-commands)
  4. [Scan Command](#scan-command)
      1. [Running a Scan](#running-a-scan)
          1. [Repository Scan](#repository-scan)
              1. [Branch Option](#branch-option)
          2. [Monitor Option](#monitor-option)
          3. [Report Option](#report-option)
          4. [Package Vulnerabilities Scan](#package-vulnerabilities-option)
              1. [License Compliance Option](#license-compliance-option)
              2. [Severity Threshold](#severity-threshold)
          5. [Path Scan](#path-scan)
              1. [Terraform Plan Scan](#terraform-plan-scan)
          6. [Commit History Scan](#commit-history-scan)
              1. [Commit Range Option](#commit-range-option)
          7. [Pre-Commit Scan](#pre-commit-scan)
      2. [Scan Results](#scan-results)
          1. [Show/Hide Secrets](#showhide-secrets)
          2. [Soft Fail](#soft-fail)
          3. [Example Scan Results](#example-scan-results)
              1. [Secrets Result Example](#secrets-result-example)
              2. [IaC Result Example](#iac-result-example)
              3. [SCA Result Example](#sca-result-example)
              4. [SAST Result Example](#sast-result-example)
          4. [Company’s Custom Remediation Guidelines](#companys-custom-remediation-guidelines)
      3. [Ignoring Scan Results](#ignoring-scan-results)
          1. [Ignoring a Secret Value](#ignoring-a-secret-value)
          2. [Ignoring a Secret SHA Value](#ignoring-a-secret-sha-value)
          3. [Ignoring a Path](#ignoring-a-path)
          4. [Ignoring a Secret, IaC, or SCA Rule](#ignoring-a-secret-iac-sca-or-sast-rule)
          5. [Ignoring a Package](#ignoring-a-package)
          6. [Ignoring using config file](#ignoring-using-config-file)
  5. [Report command](#report-command)
      1. [Generating SBOM Report](#generating-sbom-report)
  6. [Syntax Help](#syntax-help)



  > [!WARNING]
  > Python 3.7 end-of-life was on 2023-06-27.
  > It is recommended to use Python 3.8 or later.
  > We will drop support for Python 3.7 soon.

  - The Cycode CLI application requires Python version 3.7 or later.
  - Use the [`cycode auth` command](#using-the-auth-command) to authenticate to Cycode with the CLI
    - Alternatively, you can obtain a Cycode Client ID and Client Secret Key by following the steps detailed in the [Service Account Token](https://docs.cycode.com/reference/creating-a-service-account-access-token) and [Personal Access Token](https://docs.cycode.com/reference/creating-a-personal-access-token-1) pages, which contain details on obtaining these values.



  The following installation steps are applicable to both Windows and UNIX / Linux operating systems.

  > [!NOTE]
  > The following steps assume the use of `python3` and `pip3` for Python-related commands; however, some systems may instead use the `python` and `pip` commands, depending on your Python environment’s configuration.



  To install the Cycode CLI application on your local machine, perform the following steps:

  1. Open your command line or terminal application.

  2. Execute one of the following commands:

     - `pip3 install cycode` - to install from PyPI
     - `brew install cycode` - to install from Homebrew

  3. Navigate to the top directory of the local repository you wish to scan.

  4. There are three methods to set the Cycode client ID and client secret:

     - [cycode auth](#using-the-auth-command) (**Recommended**)
     - [cycode configure](#using-the-configure-command)
     - Add them to your [environment variables](#add-to-environment-variables)



  > [!NOTE]
  > This is the **recommended** method for setting up your local machine to authenticate with Cycode CLI.

  1. Type the following command into your terminal/command line window:

     `cycode auth`

  2. A browser window will appear, asking you to log into Cycode (as seen below):

      ![Cycode login](https://raw.githubusercontent.com/cycodehq/cycode-cli/main/images/cycode_login.png)

  3. Enter your login credentials on this page and log in.

  4. You will eventually be taken to the page below, where you'll be asked to choose the business group you want to authorize Cycode with (if applicable):

      ![authorize CLI](https://raw.githubusercontent.com/cycodehq/cycode-cli/main/images/authorize_cli.png)

     > [!NOTE]
      > This will be the default method for authenticating with the Cycode CLI.

  5. Click the **Allow** button to authorize the Cycode CLI on the selected business group.

      ![allow CLI](https://raw.githubusercontent.com/cycodehq/cycode-cli/main/images/allow_cli.png)

  6. Once completed, you'll see the following screen, if it was selected successfully:

      ![successfully auth](https://raw.githubusercontent.com/cycodehq/cycode-cli/main/images/successfully_auth.png)

  7. In the terminal/command line screen, you will see the following when exiting the browser window:

    ```bash
    Successfully logged into cycode
    ```



  > [!NOTE]
  > If you already set up your Cycode Client ID and Client Secret through the Linux or Windows environment variables, those credentials will take precedent over this method.

  1. Type the following command into your terminal/command line window:

     `cycode configure`

  2. Enter your Cycode API URL value (you can leave blank to use default value).

      ```bash
      Cycode API URL [https://api.cycode.com]: https://api.onpremise.com
      ```

  3. Enter your Cycode APP URL value (you can leave blank to use default value).

      ```bash
      Cycode APP URL [https://app.cycode.com]: https://app.onpremise.com
      ```

  4. Enter your Cycode Client ID value.

      ```bash
      Cycode Client ID []: 7fe5346b-xxxx-xxxx-xxxx-55157625c72d
      ```

  5. Enter your Cycode Client Secret value.

      ```bash
      Cycode Client Secret []: c1e24929-xxxx-xxxx-xxxx-8b08c1839a2e
      ```

  6. If the values were entered successfully, you'll see the following message:

      ```bash
      Successfully configured CLI credentials!
      ```

     or/and

      ```bash
      Successfully configured Cycode URLs!
      ```

  If you go into the `.cycode` folder under your user folder, you'll find these credentials were created and placed in the `credentials.yaml` file in that folder.
  And the URLs were placed in the `config.yaml` file in that folder.





  ```bash
  export CYCODE_CLIENT_ID={your Cycode ID}
  export CYCODE_CLIENT_SECRET={your Cycode Secret Key}
  ```



  1. From the Control Panel, navigate to the System menu:

      ![](https://raw.githubusercontent.com/cycodehq/cycode-cli/main/images/image1.png)

  2. Next, click Advanced system settings:

      ![](https://raw.githubusercontent.com/cycodehq/cycode-cli/main/images/image2.png)

  3. In the System Properties window that opens, click the Environment Variables button:

      ![](https://raw.githubusercontent.com/cycodehq/cycode-cli/main/images/image3.png)

  4. Create `CYCODE_CLIENT_ID` and `CYCODE_CLIENT_SECRET` variables with values matching your ID and Secret Key, respectively:

      ![](https://raw.githubusercontent.com/cycodehq/cycode-cli/main/images/image4.png)

  5. Insert the cycode.exe into the path to complete the installation.



  Cycode’s pre-commit hook can be set up within your local repository so that the Cycode CLI application will identify any issues with your code automatically before you commit it to your codebase.

  Perform the following steps to install the pre-commit hook:

  1. Install the pre-commit framework:

     `pip3 install pre-commit`

  2. Navigate to the top directory of the local repository you wish to scan.

  3. Create a new YAML file named `.pre-commit-config.yaml` (include the beginning `.`) in the repository’s top directory that contains the following:

      ```yaml
      repos:
        - repo: https://github.com/cycodehq/cycode-cli
          rev: v1.4.0
          hooks:
            - id: cycode
              stages:
                - commit
      ```

  4. Install Cycode’s hook:

     `pre-commit install`

  > [!NOTE]
  > A successful hook installation will result in the message:<br/>
  `Pre-commit installed at .git/hooks/pre-commit`



  The following are the options and commands available with the Cycode CLI application:

  | Option                               | Description                                                        |
  |--------------------------------------|--------------------------------------------------------------------|
  | `-o`, `--output [text\|json\|table]` | Specify the output (`text`/`json`/`table`). The default is `text`. |
  | `-v`, `--verbose`                    | Show detailed logs.                                                |
  | `--help`                             | Show options for given command.                                    |

  | Command                                   | Description                                                                                                                           |
  |-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
  | [auth](#using-the-auth-command)           | Authenticates your machine to associate CLI with your Cycode account.                                                                 |
  | [configure](#using-the-configure-command) | Initial command to authenticate your CLI client with Cycode using client ID and client secret.                                        |
  | [ignore](#ignoring-scan-results)          | Ignore a specific value, path or rule ID.                                                                                             |
  | [scan](#running-a-scan)                   | Scan content for secrets/IaC/SCA/SAST violations. You need to specify which scan type: `ci`/`commit_history`/`path`/`repository`/etc. |
  | [report](#report-command)                 | Generate report for SCA SBOM.                                                                                                         |
  | version                                   | Show the version and exit.                                                                                                            |





  The Cycode CLI application offers several types of scans so that you can choose the option that best fits your case. The following are the current options and commands available:

  | Option                                                     | Description                                                                                                                                                                                                                                             |
  |------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | `-t, --scan-type [secret\|iac\|sca\|sast]`                 | Specify the scan you wish to execute (`secret`/`iac`/`sca`/`sast`), the default is `secret`                                                                                                                                                             |
  | `--secret TEXT`                                            | Specify a Cycode client secret for this specific scan execution                                                                                                                                                                                         |
  | `--client-id TEXT`                                         | Specify a Cycode client ID for this specific scan execution                                                                                                                                                                                             |
  | `--show-secret BOOLEAN`                                    | Show secrets in plain text. See [Show/Hide Secrets](#showhide-secrets) section for more details.                                                                                                                                                        |
  | `--soft-fail BOOLEAN`                                      | Run scan without failing, always return a non-error status code. See [Soft Fail](#soft-fail) section for more details.                                                                                                                                  |
  | `--severity-threshold [INFO\|LOW\|MEDIUM\|HIGH\|CRITICAL]` | Show only violations at the specified level or higher (supported for the SCA scan type only).                                                                                                                                                           |
  | `--sca-scan`                                               | Specify the SCA scan you wish to execute (`package-vulnerabilities`/`license-compliance`). The default is both                                                                                                                                          |
  | `--monitor`                                                | When specified, the scan results will be recorded in the knowledge graph. Please note that when working in `monitor` mode, the knowledge graph will not be updated as a result of SCM events (Push, Repo creation). (Supported for SCA scan type only). |
  | `--report`                                                 | When specified, a violations report will be generated. A URL link to the report will be printed as an output to the command execution                                                                                                                   |
  | `--no-restore`                                             | When specified, Cycode will not run restore command. Will scan direct dependencies ONLY!                                                                                                                                                                |
  | `--help`                                                   | Show options for given command.                                                                                                                                                                                                                         |

  | Command                                | Description                                                     |
  |----------------------------------------|-----------------------------------------------------------------|
  | [commit_history](#commit-history-scan) | Scan all the commits history in this git repository             |
  | [path](#path-scan)                     | Scan the files in the path supplied in the command              |
  | [pre_commit](#pre-commit-scan)         | Use this command to scan the content that was not committed yet |
  | [repository](#repository-scan)         | Scan git repository including its history                       |



  A repository scan examines an entire local repository for any exposed secrets or insecure misconfigurations. This more holistic scan type looks at everything: the current state of your repository and its commit history. It will look not only for secrets that are currently exposed within the repository but previously deleted secrets as well.

  To execute a full repository scan, execute the following:

  `cycode scan repository {{path}}`

  For example, consider a scenario in which you want to scan your repository stored in `~/home/git/codebase`. You could then execute the following:

  `cycode scan repository ~/home/git/codebase`

  The following option is available for use with this command:

  | Option              | Description                                            |
  |---------------------|--------------------------------------------------------|
  | `-b, --branch TEXT` | Branch to scan, if not set scanning the default branch |



  To scan a specific branch of your local repository, add the argument `-b` (alternatively, `--branch`) followed by the name of the branch you wish to scan.

  Consider the previous example. If you wanted to only scan a branch named `dev`, you could execute the following:

  `cycode scan repository ~/home/git/codebase -b dev`

  or:

  `cycode scan repository ~/home/git/codebase --branch dev`



  > [!NOTE]
  > This option is only available to SCA scans.

  To push scan results tied to the [SCA policies](https://docs.cycode.com/docs/sca-policies) found in an SCA type scan to Cycode's knowledge graph, add the argument `--monitor` to the scan command.

  Consider the following example. The following command will scan the repository for SCA policy violations and push them to Cycode:

  `cycode scan -t sca --monitor repository ~/home/git/codebase`

  or:

  `cycode scan --scan-type sca --monitor repository ~/home/git/codebase`

  When using this option, the scan results from this scan will appear in the knowledge graph, which can be found [here](https://app.cycode.com/query-builder).

  > [!WARNING]
  > You must be an `owner` or an `admin` in Cycode to view the knowledge graph page.



  > [!NOTE]
  > This option is not available to IaC scans.

  To push scan results tied to the [SCA policies](https://docs.cycode.com/docs/sca-policies) found in the Repository scan to Cycode, add the argument `--report` to the scan command.

  `cycode scan -t sca --report repository ~/home/git/codebase`
  `cycode scan -t secret --report repository ~/home/git/codebase`

  or:

  `cycode scan --scan-type sca --report repository ~/home/git/codebase`
  `cycode scan --scan-type secret --report repository ~/home/git/codebase`

  When using this option, the scan results from this scan will appear in the On-Demand Scans section of Cycode. To get to this page, click the link that appears after the printed results:

  > :warning: **NOTE**<br/>
  > You must be an `owner` or an `admin` in Cycode to view this page.

  ![cli-report](https://raw.githubusercontent.com/cycodehq/cycode-cli/main/images/sca_report_url.png)


  The report page will look something like below:

  ![](https://raw.githubusercontent.com/cycodehq/cycode-cli/main/images/scan_details.png)



  > [!NOTE]
  > This option is only available to SCA scans.

  To scan a specific package vulnerability of your local repository, add the argument `--sca-scan package-vulnerabilities` following the `-t sca` or `--scan-type sca` option.

  Consider the previous example. If you wanted to only run an SCA scan on package vulnerabilities, you could execute the following:

  `cycode scan -t sca --sca-scan package-vulnerabilities repository ~/home/git/codebase`

  or:

  `cycode scan --scan-type sca --sca-scan package-vulnerabilities repository ~/home/git/codebase`



  > [!NOTE]
  > This option is only available to SCA scans.

  To scan a specific branch of your local repository, add the argument `--sca-scan license-compliance` followed by the name of the branch you wish to scan.

  Consider the previous example. If you wanted to only scan a branch named `dev`, you could execute the following:

  `cycode scan -t sca --sca-scan license-compliance repository ~/home/git/codebase -b dev`

  or:

  `cycode scan --scan-type sca --sca-scan license-compliance repository ~/home/git/codebase`



  > [!NOTE]
  > This option is only available to SCA scans.

  To limit the results of the `sca` scan to a specific severity threshold, add the argument `--severity-threshold` to the scan command.

  Consider the following example. The following command will scan the repository for SCA policy violations that have a severity of Medium or higher:

  `cycode scan -t sca --security-threshold MEDIUM repository ~/home/git/codebase`

  or:

  `cycode scan --scan-type sca --security-threshold MEDIUM repository ~/home/git/codebase`



  A path scan examines a specific local directory and all the contents within it, instead of focusing solely on a GIT repository.

  To execute a directory scan, execute the following:

  `cycode scan path {{path}}`

  For example, consider a scenario in which you want to scan the directory located at `~/home/git/codebase`. You could then execute the following:

  `cycode scan path ~/home/git/codebase`




  Cycode CLI supports Terraform plan scanning (supporting Terraform 0.12 and later)

  Terraform plan file must be in JSON format (having `.json` extension)

  _How to generate a Terraform plan from Terraform configuration file?_

  1. Initialize a working directory that contains Terraform configuration file:

      `terraform init`

  2. Create Terraform execution plan and save the binary output:

      `terraform plan -out={tfplan_output}`

  3. Convert the binary output file into readable JSON:

      `terraform show -json {tfplan_output} > {tfplan}.json`

  4. Scan your `{tfplan}.json` with Cycode CLI:

      `cycode scan -t iac path ~/PATH/TO/YOUR/{tfplan}.json`



  A commit history scan is limited to a local repository’s previous commits, focused on finding any secrets within the commit history, instead of examining the repository’s current state.

  To execute a commit history scan, execute the following:

  `cycode scan commit_history {{path}}`

  For example, consider a scenario in which you want to scan the commit history for a repository stored in `~/home/git/codebase`. You could then execute the following:

  `cycode scan commit_history ~/home/git/codebase`

  The following options are available for use with this command:

  | Option                    | Description                                                                                              |
  |---------------------------|----------------------------------------------------------------------------------------------------------|
  | `-r, --commit_range TEXT` | Scan a commit range in this git repository, by default cycode scans all commit history (example: HEAD~1) |



  The commit history scan, by default, examines the repository’s entire commit history, all the way back to the initial commit. You can instead limit the scan to a specific commit range by adding the argument `--commit_range` followed by the name you specify.

  Consider the previous example. If you wanted to scan only specific commits on your repository, you could execute the following:

  `cycode scan commit_history -r {{from-commit-id}}...{{to-commit-id}} ~/home/git/codebase`

  OR

  `cycode scan commit_history --commit_range {{from-commit-id}}...{{to-commit-id}} ~/home/git/codebase`



  A pre-commit scan automatically identifies any issues before you commit changes to your repository. There is no need to manually execute this scan; simply configure the pre-commit hook as detailed under the Installation section of this guide.

  After your install the pre-commit hook and, you may, on occasion, wish to skip scanning during a specific commit. Simply add the following to your `git` command to skip scanning for a single commit:

  `SKIP=cycode git commit -m <your commit message>`



  Each scan will complete with a message stating if any issues were found or not.

  If no issues are found, the scan ends with the following success message:

  `Good job! No issues were found!!! 👏👏👏`

  If an issue is found, a `Found issue of type:` message appears upon completion instead:

  ```bash
  ⛔  Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
  Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0  ⛔
  0 | @@ -0,0 +1 @@
  1 | +my_password = 'h3l***********350'
  2 | \ No newline at end of file
  ```

  In the event an issue is found, review the file in question for the specific line highlighted by the result message. Implement any changes required to resolve the issue, then execute the scan again.



  In the above example, a secret was found in the file `secret_test`, located in the subfolder `cli`. The second part of the message shows the specific line the secret appears in, which in this case is a value assigned to `googleApiKey`.

  Note how the above example obscures the actual secret value, replacing most of the secret with asterisks. Scans obscure secrets by default, but you may optionally disable this feature in order to view the full secret (assuming the machine you are viewing the scan result on is sufficiently secure from prying eyes).

  To disable secret obfuscation, add the `--show-secret` argument to any type of scan, then assign it a `1` value to show the full secret in the result message, or `0` to hide the secret (which is done by default).

  In the following example, a Path Scan is executed against the `cli` subdirectory with the option enabled to display any secrets found in full:

  `cycode scan --show-secret=1 path ./cli`

  The result would then not be obfuscated:

  ```bash
  ⛔  Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
  Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0  ⛔
  0 | @@ -0,0 +1 @@
  1 | +my_password = 'h3110w0r1d!@#$350'
  2 | \ No newline at end of file
  ```



  Using the soft fail feature will not fail the CI/CD step within the pipeline if the Cycode scan detects an issue.
  If an issue occurs during the Cycode scan, using a soft fail feature will automatically execute with success (`0`) to avoid interference.

  To configure this feature, add the `--soft-fail` option to any type of scan. This will force the scan results to succeed (exit code `0`).

  Scan results are assigned with a value of exit code `1` when issues are found in the scan results; this will result in a failure within the CI/CD tool. Use the option `--soft-fail` to force the results with the exit code `0` to have no impact (i.e., to have a successful result).





  ```bash
  ⛔  Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
  Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0  ⛔
  0 | @@ -0,0 +1 @@
  1 | +my_password = 'h3l***********350'
  2 | \ No newline at end of file
  ```



  ```bash
  ⛔  Found issue of type: Resource should use non-default namespace (rule ID: bdaa88e2-5e7c-46ff-ac2a-29721418c59c) in file: ./k8s/k8s.yaml   ⛔

  7 |   name: secrets-file
  8 |   namespace: default
  9 |   resourceVersion: "4228"
  ```



  ```bash
  ⛔  Found issue of type: Security vulnerability in package 'pyyaml' referenced in project 'Users/myuser/my-test-repo': Improper Input Validation in PyYAML (rule ID: d003b23a-a2eb-42f3-83c9-7a84505603e5) in file: Users/myuser/my-test-repo/requirements.txt   ⛔

  1 | PyYAML~=5.3.1
  2 | vyper==0.3.1
  3 | cleo==1.0.0a5
  ```



  ```bash
  ⛔  Found issue of type: Detected a request using 'http://'. This request will be unencrypted, and attackers could listen into traffic on the network and be able to obtain sensitive information. Use 'https://' instead. (rule ID: 3fbbd34b-b00d-4415-b9d9-f861c076b9f2) in file: ./requests.py   ⛔

  2 |
  3 | res = requests.get('http://example.com', timeout=1)
  4 | print(res.content)
  ```



  If your company has set custom remediation guidelines in the relevant policy via the Cycode portal, you'll see a field for “Company Guidelines” that contains the remediation guidelines you added. Note that if you haven't added any company guideline, this field will not appear in the CLI tool.



  Ignore rules can be added to ignore specific secret values, specific SHA512 values, specific paths, and specific Cycode secret and IaC rule IDs. This will cause the scan to not alert these values. The ignore rules are written and saved locally in the `./.cycode/config.yaml` file.

  > :warning: **Warning**<br/>
  > Adding values to be ignored should be done with careful consideration of the values, paths, and policies to ensure that the scans will pick up true positives.

  The following are the options available for the `cycode ignore` command:

  | Option                                     | Description                                                                                                                                                              |
  |--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | `--by-value TEXT`                          | Ignore a specific value while scanning for secrets. See [Ignoring a Secret Value](#ignoring-a-secret-value) for more details.                                            |
  | `--by-sha TEXT`                            | Ignore a specific SHA512 representation of a string while scanning for secrets. See [Ignoring a Secret SHA Value](#ignoring-a-secret-sha-value) for more details.        |
  | `--by-path TEXT`                           | Avoid scanning a specific path. Need to specify scan type. See [Ignoring a Path](#ignoring-a-path) for more details.                                                     |
  | `--by-rule TEXT`                           | Ignore scanning a specific secret rule ID/IaC rule ID/SCA rule ID. See [Ignoring a Secret or Iac Rule](#ignoring-a-secret-iac-sca-or-sast-rule) for more details.        |
  | `--by-package TEXT`                        | Ignore scanning a specific package version while running an SCA scan. Expected pattern - `name@version`. See [Ignoring a Package](#ignoring-a-package) for more details. |
  | `-t, --scan-type [secret\|iac\|sca\|sast]` | Specify the scan you wish to execute (`secret`/`iac`/`sca`/`sast`), The default value is `secret`                                                                        |
  | `-g, --global`                             | Add an ignore rule and update it in the global `.cycode` config file                                                                                                     |

  In the following example, a pre-commit scan runs and finds the following:

  ```bash
  ⛔  Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
  Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0  ⛔
  0 | @@ -0,0 +1 @@
  1 | +my_password = 'h3l***********350'
  2 | \ No newline at end of file
  ```

  If this is a value that is not a valid secret, then use the `cycode ignore` command to ignore the secret by its value, SHA value, specific path, or rule ID. If this is an IaC scan, then you can ignore that result by its path or rule ID.



  To ignore a specific secret value, you will need to use the `--by-value` flag. This will ignore the given secret value from all future scans. Use the following command to add a secret value to be ignored:

  `cycode ignore --by-value {{secret-value}}`

  In the example at the top of this section, the command to ignore a specific secret value is as follows:

  `cycode ignore --by-value h3110w0r1d!@#$350`

  In the example above, replace the `h3110w0r1d!@#$350` value with your non-masked secret value. See the Cycode scan options for details on how to see secret values in the scan results.



  To ignore a specific secret SHA value, you will need to use the `--by-sha` flag. This will ignore the given secret SHA value from all future scans. Use the following command to add a secret SHA value to be ignored:

  `cycode ignore --by-sha {{secret-sha-value}}`

  In the example at the top of this section, the command to ignore a specific secret SHA value is as follows:

  `cycode ignore --by-sha a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0`

  In the example above, replace the `a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0` value with your secret SHA value.



  To ignore a specific path for either secret, IaC, or SCA scans, you will need to use the `--by-path` flag in conjunction with the `-t, --scan-type` flag (you must specify the scan type). This will ignore the given path from all future scans for the given scan type. Use the following command to add a path to be ignored:

  `cycode ignore -t {{scan-type}} --by-path {{path}}`

  OR

  `cycode ignore --scan-type {{scan-type}} --by-path {{path}}`

  In the example at the top of this section, the command to ignore a specific path for a secret is as follows:

  `cycode ignore -t secret --by-path ~/home/my-repo/config`

  In the example above, replace the `~/home/my-repo/config` value with your path value.

  In the example at the top of this section, the command to ignore a specific path from IaC scans is as follows:

  `cycode ignore -t iac --by-path ~/home/my-repo/config`

  In the example above, replace the `~/home/my-repo/config` value with your path value.

  In the example at the top of this section, the command to ignore a specific path from SCA scans is as follows:

  `cycode ignore -t sca --by-path ~/home/my-repo/config`

  In the example above, replace the `~/home/my-repo/config` value with your path value.



  To ignore a specific secret, IaC, SCA, or SAST rule, you will need to use the `--by-rule` flag in conjunction with the `-t, --scan-type` flag (you must specify the scan type). This will ignore the given rule ID value from all future scans. Use the following command to add a rule ID value to be ignored:

  `cycode ignore -t {{scan-type}} --by-rule {{rule-ID}}`

  OR

  `cycode ignore --scan-type {{scan-type}} --by-rule {{rule-ID}}`

  In the example at the top of this section, the command to ignore the specific secret rule ID is as follows:

  `cycode ignore --scan-type secret --by-rule ce3a4de0-9dfc-448b-a004-c538cf8b4710`

  In the example above, replace the `ce3a4de0-9dfc-448b-a004-c538cf8b4710` value with the rule ID you want to ignore.

  In the example at the top of this section, the command to ignore the specific IaC rule ID is as follows:

  `cycode ignore --scan-type iac --by-rule bdaa88e2-5e7c-46ff-ac2a-29721418c59c`

  In the example above, replace the `bdaa88e2-5e7c-46ff-ac2a-29721418c59c` value with the rule ID you want to ignore.

  In the example at the top of this section, the command to ignore the specific SCA rule ID is as follows:

  `cycode ignore --scan-type sca --by-rule dc21bc6b-9f4f-46fb-9f92-e4327ea03f6b`

  In the example above, replace the `dc21bc6b-9f4f-46fb-9f92-e4327ea03f6b` value with the rule ID you want to ignore.



  > [!NOTE]
  > This option is only available to the SCA scans.

  To ignore a specific package in the SCA scans, you will need to use the `--by-package` flag in conjunction with the `-t, --scan-type` flag (you must specify the `sca` scan type). This will ignore the given package, using the `{{package_name}}@{{package_version}}` formatting, from all future scans. Use the following command to add a package and version to be ignored:

  `cycode ignore --scan-type sca --by-package {{package_name}}@{{package_version}}`

  OR

  `cycode ignore -t sca --by-package {{package_name}}@{{package_version}}`

  In the example below, the command to ignore a specific SCA package is as follows:

  `cycode ignore --scan-type sca --by-package pyyaml@5.3.1`

  In the example above, replace `pyyaml` with package name and `5.3.1` with the package version you want to ignore.



  The applied ignoring rules are stored in the configuration file called `config.yaml`.
  This file could be easily shared between developers or even committed to remote Git.
  These files are always located in the `.cycode` folder.
  The folder starts with a dot (.), and you should enable the displaying of hidden files to see it.



  By default, all `cycode ignore` commands save the ignoring rule to the current directory from which CLI has been run.

  Example: running ignoring CLI command from `/Users/name/projects/backend` will create `config.yaml` in `/Users/name/projects/backend/.cycode`

  ```shell
  ➜  backend  pwd
  /Users/name/projects/backend
  ➜  backend  cycode ignore --by-value test-value
  ➜  backend  tree -a
  .
  └── .cycode
      └── config.yaml

  2 directories, 1 file
  ```

  The second option is to save ignoring rules to the global configuration files.
  The path of the global config is `~/.cycode/config.yaml`,
  where `~` means user\`s home directory, for example, `/Users/name` on macOS.

  Saving to the global space could be performed with the `-g` flag of the `cycode ignore` command.
  For example: `cycode ignore -g --by-value test-value`.



  This is incredibly important to place the `.cycode` folder and run CLI from the same place.
  You should double-check it when working with different environments like CI/CD (GitHub Actions, Jenkins, etc.).

  You could commit the `.cycode` folder to the root of your repository.
  In this scenario, you must run CLI scans from the repository root.
  If it doesn't fit your requirements, you could temporarily copy the `.cycode` folder
  wherever you want and perform a CLI scan from this folder.



  It's important to understand how CLI stores ignore rules to be able to read these configuration files or even modify them without CLI.

  The abstract YAML structure:
  ```yaml
  exclusions:
    *scanTypeName*:
      *ignoringType:
      - *ignoringValue1*
      - *ignoringValue2*
  ```

  Possible values of `scanTypeName`: `iac`, `sca`, `sast`, `secret`.
  Possible values of `ignoringType`: `paths`, `values`, `rules`, `packages`, `shas`.

  > [!WARNING]
  > Values for "ignore by value" are not stored as plain text!
  > CLI stores sha256 hashes of the values instead.
  > You should put hashes of the string when modifying the configuration file by hand.

  Example of real `config.yaml`:
  ```yaml
  exclusions:
    iac:
      rules:
      - bdaa88e2-5e7c-46ff-ac2a-29721418c59c
    sca:
      packages:
      - pyyaml@5.3.1
    secret:
      paths:
      - /Users/name/projects/build
      rules:
      - ce3a4de0-9dfc-448b-a004-c538cf8b4710
      shas:
      - a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0
      values:
      - a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3
      - 60303ae22b998861bce3b28f33eec1be758a213c86c93c076dbe9f558c11c752
  ```





  A software bill of materials (SBOM) is an inventory of all constituent components and software dependencies involved in the development and delivery of an application.
  Using this command you can create an SBOM report for your local project or for your repository URI.

  The following options are available for use with this command:

  | Option                                             | Description                    | Required | Default                                               |
  |----------------------------------------------------|--------------------------------|----------|-------------------------------------------------------|
  | `-f, --format [spdx-2.2\|spdx-2.3\|cyclonedx-1.4]` | SBOM format                    | Yes      |                                                       |
  | `-o, --output-format [JSON]`                       | Specify the output file format | No       | json                                                  |
  | `--output-file PATH`                               | Output file                    | No       | autogenerated filename saved to the current directory |
  | `--include-vulnerabilities`                        | Include vulnerabilities        | No       | False                                                 |
  | `--include-dev-dependencies`                       | Include dev dependencies       | No       | False                                                 |

  The following commands are available for use with this command:

  | Command          | Description                                                     |
  |------------------|-----------------------------------------------------------------|
  | `path`           | Generate SBOM report for provided path in the command           |
  | `repository_url` | Generate SBOM report for provided repository URI in the command |



  To create an SBOM report for a repository URI:\
  `cycode report sbom --format <sbom format> --include-vulnerabilities --include-dev-dependencies --output-file </path/to/file> repository_url <repository url>`

  For example:\
  `cycode report sbom --format spdx-2.3 --include-vulnerabilities --include-dev-dependencies repository_url https://github.com/cycodehq/cycode-cli.git`



  To create an SBOM report for a path:\
  `cycode report sbom --format <sbom format> --include-vulnerabilities --include-dev-dependencies --output-file </path/to/file> path </path/to/project>`

  For example:\
  `cycode report sbom --format spdx-2.3 --include-vulnerabilities --include-dev-dependencies path /path/to/local/project`



  You may add the `--help` argument to any command at any time to see a help message that will display available options and their syntax.

  To see general help, simply enter the command:

  `cycode --help`

  To see scan options, enter:

  `cycode scan --help`

  To see the options available for a specific type of scan, enter:

  `cycode scan {{option}} --help`

  For example, to see options available for a Path Scan, you would simply enter:

  `cycode scan path --help`

  To see the options available for the ignore scan function, use this command:

  `cycode ignore --help`

  To see the options available for report, use this command:

  `cycode report --help`


  To see the options available for a specific type of report, enter:

  `cycode scan {{option}} --help`


