# packages

pkgId: f8956ce5806a0959845964c260b897284d5e84834f6e38e332e543f80d9aabd7
name: python-circuitpainter-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for circuitpainter
url: https://circuitpainter.blinkinlabs.com
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-circuitpainter-0.1.0-1.src.rpm
location_href: Packages/python-circuitpainter-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  ![](doc/_static/images/lotus_leds.png)

  Circuit painter is a creative coding tool for making functional printed
  circuit boards.

  See the full documentation here: https://circuitpainter.blinkinlabs.com/


pkgId: 5c98ab5348dfd6817aed9ecc0ed79b4979b1ff4a90696d0ffdc7766adf45be4a
name: python-cirq-superstaq-help
arch: noarch
version: 0.5.33
epoch: 0
release: 1
summary: Development documents and examples for cirq-superstaq
url: https://pypi.org/project/cirq-superstaq/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cirq-superstaq-0.5.33-1.src.rpm
location_href: Packages/python-cirq-superstaq-help-0.5.33-1.noarch.rpm
checksum_type: sha256
description:
  ![cirq-superstaq's default workflow](https://github.com/Infleqtion/client-superstaq/actions/workflows/ci.yml/badge.svg)

  This package is used to access Superstaq via a Web API through [Cirq](https://github.com/quantumlib/Cirq).
  Cirq programmers can take advantage of the applications, pulse level optimizations, and write-once-target-all
  features of Superstaq with this package.

  `cirq-superstaq` is [available on PyPI](https://pypi.org/project/cirq-superstaq) and can be installed with:

  ```
  pip install cirq-superstaq
  ```

  Please note that Python version `3.8` or higher is required. For further installation instructions, see [here](https://github.com/Infleqtion/client-superstaq#readme).


  ```python
  import cirq
  import cirq_superstaq as css

  q0 = cirq.LineQubit(0)
  q1 = cirq.LineQubit(1)

  circuit = cirq.Circuit(cirq.H(q0), cirq.CNOT(q0, q1), cirq.measure(q0))

  service = css.Service(
      api_key="""Insert superstaq token that you received from https://superstaq.infleqtion.com""",
      verbose=True,
  )


  job = service.create_job(circuit, repetitions=1, target="ibmq_brisbane_qpu", method="dry-run")
  print("This is the job that's created ", job.status())
  print(job.counts())
  ```


pkgId: 213e5fccc380295a823038b758b08cc9294b8a13c3ddfbdef3e5e48cee7415b6
name: python-cirro_api_client-help
arch: noarch
version: 0.2.3
epoch: 0
release: 1
summary: Development documents and examples for cirro_api_client
url: https://github.com/CirroBio/Cirro-client-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cirro_api_client-0.2.3-1.src.rpm
location_href: Packages/python-cirro_api_client-help-0.2.3-1.noarch.rpm
checksum_type: sha256
description:
  [![](https://img.shields.io/pypi/v/cirro-api-client.svg)](https://pypi.org/project/cirro_api_client/)

  Low-level client for the Cirro API. Rather than using this package directly, we recommend using the [Cirro SDK](https://github.com/CirroBio/Cirro-client).

  This Python package is automatically generated by the [OpenAPI Python Client](https://github.com/openapi-generators/openapi-python-client) project.



  Python 3.8+.




  Via PyPI:
  ```sh
  pip install cirro-api-client
  ```

  You can also install it directory from the repository using:

  ```sh
  pip install git+https://github.com/CirroBio/Cirro-client-python.git
  ```





  ```python
  import os
  from typing import List
  from pprint import pprint

  from cirro_api_client import CirroApiClient, TokenAuth
  from cirro_api_client.v1.api.projects import get_projects
  from cirro_api_client.v1.models import Project
  from cirro_api_client.v1.types import Response


  auth_method = TokenAuth(token=os.environ['TOKEN'])




  client = CirroApiClient(base_url="https://api.cirro.bio",
                          auth_method=auth_method)


  projects: List[Project] = get_projects.sync(client=client)
  print("The response of get_projects:\n")
  pprint(projects)

  resp: Response[List[Project]] = get_projects.sync_detailed(client=client)
  projects = resp.parsed
  ```


  ```python
  import os
  from typing import List

  from cirro_api_client import CirroApiClient, TokenAuth
  from cirro_api_client.v1.api.projects import get_projects
  from cirro_api_client.v1.models import Project

  client = CirroApiClient(base_url="https://api.cirro.bio",
                          auth_method=TokenAuth(token=os.environ['TOKEN']))


  async with client as client:
      projects: List[Project] = await get_projects.asyncio(client=client)
  ```



  There are more settings on the generated `CirroApiClient` class which let you control more runtime behavior, check out the docstring on that class for more info. You can also customize the underlying `httpx.Client` or `httpx.AsyncClient` (depending on your use-case):

  ```python
  import os
  from cirro_api_client import CirroApiClient, TokenAuth

  def log_request(request):
      print(f"Request event hook: {request.method} {request.url} - Waiting for response")

  def log_response(response):
      request = response.request
      print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}")

  client = CirroApiClient(
      base_url="https://api.cirro.bio",
      auth_method=TokenAuth(token=os.environ['TOKEN']),
      httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
  )


  ```

  You can even set the httpx client directly, but beware that this will override any existing settings (e.g., base_url):

  ```python
  import os
  import httpx
  from cirro_api_client import CirroApiClient, TokenAuth

  client = CirroApiClient(base_url="https://api.cirro.bio",
                          auth_method=TokenAuth(token=os.environ['TOKEN']))


  client.set_httpx_client(httpx.Client(base_url="https://api.cirro.bio", proxies="http://localhost:8030"))
  ```



  Re-generate the API client by running:

  ```sh
  openapi-python-client update --url https://dev.cirro.bio/openapi/cirro-data-latest.yml --config config.yml --custom-template-path=templates/
   ```


pkgId: 22cbc2601f441154c1a0ef46cf08433f26f2af425f3fc9e10069f6de6e8940cd
name: python-civstation-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for civstation
url: https://github.com/windsorwindsor2/civstation
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-civstation-0.1.2-1.src.rpm
location_href: Packages/python-civstation-help-0.1.2-1.noarch.rpm
checksum_type: sha256
description:
  Provides a Station object, which represents a Station of the kind found in civil plans of roads and other linear features, where 5+10 for example represents a point 510 feet (or meters or any units) from an arbitrary starting point.


  Import the Station class:
  ```python
  from civstation import Station
  ```
  Create a station object:
  ```python
  sta = Station("4+56.78")
  ```

  Stations can also be made from a number, which will convert it to a Station.
  ```python
  >>>sta = Station(456.78)
  >>>print (sta)
  4+56.78
  ```

  Stations can also be made from a Station, for ease of implentation.

  Stations default to displaying two decimal places with trailing zeros. This can be changed by setting decimal_places to the desired number.

  ```python
  >>>sta = Station(456.78, decimal_places = 4)
  >>>print(sta)
  4+56.7800
  ```



  Stations can be added, subtracted, and compared.

  Adding a station and a number (float, int, etc.) returns a Station.

  Subtracting a number from a station returns a Station.

  Subtracting a a Station from a Station returns a **float**. This is because stations represent a position along a line. Subtracting two stations produces a *distance* not a *position*, best represented as a float, not a Station. However, this behavior can be overridden by setting `return_float_on_sub = False`, to work completely in Stations.

  There doesn't appear to be a good reason to multiply or divide Stations, so it is not supported. If this is necessary, convert them to floats or another suitable type.


  The following code shows the args taken by a Station object.
  ```python
  class Station:
      def __init__(self, sta, decimal_places = 2, return_float_on_sub = True) -> None:
  ```

rpm_license:
  MIT License  Copyright (c) 2024 Scott Windsor  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: d632047f9fab3298d4bdf5953d140afff911fc7f5dd102701dabdb53d15a4608
name: python-cjen-help
arch: noarch
version: 1.0.16
epoch: 0
release: 1
summary: Development documents and examples for cjen
url: https://github.com/thcpc/cjen
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cjen-1.0.16-1.src.rpm
location_href: Packages/python-cjen-help-1.0.16-1.noarch.rpm
checksum_type: sha256
description:
  <!--
   * @Author: your name
   * @Date: 2022-02-05 00:15:52
   * @LastEditTime: 2022-02-28 14:09:40
   * @LastEditors: Please set LastEditors
   * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
   * @FilePath: \PyPackage\cjen\README.md
  -->

  该项目封装了测试人员写自动化代码的常用功能作为装饰器，
  目标是能让测试人员更关注业务逻辑的实现，隐藏和业务逻辑无关的细节。
  GitHub地址：https://github.com/thcpc/cjen


  get_mapping, put_mapping, post_mapping, delete_mapping, upload_mapping 增加json_clazz参数，作用同operate.json.factory


  - 1. 修改metaMysql 没有数据时，是警告信息而不是错误信息

  - 2. 方便批量检查，增加了 context["cursor"]


  - 1. 修改了创建metaMysql后，直接释放数据库连接池（临时修改方案）


  - 1. 上传的文件支持sql


  - 1. 修改了文件的判断


  - 1. 测试http请求的写日志文件


  - 1. fix a bug


  - 1. 增加了http请求的日志文件


  - 1. 增加了封装操作步骤


  - 1. 修复了文件下载日志的bug 和对是否是文件下载的判断


  - 1. 取消了文件下载请求响应的日志


  - 1. 增加了Step的装饰器


  - 1. bug：不管step是否运行都会注册到BigTangerine
       修复：调用接口时才会注册到BigTangerine中


  - 1. scenario 中的step 都应该使用相同的service, 所以在构造函数中增加了service参数，同时兼容以前的方法


  - 1. 取消FormData中,文件作为必填项


  - 1. 修复了upload 会修改service中的全局headers


  - 1. 增加了测试装饰器


  - 1. 在Scenario中增加了测试用例的注册机制

  - 1. 修复一些低级错误


  - 1. 针对 mysql 增加可通过函数参数传递查询参数，而不是一定需要通过上下文传递


  - 1. 增加是否打印日志的标志，以免IO占完，导致文件读取变慢


pkgId: 00242742ea4230978f2450b95350289bef23fb89da6fc554497e8787eb4563b3
name: python-ck-apstra-api-help
arch: noarch
version: 0.5.0
epoch: 0
release: 1
summary: Development documents and examples for ck-apstra-api
url: https://pypi.org/project/ck-apstra-api/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ck-apstra-api-0.5.0-1.src.rpm
location_href: Packages/python-ck-apstra-api-help-0.5.0-1.noarch.rpm
checksum_type: sha256
description:
  https://github.com/kimcharli/ck-apstra-api





  [ChangeLog](./ChangeLog.md)


  install python3.11: https://www.python.org/downloads/windows/





  https://git-scm.com/download/win




  ```
  ckim@ckim-mbp:sandbox % mkdir test
  ckim@ckim-mbp:sandbox % cd test
  ckim@ckim-mbp:test % python -m venv .venv
  ckim@ckim-mbp:test % source .venv/bin/activate
  (.venv) ckim@ckim-mbp:test % pip install ck-apstra-api==0.5.0
  ...
  (.venv) ckim@ckim-mbp:test %
  ```



  ```
  cd test
  py -m venv .venv
  .venv\Scripts\activate
  pip install ck-apstra-api==0.5.0
  ```




  ```
  (.venv) ckim@ckim-mbp:ck-apstra-api % ck-cli --version
  ck_apstra_api, 0.5.0
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  ```

  ```
  (.venv) ckim@ckim-mbp:ck-apstra-api % ck-cli --help
  Usage: ck-cli [OPTIONS] COMMAND [ARGS]...

    A CLI tool for interacting with ck-apstra-api

  Options:
    --host-ip TEXT        Host IP address
    --host-port INTEGER   Host port
    --host-user TEXT      Host username
    --host-password TEXT  Host password
    --version             Show the version and exit.
    --help                Show this message and exit.

  Commands:
    check-apstra           Test the connectivity to the server
    check-blueprint        Test the connectivity to the blueprint
    export-blueprint       Export a blueprint into a json file
    export-device-configs  Export a device configurations into multiple files
    export-generic-system  Export generic systems to a CSV file
    export-systems         Export systems of a blueprint to a CSV file
    import-blueprint       Import a blueprint from a json file
    import-generic-system  Import generic systems from a CSV file
    relocate-vn            Move a Virtual Network to the target Routing Zone
    test-get-temp-vn       Test get_temp_vn
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  ```





  |line|blueprint|server       |ext|tags_server|ae   |lag_mode   |ct_names    |tags_ae|speed|ifname|switch  |switch_ifname|tags_link|comment|
  |----|---------|-------------|---|-----------|-----|-----------|------------|-------|-----|------|--------|-------------|---------|-------|
  |1   |terra    |single-home-1|   |single     |     |           | vn20       |single |10g  |eth0  |server_1|xe-0/0/11    |         |       |
  |2   |terra    |dual-home-1  |   |dual       |ae101|lacp_active|vn20 , vn101|dual   |10g  |eth0  |server_1|xe-0/0/12    |forceup  |       |
  |3   |terra    |dual-home-1  |   |dual       |ae101|lacp_active|vn20,vn101  |dual   |10g  |eth1  |server_2|xe-0/0/12    |         |       |

  [gs_sample.csv](./tests/fixtures/gs_sample.csv)




  ```
  (.venv) ckim@ckim-mbp:ck-apstra-api % ck-cli import-generic-system --help
  Usage: ck-cli import-generic-system [OPTIONS]

    Import generic systems from a CSV file

  Options:
    --gs-csv-in TEXT  Path to the CSV file for generic systems
    --help            Show this message and exit.
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  (.venv) ckim@ckim-mbp:ck-apstra-api % ck-cli --host-ip 10.85.192.45 --host-password admin import-generic-system --gs-csv-in ~/Downloads/gs_sample.csv
  2024-06-29 17:51:43,445 - INFO     - import_generic_system - add_generic_systems ServerBlueprint._bps={'terra': ServerBlueprint(blueprint='terra')} (cli.py:246)
  2024-06-29 17:51:43,445 - INFO     - import_generic_system - ServerBlueprint:fetch_apstra() self.blueprint='terra' (cli.py:246)
  2024-06-29 17:51:43,956 - INFO     - import_generic_system - LinkMember(server_1:xe-0/0/11:eth0)::fetch_apstra() done LinkMember(line='1', speed='10G', ifname='eth0', switch='server_1', switch_ifname='xe-0/0/11', tags_link=[], comment='', fetched_server_ifname=None, fetched_server_intf_id=None, fetched_switch_id='2QKZLUzqCO0ZJ73Fb1I', fetched_switch_intf_id=None, fetched_tags_link=None, fetched_link_id=None) (cli.py:246)
  2024-06-29 17:51:43,956 - INFO     - import_generic_system - LinkGroup(____1)::fetch_apstra() done LinkGroup(ae='____1', lag_mode='', ct_names=['vn20'], tags_ae=['single'], fetched_ae_id=None, fetched_lag_mode=None, fetched_ct_names=[], fetched_tags=None) (cli.py:246)
  2024-06-29 17:51:43,956 - INFO     - import_generic_system - text GenericSystem(single-home-1)::fetch_apstra() done GenericSystem(server='single-home-1', ext='', tags_server=['single'], gs_id=None, fetched_server_tags=None) (cli.py:250)
  2024-06-29 17:51:44,223 - INFO     - import_generic_system - LinkMember(server_1:xe-0/0/12:eth0)::fetch_apstra() done LinkMember(line='2', speed='10G', ifname='eth0', switch='server_1', switch_ifname='xe-0/0/12', tags_link=['forceup'], comment='', fetched_server_ifname=None, fetched_server_intf_id=None, fetched_switch_id='2QKZLUzqCO0ZJ73Fb1I', fetched_switch_intf_id=None, fetched_tags_link=None, fetched_link_id=None) (cli.py:246)
  2024-06-29 17:51:44,374 - INFO     - import_generic_system - LinkMember(server_2:xe-0/0/12:eth1)::fetch_apstra() done LinkMember(line='3', speed='10G', ifname='eth1', switch='server_2', switch_ifname='xe-0/0/12', tags_link=[], comment='', fetched_server_ifname=None, fetched_server_intf_id=None, fetched_switch_id='qCc9ps52vPppDp2b6rk', fetched_switch_intf_id=None, fetched_tags_link=None, fetched_link_id=None) (cli.py:246)
  2024-06-29 17:51:44,375 - INFO     - import_generic_system - LinkGroup(ae101)::fetch_apstra() done LinkGroup(ae='ae101', lag_mode='lacp_active', ct_names=['vn20', 'vn101'], tags_ae=['dual'], fetched_ae_id=None, fetched_lag_mode=None, fetched_ct_names=[], fetched_tags=None) (cli.py:246)
  2024-06-29 17:51:44,375 - INFO     - import_generic_system - text GenericSystem(dual-home-1)::fetch_apstra() done GenericSystem(server='dual-home-1', ext='', tags_server=['dual'], gs_id=None, fetched_server_tags=None) (cli.py:250)
  2024-06-29 17:51:44,375 - INFO     - import_generic_system - add_generic_systems fetched ServerBlueprint._bps={'terra': ServerBlueprint(blueprint='terra')} (cli.py:246)
  2024-06-29 17:51:51,000 - INFO     - import_generic_system - GenericSystem(single-home-1)::create() creating generic_system_spec={'links': [{'switch': {'system_id': '2QKZLUzqCO0ZJ73Fb1I', 'transformation_id': 1, 'if_name': 'xe-0/0/11'}, 'system': {'system_id': None}, 'lag_mode': None, 'link_group_label': None}], 'new_systems': [{'system_type': 'server', 'label': 'single-home-1', 'port_channel_id_min': 0, 'port_channel_id_max': 0, 'logical_device': {'display_name': 'ck-auto-1x10', 'id': 'ck-auto-1x10', 'panels': [{'panel_layout': {'row_count': 1, 'column_count': 1}, 'port_indexing': {'order': 'T-B, L-R', 'start_index': 1, 'schema': 'absolute'}, 'port_groups': [{'count': 1, 'speed': {'unit': 'G', 'value': 10}, 'roles': ['leaf', 'access']}]}]}}]} (cli.py:246)
  2024-06-29 17:51:52,321 - INFO     - import_generic_system - GenericSystem(single-home-1)::create() created (cli.py:246)
  2024-06-29 17:51:52,659 - INFO     - import_generic_system - GenericSystem(dual-home-1)::create() creating generic_system_spec={'links': [{'switch': {'system_id': '2QKZLUzqCO0ZJ73Fb1I', 'transformation_id': 1, 'if_name': 'xe-0/0/12'}, 'system': {'system_id': None}, 'lag_mode': None, 'link_group_label': None}, {'switch': {'system_id': 'qCc9ps52vPppDp2b6rk', 'transformation_id': 1, 'if_name': 'xe-0/0/12'}, 'system': {'system_id': None}, 'lag_mode': None, 'link_group_label': None}], 'new_systems': [{'system_type': 'server', 'label': 'dual-home-1', 'port_channel_id_min': 0, 'port_channel_id_max': 0, 'logical_device': {'display_name': 'ck-auto-2x10', 'id': 'ck-auto-2x10', 'panels': [{'panel_layout': {'row_count': 1, 'column_count': 2}, 'port_indexing': {'order': 'T-B, L-R', 'start_index': 1, 'schema': 'absolute'}, 'port_groups': [{'count': 2, 'speed': {'unit': 'G', 'value': 10}, 'roles': ['leaf', 'access']}]}]}}]} (cli.py:246)
  2024-06-29 17:51:53,984 - INFO     - import_generic_system - GenericSystem(dual-home-1)::create() created (cli.py:246)
  2024-06-29 17:51:53,985 - INFO     - import_generic_system - add_generic_systems generic_systems added ServerBlueprint._bps={'terra': ServerBlueprint(blueprint='terra')} (cli.py:246)
  2024-06-29 17:51:53,985 - INFO     - import_generic_system - ServerBlueprint:fetch_apstra() self.blueprint='terra' (cli.py:246)
  2024-06-29 17:51:54,399 - INFO     - import_generic_system - LinkMember(server_1:xe-0/0/11:eth0)::fetch_apstra() done LinkMember(line='1', speed='10G', ifname='eth0', switch='server_1', switch_ifname='xe-0/0/11', tags_link=[], comment='', fetched_server_ifname=None, fetched_server_intf_id='Eoj5YQ2DufOIkAwqJFs', fetched_switch_id='2QKZLUzqCO0ZJ73Fb1I', fetched_switch_intf_id='wHrEU9Ogsu5PT3rX5ZU', fetched_tags_link=None, fetched_link_id='server_1<->single-home-1(link-000000001)[1]') (cli.py:246)
  2024-06-29 17:51:54,526 - INFO     - import_generic_system - LinkGroup(____1)::fetch_apstra() done LinkGroup(ae='____1', lag_mode='', ct_names=['vn20'], tags_ae=['single'], fetched_ae_id='wHrEU9Ogsu5PT3rX5ZU', fetched_lag_mode=None, fetched_ct_names=[], fetched_tags=None) (cli.py:246)
  2024-06-29 17:51:54,662 - INFO     - import_generic_system - text GenericSystem(single-home-1)::fetch_apstra() done GenericSystem(server='single-home-1', ext='', tags_server=['single'], gs_id='vjdUZp5Bzan9ly5CGMg', fetched_server_tags=[]) (cli.py:250)
  2024-06-29 17:51:54,791 - INFO     - import_generic_system - LinkMember(server_1:xe-0/0/12:eth0)::fetch_apstra() done LinkMember(line='2', speed='10G', ifname='eth0', switch='server_1', switch_ifname='xe-0/0/12', tags_link=['forceup'], comment='', fetched_server_ifname=None, fetched_server_intf_id='MxGkufPpO905ZT0vyT4', fetched_switch_id='2QKZLUzqCO0ZJ73Fb1I', fetched_switch_intf_id='92L4PECw70iubqVgl88', fetched_tags_link=None, fetched_link_id='server_1<->dual-home-1(link-000000001)[1]') (cli.py:246)
  2024-06-29 17:51:54,791 - INFO     - import_generic_system - LinkMember(server_2:xe-0/0/12:eth1)::fetch_apstra() done LinkMember(line='3', speed='10G', ifname='eth1', switch='server_2', switch_ifname='xe-0/0/12', tags_link=[], comment='', fetched_server_ifname=None, fetched_server_intf_id='619M5CRWBvhqPtzhzsM', fetched_switch_id='qCc9ps52vPppDp2b6rk', fetched_switch_intf_id='FlQxBvVV_uVaV_g1VPI', fetched_tags_link=None, fetched_link_id='server_2<->dual-home-1(link-000000002)[1]') (cli.py:246)
  2024-06-29 17:51:54,792 - INFO     - import_generic_system - LinkGroup(ae101)::fetch_apstra() done LinkGroup(ae='ae101', lag_mode='lacp_active', ct_names=['vn20', 'vn101'], tags_ae=['dual'], fetched_ae_id=None, fetched_lag_mode=None, fetched_ct_names=[], fetched_tags=None) (cli.py:246)
  2024-06-29 17:51:54,916 - INFO     - import_generic_system - text GenericSystem(dual-home-1)::fetch_apstra() done GenericSystem(server='dual-home-1', ext='', tags_server=['dual'], gs_id='l1zH-lTraCUodsjRCGQ', fetched_server_tags=[]) (cli.py:250)
  2024-06-29 17:51:54,916 - INFO     - import_generic_system - add_generic_systems after generic system creation - fetched ServerBlueprint._bps={'terra': ServerBlueprint(blueprint='terra')} (cli.py:246)
  2024-06-29 17:51:54,916 - INFO     - import_generic_system - LinkGroup(____1)::form_lacp() self.ae='____1' is not for lag. Skipping (cli.py:246)
  2024-06-29 17:51:55,982 - WARNING  - import_generic_system - LinkGroup(ae101)::form_lacp() self.ae='ae101' has no ae_id. Skipping (cli.py:248)
  2024-06-29 17:51:55,982 - INFO     - import_generic_system - add_generic_systems lacp formed ServerBlueprint._bps={'terra': ServerBlueprint(blueprint='terra')} (cli.py:246)
  2024-06-29 17:51:55,982 - INFO     - import_generic_system - ServerBlueprint:fetch_apstra() self.blueprint='terra' (cli.py:246)
  2024-06-29 17:51:56,344 - INFO     - import_generic_system - LinkMember(server_1:xe-0/0/11:eth0)::fetch_apstra() done LinkMember(line='1', speed='10G', ifname='eth0', switch='server_1', switch_ifname='xe-0/0/11', tags_link=[], comment='', fetched_server_ifname=None, fetched_server_intf_id='Eoj5YQ2DufOIkAwqJFs', fetched_switch_id='2QKZLUzqCO0ZJ73Fb1I', fetched_switch_intf_id='wHrEU9Ogsu5PT3rX5ZU', fetched_tags_link=None, fetched_link_id='server_1<->single-home-1(link-000000001)[1]') (cli.py:246)
  2024-06-29 17:51:56,469 - INFO     - import_generic_system - LinkGroup(____1)::fetch_apstra() done LinkGroup(ae='____1', lag_mode='', ct_names=['vn20'], tags_ae=['single'], fetched_ae_id='wHrEU9Ogsu5PT3rX5ZU', fetched_lag_mode=None, fetched_ct_names=[], fetched_tags=None) (cli.py:246)
  2024-06-29 17:51:56,588 - INFO     - import_generic_system - text GenericSystem(single-home-1)::fetch_apstra() done GenericSystem(server='single-home-1', ext='', tags_server=['single'], gs_id='vjdUZp5Bzan9ly5CGMg', fetched_server_tags=[]) (cli.py:250)
  2024-06-29 17:51:56,720 - INFO     - import_generic_system - LinkMember(server_1:xe-0/0/12:eth0)::fetch_apstra() done LinkMember(line='2', speed='10G', ifname='eth0', switch='server_1', switch_ifname='xe-0/0/12', tags_link=['forceup'], comment='', fetched_server_ifname=None, fetched_server_intf_id='MxGkufPpO905ZT0vyT4', fetched_switch_id='2QKZLUzqCO0ZJ73Fb1I', fetched_switch_intf_id='92L4PECw70iubqVgl88', fetched_tags_link=None, fetched_link_id='server_1<->dual-home-1(link-000000001)[1]') (cli.py:246)
  2024-06-29 17:51:56,720 - INFO     - import_generic_system - LinkMember(server_2:xe-0/0/12:eth1)::fetch_apstra() done LinkMember(line='3', speed='10G', ifname='eth1', switch='server_2', switch_ifname='xe-0/0/12', tags_link=[], comment='', fetched_server_ifname=None, fetched_server_intf_id='619M5CRWBvhqPtzhzsM', fetched_switch_id='qCc9ps52vPppDp2b6rk', fetched_switch_intf_id='FlQxBvVV_uVaV_g1VPI', fetched_tags_link=None, fetched_link_id='server_2<->dual-home-1(link-000000002)[1]') (cli.py:246)
  2024-06-29 17:51:56,840 - INFO     - import_generic_system - LinkGroup(ae101)::fetch_apstra() done LinkGroup(ae='ae1', lag_mode='lacp_active', ct_names=['vn20', 'vn101'], tags_ae=['dual'], fetched_ae_id='QsX0BGRzwmP3ZVcNzYA', fetched_lag_mode='lacp_active', fetched_ct_names=[], fetched_tags=None) (cli.py:246)
  2024-06-29 17:51:56,974 - INFO     - import_generic_system - text GenericSystem(dual-home-1)::fetch_apstra() done GenericSystem(server='dual-home-1', ext='', tags_server=['dual'], gs_id='l1zH-lTraCUodsjRCGQ', fetched_server_tags=[]) (cli.py:250)
  2024-06-29 17:51:56,974 - INFO     - import_generic_system - add_generic_systems after form lag - fetched ServerBlueprint._bps={'terra': ServerBlueprint(blueprint='terra')} (cli.py:246)
  2024-06-29 17:51:56,975 - INFO     - import_generic_system - LinkGroup(____1)::rename_interfaces() self.ae='____1' rename_spec={'links': [{'endpoints': [{'interface': {'id': 'wHrEU9Ogsu5PT3rX5ZU'}}, {'interface': {'id': 'Eoj5YQ2DufOIkAwqJFs', 'if_name': 'eth0'}}], 'id': 'server_1<->single-home-1(link-000000001)[1]'}]} (cli.py:246)
  2024-06-29 17:51:57,819 - INFO     - import_generic_system - LinkGroup(____1) self.ae='____1' rename done (cli.py:246)
  2024-06-29 17:51:57,819 - INFO     - import_generic_system - LinkGroup(ae101)::rename_interfaces() self.ae='ae1' rename_spec={'links': [{'endpoints': [{'interface': {'id': '92L4PECw70iubqVgl88'}}, {'interface': {'id': 'MxGkufPpO905ZT0vyT4', 'if_name': 'eth0'}}], 'id': 'server_1<->dual-home-1(link-000000001)[1]'}, {'endpoints': [{'interface': {'id': 'FlQxBvVV_uVaV_g1VPI'}}, {'interface': {'id': '619M5CRWBvhqPtzhzsM', 'if_name': 'eth1'}}], 'id': 'server_2<->dual-home-1(link-000000002)[1]'}]} (cli.py:246)
  2024-06-29 17:51:58,989 - INFO     - import_generic_system - LinkGroup(ae101) self.ae='ae1' rename done (cli.py:246)
  2024-06-29 17:51:58,989 - INFO     - import_generic_system - add_generic_systems interfaces renamed ServerBlueprint._bps={'terra': ServerBlueprint(blueprint='terra')} (cli.py:246)
  2024-06-29 17:51:59,267 - INFO     - import_generic_system - GenericSystem(single-home-1) done - 1 vlans (cli.py:246)
  2024-06-29 17:51:59,524 - INFO     - import_generic_system - GenericSystem(dual-home-1) done - 1 vlans (cli.py:246)
  2024-06-29 17:51:59,524 - INFO     - import_generic_system - add_generic_systems vlans added ServerBlueprint._bps={'terra': ServerBlueprint(blueprint='terra')} (cli.py:246)
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  ```



  Below is an example code to call add_generic_systems from a script.
  ```python
  def import_generic_system(ctx, gs_csv_in: str):
      """
      Import generic systems from a CSV file
      """
      from ck_apstra_api.generic_system import GsCsvKeys, add_generic_systems
      from ck_apstra_api.apstra_session import CkApstraSession
      from result import Ok, Err
      import logging

      logger = logging.getLogger('import_generic_system')
      logger.setLevel(logging.INFO)
      

      host_ip = ctx.obj['HOST_IP']
      host_port = ctx.obj['HOST_PORT']
      host_user = ctx.obj['HOST_USER']
      host_password = ctx.obj['HOST_PASSWORD']

      
      

      session = CkApstraSession(host_ip, host_port, host_user, host_password)
      gs_csv_path = os.path.expanduser(gs_csv_in)

      links_to_add = []
      with open(gs_csv_path, 'r') as csvfile:
          csv_reader = csv.reader(csvfile)
          headers = next(csv_reader)  # Read the header row
          expected_headers = [header.value for header in GsCsvKeys]
          if headers != expected_headers:
              raise ValueError("CSV header mismatch. Expected headers: " + ', '.join(expected_headers))

          for row in csv_reader:
              links_to_add.append(dict(zip(headers, row)))

      for res in add_generic_systems(session, links_to_add):
          if isinstance(res, Ok):
              logger.info(res.ok_value)
          elif isinstance(res, Err):
              logger.warning(res.err_value)
          else:
              logger.info(f"text {res}")
  ```



  Currenly only takes care of VLANs.


  ```
  ckim@ckim-mbp:ck-apstra-api % ck-cli relocate-vn --help
  Usage: ck-cli relocate-vn [OPTIONS]

    Move a Virtual Network to the target Routing Zone

    The virtual network move involves deleting and recreating the virtual
    network in the target routing zone. To delete the virtual network, the
    associated CT should be taken care of. Either deassign and delete them and
    later do reverse. This CT handling trouble can be mitigated with a temporary
    VN to replace the original VN in the CT. Later, to be reversed later.

  Options:
    --virtual-network TEXT  Subject Virtual Network name  [required]
    --routing-zone TEXT     Destination Routing Zone name  [required]
    --blueprint TEXT        Blueprint name  [required]
    --help                  Show this message and exit.
  ckim@ckim-mbp:ck-apstra-api %
  ```


  ```
  (.venv) ckim@ckim-mbp:ck-apstra-api % ck-cli --host-ip 10.85.192.45 --host-password admin relocate-vn --virtual-network vn2222 --blueprint terra --routing-zone vrf
  2024-07-03 18:47:07,957 - INFO     - immigrate_vn() - Took order blueprint='terra' virtual_network='vn2222' routing_zone='vrf' (cli.py:333)
  2024-07-03 18:47:09,195 - INFO     - immigrate_vn() - Temporary VN x-vn2222 not found. Creating... (cli.py:391)
  2024-07-03 18:47:10,208 - INFO     - immigrate_vn() - Temporary VN x-vn2222:the_order.test_vn_id='mTlYxQM-bvG1oP6mhZQ' created vn_temp_created=<Response [201]> (cli.py:408)
  2024-07-03 18:47:10,208 - INFO     - immigrate_vn() - Ready execute: Order: self.target_vn='vn2222' self.target_vn_id='BPB80Tuop2qUINeUZOU' self.test_vn='x-vn2222' self.test_vn_id='mTlYxQM-bvG1oP6mhZQ' self.target_rz='vrf' self.terget_rz_id='S2WY6qMrf9J6cvoZfeY' (cli.py:410)
  2024-07-03 18:47:12,048 - INFO     - immigrate_vn() - CkApstraBlueprint(terra)::swap_ct_vns(from_vn_id='BPB80Tuop2qUINeUZOU', to_vn_id='mTlYxQM-bvG1oP6mhZQ') patched: ct['id']='1604b264-fa4a-46ec-a47f-1d237b2c5a3f' attr={'tag_type': 'vlan_tagged', 'vn_node_id': 'BPB80Tuop2qUINeUZOU'} patched=<Response [204]> (cli.py:414)
  2024-07-03 18:47:13,360 - INFO     - immigrate_vn() - VN vn2222:BPB80Tuop2qUINeUZOU deleted: deleted=<Response [204]> (cli.py:418)
  2024-07-03 18:47:14,552 - INFO     - immigrate_vn() - VN vn2222:tzPJy0Myr5_b2pP9x1M created: created=<Response [201]> under RZ:vrf (cli.py:424)
  2024-07-03 18:47:14,552 - INFO     - immigrate_vn() - Restoring CTs with new VN x-vn2222:mTlYxQM-bvG1oP6mhZQ (cli.py:427)
  2024-07-03 18:47:16,414 - INFO     - immigrate_vn() - CkApstraBlueprint(terra)::swap_ct_vns(from_vn_id='mTlYxQM-bvG1oP6mhZQ', to_vn_id='tzPJy0Myr5_b2pP9x1M') patched: ct['id']='1604b264-fa4a-46ec-a47f-1d237b2c5a3f' attr={'tag_type': 'vlan_tagged', 'vn_node_id': 'mTlYxQM-bvG1oP6mhZQ'} patched=<Response [204]> (cli.py:429)
  2024-07-03 18:47:17,538 - INFO     - immigrate_vn() - Temporary VN x-vn2222:mTlYxQM-bvG1oP6mhZQ deleted: deleted=<Response [204]> (cli.py:433)
  2024-07-03 18:47:17,538 - INFO     - immigrate_vn() - Order completed: Order: self.target_vn='vn2222' self.target_vn_id='tzPJy0Myr5_b2pP9x1M' self.test_vn='x-vn2222' self.test_vn_id='mTlYxQM-bvG1oP6mhZQ' self.target_rz='vrf' self.terget_rz_id='S2WY6qMrf9J6cvoZfeY' (cli.py:435)
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  ```



  ```python
  @cli.command()
  @click.option('--virtual-network', type=str, required=True, help='Subject Virtual Network name')
  @click.option('--routing-zone', type=str, required=True, help='Destination Routing Zone name')
  @click.option('--blueprint', type=str, required=True, help='Blueprint name')
  @click.pass_context
  def relocate_vn(ctx, blueprint: str, virtual_network: str, routing_zone: str):
      """
      Move a Virtual Network to the target Routing Zone

      The virtual network move involves deleting and recreating the virtual network in the target routing zone.
      To delete the virtual network, the associated CT should be taken care of. Either deassign and delete them and later do reverse.
      This CT handling trouble can be mitigated with a temporary VN to replace the original VN in the CT. Later, to be reversed later.

      """
  from ck_apstra_api.apstra_session import CkApstraSession, prep_logging
      from ck_apstra_api.apstra_blueprint import CkApstraBlueprint

      from result import Ok, Err

      logger = prep_logging('INFO', 'relocate_vn()')
      logger.info(f"Took order {blueprint=} {virtual_network=} {routing_zone=}")

      NODE_NAME_RZ = 'rz'

      host_ip = ctx.obj['HOST_IP']
      host_port = ctx.obj['HOST_PORT']
      host_user = ctx.obj['HOST_USER']
      host_password = ctx.obj['HOST_PASSWORD']

      session = CkApstraSession(host_ip, host_port, host_user, host_password)
      bp = CkApstraBlueprint(session, blueprint)

      @dataclass
      class Order(object):
          target_vn: str = virtual_network
          target_vn_id: str = None
          target_vn_spec: dict = None
          test_vn: str = None
          test_vn_id: str = None
          test_vn_spec: dict = None
          target_rz: str = routing_zone
          terget_rz_id: str = None

          def summary(self):
              return f"Order: {self.target_vn=} {self.target_vn_id=} {self.test_vn=} {self.test_vn_id=} {self.target_rz=} {self.terget_rz_id=}"
      the_order = Order()

      
      found_rz = bp.query(f"node('security_zone', name='{NODE_NAME_RZ}', label='{routing_zone}')").ok_value
      the_order.terget_rz_id = found_rz[0][NODE_NAME_RZ]['id']

      
      found_vns_dict = bp.get_item('virtual-networks')['virtual_networks']

      
      target_vn_node = [vn for vn in found_vns_dict.values() if vn['label'] == virtual_network]
      if len(target_vn_node) == 0:
          logger.error(f"Virtual Network {virtual_network} not found")
          return
      the_order.target_vn_spec = target_vn_node[0]
      the_order.target_vn_id = the_order.target_vn_spec['id']
      
      if the_order.target_vn_spec['security_zone_id'] == the_order.terget_rz_id:
          logger.warning(f"Virtual Network {virtual_network} already in the target Routing Zone {routing_zone}")
          return

      for res in bp.get_temp_vn(the_order.target_vn):
          if isinstance(res, dict):
              the_order.test_vn_spec = res
              the_order.test_vn_id = res['id']
              the_order.test_vn = res['label']
          else:
              logger.info(res)

      logger.info(f"Ready to relocate vn {virtual_network}: {the_order.summary()}")

      
      for res in bp.swap_ct_vns(the_order.target_vn_id, the_order.test_vn_id):
          logger.info(res)

      
      deleted = bp.delete_item(f"virtual-networks/{the_order.target_vn_id}")
      logger.info(f"VN {the_order.target_vn}:{the_order.target_vn_id} deleted: {deleted=}")

      
      the_order.target_vn_spec['security_zone_id'] = the_order.terget_rz_id
      created = bp.post_item('virtual-networks', the_order.target_vn_spec)
      the_order.target_vn_id = created.json()['id']
      logger.info(f"VN {the_order.target_vn}:{the_order.target_vn_id} created: {created=} under RZ:{the_order.target_rz}")

      
      logger.info(f"Restoring CTs with new VN {the_order.test_vn}:{the_order.test_vn_id}")
      for res in bp.swap_ct_vns(the_order.test_vn_id, the_order.target_vn_id):
          logger.info(res)

      
      deleted = bp.delete_item(f"virtual-networks/{the_order.test_vn_id}")
      logger.info(f"Temporary VN {the_order.test_vn}:{the_order.test_vn_id} deleted: {deleted=}")

      logger.info(f"Order completed: {the_order.summary()}")
      session.logout()

  ```



  ```
  .venv) ckim@ckim-mbp:ck-apstra-api % ck-cli export-device-configs --help
  Usage: ck-cli export-device-configs [OPTIONS]

    Export a device configurations into multiple files

    The folder for each device will be created with the device name.
    0_load_override_pristine.txt (if the device is managed)
    0_load_override_freeform.txt (if case of freeform) 1_load_merge_intended.txt
    2_load_merge_configlet.txt (if applicable) 3_load_set_configlet-set.txt (if
    applicable)

  Options:
    --bp-name TEXT     Blueprint name
    --out-folder TEXT  Folder name to export
    --help             Show this message and exit.
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  (.venv) ckim@ckim-mbp:ck-apstra-api % ck-cli export-device-configs --bp-name dh --out-folder ~/Downloads/dev1
  2024-07-17 19:02:23,828 - INFO     - export_device_configs() - bp_name='dh' out_folder='/Users/ckim/Downloads/dev1' (cli.py:280)
  2024-07-17 19:02:23,952 - INFO     - export_device_configs() - system_label='dh_border2' (cli.py:301)
  2024-07-17 19:02:24,501 - INFO     - export_device_configs() - write_to_file(): rendered.txt (cli.py:291)
  2024-07-17 19:02:24,502 - INFO     - export_device_configs() - write_to_file(): 1_load_merge_intended.txt (cli.py:291)
  2024-07-17 19:02:24,502 - INFO     - export_device_configs() - write_to_file(): 2_load_merge_configlet.txt (cli.py:291)
  2024-07-17 19:02:24,503 - INFO     - export_device_configs() - system_label='spine1' (cli.py:301)
  2024-07-17 19:02:24,715 - INFO     - export_device_configs() - write_to_file(): 0_load_override_pristine.txt (cli.py:291)
  2024-07-17 19:02:25,173 - INFO     - export_device_configs() - write_to_file(): rendered.txt (cli.py:291)
  2024-07-17 19:02:25,174 - INFO     - export_device_configs() - write_to_file(): 1_load_merge_intended.txt (cli.py:291)
  2024-07-17 19:02:25,175 - INFO     - export_device_configs() - write_to_file(): 2_load_merge_configlet.txt (cli.py:291)
  2024-07-17 19:02:25,175 - INFO     - export_device_configs() - system_label='spine2' (cli.py:301)
  2024-07-17 19:02:25,654 - INFO     - export_device_configs() - write_to_file(): rendered.txt (cli.py:291)
  2024-07-17 19:02:25,655 - INFO     - export_device_configs() - write_to_file(): 1_load_merge_intended.txt (cli.py:291)
  2024-07-17 19:02:25,655 - INFO     - export_device_configs() - write_to_file(): 2_load_merge_configlet.txt (cli.py:291)
  2024-07-17 19:02:25,656 - INFO     - export_device_configs() - system_label='dh_border1' (cli.py:301)
  2024-07-17 19:02:25,868 - INFO     - export_device_configs() - write_to_file(): 0_load_override_pristine.txt (cli.py:291)
  2024-07-17 19:02:26,414 - INFO     - export_device_configs() - write_to_file(): rendered.txt (cli.py:291)
  2024-07-17 19:02:26,414 - INFO     - export_device_configs() - write_to_file(): 1_load_merge_intended.txt (cli.py:291)
  2024-07-17 19:02:26,415 - INFO     - export_device_configs() - write_to_file(): 2_load_merge_configlet.txt (cli.py:291)
  2024-07-17 19:02:26,415 - INFO     - export_device_configs() - write_to_file(): 3_load_set_configlet-set.txt (cli.py:291)
  2024-07-17 19:02:26,415 - INFO     - export_device_configs() - system_label='terra-border1' (cli.py:301)
  2024-07-17 19:02:26,533 - INFO     - export_device_configs() - system_label='terra-border2' (cli.py:301)
  (.venv) ckim@ckim-mbp:ck-apstra-api % ls ~/Downloads/dev1/dh
  dh_border1    dh_border2    spine1        spine2        terra-border1 terra-border2
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  ```




  ```
  (.venv) ckim@ckim-mbp:ck-apstra-api % ck-cli export-systems --help
  Usage: ck-cli export-systems [OPTIONS]

    Export systems of a blueprint to a CSV file

    The CSV file will have below columns: system, asn, lo0, rack, device_profile

  Options:
    --bp-name TEXT      Blueprint name
    --systems-csv TEXT  The CSV file path to create  [required]
    --help              Show this message and exit.
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  (.venv) ckim@ckim-mbp:ck-apstra-api % python src/ck_apstra_api/cli.py export-systems --systems-csv ~/Downloads/system.csv
  2024-07-09 19:27:19,866 - INFO     - export_systems() - systems_csv_path='/Users/ckim/Downloads/system.csv' writing to /Users/ckim/Downloads/system.csv (cli.py:276)
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  ```


  ```
  (.venv) ckim@ckim-mbp:ck-apstra-api % ck-cli export-blueprint --help
  Usage: ck-cli export-blueprint [OPTIONS]

    Export a blueprint into a json file The blueprint label -
    job_env.main_blueprint_name The json file - job_env.bp_json_file

  Options:
    --bp-name TEXT    Blueprint name
    --json-file TEXT  Blueprint name
    --help            Show this message and exit.
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  (.venv) ckim@ckim-mbp:ck-apstra-api % ck-cli export-blueprint --json-file ~/Downloads/dh.json --bp-name dh
  2024-07-17 18:18:29,465 - INFO     - export_blueprint() - bp_name='dh' json_file='/Users/ckim/Downloads/dh.json' (cli.py:191)
  (.venv) ckim@ckim-mbp:ck-apstra-api %
  ```



  ```
  ck-apstra-api-py3.11ckim@ckim-mbp:ck-apstra-api % ck-cli import-iplink-ct --help
  Usage: ck-cli import-iplink-ct [OPTIONS]

    Import IpLink CT from a CSV file

  Options:
    --csv-in TEXT  Path to the CSV file for iplink CT
    --help         Show this message and exit.
  ck-apstra-api-py3.11ckim@ckim-mbp:ck-apstra-api %
  ```

  [Example csv file](./tests/fixtures/iplink_ct_sample.csv)




  This repository is maintained on a best-effort basis. Comments and bug reports are encouraged and welcomed.


pkgId: c6f107c0e4488277c9c6822f29384f6f73f8792296dd4e2fae9dcef1b4fe28f2
name: python-ckanext-datagovtheme-help
arch: noarch
version: 0.2.41
epoch: 0
release: 1
summary: Development documents and examples for ckanext-datagovtheme
url: https://github.com/GSA/ckanext-datagovtheme/
rpm_license: Public Domain
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ckanext-datagovtheme-0.2.41-1.src.rpm
location_href: Packages/python-ckanext-datagovtheme-help-0.2.41-1.noarch.rpm
checksum_type: sha256
description:
  <=2.8        | no
  2.9          | 0.1.27 (last supported)
  2.10         | >=0.2.0

  [Optional]
  `ckanext.datagovtheme.js_recent_view = true`
  This defaults to `false`. If displaying the recent view count slows down page loading, the optional parameter can be set to `true` to make the recent view count an AJAX call, improving page loading speed. If the recent view count information (package['tracking_summary']) is already present, the AJAX call is disabled to reduce overhead. Therefore, the built-in recent view count rendering must be disabled for this mechanism to take effect. For catalog.data.gov, it means set setting `ckanext.datagovcatalog.add_packages_tracking_info` to false.
  **TODO**: re-evaluate the need for this customization after ckan 2.11 release, as described in ticket https://github.com/GSA/data.gov/issues/4798.


  - GNU Make
  - Docker Compose

  Build the docker containers. You'll want to do this anytime the dependencies
  change (requirements.txt, dev-requirements.txt).
      $ make build
  Start the containers.
      $ make up
  CKAN will start at [localhost:5000](http://localhost:5000).
  Clean up the environment.
      $ make down
  Open a shell to run commands in the container.
      $ docker-compose exec ckan bash
  If you're unfamiliar with docker-compose, see our
  [cheatsheet](https://github.com/GSA/datagov-deploy/wiki/Docker-Best-Practices#cheatsheet)
  and the [official docs](https://docs.docker.com/compose/reference/).
  For additional make targets, see the help.
      $ make help

  They follow the guidelines for [testing CKAN extensions](https://docs.ckan.org/en/2.8/extensions/testing-extensions.html#testing-extensions).
  To run the extension tests:
      $ make test
  Lint your code.
      $ make lint

  We have seen issues with `datagovtheme not installed`.
  If this is the case, run `python setup.py develop` in the container.

  The development environment drops as many dependencies as possible. It is
  not meant to have feature parity with
  [GSA/catalog.data.gov](https://github.com/GSA/catalog.data.gov/) or
  [GSA/inventory-app](https://github.com/GSA/inventory-app/). Tests should mock
  external dependencies where possible.
  In order to support multiple versions of CKAN, or even upgrade to new versions
  of CKAN, we support development and testing through the `CKAN_VERSION`
  environment variable.
      $ make CKAN_VERSION=2.10.1 test


pkgId: f619381ca7e82e7137bdf2c081f6fe229430bd0d6fc3793a5b86dd055ab24ba5
name: python-ckanext-validation-help
arch: noarch
version: 2.2.0
epoch: 0
release: 1
summary: Development documents and examples for ckanext-validation
url: https://github.com/ckan/ckanext-validation
rpm_license: AGPL
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-ckanext-validation-2.2.0-1.src.rpm
location_href: Packages/python-ckanext-validation-help-2.2.0-1.noarch.rpm
checksum_type: sha256
description:
  [![Tests](https://github.com/frictionlessdata/ckanext-validation/workflows/Tests/badge.svg?branch=master)](https://github.com/frictionlessdata/ckanext-validation/actions)
  [![Code Coverage](http://codecov.io/github/frictionlessdata/ckanext-validation/coverage.svg?branch=master)](http://codecov.io/github/frictionlessdata/ckanext-validation?branch=master)


  Data description and validation for CKAN with [Frictionless Data](https://frictionlessdata.io) tools.




    * [Overview](#overview)
    * [Versions supported and Requirements](#versions-supported-and-requirements)
    * [Installation](#installation)
    * [Configuration](#configuration)
    * [How it works](#how-it-works)
       * [Data Validation](#data-validation)
       * [Data Schema](#data-schema)
       * [Validation Options](#validation-options)
       * [Operation modes](#operation-modes)
          * [Asynchronous validation](#asynchronous-validation)
          * [Synchronous validation](#synchronous-validation)
       * [Changes in the metadata schema](#changes-in-the-metadata-schema)
       * [Extending via interfaces](#extending-via-interfaces)
    * [Action functions](#action-functions)
  	* [resource_validation_run](#resource_validation_run)
  	* [resource_validation_show](#resource_validation_show)
  	* [resource_validation_delete](#resource_validation_delete)
  	* [resource_validation_run_batch](#resource_validation_run_batch)
    * [Command Line Interface](#command-line-interface)
      * [Starting the validation process manually](#starting-the-validation-process-manually)
      * [Data validation reports](#data-validation-reports)
    * [Running the Tests](#running-the-tests)
    * [Copying and License](#copying-and-license)




  This extension brings data validation powered by the [Frictionless
  Framework](https://github.com/frictionlessdata/framework) library to CKAN. It
  provides out of the box features to validate tabular data and integrate
  validation reports to the CKAN interface.

  Data validation can be performed automatically on the background or during
  dataset creation, and the results are stored against each resource.

  !['Status badges in resources'](https://i.imgur.com/9VIzfwo.png)

  Comprehensive reports are created describing issues found with the data, both
  at the structure level (missing headers, blank rows, etc) and at the data
  schema level (wrong data types, values out of range, etc).


  The extension also exposes all the underlying [actions](#action-functions) so
  data validation can be integrated in custom workflows from other extensions.

  If you are eager to get started, jump to the [Installation](#installation) and
  [Configuration](#configuration) instructions. To learn more about data
  validation and how the extension works, read the next section.



  Compatibility with core CKAN versions:

    | CKAN version   | Compatibility                                              |
    | -------------- |------------------------------------------------------------|
    | 2.7            | no longer supported                                        |
    | 2.8            | no longer supported (last supported 1.x)                   |
    | 2.9            | yes (Python3) Must: `pip install "setuptools>=44.1.0,<71"` |
    | 2.10           | no                                                         |
    | 2.11           | no                                                         |


  It is strongly recommended to use it alongside
  [ckanext-scheming](https://github.com/ckan/ckanext-scheming) to define the
  necessary extra fields in the default CKAN schema.




  To install ckanext-validation, activate your CKAN virtualenv and run:

      git clone https://github.com/ckan/ckanext-validation.git
      cd ckanext-validation
      pip install -r requirements.txt
      python setup.py develop

  Create the database tables running:

      paster validation init-db -c ../path/to/ini/file




  Once installed, add the `validation` plugin to the `ckan.plugins` configuration option in your INI file. If using ckanext-scheming, the `validation` plugins should be loaded **before** the `scheming_datasets` one:

      ckan.plugins = ... validation scheming_datasets




  The extension requires changes in the CKAN metadata schema. The easiest way to
  add those is by using ckanext-scheming. Use these two configuration options to
  link to the dataset schema (replace with your own if you need to customize it)
    and the required presets:

  	scheming.dataset_schemas = ckanext.validation.examples:ckan_default_schema.json
  	scheming.presets = ckanext.scheming:presets.json
      	               ckanext.validation:presets.json

  Read more below about how to [change the CKAN metadata schema](#changes-in-the-metadata-schema)



  Use the following configuration options to choose the [operation modes](#operation-modes):

  	ckanext.validation.run_on_create_async = True|False (Defaults to True)
  	ckanext.validation.run_on_update_async = True|False (Defaults to True)

  	ckanext.validation.run_on_create_sync = True|False (Defaults to False)
  	ckanext.validation.run_on_update_sync = True|False (Defaults to False)



  By default validation will be run against the following formats: `CSV`, `XLSX`
  and `XLS`. You can modify these formats using the following option:

  	ckanext.validation.formats = csv xlsx

  You can also provide [validation options](#validation-options) that will be
  used by default when running the validation:

  	ckanext.validation.default_validation_options={
  	    "skip_errors": ["blank-row", "duplicate-label"],
      	}

  Make sure to use indentation if the value spans multiple lines otherwise it
  won't be parsed.

  If you are using a cloud-based storage backend for uploads, check [Private
  datasets](#private-datasets) for other configuration settings that might be
  relevant.



  To prevent the extension from adding the validation badges next to the
  resources use the following option:

      ckanext.validation.show_badges_in_listings = False



  To prevent the extension from keeping validation reports for unsupported Resource formats. Defaults to False:

      ckanext.validation.clean_validation_reports = True

  Once a Resource is updated and its format is not supported in ckanext.validation.formats, a job will be enqueued to remove the validation reports from the Resource.





  CKAN users will be familiar with the validation performed against the metadata
  fields when creating or updating datasets. The form will return an error, for
  instance, if a field is missing or it doesn't have the expected format.

  Data validation follows the same principle, but against the actual data
  published in CKAN, that is the contents of tabular files (Excel, CSV, etc)
  hosted in CKAN itself or elsewhere. Whenever a resource of the appropriate
  format is created or updated, the extension will validate the data against a
  collection of checks. This validation is powered by
  [Frictionless Framework](https://github.com/frictionlessdata/framework), a very
  powerful data validation library developed by the [Open Knowledge Foundation](https://okfn.org)
  as part of the [Frictionless Data](https://frictionlessdata.io) project.
  Frictionless Framework provides an extensive suite of [checks](https://framework.frictionlessdata.io/docs/checks/baseline.html)
  that cover common issues with tabular data files.

  These checks include structural problems like missing headers or values, blank
  rows, etc., but also can validate the data contents themselves (see
  [Data Schemas](#data-schemas)) or even run [custom checks](https://framework.frictionlessdata.io/docs/guides/validating-data.html#custom-checks).

  The result of this validation is a JSON report. This report contains all the
  issues found (if any) with their relevant context (row number, columns
      involved, etc). The reports are stored in the database and linked to the
  CKAN resources, and can be retrieved [via the API](#resource_validation_show).

  If there is a report available for a particular resource, a status badge will
  be displayed in the resource listing and on the resource page, showing whether
  validation passed or failed for the resource.

  ![Status badge](https://i.imgur.com/9LIHMF8.png)

  Clicking on the badge will take you to the validation report page, where the
  report will be rendered.

  !['Validation report'](https://i.imgur.com/Mm6vKFD.png)

  Whenever possible, the report will provide a preview of the cells, rows or
  columns involved in an error, to make it easy to identify and fix it.



  As mentioned before, data can be validated against a schema. Much in the same
  way as the standard CKAN schema for metadata fields, the schema describes the
  data and what its values are expected to be.

  These schemas are defined following the [Table Schema](http://frictionlessdata.io/specs/table-schema/)
  specification, a really simple and flexible standard for describing tabular data.

  Let's see an example. Consider the following table (that could be stored as a
      CSV or Excel file):

  | id  | location | date       | measurement | observations   |
  | --- | -------- | ---------- | ----------- | -------------- |
  | 1   | 'A'      | 01/02/2017 | 23.65       |                |
  | 2   | 'B'      | 21/03/2017 | 22.90       |                |
  | 3   | 'A'      | 15/06/2017 | 21.79       | Severe drought |
  | 4   | 'C'      | 10/10/2017 | 24.12       |                |
  | 5   | 'C'      | 31/10/2017 | 24.21       |                |


  The following schema describes the expected data:

  ```json
  {
      "primaryKey": "id",
      "fields": [
          {
              "name": "id",
              "title": "Measurement identifier",
              "type": "integer"
          },
          {
              "name": "location",
              "title": "Measurement location code",
              "type": "string",
              "constraints": {
                  "enum": ["A", "B", "C", "D"]
              }
          },
          {
              "name": "date",
              "title": "Measurement date",
              "type": "date",
              "format": "%d/%m/%Y"
          },
          {
              "name": "measurement",
              "title": "Measure of the oblique fractal impedance at noon",
              "type": "number",
              "constraints": {
                  "required": true
              }
          },
          {
              "name": "observations",
              "title": "Extra observations",
              "type": "string"
          }
      ]
  }

  ```

  If we store this schema against a resource, it will be used to perform a more
  thorough validation. For instance, updating the resource with the following
  data would fail validation with a variety of errors, even if the general
  structure of the file is correct:


  | id  | location | date       | measurement | observations   |
  | --- | -------- | ---------- | ----------- | -------------- |
  | ... | ...      | ...        | ...         | ...            |
  | 5   | 'E'      | 2017-11-01 | missing     |                |
  | 'a' | 'B'      | 21/03/2017 |             |                |

  With the extension enabled and configured, schemas can be attached to the
  `schema` field on resources via the UI form or the API. If present in a
  resource, they will be used when performing validation on the resource file.




  As we saw before, the validation process involves many different checks and
  it's very likely that what "valid" data actually means will vary across CKAN
  instances or datasets. The validation process can be tweaked by passing any of
  the [supported
  options](https://framework.frictionlessdata.io/docs/guides/validating-data.html)
  to Frictionless Framework. These can be used to add or remove specific checks, control
  limits, etc.

  For instance, the following file would fail validation using the default
  options, but it may be valid in a given context, or the issues may be known to
  the publishers:

  ```
  <blank line>
  <blank line>
  id;group;measurement

  1;A;23
  2;B;24

  3;C;23
  4;C;25
  <blank line>
  ```

  The following validation options would make validation pass:

  ```json
  {
      "skip_errors": ["blank-row"]
      "dialect":  {
        "header": True,
        "headerRows": [2],
        "commentChar": "#",
        "csv": {
          "delimiter": ";"
        }
      },
      "checks": [
        {"type": "table-dimensions", "minRows": 3},
        {"type": 'ascii-value'}
      ]
  }

  ```

  Validation options can be defined (as a JSON object like the above) on each
  resource (via the UI form or the API on the `validation_options` field) or can
  be set globally by administrators on the CKAN INI file (see [Configuration](#configuration)).




  Validation can be performed on private datasets. When validating a locally
  uploaded resource, the extension uses the actual physical path to read the
  file, so internally there is no need for authorization. But when the upload is
  on a cloud-based backend (like the ones provided by [ckanext-cloudstorage](https://github.com/TkTech/ckanext-cloudstorage) or
  [ckanext-s3filestore](https://github.com/okfn/ckanext-s3filestore)) we need
  to request the file via an HTTP request to CKAN. If the resource is private
  this will require an `Authorization` header in order to avoid a `Not Authorized` error.

  In these cases, the API key for the site user will be passed as part of the
  request (or alternatively `ckanext.validation.pass_auth_header_value` if set in
  the configuration).

  As this involves sending API keys to other extensions, this behaviour can be
  turned off by setting `ckanext.validation.pass_auth_header` to `False`.

  Again, these settings only affect private resources when using a cloud-based
  backend.




  The data validation process described above can be run in two modes:
  asynchronously in the background or synchronously while the resource is being
  created or updated. You can choose the mode for each of the create and update
  actions, but in most cases you will probably need just one of the two modes for
  both actions.



  Asynchronous validation is run in the background whenever a resource of a
  supported format is created or updated. Validation won't affect the action
  performed, so if there are validation errors found the resource will be created
  or updated anyway.

  This mode might be useful for instances where datasets are harvested from other
  sources, or where multiple publishers create datasets and as a maintainer you
  only want to give visibility to the quality of data, encouraging publishers to
  fix any issues.

  You will need to run the `worker` commmand to pick up validation jobs. Please
  refer to the [background jobs documentation](http://docs.ckan.org/en/latest/maintaining/background-tasks.html)
  for more details:

      paster jobs worker -c /path/to/ini/file

  Use `ckanext.validation.run_on_create_async` and
  `ckanext.validation.run_on_update_async` to enable this mode (See [Configuration](#configuration)).




  Synchronous validation is performed at the same time a resource of the
  supported formats is being created or updated. Currently, if data validation
  errors are found, a `ValidationError` will be raised and you won't be able to
  create or update the resource.

  Validation at creation or update time can be useful to ensure that data quality
  is maintained or that published data conforms to a particular schema.

  When using the UI form, validation errors will be displayed as normal CKAN
  validation errors:

  ![Error message](https://i.imgur.com/M9ARlAk.png)

  Clicking the link on the error message will bring up a modal window with the
  validation report rendered:

  ![Modal window with report](https://i.imgur.com/hx7WSqX.png)

  Use `ckanext.validation.run_on_create_sync` and `ckanext.validation.run_on_update_sync`
  to enable this mode (See [Configuration](#configuration)).




  The extension requires changes in the default CKAN resource metadata schema to
  add some fields it requires. It is strongly recommended to use
  [ckanext-scheming](https://github.com/ckan/ckanext-scheming) to define your
  CKAN schema. This extension provides all the necessary presets and validators
  to get up and running just by adding the following fields to the
  `resource_fields` section of a ckanext-scheming schema:

  ```json
      {
        "field_name": "schema",
        "label": "Schema",
        "preset": "resource_schema"
      },
      {
        "field_name": "validation_options",
        "label": "Validation options",
        "preset": "validation_options"
      },
      {
        "field_name": "validation_status",
        "label": "Validation status",
        "preset": "hidden_in_form"
      },
      {
        "field_name": "validation_timestamp",
        "label": "Validation timestamp",
        "preset": "hidden_in_form"
      }

  ```


  Here's more detail on the fields added:

  * `schema`: This can be a [Table Schema](http://frictionlessdata.io/specs/table-schema/)
  JSON object or an URL pointing to one. In the UI form you can upload a JSON file, link to one
  providing a URL or enter it directly. If uploaded, the file contents will be
  read and stored in the `schema` field. In all three cases the contents will be
  validated against the Table Schema specification.
  * `validation_options`: A JSON object with validation options that will be
  passed to Frictionless Framework [validate](https://framework.frictionlessdata.io/docs/guides/validating-data.html)
  function.

  ![Form fields](https://i.imgur.com/ixKOCij.png)

  Additionally, two read-only fields are added to resources:

  * `validation_status`: Stores the last validation result for the resource.
  Can be one of `success`, `failure` or `error`.
  * `validation_timestamp`: Date and time of the last validation run.




  The plugin provides the `IDataValidation` interface so other plugins can modify
  its behaviour.

  Currently it only provides the `can_validate()` method, that plugins can use to
  determine if a specific resource should be validated or not:

  ```
  class IDataValidation(Interface):

      def can_validate(self, context, data_dict):
          '''
          When implemented, this call can be used to control whether the
          data validation should take place or not on a specific resource.

          Implementations will receive a context object and the data_dict of
          the resource.

          If it returns False, the validation won't be performed, and if it
          returns True there will be a validation job started.

          Note that after this methods is called there are further checks
          performed to ensure the resource has one of the supported formats.
          This is controlled via the `ckanext.validation.formats` config option.

          Here is an example implementation:


          from ckan import plugins as p

          from ckanext.validation.interfaces import IDataValidation


          class MyPlugin(p.SingletonPlugin):

              p.implements(IDataValidation, inherit=True)

              def can_validate(self, context, data_dict):

                  if data_dict.get('my_custom_field') == 'xx':
                      return False

                  return True

          '''
          return True
  ```

  The plugin also provides the `IPipeValidation` interface so other plugins can receive the dictized validation reports in a Data Pipeline way. This would allow plugins to perform actions once a validation job is finished.

  Example:
  ```
  import ckan.plugins as plugins
  from ckanext.validation.interfaces import IPipeValidation

  class MyPlugin(plugins.SingletonPlugin):
    plugins.implements(IPipeValidation)

    def receive_validation_report(self, validation_report):
      if validation_report.get('status') == 'success':
        
  ```



  The `validation` plugin adds new API actions to create and display validation
  reports. By default `resource_validation_run`, `resource_validation_delete` and
  `resource_validation_show` inherit whatever auth is in place for
  `resource_update` and `resource_show` respectively.

  There is an extra action which only sysadmins can access:
  `resource_validation_run_batch`.



  ```python
  def resource_validation_run(context, data_dict):
      u'''
      Start a validation job against a resource.
      Returns the identifier for the job started.

      Note that the resource format must be one of the supported ones,
      currently CSV or Excel.

      :param resource_id: id of the resource to validate
      :type resource_id: string

      :rtype: string

      '''
  ```



  ```python
  def resource_validation_show(context, data_dict):
      u'''
      Display the validation job result for a particular resource.
      Returns a validation object, including the validation report or errors
      and metadata about the validation like the timestamp and current status.

      Validation status can be one of:

      * `created`: The validation job is in the processing queue
      * `running`: Validation is under way
      * `error`: There was an error while performing the validation, eg the file
          could not be downloaded or there was an error reading it
      * `success`: Validation was performed, and no issues were found
      * `failure`: Validation was performed, and there were issues found

      :param resource_id: id of the resource to validate
      :type resource_id: string

      :rtype: dict

      '''
  ```



  ```python

  def resource_validation_delete(context, data_dict):
      u'''
      Remove the validation job result for a particular resource.
      It also deletes the underlying Validation object.

      :param resource_id: id of the resource to remove validation from
      :type resource_id: string

      :rtype: None

      '''

  ```



  ```python

  def resource_validation_run_batch(context, data_dict):
      u'''
      Start asynchronous data validation on the site resources. If no
      options are provided it will run validation on all resources of
      the supported formats (`ckanext.validation.formats`). You can
      specify particular datasets to run the validation on their
      resources. You can also pass arbitrary search parameters to filter
      the selected datasets.

      Only sysadmins are allowed to run this action.

      Examples::

         curl -X POST http://localhost:5001/api/action/resource_validation_run_batch \
              -d '{"dataset_ids": "ec9bfd88-f90a-45ca-b024-adc8854b49bd"}' \
              -H Content-type:application/json \
              -H Authorization:API_KEY

         curl -X POST http://localhost:5001/api/action/resource_validation_run_batch \
              -d '{"dataset_ids": ["passenger-data-2018", "passenger-data-2017]}}' \
              -H Content-type:application/json \
              -H Authorization:API_KEY


         curl -X POST http://localhost:5001/api/action/resource_validation_run_batch \
              -d '{"query": {"fq": "res_format:XLSX"}}' \
              -H Content-type:application/json \
              -H Authorization:API_KEY

      :param dataset_ids: Run data validation on all resources for a
          particular dataset or datasets. Not to be used with ``query``.
      :type dataset_ids: string or list
      :param query: Extra search parameters that will be used for getting
          the datasets to run validation on. It must be a JSON object like
          the one used by the `package_search` API call. Supported fields
          are ``q``, ``fq`` and ``fq_list``. Check the documentation for
          examples. Note that when using this you will have to specify
          the resource formats to target your Not to be used with
          ``dataset_ids``.
      :type query: dict

      :rtype: string
      '''
  ```






  You can start (asynchronous) validation jobs from the command line using the
  `paster validation run` command. If no parameters are provided it will start a
  validation job for all resources in the site of suitable format (ie
      `ckanext.validation.formats`):

      paster validation run -c /path/to/ckan/ini

  You can limit the resources by specifying a dataset id or name:

      paster validation run -c /path/to/ckan/ini -d statistical-data-2018

  Or providing arbitrary search parameters:

      paster validation run -c ../ckan/development.ini -s '{"fq":"res_format:XLSX"}'




  The extension provides two small utilities to generate a global report with all the current data validation reports:

  	paster validation report -c /path/to/ckan/ini

  	paster validation report-full -c /path/to/ckan/ini


  Both commands will print an overview of the total number of datasets and
  tabular resources, and a breakdown of how many have a validation status of
  success, failure or error. Additionally they will create a CSV report. `paster
  validation report` will create a report with all failing resources, including
  the following fields:

  * Dataset name
  * Resource id
  * Resource format
  * Resource URL
  * Status
  * Validation report URL

  `paster validation report-full` will add a row on the output CSV for each error
  found on the validation report (limited to ten occurrences of the same error
      type per file). So the fields in the generated CSV report will be:

  * Dataset name
  * Resource id
  * Resource format
  * Resource URL
  * Status
  * Error code
  * Error message

  In both cases you can define the location of the output CSV passing the `-o` or
  `--output` option:


  	paster validation report-full -c /path/to/ckan/ini -o /tmp/reports/validation_full.csv


  Check the command help for more details:

  	paster validation --help

  	Usage: paster validation [options] Utilities for the CKAN data validation extension

      Usage:
          paster validation init-db
              Initialize database tables

          paster validation run [options]

              Start asynchronous data validation on the site resources. If no
              options are provided it will run validation on all resources of
              the supported formats (`ckanext.validation.formats`). You can
              specify particular datasets to run the validation on their
              resources. You can also pass arbitrary search parameters to filter
              the selected datasets.

           paster validation report [options]

              Generate a report with all current data validation reports. This
              will print an overview of the total number of tabular resources
              and a breakdown of how many have a validation status of success,
              failure or error. Additionally it will create a CSV report with all
              failing resources, including the following fields:
                  * Dataset name
                  * Resource id
                  * Resource URL
                  * Status
                  * Validation report URL

            paster validation report-full [options]

              Generate a detailed report. This is similar to the previous command
              but on the CSV report it will add a row for each error found on the
              validation report (limited to ten occurrences of the same error
              type per file). So the fields in the generated CSV report will be:

                  * Dataset name
                  * Resource id
                  * Resource URL
                  * Status
                  * Error code
                  * Error message



  	Options:
  	  -h, --help            show this help message and exit
  	  -v, --verbose
  	  -c CONFIG, --config=CONFIG
  							Config file to use.
  	  -f FILE_PATH, --file=FILE_PATH
  							File to dump results to (if needed)
  	  -y, --yes             Automatic yes to prompts. Assume "yes" as answer to
  							all prompts and run non-interactively
  	  -r RESOURCE_ID, --resource=RESOURCE_ID
  							 Run data validation on a particular resource (if the
  							format is suitable). It can be defined multiple times.
  							Not to be used with -d or -s
  	  -d DATASET_ID, --dataset=DATASET_ID
  							 Run data validation on all resources for a particular
  							dataset (if the format is suitable). You can use the
  							dataset id or name, and it can be defined multiple
  							times. Not to be used with -r or -s
  	  -s SEARCH_PARAMS, --search=SEARCH_PARAMS
  							Extra search parameters that will be used for getting
  							the datasets to run validation on. It must be a JSON
  							object like the one used by the `package_search` API
  							call. Supported fields are `q`, `fq` and `fq_list`.
  							Check the documentation for examples. Note that when
  							using this you will have to specify the resource
  							formats to target yourself. Not to be used with -r or
  							-d.
  	  -o OUTPUT_FILE, --output=OUTPUT_FILE
  							Location of the CSV validation report file on the
  							relevant commands.




  To run the tests, do:

      pip install -r dev-requirements.txt
      pytest --ckan-ini=test-custom.ini




  This material is copyright (c) [Open Knowledge Foundation](https://okfn.org).

  It is open and licensed under the GNU Affero General Public License (AGPL) v3.0
  whose full text may be found at:

  http://www.fsf.org/licensing/licenses/agpl-3.0.html


pkgId: 996b4db67829c3aea13f273b4ee80b0de3a3f8d2b4d09839192990a269faf163
name: python-cl4py-help
arch: noarch
version: 1.8.2
epoch: 0
release: 1
summary: Development documents and examples for cl4py
url: https://github.com/marcoheisig/cl4py
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cl4py-1.8.2-1.src.rpm
location_href: Packages/python-cl4py-help-1.8.2-1.noarch.rpm
checksum_type: sha256
description:
  The library cl4py (pronounce as *clappy*) allows Python programs to call
  Common Lisp libraries.  Its official mascot is the cl4py-bird:


pkgId: 38317c40fd07b00781634461df0dffe8eda74358f4a86b45f03edb5f5b479e74
name: python-clabe-help
arch: noarch
version: 1.2.16
epoch: 0
release: 1
summary: Development documents and examples for clabe
url: https://github.com/cuenca-mx/clabe
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clabe-1.2.16-1.src.rpm
location_href: Packages/python-clabe-help-1.2.16-1.noarch.rpm
checksum_type: sha256
description:
  [![test](https://github.com/cuenca-mx/clabe-python/workflows/test/badge.svg)](https://github.com/cuenca-mx/clabe-python/actions?query=workflow%3Atest)
  [![codecov](https://codecov.io/gh/cuenca-mx/clabe-python/branch/main/graph/badge.svg)](https://codecov.io/gh/cuenca-mx/clabe-python)
  [![PyPI](https://img.shields.io/pypi/v/clabe.svg)](https://pypi.org/project/clabe/)
  [![Downloads](https://pepy.tech/badge/clabe)](https://pepy.tech/project/clabe)

  Librería para validar y calcular un número CLABE basado en
  https://es.wikipedia.org/wiki/CLABE



  Python 3.6 o superior.



  Se puede instalar desde Pypi usando

  ```
  pip install clabe
  ```



  Para ejecutar las pruebas

  ```
  $ make test
  ```



  Obtener el dígito de control de un número CLABE

  ```python
  import clabe
  clabe.compute_control_digit('00200000000000000')
  ```

  Para validar si un número CLABE es válido

  ```python
  import clabe
  clabe.validate_clabe('002000000000000008')
  ```

  Para obtener el banco a partir de 3 dígitos

  ```python
  import clabe
  clabe.get_bank_name('002')
  ```

  Para generar nuevo válido CLABES

  ```python
  import clabe
  clabe.generate_new_clabes(10, '002123456')
  ```


pkgId: 6e6131aca528719a44815bfe7c5d1910adb6b2af6ae9eeb45a236a0c74bda836
name: python-clamnibs-help
arch: noarch
version: 0.1.13
epoch: 0
release: 1
summary: Development documents and examples for clamnibs
url: https://github.com/davidhaslacher/clam-nibs
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clamnibs-0.1.13-1.src.rpm
location_href: Packages/python-clamnibs-help-0.1.13-1.noarch.rpm
checksum_type: sha256
description:
  This toolbox contains all software required to implement closed-loop amplitude-modulated non-invasive brain stimulation (CLAM-NIBS) and evaluate the resulting electroencephalography (EEG) or magnetoencephalography (MEG) data.


pkgId: 25c6a6740849554ce4427400a0d9291a6af7cbd83926f4033d1b2b1edeb68e50
name: python-clang-tools
arch: noarch
version: 0.14.0
epoch: 0
release: 1
summary: Install clang-tools (clang-format, clang-tidy) with pip
url: https://pypi.org/project/clang-tools/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clang-tools-0.14.0-1.src.rpm
location_href: Packages/python-clang-tools-0.14.0-1.noarch.rpm
checksum_type: sha256
description:
  **Install clang-format, clang-tidy, clang-query, and clang-apply-replacements binaries with clang-tools CLI.**
  |latest-version| |python-test| |codecov-badge| |sonar-badge| |platfrom-badge| |pypi-badge|
      This package only manages binary executables (& corresponding symbolic links) that
      are installed using this package's executable script. It does not intend to change or
      modify any binary executable installed from other sources (like LLVM releases).


pkgId: ab2c301491fe04a435c7c8c1cbdb52b993a4b7ad0b7c483470c92e43e9663aa5
name: python-clarifai-datautils-help
arch: noarch
version: 0.0.6
epoch: 0
release: 1
summary: Development documents and examples for clarifai-datautils
url: https://github.com/Clarifai/clarifai-python-datautils
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clarifai-datautils-0.0.6-1.src.rpm
location_href: Packages/python-clarifai-datautils-help-0.0.6-1.noarch.rpm
checksum_type: sha256
description:
  * **[Installation](#installation)**
  * **[Getting Started](#getting-started)**
  * **[Features](#features)**
    * [Image Utils](#image-utils)
    * [Data Ingestion Pipeline](#ingestion-pipeline)
  * **[Usage](#usage)**
  * **[Examples](#more-examples)**

  Install from PyPi:
  ```bash
  pip install clarifai-datautils
  ```
  Install from Source:
  ```bash
  git clone https://github.com/Clarifai/clarifai-python-datautils
  cd clarifai-python-datautils
  python3 -m venv env
  source env/bin/activate
  pip3 install -r requirements.txt
  ```

  Quick intro to Image Annotation Conversion feature
  ```python
  from clarifai_datautils import ImageAnnotations
  annotated_dataset = ImageAnnotations.import_from(path= 'folder_path', format= 'annotation_format')
  ```


  - #### Annotation Loader
    - Load various annotated image datasets and export to clarifai Platform
    - Convert from one annotation format to other supported annotation formats

    - Easy to use pipelines to load data from files and ingest into clarifai platfrom.
    - Load text files(pdf, doc, etc..) , transform, chunk and upload to the Clarifai Platform


  ```python
  from clarifai_datautils import ImageAnnotations

  coco_dataset = ImageAnnotations.import_from(path='folder_path',format= 'coco_detection')


  from clarifai.client.dataset import Dataset
  dataset = Dataset(user_id="user_id", app_id="app_id", dataset_id="dataset_id")
  dataset.upload_dataset(dataloader=coco_dataset.dataloader)

  coco_dataset.get_info()

  coco_dataset.export_to('voc_detection')
  ```


  To use Data Ingestion Pipeline, please run
  ```python
  pip install -r requirements-dev.txt
  ```
  ```python
  from clarifai_datautils.text import Pipeline, PDFPartition
  from clarifai_datautils.text.pipeline.cleaners import Clean_extra_whitespace

  pipeline = Pipeline(
      name='pipeline-1',
      transformations=[
          PDFPartition(chunking_strategy = "by_title",max_characters = 1024),
          Clean_extra_whitespace()
      ]
  )

  from clarifai.client import Dataset
  dataset = Dataset(dataset_url)
  dataset.upload_dataset(pipeline.run(files = file_path, loader = True))
  ```

  See many more code examples in this [repo](https://github.com/Clarifai/examples).


pkgId: 1b3799eae643ed9f48738031652f9522c80c6c3523513c501db973916cfaac8c
name: python-clarifai-grpc-help
arch: noarch
version: 10.11.2
epoch: 0
release: 1
summary: Development documents and examples for clarifai-grpc
url: https://github.com/Clarifai/clarifai-python-grpc
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clarifai-grpc-10.11.2-1.src.rpm
location_href: Packages/python-clarifai-grpc-help-10.11.2-1.noarch.rpm
checksum_type: sha256
description:
  ![image](https://github.com/user-attachments/assets/e52874e7-9246-4d55-ad9d-18b1f44aee1a)




  This is the official Clarifai gRPC Python client for interacting with our powerful recognition
  [API](https://docs.clarifai.com).
  Clarifai provides a platform for data scientists, developers, researchers and enterprises to master the entire
  artificial intelligence lifecycle. Gather valuable business insights from images, video and text using computer vision
  and natural language processing.

  * Try the Clarifai demo at: https://clarifai.com/demo
  * Sign up for a free account at: https://portal.clarifai.com/signup
  * Read the documentation at: https://docs.clarifai.com/


  [![PyPI version](https://pypip.in/v/clarifai-grpc/badge.png)](https://pypi.python.org/pypi/clarifai-grpc)
  [![Build](https://github.com/Clarifai/clarifai-python-grpc/workflows/Run%20tests/badge.svg)](https://github.com/Clarifai/clarifai-python-grpc/actions)



  ```cmd
  python -m pip install clarifai-grpc
  ```



  This library doesn't use semantic versioning. The first two version numbers (`X.Y` out of `X.Y.Z`) follow the API (backend) versioning, and
  whenever the API gets updated, this library follows it.

  The third version number (`Z` out of `X.Y.Z`) is used by this library for any independent releases of library-specific improvements and bug fixes.



  Construct the `V2Stub` object using which you'll access all the Clarifai API functionality:

  ```python
  from clarifai_grpc.channel.clarifai_channel import ClarifaiChannel
  from clarifai_grpc.grpc.api import service_pb2_grpc

  stub = service_pb2_grpc.V2Stub(ClarifaiChannel.get_grpc_channel())
  ```

  > Alternatives to the encrypted gRPC channel (`ClarifaiChannel.get_grpc_channel()`) are:
  > - the HTTPS+JSON channel (`ClarifaiChannel.get_json_channel()`), and
  > - the unencrypted gRPC channel (`ClarifaiChannel.get_insecure_grpc_channel()`).
  >
  > We only recommend them in special cases.

  Predict concepts in an image:

  ```python
  from clarifai_grpc.grpc.api import service_pb2, resources_pb2
  from clarifai_grpc.grpc.api.status import status_code_pb2

  YOUR_CLARIFAI_API_KEY = "???"
  YOUR_APPLICATION_ID = "???"
  SAMPLE_URL = "https://samples.clarifai.com/metro-north.jpg"


  metadata = (("authorization", f"Key {YOUR_CLARIFAI_API_KEY}"),)

  request = service_pb2.PostModelOutputsRequest(
      
      model_id="general-image-recognition",
      user_app_id=resources_pb2.UserAppIDSet(app_id=YOUR_APPLICATION_ID),
      inputs=[
          resources_pb2.Input(
              data=resources_pb2.Data(image=resources_pb2.Image(url=SAMPLE_URL))
          )
      ],
  )
  response = stub.PostModelOutputs(request, metadata=metadata)

  if response.status.code != status_code_pb2.SUCCESS:
      print(response)
      raise Exception(f"Request failed, status code: {response.status}")

  for concept in response.outputs[0].data.concepts:
      print("%12s: %.2f" % (concept.name, concept.value))
  ```

  See [the Clarifai API documentation](https://docs.clarifai.com/) for all available functionality.





  Try upgrading **setuptools** to a version `40.7.1` or higher.
  ```
  pip install --upgrade setuptools
  ```
  Source: https://github.com/grpc/grpc/issues/17829


pkgId: 9ea0dbce3d6809e103f05f30e994e6629f28f0bb58f6c3c1418b59e9418538c0
name: python-classifier_trains-help
arch: noarch
version: 1.1.7
epoch: 0
release: 1
summary: Development documents and examples for classifier_trains
url: https://pypi.org/project/classifier_trains/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-classifier_trains-1.1.7-1.src.rpm
location_href: Packages/python-classifier_trains-help-1.1.7-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/classifier-trains.svg)](https://pypi.org/project/classifier-trains)
  [![Python version](https://img.shields.io/pypi/pyversions/classifier-trains)](https://pypi.org/project/classifier-trains/)
  [![Downloads](https://img.shields.io/pepy/dt/classifier-trains)](https://github.com/wyhwong/classifier-trains)
  [![license](https://img.shields.io/badge/license-MIT-orange.svg)](https://github.com/wyhwong/classifier-trains/blob/main/LICENSE)
  [![CI](https://github.com/wyhwong/classifier-trains/actions/workflows/main.yml/badge.svg)](https://github.com/wyhwong/classifier-trains/actions/workflows/main.yml/)


  ```bash
  pip3 install classifier-trains
  ```



  For example of pipeline configuration, please see [pipeline_config_only_train.yml](https://github.com/wyhwong/classifier-trains/blob/main/src/tests/test_data/pipeline_config_only_train.yml), [pipeline_config_only_eval.yml](https://github.com/wyhwong/classifier-trains/blob/main/src/tests/test_data/pipeline_config_only_eval.yml), [full_pipeline_config.yml](https://github.com/wyhwong/classifier-trains/blob/main/src/tests/test_data/full_pipeline_config.yml).

  ```bash

  python3 -m classifier_trains run --config <path to yml config> --output_dir <output_dir>


  python3 -m classifier_trains profile --config <path to yml config> --output_dir <output_dir>


  python3 -m classifier_trains compute-mean-and-std --dir-path <path to dataset>


  python3 -m classifier_trains get-output-mapping --dir-path <path to dataset>
  ```


  ```
  Dataset Directory
  ├── train
  │   ├── <class1>
  │   │   ├── <image1>
  │   │   └── ...
  │   └── <class2>
  │       ├── <image1>
  │       └── ...
  ├── val
  │   ├── <class1>
  │   │   ├── <image1>
  │   │   └── ...
  │   └── <class2>
  │       ├── <image1>
  │       └── ...
  └── eval
      ├── <class1>
      │   ├── <image1>
      │   └── ...
      └── <class2>
          ├── <image1>
          └── ...
  ```





  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | enable_training | Enable training | bool | False | True, False |
  | enable_evaluation | Enable evaluation | bool | False | True, False |



  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | model | Model architecture to use | str | / | resnet18, resnet34, resnet50, resnet152, vgg11, vgg11_bn, vgg13, vgg13_bn, vgg16, vgg16_bn, vgg19, vgg19_bn, squeezenet1_0, squeezenet1_1, densenet121, densenet161, densenet169, densenet201, inception_v3 |
  | num_classes | Number of classes | int | / | Any positive integer |
  | weights | Pretrained weights | str | DEFAULT | Check PyTorch Documentation |
  | checkpoint_path | Path to checkpoint | Optional[str] | None | Self defined path |



  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | batch_size | Batch size | int | / | Any positive integer |
  | num_workers | Number of workers | int | 0 | Any non negative integer |



  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | width | Width of resized image | int | / | Any positive integer |
  | height | Height of resized image | int | / | Any positive integer |
  | interpolation | Interpolation method | str | bicubic | nearest, nearest_exact, bilinear, bicubic |
  | padding | Padding | Optional[str] | None | top_left, top_right, bottom_left, bottom_right, center |
  | maintain_aspect_ratio | Maintain aspect ratio | bool | False | True, False |



  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | hflip_prob | Horizontal flip probability | float | / | Any float between 0 and 1 |
  | vflip_prob | Vertical flip probability | float | / | Any float between 0 and 1 |
  | max_rotate_in_degree | Maximum rotation in degree | float | 0.0 | Any non negative float |
  | allow_center_crop | Allow center crop | bool | False | True, False |
  | allow_random_crop | Allow random crop | bool | False | True, False |



  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | allow_gray_scale | Allow gray scale | bool | False | True, False |
  | allow_random_color | Allow random color | bool | False | True, False |



  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | mean | Mean of dataset | List[float] | / | Any list of floats |
  | std | Standard deviation of dataset | List[float] | / | Any list of floats |



  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | name | Optimizer to use | str | / | sgd, adam, rmsprop, adamw |
  | lr | Learning rate | float | / | Any positive float |
  | weight_decay | Weight decay | float | 0.0 | Any non negative float |
  | momentum | Momentum | Optional[float] | None | Any non negative float |
  | alpha | Alpha | Optional[float] | None | Any non negative float |
  | betas | Betas | Optional[Tuple[float, float]] | None | Any tuple of non negative floats |



  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | name | Scheduler to use | str | / | step, consine |
  | lr_min | Minimum learning rate | Optional[float] | None | Any non negative float |
  | step_size | Step size | Optional[int] | None | Any positive integer |
  | gamma | Gamma | Optional[float] | None | Any non negative float |



  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | name | Name of the experiment | str | / | Any string |
  | num_epochs | Number of epochs | int | / | Any positive integer |
  | trainset_dir | Path to training dataset | str | / | Any string |
  | valset_dir | Path to validation dataset | str | / | Any string |
  | testset_dir | Path to testing dataset | Optional[str] | None | Any string |
  | device | Device to use | str | cuda | cpu, cuda, etc. |
  | max_num_hrs | Maximum number of hours to run | Optional[float] | None | Any non negative float |
  | criterion | What criterion to use for best model | str | loss | loss, accuracy |
  | validate_every | Validate every n epochs | int | 1 | Any positive integer |
  | save_every | Save model every n epochs | int | 3 | Any positive integer |
  | patience | Patience for early stopping | int | 5 | Any positive integer |
  | random_seed | Random seed | int | 42 | Any positive integer |
  | precision | Precision | int | 64 | 16, 32, 64 |
  | export_last_as_onnx | Export last model as ONNX | bool | False | True, False |
  | export_best_as_onnx | Export best model as ONNX | bool | False | True, False |



  | Parameter | Description | Type | Default | Choices |
  | --- | --- | --- | --- | --- |
  | name | Name of the experiment | str | / | Any string |
  | evalset_dir | Path to evaluation dataset | str | / | Any string |
  | device | Device to use | str | cuda | cpu, cuda, etc. |
  | precision | Precision | int | 64 | 16, 32, 64 |
  | random_seed | Random seed | int | 42 | Any positive integer |


pkgId: 2d9e5a8da3a293cd2f3e55327085ba9aa2d02e5d9c1ae5567e16727d21971d7b
name: python-clc99-help
arch: noarch
version: 1.1
epoch: 0
release: 1
summary: Development documents and examples for clc99
url: https://github.com/windows99-hue/clc99
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clc99-1.1-1.src.rpm
location_href: Packages/python-clc99-help-1.1-1.noarch.rpm
checksum_type: sha256
description:
  > 三年后，我再次更新了它。。。。



  这是一个用于命令行美化的python库，他可以实现像`Metasploit`一样的命令行显示。为了文档的简洁性，请阅读[帮助文档](https://github.com/windows99-hue/clc99/blob/master/help-chinese.md)



  在命令行下执行

  ~~~bash
  pip install clc99
  ~~~

  这将会为您安装 `clc99`



  详情请见[帮助文档](https://github.com/windows99-hue/clc99/blob/master/help-chinese.md)



  我在GitHub上开源了它。我希望您能维护和改进我的代码，感激不尽。

  这次更新，也算是完成了我小时候的一个愿望，而我将会带着这份礼物，继续向前。。。。。


pkgId: 4192f1b4853e2d9d9a76b8f05eae07fcf2a1d6db3937e22bd36f439f1a8bbfb4
name: python-cld4py-help
arch: noarch
version: 1.1.1
epoch: 0
release: 1
summary: Development documents and examples for cld4py
url: https://github.com/timyerg/cld4py
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cld4py-1.1.1-1.src.rpm
location_href: Packages/python-cld4py-help-1.1.1-1.noarch.rpm
checksum_type: sha256
description:
  Function to apply compact letter display for pairwise contrasts.

  Groups with no significant differences share a letter.

  It also can be used for plotting letters to seaborn/matplotlib figures.




  ```python
  pip install cld4py
  ```



  Cld4py currently includes two functions:
  - assign_letters(): this function will assign CLD letters to the contrasts
  - plot_letters(): this function can add CLD letters to matplotlib/seaborn figures




  ```python
  assign_letters()
      """
      Function to apply compact letter display for pairwise contrasts.
      Groups with no significant differences share a letter.

      Parameters:

        Required:
          df    - dataframe with contrasts (pairwise comparisons).
          G1, G2 - columns in contrasts df with compared groups.
          P      - column in contrasts df with p-value (adjusted, right?).

        Optional:
          alpha  - sigificance level (default 0.05).
          order  - None (default), list or ['ascending', 'descending'].
                   This parameter will define the order of assigned letters.
                   None - alphabetical order will be applied.
                   List - order of groups will be defined by that list.
                   String 'ascending' or 'descending' requires parameters
                   'data', 'values' and 'group' to order groups by the mean.
          data   - dataframe with values that were compared to get contrasts.
          vals   - column in data with compared values.
          group  - column in data with group information.
      """

  plot_letters()
      """
      Function to plot CLD letters for sns boxplot, violinplot, barplot or swarmplot.
      Groups with no significant differences share a letter.

      Parameters:

        Required:
          cld    - dataframe or dictionary with groups and letters. If df then groups
                   should be in the index and letters in the "Letters" column.
          data   - dataframe with values that were plotted.
          vals   - column in data with compared values.
          group  - column in data with group information.
          figax  - matplotlib or sns figure or ax with plot.

        Optional:
          axis   - axis with plotted groups: "x" or "y" (default "x").
          plot   - plot type: "boxplot", "violinplot", "barplot" or "swarmplot"
                   (default "boxplot").
          pos    - letters position: "upper", "lower", "top" or "bottom"
                   (default: "upper"). If axis = "y", "upper" and "top" will be
                   plotted on the right side, "lower" and "bottom" - on the left.
          pad    - distance (% of data range) to the plotted group object (default 1).
          c      - color of letters.
          fs     - fontsize of letters.
          lim    - increase axes limits, expressed in "pad" (see above) values (default 0)
      """
  ```




  ```python
  import cld4py
  import pandas as pd
  import seaborn as sns
  import matplotlib.pyplot as plt
  %matplotlib inline

  cont = pd.read_csv('tests/contrasts.tsv', sep='\t')
  data = pd.read_csv('tests/data.tsv', sep='\t')

  order = sorted(data.Sample.unique().tolist())

  cld = cld4py.assign_letters(cont, 'Group1', 'Group2', 'P-adj', order='descending',
                              data=data, vals='Metric', group='Sample')
  cld
  ```




  <div>

  <table border="1" class="dataframe">
    <thead>
      <tr style="text-align: right;">
        <th></th>
        <th>Letters</th>
      </tr>
      <tr>
        <th>Group</th>
        <th></th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <th>S3</th>
        <td>a</td>
      </tr>
      <tr>
        <th>S1</th>
        <td>a</td>
      </tr>
      <tr>
        <th>S4</th>
        <td>a</td>
      </tr>
      <tr>
        <th>S7</th>
        <td>b</td>
      </tr>
      <tr>
        <th>S6</th>
        <td>b</td>
      </tr>
      <tr>
        <th>S2</th>
        <td>c</td>
      </tr>
      <tr>
        <th>S5</th>
        <td>d</td>
      </tr>
    </tbody>
  </table>
  </div>






  ```python

  fig, ax = plt.subplots(1, 1, )
  sns.boxplot(y='Metric', x='Sample', data=data, ax=ax, order=order, showfliers=False)

  cld4py.plot_letters(cld=cld, data=data, figax=ax, axis='x', plot='boxplot', pos='upper',
              vals='Metric', group='Sample', pad=1, c='black', fs=None, lim=1)
  plt.savefig(f'tests/Figures/Boxplot_x_upper.png')


  fig, ax = plt.subplots(1, 1, )
  sns.boxplot(y='Metric', x='Sample', data=data, ax=ax, order=order, showfliers=False)

  cld4py.plot_letters(cld=cld, data=data, figax=ax, axis='x', plot='boxplot', pos='top',
              vals='Metric', group='Sample', pad=1, c='black', fs=None, lim=2)


  fig, ax = plt.subplots(1, 1, )
  sns.boxplot(x='Metric', y='Sample', data=data, ax=ax, order=order, showfliers=False)

  cld4py.plot_letters(cld=cld, data=data, figax=ax, axis='y', plot='boxplot', pos='lower',
              vals='Metric', group='Sample', pad=1, c='black', fs=None, lim=2)


  fig, ax = plt.subplots(1, 1, )
  sns.boxplot(x='Metric', y='Sample', data=data, ax=ax, order=order, showfliers=False)

  cld4py.plot_letters(cld=cld, data=data, figax=ax, axis='y', plot='boxplot', pos='bottom',
              vals='Metric', group='Sample', pad=1, c='black', fs=None, lim=2)
  plt.savefig(f'tests/Figures/Boxplot_y_bottom.png')
  ```

  ![](tests/figs_readme/output_11_0.png)
  ![](tests/figs_readme/output_11_1.png)
  ![](tests/figs_readme/output_11_2.png)
  ![](tests/figs_readme/output_11_3.png)




  ```python

  fig, ax = plt.subplots(1, 1, )
  sns.violinplot(y='Metric', x='Sample', data=data, ax=ax, order=order,)

  cld4py.plot_letters(cld=cld, data=data, figax=ax, axis='x', plot='violinplot', pos='upper',
              vals='Metric', group='Sample', pad=2, c='black', fs=None, lim=2)
  plt.savefig(f'tests/Figures/Violinplot_x_upper.png')


  fig, ax = plt.subplots(1, 1, )
  sns.violinplot(x='Metric', y='Sample', data=data, ax=ax, order=order,)

  cld4py.plot_letters(cld=cld, data=data, figax=ax, axis='y', plot='violinplot', pos='top',
              vals='Metric', group='Sample', pad=2, c='black', fs=None, lim=2)

  ```

  ![](tests/figs_readme/output_13_0.png)
  ![](tests/figs_readme/output_13_1.png)




  ```python

  fig, ax = plt.subplots(1, 1, )
  sns.barplot(y='Metric', x='Sample', data=data, ax=ax, order=order,)

  cld4py.plot_letters(cld=cld, data=data, figax=ax, axis='x', plot='barplot', pos='upper',
              vals='Metric', group='Sample', pad=1, c='black', fs=None, lim=2)
  plt.savefig(f'tests/Figures/Barplot_x_upper.png')


  fig, ax = plt.subplots(1, 1, )
  sns.barplot(x='Metric', y='Sample', data=data, ax=ax, order=order,)

  cld4py.plot_letters(cld=cld, data=data, figax=ax, axis='y', plot='barplot', pos='top',
              vals='Metric', group='Sample', pad=1, c='black', fs=None, lim=2)
  ```

  ![](tests/figs_readme/output_15_0.png)
  ![](tests/figs_readme/output_15_1.png)


  ```python

  fig, ax = plt.subplots(1, 1, )
  sns.swarmplot(y='Metric', x='Sample', data=data, ax=ax, order=order,)

  cld4py.plot_letters(cld=cld, data=data, figax=ax, axis='x', plot='swarmplot', pos='upper',
              vals='Metric', group='Sample', pad=2, c='black', fs=None, lim=2)


  fig, ax = plt.subplots(1, 1, )
  sns.swarmplot(x='Metric', y='Sample', data=data, ax=ax, order=order,)

  cld4py.plot_letters(cld=cld, data=data, figax=ax, axis='y', plot='swarmplot', pos='bottom',
              vals='Metric', group='Sample', pad=2, c='black', fs=None, lim=2)
  ```

  ![](tests/figs_readme/output_17_0.png)
  ![](tests/figs_readme/output_17_1.png)


  ```python

  ```


pkgId: da74aace0d8fe75348862f32122b369522c4ac2e9ff349b3d366dc91cbcdfdd6
name: python-cle-help
arch: noarch
version: 9.2.133
epoch: 0
release: 1
summary: Development documents and examples for cle
url: https://github.com/angr/cle
rpm_license: BSD-2-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cle-9.2.133-1.src.rpm
location_href: Packages/python-cle-help-9.2.133-1.noarch.rpm
checksum_type: sha256
description:
  [![Latest Release](https://img.shields.io/pypi/v/cle.svg)](https://pypi.python.org/pypi/cle/)
  [![Python Version](https://img.shields.io/pypi/pyversions/cle)](https://pypi.python.org/pypi/cle/)
  [![PyPI Statistics](https://img.shields.io/pypi/dm/cle.svg)](https://pypistats.org/packages/cle)
  [![License](https://img.shields.io/github/license/angr/cle.svg)](https://github.com/angr/cle/blob/master/LICENSE)

  CLE loads binaries and their associated libraries, resolves imports and
  provides an abstraction of process memory the same way as if it was loader by
  the OS's loader.


  Project repository: https://github.com/angr/cle

  Documentation: https://api.angr.io/projects/cle/en/latest/



  ```sh
  pip install cle
  ```



  ```python
  >>> import cle
  >>> ld = cle.Loader("/bin/ls")
  >>> hex(ld.main_object.entry)
  '0x4048d0'
  >>> ld.shared_objects
  {'ld-linux-x86-64.so.2': <ELF Object ld-2.21.so, maps [0x5000000:0x522312f]>,
   'libacl.so.1': <ELF Object libacl.so.1.1.0, maps [0x2000000:0x220829f]>,
   'libattr.so.1': <ELF Object libattr.so.1.1.0, maps [0x4000000:0x4204177]>,
   'libc.so.6': <ELF Object libc-2.21.so, maps [0x3000000:0x33a1a0f]>,
   'libcap.so.2': <ELF Object libcap.so.2.24, maps [0x1000000:0x1203c37]>}
  >>> ld.addr_belongs_to_object(0x5000000)
  <ELF Object ld-2.21.so, maps [0x5000000:0x522312f]>
  >>> libc_main_reloc = ld.main_object.imports['__libc_start_main']
  >>> hex(libc_main_reloc.addr)       # Address of GOT entry for libc_start_main
  '0x61c1c0'
  >>> import pyvex
  >>> some_text_data = ld.memory.load(ld.main_object.entry, 0x100)
  >>> irsb = pyvex.lift(some_text_data, ld.main_object.entry, ld.main_object.arch)
  >>> irsb.pp()
  IRSB {
     t0:Ity_I32 t1:Ity_I32 t2:Ity_I32 t3:Ity_I64 t4:Ity_I64 t5:Ity_I64 t6:Ity_I32 t7:Ity_I64 t8:Ity_I32 t9:Ity_I64 t10:Ity_I64 t11:Ity_I64 t12:Ity_I64 t13:Ity_I64 t14:Ity_I64

     15 | ------ IMark(0x4048d0, 2, 0) ------
     16 | t5 = 32Uto64(0x00000000)
     17 | PUT(rbp) = t5
     18 | t7 = GET:I64(rbp)
     19 | t6 = 64to32(t7)
     20 | t2 = t6
     21 | t9 = GET:I64(rbp)
     22 | t8 = 64to32(t9)
     23 | t1 = t8
     24 | t0 = Xor32(t2,t1)
     25 | PUT(cc_op) = 0x0000000000000013
     26 | t10 = 32Uto64(t0)
     27 | PUT(cc_dep1) = t10
     28 | PUT(cc_dep2) = 0x0000000000000000
     29 | t11 = 32Uto64(t0)
     30 | PUT(rbp) = t11
     31 | PUT(rip) = 0x00000000004048d2
     32 | ------ IMark(0x4048d2, 3, 0) ------
     33 | t12 = GET:I64(rdx)
     34 | PUT(r9) = t12
     35 | PUT(rip) = 0x00000000004048d5
     36 | ------ IMark(0x4048d5, 1, 0) ------
     37 | t4 = GET:I64(rsp)
     38 | t3 = LDle:I64(t4)
     39 | t13 = Add64(t4,0x0000000000000008)
     40 | PUT(rsp) = t13
     41 | PUT(rsi) = t3
     42 | PUT(rip) = 0x00000000004048d6
     43 | t14 = GET:I64(rip)
     NEXT: PUT(rip) = t14; Ijk_Boring
  }
  ```



  For a full listing and description of the options that can be provided to the
  loader and the methods it provides, please examine the docstrings in
  `cle/loader.py`. If anything is unclear or poorly documented (there is much)
  please complain through whatever channel you feel appropriate.



  CLE's loader is implemented in the Loader class.
  There are several backends that can be used to load a single file:

    - ELF, as its name says, loads ELF binaries. ELF files loaded this way are
      statically parsed using PyElfTools.

    - PE is a backend to load Microsoft's Portable Executable format,
      effectively Windows binaries. It uses the (optional) `pefile` module.

    - Mach-O is a backend to load, you guessed it, Mach-O binaries. Support is
      limited for this backend.

    - Blob is a backend to load unknown data. It requires that you specify
      the architecture it would be run on, in the form of a class from
      ArchInfo.

  Which backend you use can be specified as an argument to Loader. If left
  unspecified, the loader will pick a reasonable default.



  - If the `auto_load_libs` option is set to False, the Loader will not
    automatically load libraries requested by loaded objects. Otherwise...
  - The loader determines which shared objects are needed when loading
    binaries, and searches for them in the following order:
      - in the current working directory
      - in folders specified in the `ld_path` option
      - in the same folder as the main binary
      - in the system (in the corresponding library path for the architecture
        of the binary, e.g., /usr/arm-linux-gnueabi/lib for ARM, note that
        you need to install cross libraries for this, e.g.,
        libc6-powerpc-cross on Debian - needs emdebian repos)
      - in the system, but with mismatched version numbers from what is specified
        as a dependency, if the `ignore_import_version_numbers` option is True

  - If no binary is found with the correct architecture, the loader raises an
    exception if `except_missing_libs` option is True. Otherwise it simply
    leaves the dependencies unresolved.


pkgId: f98f99510bcf2fcc9f959e434045271810658bddfa42f14cc01892414fe0a147
name: python-clean-packager-help
arch: noarch
version: 1.0.0
epoch: 0
release: 1
summary: Development documents and examples for clean-packager
url: https://pypi.org/project/clean-packager/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clean-packager-1.0.0-1.src.rpm
location_href: Packages/python-clean-packager-help-1.0.0-1.noarch.rpm
checksum_type: sha256
description:
  - **Remove Unnecessary Files**: Cleans up temporary files, cache directories, and other clutter (e.g., `.pyc`, `.pyo`, `__pycache__`).
  - **Streamline Package Structure**: Keeps only essential files like source code, `README`, `LICENSE`, and setup scripts.
  - **Customizable Cleanup**: Define specific file patterns or directories to exclude from your package.
  - **Pre-Publish Checks**: Validates the package structure before upload.


pkgId: 6434e364cbb6be9a559c43c1a901359a05e428863dbc6eb4815eaf006c63f21b
name: python-cleanlab-studio-help
arch: noarch
version: 2.5.9
epoch: 0
release: 1
summary: Development documents and examples for cleanlab-studio
url: https://github.com/cleanlab/cleanlab-studio
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cleanlab-studio-2.5.9-1.src.rpm
location_href: Packages/python-cleanlab-studio-help-2.5.9-1.noarch.rpm
checksum_type: sha256
description:
  Command line and Python library interface to [Cleanlab Studio](https://cleanlab.ai/studio/). Analyze datasets and produce *cleansets* (cleaned datasets) with Cleanlab Studio in a single line of code!

  - [Installation](#installation)
  - [Quickstart](#quickstart)
  - [Advanced Usage](#advanced-usage)
  - [Documentation/Tutorials](https://help.cleanlab.ai/)




  You can install the Cleanlab Studio client [from PyPI][PyPI] with:

  ```bash
  pip install cleanlab-studio
  ```

  If you already have the client installed and wish to upgrade to the latest version, run:

  ```bash
  pip install --upgrade cleanlab-studio
  ```






  ```python
  from cleanlab_studio import Studio


  studio = Studio(<your api key>)


  dataset_id: str = studio.upload_dataset(<your dataset>, <your dataset name>)





  cleanset = studio.download_cleanlab_columns(<your cleanset id>)
  corrected_dataset = studio.apply_corrections(<your cleanset id>, <your dataset>)
  ```

  The Python API offers significantly more functionality than is available in the Cleanlab Studio Web Application. Learn more via the [tutorials](https://help.cleanlab.ai/tutorials/) and [quickstart guide](https://help.cleanlab.ai/guide/quickstart/api/).



  1. If this is your first time using the Cleanlab CLI, authenticate with `cleanlab login`. You can find your API key at https://app.cleanlab.ai/account.
  2. Upload your dataset (image, text, or tabular) using `cleanlab dataset upload`.
  3. Create a project in Cleanlab Studio.
  4. Improve your dataset in Cleanlab Studio (e.g., correct some labels).
  5. Download your cleanset with `cleanlab cleanset download`.

  Learn more about the Cleanlab Studio CLI from the [quickstart guide](https://help.cleanlab.ai/guide/quickstart/cli/).



  Cleanlab Studio supports the following data formats:

  - Text/Tabular
    - CSV
    - JSON
    - XLS/XLSX
    - Pandas DataFrame _(Python library only)_
    - PySpark DataFrame _(Python library only)_
    - more to come!
  - Image
    - CSV (external media)
    - JSON (external media)
    - XLS/XLSX (external media)
    - Pandas DataFrame (external media) _(Python library only)_
    - PySpark DataFrame (external media) _(Python library only)_
    - Simple ZIP upload
    - Metadata ZIP upload
    - more to come!

  Information on how to format your dataset can be found by clicking the tutorial on https://app.cleanlab.ai/upload or in the [Datasets concept guide](https://help.cleanlab.ai/guide/concepts/datasets/). We also provide tutorials for converting certain common Python [image](https://help.cleanlab.ai/tutorials/format_image_data/) or [text](https://help.cleanlab.ai/tutorials/format_text_data/) datasets.







  All schema information will be inferred by default when uploading a dataset through the Python API. We provide some options to override the inferred schema if necessary:

  - To override the dataset modality, supply a `modality` kwarg to `studio.upload_dataset()`. Supported modalities include "text", "tabular", and "image"
  - To override the ID column, supply an `id_column` kwarg to `studio.upload_dataset()`
  - To override column types in your dataset, supply a `schema_overrides` kwarg to `studio.upload_dataset()` in the following format:

  ```
  {
    <name_of_column_to_override>: {
      "data_type": <desired_data_type>,
      "feature_type": <desired_feature_type>,
    },
    ...
  }
  ```



  To specify the column types in your dataset, create a JSON file named `schema.json`. If you would like to edit an inferred schema (rather than starting from scratch) follow these steps:

  1. Kick off a dataset upload using: `cleanlab dataset upload`
  2. Once schema generation is complete, you'll be asked whether you'd like to use our inferred schema. Enter `n` to decline
  3. You'll then be asked whether you'd like to save the inferred schema. Enter `y` to accept. Then enter the filename you'd like to save to (`schema.json` by default)
  4. Edit the schema file as you wish
  5. Kick off a dataset upload again using: `cleanlab dataset upload --schema_path [path to schema file]`

  Your schema file should be formatted as follows:

  ```json
  {
    "metadata": {
      "id_column": "tweet_id",
      "modality": "text",
      "name": "Tweets.csv"
    },
    "fields": {
      "tweet_id": {
        "data_type": "string",
        "feature_type": "identifier"
      },
      "sentiment": {
        "data_type": "string",
        "feature_type": "categorical"
      },
      "sentiment_confidence": {
        "data_type": "float",
        "feature_type": "numeric"
      },
      "retweet_count": {
        "data_type": "integer",
        "feature_type": "numeric"
      },
      "text": {
        "data_type": "string",
        "feature_type": "text"
      },
      "tweet_created": {
        "data_type": "boolean",
        "feature_type": "boolean"
      },
      "tweet_created": {
        "data_type": "string",
        "feature_type": "datetime"
      }
    },
    "version": "0.1.12"
  }
  ```

  This is the schema of a hypothetical dataset `Tweets.csv` that contains tweets, where the column `tweet_id` contains a
  unique identifier for each record. Each column in the dataset is specified under `fields` with its data type and feature
  type.



  **Data type** refers to the type of the field's values: string, integer, float, or boolean.

  Note that the integer type is partially _strict_, meaning floats that are equal to integers (e.g. `1.0`, `2.0`, etc)
  will be accepted, but floats like `0.8` and `1.5` will not. In contrast, the float type is _lenient_, meaning integers
  are accepted. Users should select the float type if the field may include float values. Note too that integers can have
  categorical and identifier feature types, whereas floats cannot.

  For booleans, the list of accepted values are: true/false, t/f, yes/no, 1/0, 1.0/0.0.

  **Feature type** refers to the secondary type of the field, relating to how it is used in a machine learning model, such
  as whether it is:

  - a categorical value
  - a numeric value
  - a datetime value
  - a boolean value
  - text
  - an identifier — a string / integer that identifies some entity
  - a filepath value (only valid for image datasets)

  Some feature types can only correspond to specific data types. The list of possible feature types for each data type is
  shown below

  | Data type | Feature type                                      |
  | :-------- | :------------------------------------------------ |
  | string    | text, categorical, datetime, identifier, filepath |
  | integer   | categorical, datetime, identifier, numeric        |
  | float     | datetime, numeric                                 |
  | boolean   | boolean                                           |

  The `datetime` type should be used for datetime strings, e.g. "2015-02-24 11:35:52 -0800", and Unix timestamps (which
  will be integers or floats). Datetime values must be parseable
  by [polars.from_epoch](https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.from_epoch.html) for integer/floats or [polars.Expr.str.strptime](https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.strptime.html) for strings.

  `version` indicates the version of the Cleanlab CLI package version used to generate the schema.



  - [Documentation](https://help.cleanlab.ai/) -- tutorials on how to use Cleanlab Studio and guides to learn key concepts
  - [Blog](https://cleanlab.ai/examples/) -- end-to-end applications, feature announcements, how-it-works explanations, benchmarks
  - [Slack Community](https://cleanlab.ai/slack/) -- ask questions, request features, discuss Data-Centric AI with others
  - Need professional help or want demo? Reach out via email: team@cleanlab.ai

  <p align="center">
    <img src="https://raw.githubusercontent.com/cleanlab/assets/master/cleanlab/studio.png" width=80% height=80%>
  </p>

  [PyPI]: https://pypi.org/project/cleanlab-studio/


pkgId: 0588991560ed313a837aa27719a18aa1a00ca14262c797a52e9365ff7e39ead6
name: python-clear-street-studio-sdk-help
arch: noarch
version: 0.1.0a17
epoch: 0
release: 1
summary: Development documents and examples for clear-street-studio-sdk
url: https://github.com/clear-street/studio-sdk-python
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clear-street-studio-sdk-0.1.0a17-1.src.rpm
location_href: Packages/python-clear-street-studio-sdk-help-0.1.0a17-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/clear-street-studio-sdk.svg)](https://pypi.org/project/clear-street-studio-sdk/)

  The Studio SDK Python library provides convenient access to the Studio SDK REST API from any Python 3.8+
  application. The library includes type definitions for all request params and response fields,
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).

  It is generated with [Stainless](https://www.stainlessapi.com/).



  The REST API documentation can be found on [docs.clearstreet.io](https://docs.clearstreet.io/studio). The full API of this library can be found in [api.md](https://github.com/clear-street/studio-sdk-python/tree/main/api.md).



  ```sh

  pip install --pre clear-street-studio-sdk
  ```



  The full API of this library can be found in [api.md](https://github.com/clear-street/studio-sdk-python/tree/main/api.md).

  ```python
  import os
  from studio_sdk import StudioSDK

  client = StudioSDK(
      bearer_token=os.environ.get(
          "STUDIO_SDK_BEARER_TOKEN"
      ),  # This is the default and can be omitted
      
      environment="sandbox",
  )

  entity = client.entities.retrieve(
      "<your_entity_id>",
  )
  print(entity.entity_id)
  ```

  While you can provide a `bearer_token` keyword argument,
  we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
  to add `STUDIO_SDK_BEARER_TOKEN="My Bearer Token"` to your `.env` file
  so that your Bearer Token is not stored in source control.



  Simply import `AsyncStudioSDK` instead of `StudioSDK` and use `await` with each API call:

  ```python
  import os
  import asyncio
  from studio_sdk import AsyncStudioSDK

  client = AsyncStudioSDK(
      bearer_token=os.environ.get(
          "STUDIO_SDK_BEARER_TOKEN"
      ),  # This is the default and can be omitted
      
      environment="sandbox",
  )


  async def main() -> None:
      entity = await client.entities.retrieve(
          "<your_entity_id>",
      )
      print(entity.entity_id)


  asyncio.run(main())
  ```

  Functionality between the synchronous and asynchronous clients is otherwise identical.



  Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:

  - Serializing back into JSON, `model.to_json()`
  - Converting to a dictionary, `model.to_dict()`

  Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.



  When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `studio_sdk.APIConnectionError` is raised.

  When the API returns a non-success status code (that is, 4xx or 5xx
  response), a subclass of `studio_sdk.APIStatusError` is raised, containing `status_code` and `response` properties.

  All errors inherit from `studio_sdk.APIError`.

  ```python
  import studio_sdk
  from studio_sdk import StudioSDK

  client = StudioSDK()

  try:
      client.entities.retrieve(
          "<your_entity_id>",
      )
  except studio_sdk.APIConnectionError as e:
      print("The server could not be reached")
      print(e.__cause__)  # an underlying Exception, likely raised within httpx.
  except studio_sdk.RateLimitError as e:
      print("A 429 status code was received; we should back off a bit.")
  except studio_sdk.APIStatusError as e:
      print("Another non-200-range status code was received")
      print(e.status_code)
      print(e.response)
  ```

  Error codes are as followed:

  | Status Code | Error Type                 |
  | ----------- | -------------------------- |
  | 400         | `BadRequestError`          |
  | 401         | `AuthenticationError`      |
  | 403         | `PermissionDeniedError`    |
  | 404         | `NotFoundError`            |
  | 422         | `UnprocessableEntityError` |
  | 429         | `RateLimitError`           |
  | >=500       | `InternalServerError`      |
  | N/A         | `APIConnectionError`       |



  Certain errors are automatically retried 2 times by default, with a short exponential backoff.
  Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
  429 Rate Limit, and >=500 Internal errors are all retried by default.

  You can use the `max_retries` option to configure or disable retry settings:

  ```python
  from studio_sdk import StudioSDK


  client = StudioSDK(
      
      max_retries=0,
  )


  client.with_options(max_retries=5).entities.retrieve(
      "<your_entity_id>",
  )
  ```



  By default requests time out after 1 minute. You can configure this with a `timeout` option,
  which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:

  ```python
  from studio_sdk import StudioSDK


  client = StudioSDK(
      
      timeout=20.0,
  )


  client = StudioSDK(
      timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
  )


  client.with_options(timeout=5.0).entities.retrieve(
      "<your_entity_id>",
  )
  ```

  On timeout, an `APITimeoutError` is thrown.

  Note that requests that time out are [retried twice by default](https://github.com/clear-street/studio-sdk-python/tree/main/#retries).





  We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.

  You can enable logging by setting the environment variable `STUDIO_SDK_LOG` to `info`.

  ```shell
  $ export STUDIO_SDK_LOG=info
  ```

  Or to `debug` for more verbose logging.



  In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:

  ```py
  if response.my_field is None:
    if 'my_field' not in response.model_fields_set:
      print('Got json like {}, without a "my_field" key present at all.')
    else:
      print('Got json like {"my_field": null}.')
  ```



  The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,

  ```py
  from studio_sdk import StudioSDK

  client = StudioSDK()
  response = client.entities.with_raw_response.retrieve(
      "<your_entity_id>",
  )
  print(response.headers.get('X-My-Header'))

  entity = response.parse()  # get the object that `entities.retrieve()` would have returned
  print(entity.entity_id)
  ```

  These methods return an [`APIResponse`](https://github.com/clear-street/studio-sdk-python/tree/main/src/studio_sdk/_response.py) object.

  The async client returns an [`AsyncAPIResponse`](https://github.com/clear-street/studio-sdk-python/tree/main/src/studio_sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.



  The above interface eagerly reads the full response body when you make the request, which may not always be what you want.

  To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.

  ```python
  with client.entities.with_streaming_response.retrieve(
      "<your_entity_id>",
  ) as response:
      print(response.headers.get("X-My-Header"))

      for line in response.iter_lines():
          print(line)
  ```

  The context manager is required so that the response will reliably be closed.



  This library is typed for convenient access to the documented API.

  If you need to access undocumented endpoints, params, or response properties, the library can still be used.



  To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
  http verbs. Options on the client will be respected (such as retries) will be respected when making this
  request.

  ```py
  import httpx

  response = client.post(
      "/foo",
      cast_to=httpx.Response,
      body={"my_param": True},
  )

  print(response.headers.get("x-foo"))
  ```



  If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request
  options.



  To access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You
  can also get all the extra fields on the Pydantic model as a dict with
  [`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).



  You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:

  - Support for [proxies](https://www.python-httpx.org/advanced/proxies/)
  - Custom [transports](https://www.python-httpx.org/advanced/transports/)
  - Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality

  ```python
  import httpx
  from studio_sdk import StudioSDK, DefaultHttpxClient

  client = StudioSDK(
      
      base_url="http://my.test.server.example.com:8083",
      http_client=DefaultHttpxClient(
          proxy="http://my.test.proxy.example.com",
          transport=httpx.HTTPTransport(local_address="0.0.0.0"),
      ),
  )
  ```

  You can also customize the client on a per-request basis by using `with_options()`:

  ```python
  client.with_options(http_client=DefaultHttpxClient(...))
  ```



  By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.

  ```py
  from studio_sdk import StudioSDK

  with StudioSDK() as client:
    
    ...


  ```



  This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes that only affect static types, without breaking runtime behavior.
  2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
  3. Changes that we do not expect to impact the vast majority of users in practice.

  We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

  We are keen for your feedback; please open an [issue](https://www.github.com/clear-street/studio-sdk-python/issues) with questions, bugs, or suggestions.



  If you've upgraded to the latest version but aren't seeing any new features you were expecting then your python environment is likely still using an older version.

  You can determine the version that is being used at runtime with:

  ```py
  import studio_sdk
  print(studio_sdk.__version__)
  ```



  Python 3.8 or higher.



  See [the contributing documentation](https://github.com/clear-street/studio-sdk-python/tree/main/./CONTRIBUTING.md).


pkgId: 1dddbad8e2cfb4ff0e1b97218260f259f74335b067bd55e80b1a31e1ad4a8641
name: python-clelandlab-quick-help
arch: noarch
version: 0.3.5
epoch: 0
release: 1
summary: Development documents and examples for clelandlab-quick
url: https://github.com/clelandlab/quick
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clelandlab-quick-0.3.5-1.src.rpm
location_href: Packages/python-clelandlab-quick-help-0.3.5-1.noarch.rpm
checksum_type: sha256
description:
  QuICK is a useful wrap of [QICK](https://github.com/openquantumhardware/qick).

  <div>
    <a style="margin: 0.25rem;" href="https://clelandlab-quick.readthedocs.io/en/latest/"><img src="https://img.shields.io/readthedocs/clelandlab-quick?style=for-the-badge&logo=readthedocs&logoColor=white"></a>
    <a style="margin: 0.25rem;" href="https://pypi.org/project/clelandlab-quick/"><img src="https://img.shields.io/pypi/v/clelandlab-quick?style=for-the-badge&logo=pypi&logoColor=white"></a>
    <a style="margin: 0.25rem;" href="https://github.com/clelandlab/quick"><img src="https://img.shields.io/github/stars/clelandlab/quick?style=for-the-badge&logo=github"></a>
  </div>



  QuICK has several layers of complexity.

  - `quick.auto` Automation of Qubit Measurements
  - `quick.experiment` Experiment Routines for Qubit Measurements
  - `quick.Mercator` Mercator Protocol for Pulse Sequence Program
  - `qick` the QICK firmware

  ![](https://clelandlab-quick.readthedocs.io/en/latest/Images/overview.png)


pkgId: 709c8aa8129eb5a5c550e87753da49acdbd0e8794d02bfb1f50da197d18fc7f6
name: python-clerk-backend-api-help
arch: noarch
version: 1.5.0
epoch: 0
release: 1
summary: Development documents and examples for clerk-backend-api
url: https://github.com/clerk/clerk-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clerk-backend-api-1.5.0-1.src.rpm
location_href: Packages/python-clerk-backend-api-help-1.5.0-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">
    <a href="https://clerk.com?utm_source=github&utm_medium=clerk_javascript" target="_blank" rel="noopener noreferrer">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://images.clerk.com/static/logo-dark-mode-400x400.png">
        <img src="https://images.clerk.com/static/logo-light-mode-400x400.png" height="100">
      </picture>
    </a>
     <p>The most comprehensive User Management Platform</p>
     <a href="https://clerk.com/docs/reference/backend-api"><img src="https://img.shields.io/static/v1?label=Docs&message=API Ref&color=000000&style=for-the-badge" /></a>
    <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" /></a>
  </div>
  <br></br>

  [![chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://clerk.com/discord)
  [![twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)

  <!-- Start Summary [summary] -->


  Clerk Backend API: The Clerk REST Backend API, meant to be accessed by backend
  servers.



  When the API changes in a way that isn't compatible with older versions, a new version is released.
  Each version is identified by its release date, e.g. `2021-02-05`. For more information, please see [Clerk API Versions](https://clerk.com/docs/backend-requests/versioning/overview).


  Please see https://clerk.com/docs for more information.

  More information about the API can be found at https://clerk.com/docs
  <!-- End Summary [summary] -->

  <!-- Start Table of Contents [toc] -->

  <!-- $toc-max-depth=2 -->
    * [SDK Installation](https://github.com/clerk/clerk-sdk-python/blob/master/#sdk-installation)
    * [IDE Support](https://github.com/clerk/clerk-sdk-python/blob/master/#ide-support)
    * [SDK Example Usage](https://github.com/clerk/clerk-sdk-python/blob/master/#sdk-example-usage)
    * [Authentication](https://github.com/clerk/clerk-sdk-python/blob/master/#authentication)
    * [Request Authentication](https://github.com/clerk/clerk-sdk-python/blob/master/#request-authentication)
    * [Available Resources and Operations](https://github.com/clerk/clerk-sdk-python/blob/master/#available-resources-and-operations)
    * [File uploads](https://github.com/clerk/clerk-sdk-python/blob/master/#file-uploads)
    * [Retries](https://github.com/clerk/clerk-sdk-python/blob/master/#retries)
    * [Error Handling](https://github.com/clerk/clerk-sdk-python/blob/master/#error-handling)
    * [Server Selection](https://github.com/clerk/clerk-sdk-python/blob/master/#server-selection)
    * [Custom HTTP Client](https://github.com/clerk/clerk-sdk-python/blob/master/#custom-http-client)
    * [Debugging](https://github.com/clerk/clerk-sdk-python/blob/master/#debugging)
  * [Development](https://github.com/clerk/clerk-sdk-python/blob/master/#development)
    * [Maturity](https://github.com/clerk/clerk-sdk-python/blob/master/#maturity)
    * [Contributions](https://github.com/clerk/clerk-sdk-python/blob/master/#contributions)

  <!-- End Table of Contents [toc] -->

  <!-- Start SDK Installation [installation] -->


  The SDK can be installed with either *pip* or *poetry* package managers.



  *PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.

  ```bash
  pip install clerk-backend-api
  ```



  *Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.

  ```bash
  poetry add clerk-backend-api
  ```
  <!-- End SDK Installation [installation] -->

  <!-- Start IDE Support [idesupport] -->




  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.

  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->

  <!-- Start SDK Example Usage [usage] -->




  ```python

  from clerk_backend_api import Clerk

  with Clerk(
      bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
  ) as clerk:

      res = clerk.email_addresses.get(email_address_id="email_address_id_example")

      assert res is not None

      
      print(res)
  ```

  </br>

  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  from clerk_backend_api import Clerk

  async def main():
      async with Clerk(
          bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
      ) as clerk:

          res = await clerk.email_addresses.get_async(email_address_id="email_address_id_example")

          assert res is not None

          
          print(res)

  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->

  <!-- Start Authentication [security] -->




  This SDK supports the following security scheme globally:

  | Name          | Type | Scheme      |
  | ------------- | ---- | ----------- |
  | `bearer_auth` | http | HTTP Bearer |

  To authenticate with the API the `bearer_auth` parameter must be set when initializing the SDK client instance. For example:
  ```python
  from clerk_backend_api import Clerk

  with Clerk(
      bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
  ) as clerk:

      clerk.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")

      

  ```
  <!-- End Authentication [security] -->



  Use the [authenticate_request](https://github.com/clerk/clerk-sdk-python/blob/main/src/clerk_backend_api/jwks_helpers/authenticaterequest.py) method to authenticate a request from your app's frontend (when using a Clerk frontend SDK) to a Python backend (Django, Flask, and other Python web frameworks). For example the following utility function checks if the user is effectively signed in:

  ```python
  import os
  import httpx
  from clerk_backend_api import Clerk
  from clerk_backend_api.jwks_helpers import AuthenticateRequestOptions

  def is_signed_in(request: httpx.Request):
      sdk = Clerk(bearer_auth=os.getenv('CLERK_SECRET_KEY'))
      request_state = sdk.authenticate_request(
          request,
          AuthenticateRequestOptions(
              authorized_parties=['https://example.com']
          )
      )
      return request_state.is_signed_in
  ```

  If the request is correctly authenticated, the token's payload is made available in `request_state.payload`. Otherwise the reason for the token verification failure is given by `request_state.reason`.

  <!-- Start Available Resources and Operations [operations] -->


  <details open>
  <summary>Available methods</summary>



  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/actortokens/README.md#create) - Create actor token
  * [revoke](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/actortokens/README.md#revoke) - Revoke actor token



  * [list_allowlist_identifiers](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/allowlistblocklist/README.md#list_allowlist_identifiers) - List all identifiers on the allow-list
  * [create_allowlist_identifier](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/allowlistblocklist/README.md#create_allowlist_identifier) - Add identifier to the allow-list
  * [create_blocklist_identifier](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/allowlistblocklist/README.md#create_blocklist_identifier) - Add identifier to the block-list
  * [delete_blocklist_identifier](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/allowlistblocklist/README.md#delete_blocklist_identifier) - Delete identifier from block-list



  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/allowlistidentifiers/README.md#delete) - Delete identifier from allow-list



  * [update_instance_settings](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/betafeatures/README.md#update_instance_settings) - Update instance settings
  * [~~update_domain~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/betafeatures/README.md#update_domain) - Update production instance domain :warning: **Deprecated**
  * [change_production_instance_domain](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/betafeatures/README.md#change_production_instance_domain) - Update production instance domain



  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/blocklistidentifierssdk/README.md#list) - List all identifiers on the block-list




  * [~~list~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/clients/README.md#list) - List all clients :warning: **Deprecated**
  * [verify](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/clients/README.md#verify) - Verify a client
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/clients/README.md#get) - Get a client



  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/domainssdk/README.md#list) - List all instance domains
  * [add](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/domainssdk/README.md#add) - Add a domain
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/domainssdk/README.md#delete) - Delete a satellite domain
  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/domainssdk/README.md#update) - Update a domain



  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailaddresses/README.md#create) - Create an email address
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailaddresses/README.md#get) - Retrieve an email address
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailaddresses/README.md#delete) - Delete an email address
  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailaddresses/README.md#update) - Update an email address



  * [~~upsert~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailandsmstemplates/README.md#upsert) - Update a template for a given type and slug :warning: **Deprecated**



  * [~~list~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailsmstemplates/README.md#list) - List all templates :warning: **Deprecated**
  * [~~revert~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailsmstemplates/README.md#revert) - Revert a template :warning: **Deprecated**
  * [~~get~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailsmstemplates/README.md#get) - Retrieve a template :warning: **Deprecated**
  * [~~toggle_template_delivery~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/emailsmstemplates/README.md#toggle_template_delivery) - Toggle the delivery by Clerk for a template of a given type and slug :warning: **Deprecated**



  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/instancesettingssdk/README.md#update) - Update instance settings
  * [update_restrictions](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/instancesettingssdk/README.md#update_restrictions) - Update instance restrictions
  * [update_organization_settings](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/instancesettingssdk/README.md#update_organization_settings) - Update instance organization settings



  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/invitations/README.md#create) - Create an invitation
  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/invitations/README.md#list) - List all invitations
  * [revoke](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/invitations/README.md#revoke) - Revokes an invitation



  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwks/README.md#get) - Retrieve the JSON Web Key Set of the instance



  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md#list) - List all templates
  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md#create) - Create a JWT template
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md#get) - Retrieve a template
  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md#update) - Update a JWT template
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/jwttemplates/README.md#delete) - Delete a Template



  * [get_interstitial](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/miscellaneous/README.md#get_interstitial) - Returns the markup for the interstitial page



  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#list) - Get a list of OAuth applications for an instance
  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#create) - Create an OAuth application
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#get) - Retrieve an OAuth application by ID
  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#update) - Update an OAuth application
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#delete) - Delete an OAuth application
  * [rotate_secret](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/oauthapplicationssdk/README.md#rotate_secret) - Rotate the client secret of the given OAuth application



  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationdomainsdk/README.md#update) - Update an organization domain.



  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationdomainssdk/README.md#create) - Create a new organization domain.
  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationdomainssdk/README.md#list) - Get a list of all domains of an organization.
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationdomainssdk/README.md#delete) - Remove a domain from an organization.



  * [get_all](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#get_all) - Get a list of organization invitations for the current instance
  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#create) - Create and send an organization invitation
  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#list) - Get a list of organization invitations
  * [bulk_create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#bulk_create) - Bulk create and send organization invitations
  * [~~list_pending~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#list_pending) - Get a list of pending organization invitations :warning: **Deprecated**
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#get) - Retrieve an organization invitation by ID
  * [revoke](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationinvitationssdk/README.md#revoke) - Revoke a pending organization invitation



  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#create) - Create a new organization membership
  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#list) - Get a list of all members of an organization
  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#update) - Update an organization membership
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#delete) - Remove a member from an organization
  * [update_metadata](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#update_metadata) - Merge and update organization membership metadata
  * [get_all](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationmembershipssdk/README.md#get_all) - Get a list of all organization memberships within an instance.



  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#list) - Get a list of organizations for an instance
  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#create) - Create an organization
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#get) - Retrieve an organization by ID or slug
  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#update) - Update an organization
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#delete) - Delete an organization
  * [merge_metadata](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#merge_metadata) - Merge and update metadata for an organization
  * [upload_logo](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#upload_logo) - Upload a logo for the organization
  * [delete_logo](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/organizationssdk/README.md#delete_logo) - Delete the organization's logo.



  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/phonenumbers/README.md#create) - Create a phone number
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/phonenumbers/README.md#get) - Retrieve a phone number
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/phonenumbers/README.md#delete) - Delete a phone number
  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/phonenumbers/README.md#update) - Update a phone number



  * [verify](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/proxychecks/README.md#verify) - Verify the proxy configuration for your domain



  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/redirecturls/README.md#list) - List all redirect URLs



  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/clerkredirecturls/README.md#create) - Create a redirect URL
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/clerkredirecturls/README.md#get) - Retrieve a redirect URL
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/clerkredirecturls/README.md#delete) - Delete a redirect URL



  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md#list) - Get a list of SAML Connections for an instance
  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md#create) - Create a SAML Connection
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md#get) - Retrieve a SAML Connection by ID
  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md#update) - Update a SAML Connection
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/samlconnectionssdk/README.md#delete) - Delete a SAML Connection



  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md#list) - List all sessions
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md#get) - Retrieve a session
  * [revoke](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md#revoke) - Revoke a session
  * [~~verify~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md#verify) - Verify a session :warning: **Deprecated**
  * [create_token_from_template](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/sessions/README.md#create_token_from_template) - Create a session token from a jwt template



  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/signintokens/README.md#create) - Create sign-in token
  * [revoke](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/signintokens/README.md#revoke) - Revoke the given sign-in token



  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/signups/README.md#update) - Update a sign-up



  * [~~preview~~](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/templates/README.md#preview) - Preview changes to a template :warning: **Deprecated**



  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/testingtokens/README.md#create) - Retrieve a new testing token



  * [list](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#list) - List all users
  * [create](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#create) - Create a new user
  * [count](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#count) - Count users
  * [get](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#get) - Retrieve a user
  * [update](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#update) - Update a user
  * [delete](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#delete) - Delete a user
  * [ban](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#ban) - Ban a user
  * [unban](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#unban) - Unban a user
  * [lock](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#lock) - Lock a user
  * [unlock](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#unlock) - Unlock a user
  * [set_profile_image](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#set_profile_image) - Set user profile image
  * [delete_profile_image](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#delete_profile_image) - Delete user profile image
  * [update_metadata](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#update_metadata) - Merge and update a user's metadata
  * [get_o_auth_access_token](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#get_o_auth_access_token) - Retrieve the OAuth access token of a user
  * [get_organization_memberships](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#get_organization_memberships) - Retrieve all memberships for a user
  * [get_organization_invitations](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#get_organization_invitations) - Retrieve all invitations for a user
  * [verify_password](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#verify_password) - Verify the password of a user
  * [verify_totp](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#verify_totp) - Verify a TOTP or backup code for a user
  * [disable_mfa](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#disable_mfa) - Disable a user's MFA methods
  * [delete_backup_codes](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#delete_backup_codes) - Disable all user's Backup codes
  * [delete_passkey](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#delete_passkey) - Delete a user passkey
  * [delete_web3_wallet](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#delete_web3_wallet) - Delete a user web3 wallet
  * [create_totp](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#create_totp) - Create a TOTP for a user
  * [delete_totp](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#delete_totp) - Delete all the user's TOTPs
  * [delete_external_account](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/users/README.md#delete_external_account) - Delete External Account



  * [create_svix_app](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/webhooks/README.md#create_svix_app) - Create a Svix app
  * [delete_svix_app](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/webhooks/README.md#delete_svix_app) - Delete a Svix app
  * [generate_svix_auth_url](https://github.com/clerk/clerk-sdk-python/blob/master/docs/sdks/webhooks/README.md#generate_svix_auth_url) - Create a Svix Dashboard URL

  </details>
  <!-- End Available Resources and Operations [operations] -->

  <!-- Start File uploads [file-upload] -->


  Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.

  > [!TIP]
  >
  > For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
  >

  ```python
  from clerk_backend_api import Clerk

  with Clerk(
      bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
  ) as clerk:

      res = clerk.users.set_profile_image(user_id="usr_test123", file={
          "file_name": "example.file",
          "content": open("example.file", "rb"),
          "content_type": "<value>",
      })

      assert res is not None

      
      print(res)

  ```
  <!-- End File uploads [file-upload] -->

  <!-- Start Retries [retries] -->


  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  from clerk_backend_api import Clerk
  from clerk_backend_api.utils import BackoffStrategy, RetryConfig

  with Clerk() as clerk:

      clerk.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d",
          RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

      

  ```

  If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
  ```python
  from clerk_backend_api import Clerk
  from clerk_backend_api.utils import BackoffStrategy, RetryConfig

  with Clerk(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
  ) as clerk:

      clerk.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")

      

  ```
  <!-- End Retries [retries] -->

  <!-- Start Error Handling [errors] -->


  Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.

  By default, an API error will raise a models.SDKError exception, which has the following properties:

  | Property        | Type             | Description           |
  |-----------------|------------------|-----------------------|
  | `.status_code`  | *int*            | The HTTP status code  |
  | `.message`      | *str*            | The error message     |
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
  | `.body`         | *str*            | The response content  |

  When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `verify_async` method may raise the following exceptions:

  | Error Type         | Status Code   | Content Type     |
  | ------------------ | ------------- | ---------------- |
  | models.ClerkErrors | 400, 401, 404 | application/json |
  | models.SDKError    | 4XX, 5XX      | \*/\*            |



  ```python
  from clerk_backend_api import Clerk, models

  with Clerk(
      bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
  ) as clerk:
      res = None
      try:

          res = clerk.clients.verify(request={
              "token": "jwt_token_example",
          })

          assert res is not None

          
          print(res)

      except models.ClerkErrors as e:
          
          raise(e)
      except models.SDKError as e:
          
          raise(e)
  ```
  <!-- End Error Handling [errors] -->

  <!-- Start Server Selection [server] -->




  The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
  ```python
  from clerk_backend_api import Clerk

  with Clerk(
      server_url="https://api.clerk.com/v1",
  ) as clerk:

      clerk.miscellaneous.get_interstitial(frontend_api="frontend-api_1a2b3c4d", publishable_key="pub_1a2b3c4d")

      

  ```
  <!-- End Server Selection [server] -->

  <!-- Start Custom HTTP Client [http-client] -->


  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.

  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from clerk_backend_api import Clerk
  import httpx

  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = Clerk(client=http_client)
  ```

  or you could wrap the client with your own custom logic:
  ```python
  from clerk_backend_api import Clerk
  from clerk_backend_api.httpclient import AsyncHttpClient
  import httpx

  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient

      def __init__(self, client: AsyncHttpClient):
          self.client = client

      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"

          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )

      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )

  s = Clerk(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->

  <!-- Start Debugging [debug] -->


  You can setup your SDK to emit debug logs for SDK requests and responses.

  You can pass your own logger class directly into your SDK.
  ```python
  from clerk_backend_api import Clerk
  import logging

  logging.basicConfig(level=logging.DEBUG)
  s = Clerk(debug_logger=logging.getLogger("clerk_backend_api"))
  ```
  <!-- End Debugging [debug] -->

  <!-- Placeholder for Future Speakeasy SDK Sections -->





  This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
  to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
  looking for the latest version.



  While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
  We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.


pkgId: 9e39a196c57983250a95f87565a438954b945d08b8536e18c4aeeef347bdd1f4
name: python-clfd-help
arch: noarch
version: 0.4.0
epoch: 0
release: 1
summary: Development documents and examples for clfd
url: https://pypi.org/project/clfd/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clfd-0.4.0-1.src.rpm
location_href: Packages/python-clfd-help-0.4.0-1.noarch.rpm
checksum_type: sha256
description:
  [![arXiv](http://img.shields.io/badge/astro.ph-1811.04929-B31B1B.svg)](https://arxiv.org/abs/1811.04929)  ![License](https://img.shields.io/badge/License-MIT-green.svg)  ![Python versions](https://img.shields.io/pypi/pyversions/clfd.svg)



  ``clfd`` stands for **cl**ean **f**olded **d**ata, and implements smart interference removal algorithms to be used on _folded_ pulsar search and pulsar timing data. They are based on a simple outlier detection method and require very little to no human input, which is the main reason for their efficacy. These cleaning algorithms were initially developed for a complete re-processing of the High Time Resolution Universe (HTRU) survey, and can be credited with the discovery of several pulsars that would have otherwise been missed.



  If using ``clfd`` contributes to a project that leads to a scientific publication, please cite the article
  ["The High Time Resolution Universe survey XIV: Discovery of 23 pulsars through GPU-accelerated reprocessing"](https://arxiv.org/abs/1811.04929)

  A detailed explanation of ``clfd``'s algorithms and a visual demonstration of what they can do on real Parkes data can be found in section 2.4. The idea is to convert each profile (there is one profile per channel and per sub-integration) to a small set of representative features (e.g. standard deviation, peak-to-peak difference) and to flag outliers in the resulting feature space. Since v0.2.2, ``clfd``  outputs report plots to visualize the outlier flagging process and the resulting two-dimensional time-frequency mask applied to the clean archive. Here's the output of a ``clfd`` run on a Parkes observation of the pulsar J0735-62, where the red lines delimit the automatically inferred acceptable value range for each feature:

  ![Corner Plot](docs/corner_plot.png)

  ![Profile Mask](docs/profile_mask.png)



  The implementation of the cleaning algorithms is entirely decoupled from the input/output data format, and interfaces to any folded data format can be easily implemented. Currently, ``clfd`` can read and write PSRFITS archives via the python bindings of [PSRCHIVE](http://psrchive.sourceforge.net/). An interface to [PRESTO](https://www.cv.nrao.edu/~sransom/presto/)'s pfd archives can be added if there are any expressions of interest.




  `clfd` has little reason to exist without the [PSRCHIVE](http://psrchive.sourceforge.net/) python bindings, which it uses to read and write archives. Unless you are working on an HPC facility where someone has already done the job for you, you will have to build PSRCHIVE yourself, with Python support.

  We hope to provide a guide on how to do this in the future. In the meantime, you may use the Dockerfile in this repository for cautious inspiration.






  The easiest method is to install the latest release is:
  ```
  pip install clfd
  ```

  The main command-line application should now be available to run, see below for more details.
  ```
  clfd --help
  ```




  If you want to freely edit the code and perhaps contribute, clone the repository and in the base directory of `clfd` run:

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

  Which performs an [editable install](https://pip.pypa.io/en/latest/reference/pip_install/#editable-installs) with additional development dependencies.




  If you are not allowed to install packages with ``pip`` (this may be the case on some computing clusters), or perhaps want to work around the idiosyncratic installation process of the PSRCHIVE Python bindings, then you can clone the repository and add the base directory of ``clfd`` to your ``PYTHONPATH`` environment variable, but then:
  1. You have to install the required dependencies manually.
  2. The main command-line application `clfd` (see below) will **NOT** be made available in your `PATH` automatically.

  We warmly recommend using one of the methods above unless you have no other option.



  `clfd` identifies bad profiles in a folded data cube based on whether certain profile features (i.e. summary statistics) are outside an acceptable range of values inferred from the majority of the data. The user may choose a combination of the following features on the command line (see below):
  - `ptp`: peak to peak difference
  - `std`: standard deviation
  - `var`: variance
  - `lfamp`: amplitude of second bin in the Fourier transform of the profile
  - `skew`: skewness
  - `kurtosis`: excess kurtosis
  - `acf`: autocorrelation with a lag of 1 phase bin

  **The choice of profile features should be motivated by the dynamic range of the data.** Depending on the digitization / scaling scheme employed by the telescope backend, on some observing systems the mean and scale of the data may vary wildly across the band and the mean / standard deviation of the data in a given channel do not correlate well with the presence of interference. In such cases, you should use features that are insensitive to the scale of the data. The official recommendation is as follows, but feel free to experiment:
  - Low dynamic range: `std`, `ptp` and/or `lfamp`. Recommended for older 1-bit and 2-bit Parkes multibeam receiver data for example.
  - High dynamic range: `skew`, `kurtosis`, and/or `acf`. Recommended for any Parkes UWL data in particular.




  If your installation went well, a command-line application `clfd` should now appear in your `PATH` and be callable from anywhere. It points to the ``cleanup.py`` script in the ``apps`` sub-directory, and can batch process multiple files / archives at once. For detailed help on command line arguments:

  ```bash
  clfd -h
  ```

  Running with default arguments should work well in most of cases, **but the choice of profile features should be strongly motivated by the dynamic range of the data.** On some observing systems, the mean and scale of the data can vary wildly across the band and thus the mean and standard deviation of the data in a given channel do not correlate well with the presence of interference. In such cases, you should use features that are insensitive to the scale of the data. The official recommendation is:
  - Low dynamic range / bit depth: `std`, `ptp` and/or `lfamp`. Recommended for 1-bit and 2-bit Parkes multibeam receiver data in particular.
  - High dynamic range: `skew`, `kurtosis`, and/or `acf`. Recommended for any Parkes UWL data in particular.


  For example, to process a batch of `PSRCHIVE` archive files placed in the ``~/folded_data`` directory:
  ```
  clfd ~/folded_data/*.ar
  ```
  This leaves the input files intact, and produces cleaned copies which are placed in the same directory, with the an additional ``.clfd`` extension appended. Report files in HDF5 format are also saved as ``BASENAME_clfd_report.h5`` where ``BASENAME`` is the archive file name without its extension. A Report stores all inputs and outputs of a clfd run on an archive, they can easily be loaded and manipulated interactively in IPython. See also section "Working with reports" below for more details.

  ```python
  >>> from clfd import Report
  >>> r = Report.load("SomeArchive_clfd_report.h5")
  >>> r.corner_plot()
  >>> r.profile_mask_plot()
  ```

  The masking of bad time-phase bins can be enabled with the `--despike` option. However, it is disabled by default as there is a small chance that it could affect pulses from a very bright low-DM pulsar, and it also tends to fail in the worst RFI environments. Be careful when using that option, and check that you are getting an improvement of data quality out of it.




  The command-line application may be the most practical way of getting the job done, but it just calls functions that are accessible to the user as well. It might be useful to check or plot intermediate outputs. The example below exposes the computation steps: featurization, outlier flagging and application of the outlier mask to the original archive.

  ```python
  >>> import psrchive
  >>> import clfd


  >>> cube = clfd.DataCube.from_psrchive("archive.ar")



  >>> features = clfd.featurize(cube, features=('std', 'ptp', 'lfamp'))
  >>> print(features)
                       std       ptp     lfamp
  subint channel
  0      0        0.042826  0.224936  0.786012
         1        0.000210  0.003367  0.003367
         2        0.002779  0.006757  0.009283
         3        0.002778  0.006757  0.020955
  ...                  ...       ...       ...
  57     1020     0.050708  0.309764  0.171277
         1021     0.048685  0.272727  0.928349
         1022     0.055210  0.314584  1.463649
         1023     0.058338  0.346801  1.077389

  [59392 rows x 3 columns]



  >>> stats, mask = clfd.profile_mask(features, q=2.0, zap_channels=range(150))





  >>> print(stats)

             std       ptp     lfamp
  q1    0.037299  0.202817  0.376125
  q3    0.040031  0.235003  0.918363
  iqr   0.002733  0.032185  0.542239
  vmin  0.031833  0.138447 -0.708352
  vmax  0.045497  0.299373  2.002841



  >>> mask.shape
  (58, 1024)

  >>> mask
  array([[ True,  True,  True, ..., False, False, False],
         [ True,  True,  True, ..., False, False, False],
         [ True,  True,  True, ..., False, False, False],
         ...,
         [ True,  True,  True, ..., False, False, False],
         [ True,  True,  True, ..., False, False, False],
         [ True,  True,  True, ...,  True,  True,  True]])



  >>> from clfd.interfaces import PsrchiveInterface



  >>> archive = psrchive.Archive_load("archive.ar")
  >>> PsrchiveInterface.apply_profile_mask(mask, archive)
  >>> PsrchiveInterface.save("archive_clean.ar", archive)




  >>> tpmask, valid_chans, repvals = clfd.time_phase_mask(cube, q=4.0, zap_channels=zap_channels)




  >>> PsrchiveInterface.apply_time_phase_mask(tpmask, valid_chans, repvals, archive)
  >>> PsrchiveInterface.save("archive_cleanest.ar", archive)
  ```



  Running the main command line application produces report files with some useful information about the cleaning performed. Reports store all inputs and outputs of a clfd run on an archive. **NOTE: Reports are very much a feature in development and may change in the future**. At the moment (``v0.2.2`` and above), a Report object has the following attributes:

  - ``frequencies``: channel frequencies in MHz
  - ``feature_names``: list of feature names used
  - ``features``: pandas.DataFrame returned by the ``featurize()`` function
  - ``stats``: pandas.DataFrame returned by the ``featurize()`` function
  - ``profmask``: boolean profile mask returned by the ``profile_mask()`` function. This is a numpy array with shape (num_subints, num_channels)
  - ``qmask``: value of the Tukey parameter ``q`` passed to ``profile_mask()``
  - ``zap_channels``: zap_channels argument that passed to ``profile_mask()``
  - ``tpmask``: mask returned by ``time_phase_mask()`` if the function was called (i.e. when the cleanup executable is called with the ``--despike`` option). If time_phase_mask() was NOT called, tpmask will be ``None``. Otherwise, ``tpmask`` is a numpy array with shape (num_subints, num_phase_bins).
  - ``qspike``: value of the Tukey parameter 'q' passed to ``time_phase_mask()``. If ``time_phase_mask()`` was NOT called, tpmask will be ``None``.
  - ``version``: version of clfd that was used to produce this report.

  And there are two methods to generate nice plots, of which you can see examples above:
  - ``corner_plot()``: pairwise scatter plot of profile features and single feature histograms. Each point represents a single profile (there is one profile per (subint, channel) tuple), and the red lines the inlier (i.e. acceptable) value ranges for each feature. Anything outside the inlier range has been flagged as anomalous and zero-weighted in the output archive.
  - ``profile_mask_plot()``: A view of the two-dimensional profile mask, along with the fraction of data masked in each channel and each sub-integration.

  More attributes and plots will be added in future versions.


pkgId: 0b28332f111e240180c9ad70861efbdf39442c2a3cbe9b1c7d3bc51daad15a61
name: python-cli-command-parser-help
arch: noarch
version: 2024.12.15
epoch: 0
release: 1
summary: Development documents and examples for cli-command-parser
url: https://github.com/dskrypa/cli_command_parser
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cli-command-parser-2024.12.15-1.src.rpm
location_href: Packages/python-cli-command-parser-help-2024.12.15-1.noarch.rpm
checksum_type: sha256
description:
  Python versions 3.9 and above are currently supported.  The last release of CLI Command Parser that supported 3.8 was
  2024-09-07.  Support for Python 3.8 `officially ended on 2024-10-07 <https://devguide.python.org/versions/>`__.
  Links
  *****
  - Documentation: https://dskrypa.github.io/cli_command_parser/
  - Example Scripts: https://github.com/dskrypa/cli_command_parser/tree/main/examples
  - PyPI Releases: https://pypi.org/project/cli-command-parser/
  - Source Code: https://github.com/dskrypa/cli_command_parser
  - Issue Tracker: https://github.com/dskrypa/cli_command_parser/issues


pkgId: 830db3ba70a4e45a9dd6577dc00b24198cb2cf82dd659a78ac8d3058f1923b9f
name: python-cli-mcp-server-help
arch: noarch
version: 0.2.0
epoch: 0
release: 1
summary: Development documents and examples for cli-mcp-server
url: https://github.com/MladenSU/cli-mcp-server
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cli-mcp-server-0.2.0-1.src.rpm
location_href: Packages/python-cli-mcp-server-help-0.2.0-1.noarch.rpm
checksum_type: sha256
description:
  A secure Model Context Protocol (MCP) server implementation for executing controlled command-line operations with
  comprehensive security
  features.
  ![License](https://img.shields.io/badge/license-MIT-blue.svg)
  ![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)
  ![MCP Protocol](https://img.shields.io/badge/MCP-Compatible-green)


pkgId: dabfec5c35e6172e44a5e5a97cf36409bcdd9d3ac76815c95b8161acb0261f01
name: python-click-pkg-help
arch: noarch
version: 0.7
epoch: 0
release: 1
summary: Development documents and examples for click-pkg
url: https://github.com/Muhammadali-Akbarov/click-pkg
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-click-pkg-0.7-1.src.rpm
location_href: Packages/python-click-pkg-help-0.7-1.noarch.rpm
checksum_type: sha256
description:
  <h1 align="center">Click Software Development Kit</h1>

  <p align="center">
    <a href="https://t.me/+lO97J78xBj45MzBi">
      <img src="https://img.shields.io/badge/Support%20Group-blue?logo=telegram&logoColor=white" alt="Support Group on Telegram"/>
    </a>
  </p>




  ```shell
  pip install click-pkg
  ```



  Add `'click_up'` in to your settings.py

  ```python
  INSTALLED_APPS = [
      ...
      'click_up',
      ...
  ]
  ```

  Add `'click_up'` credentials inside to settings.py

  Click configuration settings.py
  ```python
  CLICK_SERVICE_ID = "your-service-id"
  CLICK_MERCHANT_ID = "your-merchant-id"
  CLICK_SECRET_KEY = "your-secret-key"
  CLICK_ACCOUNT_MODEL = "order.models.Order" # your order model path.
  CLICK_AMOUNT_FIELD = "amount" # your amount field that's belongs to your order model
  ```

  Create a new View that about handling call backs
  ```python
  from click_up.views import ClickWebhook


  class ClickWebhookAPIView(ClickWebhook):
      def successfully_payment(self, params):
          """
          successfully payment method process you can ovveride it
          """
          print(f"payment successful params: {params}")

      def cancelled_payment(self, params):
          """
          cancelled payment method process you can ovveride it
          """
          print(f"payment cancelled params: {params}")
  ```

  Add a `payme` path to core of urlpatterns:

  ```python
  from django.urls import path
  from django.urls import include

  from your_app.views import ClickWebhookAPIView


  urlpatterns = [
      ...
      path("payment/click/update/", ClickWebhookAPIView.as_view()),
      ...
  ]
  ```

  Run migrations
  ```shell
  python3 manage.py makemigrations && python manage.py migrate
  ```

  🎉 Congratulations you have been integrated click with django, keep reading docs. After successfull migrations check your admin panel and see results what happened.



  Example to generate link:

  - Input

  ```python
  from click_up import ClickUp


  click_up = ClickUp(service_id="your-service-id", merchant_id="your-merchant-id") # alternatively you can use settings variables as well here.



  paylink = click_up.initializer.generate_pay_link(
    id=1, # id maybe order_id or acount_id (user_id, chat_id and etc..)
    amount=100,
    return_url="https://example.com"
  )
  ```

  - Output
  ```
  https://my.click.uz/services/pay?service_id=service_id&merchant_id=merchant_id&amount=1000&transaction_param=1&return_url=https://example.com
  ```


pkgId: 4d4bf85b43e778d9e6d56b7219808e5d9a7686aa046e25254660c451ca9a28bb
name: python-clickpy-client-help
arch: noarch
version: 0.1.6
epoch: 0
release: 1
summary: Development documents and examples for clickpy-client
url: https://pypi.org/project/clickpy-client/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clickpy-client-0.1.6-1.src.rpm
location_href: Packages/python-clickpy-client-help-0.1.6-1.noarch.rpm
checksum_type: sha256
description:
  Client for [clickpy.clickhouse.com](https://clickpy.clickhouse.com) database.

  [![PyPI](https://img.shields.io/pypi/v/clickpy-client)](https://pypi.org/project/clickpy-client/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/clickpy-client)](https://pypi.org/project/clickpy-client/)

  [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=rocshers_clickpy-client&metric=coverage)](https://sonarcloud.io/summary/new_code?id=rocshers_clickpy-client)
  [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=rocshers_clickpy-client&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=rocshers_clickpy-client)

  [![Downloads](https://pypi.rocshers.com/badges/svg/packages/clickpy-client/downloads/total)](https://clickpy.clickhouse.com/dashboard/clickpy-client)
  [![GitLab stars](https://img.shields.io/gitlab/stars/rocshers/python/clickpy-client)](https://gitlab.com/rocshers/python/clickpy-client)
  [![GitLab last commit](https://img.shields.io/gitlab/last-commit/rocshers/python/clickpy-client)](https://gitlab.com/rocshers/python/clickpy-client)



  ```bash
  pip install clickpy-client
  ```

  ```python
  import asyncio

  from clickpy import ClickPyClient


  async def main():
      clickpy = ClickPyClient()

      tables = await clickpy.get_tables()
      for table in tables:
          print(f'Database: {table.database}; table: {table.name} rows: {table.total_rows}')

      keywords = await clickpy.get_keywords_by_releases()
      for keyword in keywords:
          print(f'Database: {keyword.name}; releases: {keyword.releases}')


  asyncio.run(main())
  ```



  The client uses a public connection. But if you have your own DB instance with a similar structure, you can override the access parameters via environment variables.

  ```bash
  CLICKPY_HOST='https://clickpy-clickhouse.clickhouse.com'
  CLICKPY_SECURE=True
  CLICKPY_USERNAME='play'
  CLICKPY_PASSWORD=''
  ```





  Get all tables in `github` and `pypi` databases.



  Get all keywords based on project description. Sorted by number of releases.



  Issue Tracker: <https://gitlab.com/rocshers/python/clickpy-client/-/issues>
  Source Code: <https://gitlab.com/rocshers/python/clickpy-client>

  Before adding changes:

  ```bash
  make install-dev
  ```

  After changes:

  ```bash
  make format test
  ```


pkgId: 43cb04ede6f3496d2af766b6ead33fc81970a1de35ef765d85ae61a16e908a6f
name: python-clientai-help
arch: noarch
version: 0.4.0
epoch: 0
release: 1
summary: Development documents and examples for clientai
url: https://pypi.org/project/clientai/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clientai-0.4.0-1.src.rpm
location_href: Packages/python-clientai-help-0.4.0-1.noarch.rpm
checksum_type: sha256
description:
  <b>ClientAI</b> is a Python package that provides a unified framework for building AI applications, from direct provider interactions to transparent LLM-powered agents, with seamless support for OpenAI, Replicate, Groq and Ollama.


pkgId: 1ff3aee3e0efe06ac6a04ccce4aac48ae76b93f46873253aa0bdcd8e9b1a9e39
name: python-clientfactory-help
arch: noarch
version: 0.5.9
epoch: 0
release: 1
summary: Development documents and examples for clientfactory
url: https://github.com/schizoprada/clientfactory
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clientfactory-0.5.9-1.src.rpm
location_href: Packages/python-clientfactory-help-0.5.9-1.noarch.rpm
checksum_type: sha256
description:
  A Python framework for building API clients with minimal boilerplate while maintaining full configurability and extensibility.



  - **Declarative API Definition**: Define your API structure using Python classes and decorators
  - **Multiple Authentication Methods**: Built-in support for:
    - API Key authentication (header or query parameter)
    - OAuth 2.0 (client credentials, authorization code)
    - Session-based authentication with browser automation
    - Basic HTTP authentication
    - Token-based authentication
    - Custom authentication handlers
  - **Resource Management**:
    - Organize endpoints into logical resource groups
    - Support for nested resources
    - Automatic URL construction
    - Path parameter handling
  - **Request Processing**:
    - Pre-processing hooks for request modification
    - Post-processing hooks for response transformation
    - Automatic retries with configurable backoff
    - File upload support with progress tracking
  - **Session Management**:
    - Persistent sessions with encryption
    - Cookie handling
    - Proxy support
    - Custom header management
  - **Type Safety**: Full type hinting support for better IDE integration
  - **Extensibility**: Every component is designed to be extended and customized



  ```bash
  pip install clientfactory
  ```





  ```python
  from clientfactory import Client, resource, get, post, ApiKeyAuth

  class GitHub(Client):
      baseurl = "https://api.github.com"
      auth = ApiKeyAuth.header("your-token", "Authorization", prefix="Bearer")

      @resource
      class Repos:
          @get("user/repos")
          def list_repos(self): pass

          @post("user/repos")
          def create_repo(self, name: str, private: bool = False):
              return {"name": name, "private": private}


  github = GitHub()
  repos = github.repos.list_repos()
  ```



  ```python
  from clientfactory import Client, resource, get, preprocess, postprocess
  from clientfactory.utils import Request, Response

  class DataAPI(Client):
      baseurl = "https://api.example.com"

      @resource
      class Data:
          @preprocess
          def add_timestamp(self, request: Request) -> Request:
              """Add timestamp to all requests"""
              return request.WITH(
                  headers={"X-Timestamp": str(time.time())}
              )

          @postprocess
          def extract_data(self, response: Response) -> dict:
              """Extract data field from response"""
              return response.json()["data"]

          @get("data/{id}")
          def get_data(self, id: str): pass
  ```



  ```python
  from clientfactory import Client, resource, post, UploadConfig
  from clientfactory.utils import FileUpload

  class Storage(Client):
      baseurl = "https://storage.example.com"

      @resource
      class Files:
          def progress(self, current: int, total: int):
              print(f"Uploaded {current}/{total} bytes")

          @post("upload")
          def upload(self, file: str):
              uploader = FileUpload(
                  config=UploadConfig(
                      progresscallback=self.progress
                  )
              )
              return uploader.multipart(
                  url=self.url + "/upload",
                  files={"file": file}
              )
  ```



  ```python
  from clientfactory import Client, OAuth2Auth, resource, get

  class ServiceAPI(Client):
      baseurl = "https://api.service.com"
      auth = OAuth2Auth.clientcredentials(
          clientid="your-client-id",
          clientsecret="your-client-secret",
          tokenurl="https://auth.service.com/token"
      )

      @resource
      class Users:
          @get("users/me")
          def me(self): pass
  ```



  ```python
  from clientfactory import ClientBuilder, ApiKeyAuth


  client = (ClientBuilder()
      .baseurl("https://api.example.com")
      .auth(ApiKeyAuth.header("your-key"))
      .sessioncfg(verify=False)  # Disable SSL verification
      .requestconfig(timeout=30.0)
      .headers({
          "User-Agent": "MyApp/1.0",
          "Accept": "application/json"
      })
      .build())
  ```



  ```python
  from clientfactory import Client, DiskPersist, PersistConfig

  class WebApp(Client):
      baseurl = "https://webapp.example.com"

      def __init__(self):
          
          self.persist = DiskPersist(
              config=PersistConfig(
                  path="~/.myapp/session",
                  encrypt=True
              )
          )
          super().__init__()
  ```



  For more advanced usage examples, including:
  - Custom authentication handlers
  - Complex request/response processing
  - Browser automation for web apps
  - Request retries and backoff strategies
  - Resource hierarchies
  - Error handling

  Visit our [Advanced Usage Guide](https://clientfactory.readthedocs.io/advanced/).



  ```bash

  git clone https://github.com/schizoprada/clientfactory.git
  cd clientfactory


  python -m venv venv
  source venv/bin/activate  # or `venv\Scripts\activate` on Windows


  pip install -e ".[test,docs]"


  pytest


  cd docs
  make html
  ```



  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.




  - Documentation: [ReadTheDocs](https://clientfactory.readthedocs.io/)
  - Issues: [GitHub Issues](https://github.com/schizoprada/clientfactory/issues)
  - Discussions: [GitHub Discussions](https://github.com/schizoprada/clientfactory/discussions)


pkgId: b89d5553a7671678349640a67194553c511bada59bf6ab790b8a7b92d2289f0d
name: python-climate-trace-help
arch: noarch
version: 0.4.0
epoch: 0
release: 1
summary: Development documents and examples for climate-trace
url: https://github.com/tjhunter/climate-trace-handbook/
rpm_license: CC BY-SA 4.0 Deed
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-climate-trace-0.4.0-1.src.rpm
location_href: Packages/python-climate-trace-help-0.4.0-1.noarch.rpm
checksum_type: sha256
description:
  This reposity contains:
  - the source to the Climate TRACE handbook for data scientists (published [here](https://tjhunter.github.io/climate-trace-handbook/))
  - the [ctrace](https://pypi.org/project/climate-trace/) python package, used to access and manipulate the Climate TRACE dataset

  **Relationship to the Climate TRACE project** Both projects are unofficial and unrelated
  to the Climate TRACE project. The Climate TRACE consortium does not sponsor
  or endorse any content in this repository. Any analysis, error, conclusion contained in these pages should not be attributed to the Climate TRACE project.





  - New data release, which solves a number of inconsistencies in the data.
  - Added CH4, N2O
  - Improvements to the ingestion pipeline.
  - Polars version has also been upgraded to benefit from the latest Improvements in stability.

  From this release, `ctrace` will take monthly snapshots of the Climate TRACE dataset. This
  dataset is currently not versioned and does not publish checksums, which limits the interest
  of pinning to specific cheksums.


pkgId: a6bc8506e07a774ace32773f3670b4c698f6153499bc0fc9b969c40f8b269d9e
name: python-climdex-kit-help
arch: noarch
version: 1.0.1
epoch: 0
release: 1
summary: Development documents and examples for climdex-kit
url: https://gitlab.inf.unibz.it/earth_observation_public/cdr/climdex-kit
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-climdex-kit-1.0.1-1.src.rpm
location_href: Packages/python-climdex-kit-help-1.0.1-1.noarch.rpm
checksum_type: sha256
description:
    
    
    
    
  ```

  | <div style="width:30%">option</div> | <div style="width:60%">description</div> | allowed values |
  |:------------------------------------|:-----------------------------------------|:--------------:|
  | `--index` / `-i` INDEX | A comma-separated list of indices to be computed | see `{list,ls}` sub-command |
  | `--multiprocessing` N  | The CPU parallelism to be employed | int>0 (N of CPUs) or one among {`one`, `all_but_one`, `all`} |
  | `--idir` DIR           | Root folder where to look for input files (expected structure: *$input_dir/variable/scenario/\*.nc*) | abs/rel path |
  | `--odir`/`-o` DIR      | Root folder where to store indices files | abs/rel path |
  | `--scenario`/`-s` S    | White-space separated list of scenarios | sub-folders of input variables |
  | `--regex`/`-x` R       | Filter input files with a regular expression | regex |
  | `--metadata-only`/`-m` | Only re-set the output attributes (metadata) on existing indices files (compute the index file too on non-existing file instead) | |
  | `--dry-run`/`-n`       | Only print jobs to output without doing anything | |
  | `--force`/`-f`         | Force overwrite of existing output indices files (otherwise execution is stopped) | |
  (See `$ python -m climdex compute -h` for a full synopsis)

  Given the huge amount of options for the analysis sub-command, we will subdivide them
  into three different categories.
  Plotting utilities for analysis outputs can be found in the [`plots`](src/climdex/analyse/plots.py) module.
  (See `$ python -m climdex analyse -h` for a full synopsis)

  | <div style="width:30%">option</div> | <div style="width:60%">description</div> | allowed values |
  |:------------------------------------|:-----------------------------------------|:--------------:|
  | `--type`/`-t`         | The type of analysis | {`map`,`trend`/`trn`, `uncertainty`/`unc` } |
  | `--src-type` TYPE     | The type of the source of the input indices | {`local`, `openeo`, `wcps`} |
  | `--src` SRC           | Source of the climate indices | either input folder or endpoint URL |
  | `--odir`/`-o` DIR     | Output folder where to store analysis files | |
  | `--oformat` FMT       | Format of the output analysis files | {`nc`, `png`, `json`, `geojson` } |
  | `--multiprocessing` N | The CPU parallelism to be employed | int>0 (N of CPUs) or one among {`one`, `all_but_one`, `all`} |
  | `--dry-run`/`-n`      | Only print jobs to output without doing anything | |
  | `--force`/`-f`        | Force overwrite of existing output indices files (otherwise execution is stopped) | |
  | `--lenient`/`-l`      | Silently accept empty outputs when input filters are not overlapping with input domain (otherwise exceptions are raised) | |

  These arguments lets the user reduce the scope of the analysis, at different scales: from
  the index future scenario, to intra-ensemble model selection, and also at the "pixel" level
  within a single future projection.

  "Image"-level scoping options.
  | <div style="width:30%">option</div> | <div style="width:60%">description</div> | allowed values |
  |:------------------------------------|:-----------------------------------------|:--------------:|
  | `--index` / `-i` INDEX[,INDEX...] | A comma-separated list of indices to be analysed | see `{list,ls}` sub-command |
  | `--scenario`/`-s` S [S ...]       | White-space separated list of future scenarios | |
  | `--model`/`-m` M [M ...]          | White-space separated list of climate models | see `mlut` sub-command |
  | `--bbox` xmin,ymin,xmax,ymax      | Input horizontal bounding-box | input native coordinates |
  | `--wgs84-bbox` lat_min,lon_min,lat_max,lon_max | Input horizontal WGS84 bounding-box | latitude/longitude decimal degrees coordinates |
  | `--clip` GEOM                     | Horizontal spatial clipping  | WKT geometry text or file containing WKT  |
  | `--clip-id` I                     | When clip is a file, the indexing label to be used to describe each geometry in the analysis output files | |
  | `--tint` [t0[,t1] ...]            | White-space separated list of input time interval(s) of analysis | timestep `t` or time interval `t0,t1` |
  | `--baseline` t0,t1                | The baseline time interval | |

  "Pixel"-level/fine-grained filtering options.
  | <div style="width:30%">option</div> | <div style="width:60%">description</div> | allowed values |
  |:------------------------------------|:-----------------------------------------|:--------------:|
  | `--hfilter` [h],[H]           | Pixel-level altitude filter (needs a `--dem`) | { `h,`, `h,H`, `,H` } |
  | `--dem` FILE                  | The Digital Elevation Model to be used for `--hfilter` | DEM with same H-grid as input indices |
  | `--significant` DIM [DIM ...] | Keep only statistically significant (Wilcoxon test) "pixels" with the given [core dimensions](https://tutorial.xarray.dev/advanced/apply_ufunc/core-dimensions.html) | |
  | `--conf-level` L              | The confidence level to be used in the Wilcoxon test (`--significant`) (default is 95%) | [1-99] int |
  | `--perc-pos` PERC             | Keep only the sections where PERC% of the values in the ensemle are >0 | [0-100] int |
  | `--perc-neg` PERC             | Keep only the sections where PERC% of the values in the ensemle are <0 | [0-100] int

  Finally, these arguments let the user specify how many and which types of aggregation are
  to be applied across the dimensions of the climate indices, which span the horizontal XY spatial axes,
  time, the future scenarios, and models within the ensemble.
  | <div style="width:30%">option</div> | <div style="width:60%">description</div> | allowed values |
  |:------------------------------------|:-----------------------------------------|:--------------:|
  |`--xyaggr` A [A ...] | Spatial (horizontal) aggregation  | {`avg`, `med`, `min`, `max`, `qX`, `pXX`, `range`, `perc_pos`, `perc_neg`} |
  | `--taggr` A [A ...] | Temporal aggregation | {`avg`, `med`, `min`, `max`, `qX`, `pXX`, `range`, `perc_pos`, `perc_neg`} |
  | `--eaggr` A [A ...] | Ensemble aggregation | {`avg`, `med`, `min`, `max`, `qX`, `pXX`, `range`, `perc_pos`, `perc_neg`}  |
  | `--baseline-op` OP  | The operator used to compare target interval (`--tint`) with baseline (`--baseline`) | {`diff`, `perc_diff`, `ratio`} |

  The package expects a fixed organization of the input datasets and a fixed naming scheme
  in order to properly extract all the metadata.
  The path and name of a climate projection NetCDF starting from the $IDIR input
  root directory (`--idir` in the command line) shall be as follows:
  ```sh
  $IDIR/{var}/{scenario}/{var}_{model}_{timeres}_{yearstart}{yearend}_{scenario}.nc
  ```
  Being:
  * `{var}` : the climate variable (whose label shall also coincide with the name of the
  variable in the NetCDF)
  * `{scenario}` : the name of the emissions scenario
  * `{model}` : the name of the climate model used to create the projection
  * `timeres` : the time-step of the time-series (e.g. day, month, etc)
  * `yearstart` / `yearend` : time range of the time-series (`YYYY` format)
  For ancillary scenario-independent datasets (e.g. land mask),
  the `{scenario}/` sub-folder can be omitted mandatory, and the name
  of the dataset shall be `{var}.nc`.
  Analogously, given the $ODIR output specified via `--odir/-o` CLI argument,
  each index file will be stored then as follows:
  ```sh
  $ODIR/{index}/{scenario}/{index}_{model}_{timeres}_{yearstart}{yearend}_{scenario}.nc
  ```

  By default the program logs to both console (with colored output to highlight warnings and errors),
  and to a file called `climdex.log` in the current working directory.
  The configuration of both loggers can be found in `./etc/logging.yaml`, otherwise use
  the `--log-conf`/`-L` option to set an alternative configuration.

  Here some examples of command-line calls of the climdex-kit available commands:
  ```sh

  $ python -m climdex list

  $ python -m climdex show spei12

  $ python -m climdex mlut


  $ python -m climdex \
      compute \
      --index amt,spi12   \
      --multiprocessing 3 \
      --scenario rcp85    \
      --idir $IDIR        \
      --odir $ODIR


  $ python -m climdex -d \
      compute \
      --index all           \
      --scenario rcp85      \
      --multiprocessing all \
      --metadata-only       \
      --idir $IDIR          \
      --odir $ODIR          \
      --dry-run



  $ python -m climdex \
      compute \
      --index fd,tn         \
      --scenario rcp45      \
      --multiprocessing one \
      --idir $IDIR          \
      --odir $ODIR          \
      --regex "*EUR-11_CNRM-CERFACS-CNRM-CM5_CLMcom-CCLM4-8-17_r1i1p1_v1*"


  $ python -m climdex \
      compute \
      --index all                   \
      --scenario rcp45 rcp85        \
      --multiprocessing all_but_one \
      --idir $IDIR                  \
      --odir $ODIR                  \
      --force




  $ python -m climdex \
      analyse -t map  \
      --index rx5day,r95ptot \
      --src-type local       \
      --src  $IDIR \
      --odir $ODIR \
      --oformat nc \
      --scenario rcp45 rcp85 \
      --tint     2041,2070 \
      --baseline 1981,2010 \
      --baseline-op "perc_diff" \
      --taggr avg \
      --eaggr med



  $ python -m climdex  \
      analyse -t trend \
      --index su,tr    \
      --src-type local \
      --src  $IDIR     \
      --odir $ODIR     \
      --oformat json   \
      --scenario rcp45 rcp85 \
      --hfilter ,700 \
      --dem $DEM_FILE\
      --xyaggr avg \
      --eaggr p05 med p95




  $ python -m climdex  \
      analyse -t trend \
      --index su,tr    \
      --src-type local \
      --src  $IDIR     \
      --odir $ODIR     \
      --oformat json   \
      --scenario rcp45 rcp85 \
      --tint     2011,2040  2041,2070  2071,2100 \
      --baseline 1981,2010 \
      --baseline-op "diff" \
      --taggr  avg \
      --xyaggr avg \
      --eaggr min p05 med p95 max




  $ python -m climdex \
      analyse -t map  \
      --index tr      \
      --src-type local\
      --src  $IDIR \
      --odir $ODIR \
      --oformat nc \
      --scenario rcp45 \
      --tint     2081,2100 \
      --baseline 1981,2010 \
      --baseline-op "diff" \
      --taggr avg \
      --eaggr range perc_pos \
      --hfilter 1000, \
      --dem $DEM_FILE





  $ python -m climdex \
      analyse -t trn  \
      --index hwd     \
      --src-type local  \
      --src  $IDIR      \
      --odir $ODIR      \
      --oformat geojson \
      --scenario rcp45 rcp85 \
      --tint 2071,2100 \
      --xyaggr avg \
      --eaggr  min q1 med q3 max \
      --clip regions.shp \
      --clip-id catasto_code \
      --multiprocessing all
  ```

  This project is funded by the
   [FAct CLIMAX](https://www.eurac.edu/en/institutes-centers/center-for-climate-change-and-transformation/projects/fact-climax)
  project at Eurac Research (Center for Climate Change and Transformation, Institute for Earth Observation).
  [![eurac_logo](media/eurac_logo_small.png)](https://www.eurac.edu/en/institutes-centers/center-for-climate-change-and-transformation)


pkgId: 664542ff37596d308e802d2c29935d60ca66a5b695d6a5ab2c7333bfa73f03c5
name: python-clinical-zeroshot-labeler-help
arch: noarch
version: 0.0.2
epoch: 0
release: 1
summary: Development documents and examples for clinical-zeroshot-labeler
url: https://github.com/oufattole/clinical-zeroshot-labeler
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clinical-zeroshot-labeler-0.0.2-1.src.rpm
location_href: Packages/python-clinical-zeroshot-labeler-help-0.0.2-1.noarch.rpm
checksum_type: sha256
description:
  A tool for adapting [ACES (Automated Cohort and Event Selection)](https://github.com/justin13601/ACES/tree/main) task schemas to zero-shot labeling of clinical sequences.



  The Clinical Zero-Shot Labeler extends ACES task schemas, originally designed for cohort extraction and binary classification tasks, to work with generative models. This allows you to:

  1. Use existing ACES task definitions for generative tasks
  2. Control sequence generation using ACES predicates and windows
  3. Extract labels from generated sequences using ACES criteria

  By leveraging the ACES schema, you can define complex clinical tasks like:

  - ICU mortality prediction
  - Lab value forecasting
  - Readmission risk assessment
  - etc.

  All without needing to modify code or retrain models, and maintaining compatibility with existing ACES configurations.



  ```bash
  pip install clinical-zeroshot-labeler
  ```



  1. Define your task in YAML:

  ```yaml
  predicates:
    hospital_discharge:
      code: {regex: HOSPITAL_DISCHARGE//.*}
    lab:
      code: {regex: LAB//.*}
    abnormal_lab:
      code: {regex: LAB//.*}
      value_min: 2.0
      value_min_inclusive: true

  trigger: hospital_discharge

  windows:
    input:
      start:
      end: trigger
      start_inclusive: true
      end_inclusive: true
      index_timestamp: end
    target:
      start: input.end
      end: start + 4d
      start_inclusive: false
      end_inclusive: true
      has:
        lab: (1, None)
      label: abnormal_lab
  ```

  2. Set up your metadata mapping:

  ```python
  import polars as pl


  metadata_df = pl.DataFrame(
      {
          "code": [
              "PAD",
              "HOSPITAL_DISCHARGE//MEDICAL",
              "LAB//NORMAL",
              "LAB//HIGH",
          ]
      }
  ).with_row_index("code/vocab_index")
  ```

  3. Process sequences and get labels:

  ```python
  from clinical_zeroshot_labeler import SequenceLabeler


  labeler = SequenceLabeler.from_yaml_str(task_config_yaml, metadata_df, batch_size=2)


  while not labeler.is_finished():
      
      tokens, times, values = model.generate_next_token(prompts)

      
      status = labeler.process_step(tokens, times, values)
      print(
          f"Status: {status}"
      )  # Shows 0=Undetermined, 1=Active, 2=Satisfied, 3=Impossible

      
      prompts = tokens


  labels = labeler.get_labels()
  ```

  See the `notebooks/tutorial.ipynb` to run the SequenceLabeler on a mocked Generator.





  Main class for processing sequences and extracting labels:

  ```python

  labeler = SequenceLabeler.from_yaml_str(yaml_str, metadata_df, batch_size)


  labeler = SequenceLabeler.from_yaml_file(yaml_path, metadata_df, batch_size)


  status = labeler.process_step(tokens, times, values)


  is_done = labeler.is_finished()


  labels = labeler.get_labels()
  ```

  The labeler tracks window states for each sequence:

  - `0`: Undetermined - Initial state
  - `1`: Active - Currently processing
  - `2`: Satisfied - Success/completion
  - `3`: Impossible - Failed/invalid


pkgId: 404e480985685ba2c4412046971da36540314ddf90572d6dd721b2eb9c863676
name: python-clipped-help
arch: noarch
version: 0.8.2
epoch: 0
release: 1
summary: Development documents and examples for clipped
url: https://github.com/mmourafiq/clipped
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clipped-0.8.2-1.src.rpm
location_href: Packages/python-clipped-help-0.8.2-1.noarch.rpm
checksum_type: sha256
description:
  [![License: Apache 2](https://img.shields.io/badge/License-apache2-green.svg)](LICENSE)
  [![clipped](https://github.com/mmourafiq/clipped/actions/workflows/clipped.yml/badge.svg)](https://github.com/mmourafiq/clipped/actions/workflows/clipped.yml)

  <a href="https://github.com/mmourafiq/clipped"><img src="https://raw.githubusercontent.com/mmourafiq/clipped/master/artifacts/logo/clipped.svg" width="125" height="125" align="right" /></a>



  Common shortcuts and utils for Python and CLI projects.



  ```bash
  pip install clipped
  ```


pkgId: a056f801ce27a360147db4d7e9e182ec57abb2e9ab0cc07e710e11b1258650f7
name: python-cloud-radar-help
arch: noarch
version: 0.13.2
epoch: 0
release: 1
summary: Development documents and examples for cloud-radar
url: https://github.com/DontShaveTheYak/cloud-radar
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloud-radar-0.13.2-1.src.rpm
location_href: Packages/python-cloud-radar-help-0.13.2-1.noarch.rpm
checksum_type: sha256
description:
  <!-- PROJECT SHIELDS -->
  <!--
  *** I'm using markdown "reference style" links for readability.
  *** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
  *** See the bottom of this document for the declaration of the reference variables
  *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
  *** https://www.markdownguide.org/basic-syntax/#reference-style-links
  -->
  [![Python][python-shield]][pypi-url]
  [![Latest][version-shield]][pypi-url]
  [![Tests][test-shield]][test-url]
  [![Coverage][codecov-shield]][codecov-url]
  [![License][license-shield]][license-url]
  <!-- [![Contributors][contributors-shield]][contributors-url]
  [![Forks][forks-shield]][forks-url]
  [![Stargazers][stars-shield]][stars-url]
  [![Issues][issues-shield]][issues-url] -->

  <!-- PROJECT LOGO -->
  <br />
  <p align="center">
    <!-- <a href="https://github.com/DontShaveTheYak/cloud-radar">
      <img src="images/logo.png" alt="Logo" width="80" height="80">
    </a> -->

    <h3 align="center">Cloud-Radar</h3>

    <p align="center">
      Write unit and functional tests for AWS Cloudformation.
      <!-- <br />
      <a href="https://github.com/DontShaveTheYak/cloud-radar"><strong>Explore the docs »</strong></a>
      <br /> -->
      <br />
      <!-- <a href="https://github.com/DontShaveTheYak/cloud-radar">View Demo</a>
      · -->
      <a href="https://github.com/DontShaveTheYak/cloud-radar/issues">Report Bug</a>
      ·
      <a href="https://github.com/DontShaveTheYak/cloud-radar/issues">Request Feature</a>
      ·
      <a href="https://la-tech.co/post/hypermodern-cloudformation/getting-started/">Guide</a>
    </p>
  </p>



  <!-- TABLE OF CONTENTS -->
  <details open="open">
    <summary>Table of Contents</summary>
    <ol>
      <li>
        <a href="#about-the-project">About The Project</a>
        <ul>
          <li><a href="#built-with">Built With</a></li>
        </ul>
      </li>
      <li>
        <a href="#getting-started">Getting Started</a>
        <ul>
          <li><a href="#prerequisites">Prerequisites</a></li>
          <li><a href="#installation">Installation</a></li>
        </ul>
      </li>
      <li><a href="#usage">Usage</a></li>
      <li><a href="#roadmap">Roadmap</a></li>
      <li><a href="#contributing">Contributing</a></li>
      <li><a href="#license">License</a></li>
      <li><a href="#contact">Contact</a></li>
      <li><a href="#acknowledgements">Acknowledgements</a></li>
    </ol>
  </details>



  <!-- [![Product Name Screen Shot][product-screenshot]](https://example.com) -->

  Cloud-Radar is a python module that allows testing of Cloudformation Templates/Stacks using Python.



  You can now unit test the logic contained inside your Cloudformation template. Cloud-Radar takes your template, the desired region and some parameters. We render the template into its final state and pass it back to you.

  You can Test:
  * That Conditionals in your template evaluate to the correct value.
  * Conditional resources were created or not.
  * That resources have the correct properties.
  * That resources are named as expected because of `!Sub`.

  You can test all this locally without worrying about AWS Credentials.

  A number of these tests can be configured in a common way to apply to all templates through the use of the [hooks](./examples/unit/hooks/README.md) functionality.



  This project is a wrapper around Taskcat. Taskcat is a great tool for ensuring your Cloudformation Template can be deployed in multiple AWS Regions. Cloud-Radar enhances Taskcat by making it easier to write more complete functional tests.

  Here's How:
  * You can interact with the deployed resources directly with tools you already know like boto3.
  * You can control the lifecycle of the stack. This allows testing if resources were retained after the stacks were deleted.
  * You can run tests without hardcoding them in a taskcat config file.

  This project is new and it's possible not all features or functionality of Taskcat/Cloudformation are supported (see [Roadmap](#roadmap)). If you find something missing or have a use case that isn't covered then please let me know =)



  * [Taskcat](https://github.com/aws-quickstart/taskcat)
  * [cfn_tools from cfn-flip](https://github.com/awslabs/aws-cfn-template-flip)



  Cloud-Radar is available as an easy to install pip package.



  Cloud-Radar requires python >= 3.8



  1. Install with pip.
     ```sh
     pip install cloud-radar
     ```


  <details>
  <summary>Unit Testing <span style='font-size: .67em'>(Click to expand)</span></summary>

  Using Cloud-Radar starts by importing it into your test file or framework. We will use this [Template](./tests/templates/log_bucket/log_bucket.yaml) for an example shown below. More scenario based examples are currently being built up in the [examples/unit](./examples/unit) directory of this project.

  ```python
  from pathlib import Path
  from cloud_radar.cf.unit import Template

  template_path = Path("tests/templates/log_bucket/log_bucket.yaml")


  template = Template.from_yaml(template_path.resolve())

  params = {"BucketPrefix": "testing", "KeepBucket": "TRUE"}


  stack = template.create_stack(params, region="us-west-2")

  stack.no_resource("LogsBucket")

  bucket = stack.get_resource("RetainLogsBucket")

  assert "DeletionPolicy" in bucket

  assert bucket["DeletionPolicy"] == "Retain"

  bucket_name = bucket.get_property_value("BucketName")

  assert "us-west-2" in bucket_name
  ```

  The AWS [pseudo parameters](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html) are all class attributes and can be modified before rendering a template.
  ```python

  Template.AccountId = '8675309'
  ```
  _Note: Region should only be changed to change the default value. To change the region during testing pass the desired region to render(region='us-west-2')_

  The default values for pseudo parameters:

  | Name             | Default Value   |
  | ---------------- | --------------- |
  | AccountId        | "555555555555"  |
  | NotificationARNs | []              |
  | **NoValue**      | ""              |
  | **Partition**    | "aws"           |
  | Region           | "us-east-1"     |
  | **StackId**      | ""              |
  | **StackName**    | ""              |
  | **URLSuffix**    | "amazonaws.com" |
  _Note: Bold variables are not fully implemented yet see the [Roadmap](#roadmap)_

  At the point of creating the `Template` instance additional configuration is required to be provided if you are using certain approaches to resolving values.

  If you use [Fn::ImportValue](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html), a dictionary of key/value pairs is required containing all the keys that your template uses. If an import name is referenced by the template which is not included in this dictionary, an error will be raised.

  ```
  imports = {
    "FakeKey": "FakeValue"
  }

  template = Template(template_content, imports=imports)
  ```

  If you use [Dynamic References](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html), a dictionary containing the service and key/value pairs is required containing all the dynamic references that your template uses. If a dynamic reference is included in the template and not contained in the configuration object, an error will be raised.

  ```
  template_content = {
      "Resources": {
          "Foo": {
              "Type": "AWS::IAM::Policy",
              "Properties": {
                  "PolicyName": (
                      "mgt-{{resolve:ssm:/account/current/short_name}}-launch-role-pol"
                  ),
              },
          },
      },
  }

  dynamic_references = {
    "ssm": {
      "/account/current/short_name": "dummy"
    }
  }

  template = Template(template_content, dynamic_references=dynamic_references)
  ```

  A real unit testing example using Pytest can be seen [here](./tests/test_cf/test_examples/test_unit.py)

  </details>

  <details>
  <summary>Functional Testing <span style='font-size: .67em'>(Click to expand)</span></summary>
  Using Cloud-Radar starts by importing it into your test file or framework.

  ```python
  from pathlib import Path

  from cloud_radar.cf.e2e import Stack


  template_path = Path("tests/templates/log_bucket/log_bucket.yaml")
  params = {"BucketPrefix": "testing", "KeepBucket": "False"}
  regions = ['us-west-2']




  with Stack(template_path, params, regions) as stacks:
      

      for stack in stacks:
          
          

          print(f"Testing {stack.name}")

          bucket_name = ""

          for output in stack.outputs:

              if output.key == "LogsBucketName":
                  bucket_name = output.value
                  break

          assert "logs" in bucket_name

          assert stack.region.name in bucket_name

          print(f"Created bucket: {bucket_name}")


  ```

  You can use taskcat [tokens](https://aws.amazon.com/blogs/infrastructure-and-automation/a-deep-dive-into-testing-with-taskcat/) in your parameter values.

  ```python
  parameters = {
    "BucketPrefix": "taskcat-$[taskcat_random-string]",
    "KeepBucket": "FALSE",
  }
  ```

  You can skip the context manager. Here is an example for `unittest`

  ```python
  import unittest

  from cloud-radar.cf.e2e import Stack

  class TestLogBucket(unittest.TestCase):
      @classmethod
      def setUpClass(cls):
          template_path = Path("tests/templates/log_bucket/log_bucket.yaml")
          cls.test = Stack(template_path)
          cls.test.create()

      @classmethod
      def tearDownClass(cls):
          cls.test.delete()

      def test_bucket(self):
          stacks = self.__class__.test.stacks

          for stack in stacks:
              
  ```

  All the properties and methods of a [stack instance](https://github.com/aws-quickstart/taskcat/blob/main/taskcat/_cfn/stack.py#L188).

  A real functional testing example using Pytest can be seen [here](./tests/test_cf/test_examples/test_functional.py)

  </details>




  - Add Logo
  - Easier to pick regions for testing


  - Add full functionality to pseudo variables.
    * Variables like `Partition`, `URLSuffix` should change if the region changes.
    * Variables like `StackName` and `StackId` should have a better default than ""
  - Handle References to resources that shouldn't exist.
    * It's currently possible that a `!Ref` to a Resource stays in the final template even if that resource is later removed because of a conditional.


  - Add the ability to update a stack instance to Taskcat.

  See the [open issues](https://github.com/DontShaveTheYak/cloud-radar/issues) for a list of proposed features (and known issues).



  Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

  This project uses poetry to manage dependencies and pre-commit to run formatting, linting and tests. You will need to have both installed to your system as well as python 3.12.

  1. Fork the Project
  2. Setup environment (`poetry install`)
  3. Setup commit hooks (`pre-commit install`)
  2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
  3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
  4. Push to the Branch (`git push origin feature/AmazingFeature`)
  5. Open a Pull Request



  Distributed under the Apache-2.0 License. See [LICENSE.txt](./LICENSE.txt) for more information.



  Levi - [@shady_cuz](https://twitter.com/shady_cuz)

  <!-- ACKNOWLEDGEMENTS -->

  * [Taskcat](https://aws-quickstart.github.io/taskcat/)
  * [Hypermodern Python](https://cjolowicz.github.io/posts/hypermodern-python-01-setup/)
  * [Best-README-Template](https://github.com/othneildrew/Best-README-Template)
  * @dhutchison - He was the first contributor to this project and finished the last couple of features to make this project complete. Thank you!

  <!-- MARKDOWN LINKS & IMAGES -->
  <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
  [python-shield]: https://img.shields.io/pypi/pyversions/cloud-radar?style=for-the-badge
  [version-shield]: https://img.shields.io/pypi/v/cloud-radar?label=latest&style=for-the-badge
  [pypi-url]: https://pypi.org/project/cloud-radar/
  [test-shield]: https://img.shields.io/github/actions/workflow/status/DontShaveTheYak/cloud-radar/test.yml?label=Tests&style=for-the-badge
  [test-url]: https://github.com/DontShaveTheYak/cloud-radar/actions?query=workflow%3ATests+branch%3Amaster
  [codecov-shield]: https://img.shields.io/codecov/c/gh/DontShaveTheYak/cloud-radar?color=green&style=for-the-badge&token=NE5C92139X
  [codecov-url]: https://codecov.io/gh/DontShaveTheYak/cloud-radar
  [contributors-shield]: https://img.shields.io/github/contributors/DontShaveTheYak/cloud-radar.svg?style=for-the-badge
  [contributors-url]: https://github.com/DontShaveTheYak/cloud-radar/graphs/contributors
  [forks-shield]: https://img.shields.io/github/forks/DontShaveTheYak/cloud-radar.svg?style=for-the-badge
  [forks-url]: https://github.com/DontShaveTheYak/cloud-radar/network/members
  [stars-shield]: https://img.shields.io/github/stars/DontShaveTheYak/cloud-radar.svg?style=for-the-badge
  [stars-url]: https://github.com/DontShaveTheYak/cloud-radar/stargazers
  [issues-shield]: https://img.shields.io/github/issues/DontShaveTheYak/cloud-radar.svg?style=for-the-badge
  [issues-url]: https://github.com/DontShaveTheYak/cloud-radar/issues
  [license-shield]: https://img.shields.io/github/license/DontShaveTheYak/cloud-radar.svg?style=for-the-badge
  [license-url]: https://github.com/DontShaveTheYak/cloud-radar/blob/master/LICENSE.txt
  [product-screenshot]: images/screenshot.png


pkgId: 623ce257cbeafe99b4f5e03fb8f9aa864c50c03100c84bed7dfc569b073fdf12
name: python-cloud-volume-help
arch: noarch
version: 11.1.1
epoch: 0
release: 1
summary: Development documents and examples for cloud-volume
url: https://github.com/seung-lab/cloud-volume/
rpm_license: License :: OSI Approved :: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloud-volume-11.1.1-1.src.rpm
location_href: Packages/python-cloud-volume-help-11.1.1-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/cloud-volume.svg)](https://badge.fury.io/py/cloud-volume) [![SfN 2018 Poster](https://img.shields.io/badge/poster-SfN%202018-blue.svg)](https://drive.google.com/open?id=1RKtaAGV2f7F13opnkQfbp6YBqmoD3fZi) [![codecov](https://img.shields.io/badge/codecov-link-%23d819a6)](https://codecov.io/gh/seung-lab/cloud-volume) [![DOI](https://zenodo.org/badge/98333149.svg)](https://zenodo.org/badge/latestdoi/98333149)



  ```python
  from cloudvolume import CloudVolume

  vol = CloudVolume('gs://mylab/mouse/image', parallel=True, progress=True)
  image = vol[:,:,:] # Download a whole image stack into a numpy array from the cloud
  vol[:,:,:] = image # Upload an entire image stack from a numpy array to the cloud

  label = 1
  mesh = vol.mesh.get(label)
  skel = vol.skeleton.get(label)
  ```

  CloudVolume is a serverless Python client for random access reading and writing of [Neuroglancer](https://github.com/google/neuroglancer/) volumes in "[Precomputed](https://github.com/google/neuroglancer/tree/master/src/datasource/precomputed#readme)" format, a set of representations for arbitrarily large volumetric images, meshes, and skeletons. CloudVolume is typically paired with [Igneous](https://github.com/seung-lab/igneous), a Kubernetes compatible system for generating image hierarchies, meshes, skeletons, and other dependency free jobs that can be applied to petavoxel scale images.

  Precomputed volumes are typically stored on [AWS S3](https://aws.amazon.com/s3/), [Google Storage](https://cloud.google.com/storage/), or locally. CloudVolume can read and write to these object storage providers given a service account token with appropriate permissions. However, these volumes can be stored on any service, including an ordinary webserver or local filesystem, that supports key-value access.

  The combination of [Neuroglancer](https://github.com/google/neuroglancer/), [Igneous](https://github.com/seung-lab/igneous), and CloudVolume comprises a system for visualizing, processing, and sharing (via browser viewable URLs) petascale datasets within and between laboratories. A typical example usage would be to visualize raw electron microscope scans of mouse, fish, or fly brains up to a cubic millimeter in physical dimension. Neuroglancer and Igneous would enable you to visualize each step of the process of montaging the image, fine tuning alignment vector fields, creating segmentation layers, ROI masks, or performing other types of analysis. CloudVolume enables you to read from and write to each of these layers. Recently, we have introduced the ability to interact with the graph server ("PyChunkGraph") that backs proofreading automated segmentations via the `graphene://` format.

  You can find a collection of CloudVolume accessible and Neuroglancer viewable datasets at https://neurodata.io/project/ocp/, an open data project by some of our collaborators.



  - Random access to petavoxel Neuroglancer images, meshes, and skeletons.
  - Nearly all output is immediately visualizable using Neuroglancer.\*
  - Reads graph server backed proofreading volumes (via `graphene://`).
  - Serverless (except `graphene://`) and multi-cloud.



  - Supports `precomputed`, `graphene`, `zarr`, (read-only) `n5`, and `boss` formats.
  - Multi-threaded, supports multi-process and green threads.
  - Memory optimized, supports shared memory.
  - Lossless connectomics relevant codecs ([`compressed_segmentation`](https://github.com/seung-lab/compressedseg), [`compresso`](https://github.com/seung-lab/compresso), [`crackle`](https://github.com/seung-lab/crackle) (BETA), [`fpzip`](https://github.com/seung-lab/fpzip/), [`zfpc`](https://github.com/seung-lab/zfpc), [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics), and [`brotli`](https://en.wikipedia.org/wiki/Brotli))
  - Understands image hierarchies & anisotropic pixel resolutions.
  - Accomodates downloading missing tiles (`fill_missing=True`).
  - Accomodates uploading compressed black tiles to erasure coded file systems (`delete_black_uploads=True`).
  - Growing support for the Neuroglancer [sharded format](https://github.com/google/neuroglancer/blob/master/src/datasource/precomputed/sharded.md) which dramatically condenses the number of files required to represent petascale datasets, similar to [Cloud Optimized GeoTIFF](https://www.cogeo.org/), which can result in [dramatic cost savings](https://github.com/seung-lab/kimimaro/wiki/The-Economics:-Skeletons-for-the-People).
  - Reads Precomputed meshes and skeletons.
  - Includes viewers for small images, meshes, and skeletons.
  - Only 3 dimensions + RBG channels currently supported for images.
  - No data versioning.



  Cloud-volume is regularly tested on Ubuntu with 3.8, 3.9, 3.10, 3.11, and 3.12. We officially support Linux and Mac OS. Windows is community supported. After installation, you'll also need to set up your cloud credentials if you're planning on writing files or reading from a private dataset. Once you're finished setting up, you can try [reading from a public dataset](https://github.com/seung-lab/cloud-volume/wiki/Reading-Public-Data-Examples).



  ```bash
  pip install cloud-volume # standard installation
  ```

  CloudVolume depends on several PyPI packages which are Cython bindings for C++. We have provided compiled binaries for many platforms and python versions, however if you are on an unsupported system, pip will attempt to install from source. In that case, follow the instructions below.

  **Windows Note:** If you get errors related to a missing C++ compiler, this blog post might help you: https://www.scivision.dev/python-windows-visual-c-14-required/



  | Tag             | Description                             | Dependencies          |
  |-----------------|-----------------------------------------|-----------------------|
  | boss            | `boss://` format support                | intern, blosc                |
  | zarr            | `zarr://` format support                | blosc                 |
  | test            | Supports testing                        | pytest                |
  | mesh_viewer     | `mesh.viewer()` GUI                     | vtk                   |
  | skeleton_viewer | `skeleton.viewer()` GUI                 | matplotlib            |
  | all_viewers     | All viewers now and in the future.      | vtk, matplotlib       |
  | dask            | Supports converting to/from dask arrays | dask\[array\]         |
  | em_codecs       | Image codecs: JPEG, JPEG-XL, and PNG    | imagecodecs, simplejpeg, pyspng-seunglab |
  | seg_codecs      | Segmentation: compressed-segmentation, compresso, crackle | compressed-segmentation, compresso, crackle-codec         |
  | fp_codecs       | Floating point: fpzip, zfpc             | fpzip, zfpc           |
  | all_codecs      | Installs all optional compression codecs: em_codecs, seg_codecs, fp_codecs, blosc | see above         |

  Example:

  ```bash
  pip install cloud-volume[all_codecs,test,all_viewers]
  ```

  gzip, brotli, JPEG, and compressed-segmentation codecs are installed by default.



  *C++ compiler required.*

  ```bash
  sudo apt-get install g++ python3-dev
  pip install numpy
  pip install cloud-volume
  ```

  Due to packaging problems endemic to Python, Cython packages that depend on numpy require numpy header files be installed before attempting to install the package you want. The numpy headers are not recognized unless numpy is installed in a seperate process that runs first. There are hacks for this issue, but I haven't gotten them to work. If you think binaries should be available for your platform, please let us know by opening an issue.



  This can be desirable if you want to hack on CloudVolume itself.

  ```bash
  git clone git@github.com:seung-lab/cloud-volume.git
  cd cloud-volume


  mkvirtualenv cv
  workon cv

  virtualenv venv
  source venv/bin/activate

  sudo apt-get install g++ python3-dev
  pip install numpy # additional step needed for accelerated compressed_segmentation and fpzip
  pip install -e . # without optional dependencies
  pip install -e .[all_viewers] # with e.g. the all_viewers optional dependency
  ```



  By default, CloudVolume's configuration and cache files are stored in `$HOME/.cloudvolume` (or in `$HOME/.cloudfiles` since we use CloudFiles for the backend). You can configure where CloudVolume looks for these files with the environment variable `$CLOUD_VOLUME_DIR`.

  Credentials are stored in `$CLOUD_VOLUME_DIR/secrets`. You'll need credentials only for the services you'll use. If you plan to use the local filesystem, you won't need any. For Google Storage ([setup instructions here](https://github.com/seung-lab/cloud-volume/wiki/Setting-up-Google-Cloud-Storage)), default account credentials will be used if available and no service account is provided.

  If neither of those two conditions apply, you need a service account credential. If you have your credentials handy, you can provide them like so as a dict, JSON string, or a bare token if the service will accept that.

  ```python
  cv = CloudVolume(..., secrets=...)
  ```

  However, it may be simpler to save your credential to disk so you don't have to always provide it. `google-secret.json` is a service account credential for Google Storage, `aws-secret.json` is a service account for S3, etc. You can support multiple projects at once by prefixing the bucket you are planning to access to the credential filename. `google-secret.json` will be your defaut service account, but if you also want to also access bucket ABC, you can provide `ABC-google-secret.json` and you'll have simultaneous access to your ordinary buckets and ABC. The secondary credentials are accessed on the basis of the bucket name, not the project name.

  ```bash
  mkdir -p ~/.cloudvolume/secrets/
  mv aws-secret.json ~/.cloudvolume/secrets/ # needed for Amazon
  mv google-secret.json ~/.cloudvolume/secrets/ # needed for Google
  mv boss-secret.json ~/.cloudvolume/secrets/ # needed for the BOSS
  mv matrix-secret.json ~/.cloudvolume/secrets/ # needed for Matrix
  mv tigerdata-secret.json ~/.cloudvolume/secrets/ # needed for Tigerdata
  ```



  Create an [IAM user service account](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html) that can read, write, and delete objects from at least one bucket.

  ```json
  {
  	"AWS_ACCESS_KEY_ID": "$MY_AWS_ACCESS_KEY_ID",
  	"AWS_SECRET_ACCESS_KEY": "$MY_SECRET_ACCESS_TOKEN"
  }
  ```



  You can create the `google-secret.json` file [here](https://console.cloud.google.com/iam-admin/serviceaccounts). You don't need to manually fill in JSON by hand, the below example is provided to show you what the end result should look like. You should be able to read, write, and delete objects from at least one bucket.

  ```json
  {
    "type": "service_account",
    "project_id": "$YOUR_GOOGLE_PROJECT_ID",
    "private_key_id": "...",
    "private_key": "...",
    "client_email": "...",
    "client_id": "...",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://accounts.google.com/o/oauth2/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_x509_cert_url": ""
  }
  ```



  *Note: used to be called chunkedgraph-secret.json. This is still supported but deprecated.*

  If you have a token from Graphene/Chunkedgraph server, create the `cave-secret.json` file as shown in the example below. You may also pass the token to `CloudVolume(..., secrets=token)`.

  ```json
  {
    "token": "<your_token>"
  }
  ```

  Note that to take advantage of multiple credential files, prepend the fully qualified domain name (FQDN) of the server instead of the bucket for GCS and S3. For example, `sudomain.domain.com-cave-secret.json`.



  CloudVolume supports reading and writing to Neuroglancer data layers on Amazon S3, Google Storage, The BOSS, and the local file system.

  Supported URLs are of the forms:

  `$FORMAT://$PROTOCOL://$BUCKET/$DATASET/$LAYER`

  The format or protocol fields may be omitted where required. In the case of the precomputed format, the format specifier is optional.

  | Format      | Protocols                                    | Default | Example                                |
  |-------------|----------------------------------------------|---------|----------------------------------------|
  | precomputed | gs, s3, http, https, file, matrix, tigerdata | Yes     | gs://mybucket/dataset/layer            |
  | graphene    | gs, s3, http, https, file, matrix, tigerdata |         | graphene://gs://mybucket/dataset/layer |
  | boss        | N/A                                          |         | boss://collection/experiment/channel   |
  | n5          | gs, s3, http, https, file, matrix, tigerdata |         | n5://gs://mybucket/dataset/layer       |
  | zarr        | gs, s3, http, https, file, matrix, tigerdata |         | zarr://gs://mybucket/dataset/layer     |



  * precomputed: Neuroglancer's native format. ([specification](https://github.com/google/neuroglancer/tree/master/src/datasource/precomputed#readme))
  * graphene: Precomputed based format used by the PyChunkGraph server.
  * boss: The BOSS (https://docs.theboss.io/docs)
  * n5: Not HDF5 (https://github.com/saalfeldlab/n5) Read-only support. Supports raw, gzip, bz2, and xz but not lz4 compression. mode 0 datasets only.
  * [zarr](https://github.com/zarr-developers/zarr-python): Custom implementation supports reading and writing for 5D arrays, but limited support for the 5th dimension.



  * gs:   Google Storage
  * s3:   Amazon S3
  * http(s): (read-only) Ordinary Web Servers
  * file: Local File System (absolute path)
  * matrix: Princeton Internal System (run in large part by Seung Lab)
  * tigerdata: Princeton Internal System (run by Princeton OIT)

  CloudVolume also supports [alternative s3 aliases](https://github.com/seung-lab/cloud-files#alias-for-alternative-s3-endpoints) via CloudFiles.




  Neuroglancer relies on an [`info`](https://github.com/google/neuroglancer/blob/master/src/datasource/precomputed/volume.md#info-json-file-specification) file located at the root of a dataset layer to tell it how to compute file locations and interpret the data in each file. CloudVolume piggy-backs on this functionality.

  In the below example, assume you are creating a new segmentation volume from a 3d numpy array "rawdata". Note Precomputed stores data in Fortran (column major, aka CZYX) order. You should do a small test to see if the image is written transposed. You can fix this by uploading `rawdata.T`. A more detailed example for uploading a local volume [is located here](https://github.com/seung-lab/cloud-volume/wiki/Example-Single-Machine-Dataset-Upload).

  ```python3
  from cloudvolume import CloudVolume

  info = CloudVolume.create_new_info(
      num_channels    = 1,
      layer_type      = 'segmentation',
      data_type       = 'uint64', # Channel images might be 'uint8'
      
      encoding        = 'raw',
      resolution      = [4, 4, 40], # Voxel scaling, units are in nanometers
      voxel_offset    = [0, 0, 0], # x,y,z offset in voxels from the origin
      mesh            = 'mesh',
      
      
      chunk_size      = [ 512, 512, 16 ], # units are voxels
      volume_size     = [ 250000, 250000, 25000 ], # e.g. a cubic millimeter dataset
  )
  vol = CloudVolume(cfg.path, info=info)
  vol.commit_info()
  vol[cfg.x: cfg.x + cfg.length, cfg.y:cfg.y + cfg.length, cfg.z: cfg.z + cfg.length] = rawdata[:,:,:]
  ```
  | Encoding                | Image Type                 | Lossless | Neuroglancer Viewable | Description                                                                              |
  |-------------------------|----------------------------|----------|-------------|------------------------------------------------------------------------------------------|
  | raw                     | Any                        | Y        | Y           | Serialized numpy arrays.                                                                 |
  | png                     | Image                      | Y        | Y           | Multiple slices stiched into a single PNG.                                               |
  | jpeg                    | Image                      | N        | Y           | Multiple slices stiched into a single JPEG.                                              |
  | jxl                     | Image                      | Optional | Y*          | Multiple slices stiched into a single JPEG-XL.                                           |
  | compressed_segmentation | Segmentation               | Y        | Y           | Renumbered numpy arrays to reduce data width. Also used by Neuroglancer internally.      |
  | compresso               | Segmentation               | Y        | Y           | Lossless high compression algorithm for connectomics segmentation.                       |
  | crackle                 | Segmentation               | Y        | Y*           | Lossless high compression algorithm for connectomics segmentation.                       |
  | fpzip                   | Floating Point             | Y        | Y*           | Takes advantage of IEEE 754 structure + L1 Lorenzo predictor to get higher compression.  |
  | kempressed              | Anisotropic Z Floating Point | N**      | Y*           | Adds manipulations on top of fpzip to achieve higher compression.                        |
  | zfpc                    | Alignment Vector Fields    | N***     | Y*          | zfp stream container.                        |

  \* Not integrated into official Neuroglancer yet, but available on a [fork](https://allcodecs-dot-neuromancer-seung-import.appspot.com/) which can be seen on Github [here](https://github.com/william-silversmith/neuroglancer/tree/wms_combined_codecs).
  \*\* Lossless if your data can handle adding and then subtracting 2.
  \*\*\* Lossless by default, but you probably want to use the lossy mode.

  Note on `compressed_segmentation`: To use, make sure `compressed_segmentation_block_size` is specified (usually `[8,8,8]`. This field will appear in the `info` file in the relevant scale.

  Note on `zfpc`: To configure, use the fields `zfpc_rate`, `zfpc_precision`, `zfpc_tolerance`, `zfpc_correlated_dims` in the relevant scale of the `info` file.




  ```python

  vol = CloudVolume('gs://mybucket/retina/image')
  vol = CloudVolume('gs://mybucket/retina/image', secrets=token, dict or json)
  vol = CloudVolume('gs://bucket/dataset/channel', mip=0, bounded=True, fill_missing=False)
  vol = CloudVolume('gs://bucket/dataset/channel', mip=[ 8, 8, 40 ], bounded=True, fill_missing=False) # set mip at this resolution
  vol = CloudVolume('gs://bucket/datasset/channel', info=info) # New info file from scratch
  image = vol[:,:,:] # Download the entire image stack into a numpy array
  image = vol.download(bbox, mip=2, renumber=True) # download w/ smaller dtype
  image = vol.download(bbox, mip=2, label=777) # download binary image for label
  uniq = vol.unique(bbox, mip=0) # efficient extraction of unique labels
  listing = vol.exists( np.s_[0:64, 0:128, 0:64] ) # get a report on which chunks actually exist
  exists = vol.image.has_data(mip=0) # boolean check to see if any data is there
  listing = vol.delete( np.s_[0:64, 0:128, 0:64] ) # delete this region (bbox must be chunk aligned)
  vol[64:128, 64:128, 64:128] = image # Write a 64^3 image to the volume
  img = vol.download_point( (x,y,z), size=256, mip=3 ) # download region around (mip 0) x,y,z at mip 3
  pts = vol.scattered_points([ (x1,y1,z1), (x2,y2,z2) ]) # download voxel labels located at indicated points

  files = vol.download_files(bbox, mip, decompress=False)




  mem_vol = vol.image.memory_cutout(bbox, mip=1, encoding="compresso")


  vol.viewer() # launches neuroglancer compatible web server on http://localhost:1337


  img = vol[64:1028, 64:1028, 64:128]
  img.viewer() # launches web viewer on http://localhost:8080


  vol.mesh.save(12345) # save 12345 as ./12345.ply on disk
  vol.mesh.save([12345, 12346, 12347]) # merge three segments into one file
  vol.mesh.save(12345, file_format='obj') # 'ply' and 'obj' are both supported
  vol.mesh.get(12345) # return the mesh as vertices and faces instead of writing to disk
  vol.mesh.get([ 12345, 12346 ]) # return these two segids fused into a single mesh
  vol.mesh.get([ 12345, 12346 ], fuse=False) # return { 12345: mesh, 12346: mesh }
  vol.mesh.put(meshes) # works for unsharded legacy only
  vol.mesh.delete(segids) # works for unsharded meshes only

  mesh.viewer() # Opens GUI. Requires vtk.


  skel = vol.skeleton.get(12345)
  vol.skeleton.upload_raw(segid, skel.vertices, skel.edges, skel.radii, skel.vertex_types)
  vol.skeleton.upload(skel)


  skels = vol.skeleton.get_by_bbox( Bbox( (0,0,0), (500, 500, 500) ) )
  vol.skeleton.spatial_index # None if not available

  skel.empty() # boolean

  bytes = skel.encode() # encode to Precomputed format (bytes)
  skel = Skeleton.decode(bytes) # decode from PrecomputedFormat

  skel = skel.crop(slices or bbox) # eliminate vertices and edges outside bbox
  skel = skel.consolidate() # eliminate duplicate vertices and edges
  skel3 = skel.merge(skel2) # merge two skeletons into one
  skel = skel.clone() # create copy
  skel = Skeleton.from_swc(swcstr) # decode an SWC file
  skel_str = skel.to_swc() # convert to SWC file in string representation
  skel.viewer() # Opens GUI. Requires matplotlib

  skel.cable_length() # sum of all edge lengths
  skel = skel.downsample(2) # reduce size of skeleton by factor of 2
  skel = skel.average_smoothing(3) # rolling average, n=3

  skel1 == skel2 # check if contents of internal arrays match
  Skeleton.equivalent(skel1, skel2) # ...even if there are differences like differently numbered edges


  vol = CloudVolume('gs://mybucket/retina/image', parallel=True) # Use all cores
  vol.parallel = 4 # e.g. any number > 1, use this many cores
  data = vol[:] # uses shared memory to coordinate processes under the hood


  vol = CloudVolume(...)


  data = vol.download_to_shared_memory(np.s_[:], location='some-example')
  vol.unlink_shared_memory() # delete the shared memory associated with this cloudvolume
  vol.shared_memory_id # get/set the default shared memory location for this instance


  vol = CloudVolume(...)
  vol.upload_from_shared_memory('my-shared-memory-id', # do not prefix with /dev/shm
      bbox=Bbox( (0,0,0), (10000, 7500, 64) ))



  vol.download_to_file('/path/to/file', bbox=Bbox(...), mip=0) # bbox is the download region
  vol.upload_from_file('/path/to/file', bbox=Bbox(...), mip=0) # bbox is the region it represents


  vol = CloudVolume(...)


  vol.transfer_to('gs://bucket/dataset/layer', vol.bounds)




  vol = CloudVolume('gs://mybucket/retina/image', cache=True) # Basic Example
  image = vol[0:10,0:10,0:10] # Download partial image and cache
  vol[0:10,0:10,0:10] = image # Upload partial image and cache


  vol = CloudVolume(..., lru_bytes=num_bytes) # >= 0, 0 means disabled
  vol.image.lru.resize(num_bytes) # same
  vol.image.lru.clear()
  len(vol.image.lru) # number of items in lru
  vol.image.lru.nbytes # size in bytes (not counting LRU structures, nor recursive)
  vol.image.lru.items() # etc, also functions as a dict



  vol = CloudVolume(..., lru_bytes=num_bytes, lru_encoding='raw')


  vol.cache.list() # list files in cache at this mip level
  vol.cache.list(mip=1) # list files in cache at mip 1
  vol.cache.list_meshes()
  vol.cache.list_skeletons()
  vol.cache.num_files() # number of files at this mip level
  vol.cache.num_bytes(all_mips=True) # Return num files for each mip level in a list
  vol.cache.num_bytes() # number of bytes taken up by files, size on disk can be bigger
  vol.cache.num_bytes(all_mips=True) # Return num bytes for each mip level in a list

  vol.cache.enabled = True/False # Turn the cache on/off
  vol.cache.path = Str # set the cache location
  vol.cache.compress = None/True/False # None: Link to cloud setting, Boolean: Force cache to compressed (True) or uncompressed (False)


  vol.cache.flush() # Delete local cache for this layer at this mip level
  vol.cache.flush(preserve=Bbox(...)) # Same, but preserve cache in a region of space
  vol.cache.flush_region(region=Bbox(...), mips=[...]) # Delete the cached files in this region at these mip levels (default all mips)
  vol.cache.flush_info()
  vol.cache.flush_provenance()


  import gevent.monkey
  gevent.monkey.patch_all(thread=False)

  cv = CloudVolume(..., green_threads=True)
  img = cv[...] # now green threads will be used


  arr = cv.to_dask()
  arr = cloudvolume.dask.from_cloudvolume(cloudpath) # same as to_dask
  res = cloudvolume.dask.to_cloudvolume(arr, cloudpath, compute=bool, return_store=bool)
  ```



  ```python3
  CloudVolume(
      cloudpath:str, mip:int=0, bounded:bool=True,
      autocrop:bool=False, fill_missing:bool=False, cache:CacheType=False,
      compress_cache:CompressType=None, cdn_cache:bool=True,
      progress:bool=INTERACTIVE, info:dict=None, provenance:dict=None,
      compress:CompressType=None, compress_level:Optional[int]=None,
      non_aligned_writes:bool=False, parallel:ParallelType=1, delete_black_uploads:bool=False,
      background_color:int=0, green_threads:bool=False, use_https:bool=False,
      max_redirects:int=10, mesh_dir:Optional[str]=None, skel_dir:Optional[str]=None,
      agglomerate:bool=False, secrets:SecretsType=None,
      spatial_index_db:Optional[str]=None, lru_bytes:int = 0,
      cache_locking:bool = True
  )
  ```


  *      agglomerate: (bool, graphene only) sets the default mode for downloading
          images to agglomerated (True) vs watershed (False).
  *      autocrop: (bool) If the specified retrieval bounding box exceeds the
            volume bounds, process only the area contained inside the volume.
            This can be useful way to ensure that you are staying inside the
            bounds when `bounded=False`.
  *      background_color: (number) Specifies what the "background value" of the
          volume is (traditionally 0). This is mainly for changing the behavior
          of delete_black_uploads.
  *      bounded: (bool) If a region outside of volume bounds is accessed:
            True: Throw an error
            False: Allow accessing the region. If no files are present, an error
                will still be thrown. Consider combining this option with
                `fill_missing=True`. However, this can be dangrous as it allows
                missing files and potentially network errors to be intepreted as
                zeros.
  *      cache: (bool or str) Store downs and uploads in a cache on disk
              and preferentially read from it before redownloading.
            - falsey value: no caching will occur.
            - True: cache will be located in a standard location.
            - non-empty string: cache is located at this file path

            After initialization, you can adjust this setting via:
            `cv.cache.enabled = ...` which accepts the same values.

            Note: This cache is totally separate from the LRU controlled by
            lru_bytes.
  *      cache_locking: (bool) The local cache will use file locks via fasteners to prevent issues with multi-process cache access. If this is not a concern, performance can be slightly improved by setting this to False. This uses CloudFiles' locking mechanism.
  *      cdn_cache: (int, bool, or str) Sets Cache-Control HTTP header on uploaded
          image files. Most cloud providers perform some kind of caching. As of
          this writing, Google defaults to 3600 seconds. Most of the time you'll
          want to go with the default.
          - int: number of seconds for cache to be considered fresh (max-age)
          - bool: True: max-age=3600, False: no-cache
          - str: set the header manually
  *      compress: (bool, str, None) pick which compression method to use.
  *          None: (default) gzip for raw arrays and no additional compression
              for compressed_segmentation and fpzip.
            bool:
              True=gzip,
              False=no compression, Overrides defaults
            str:
              'gzip': Extension so that we can add additional methods in the future
                      like lz4 or zstd.
              'br': Brotli compression, better compression rate than gzip
              '': no compression (same as False).
  *      compress_level: (int, None) level for compression. Higher number results
            in better compression but takes longer.
          Defaults to 9 for gzip (ranges from 0 to 9).
          Defaults to 5 for brotli (ranges from 0 to 11).
  *      compress_cache: (None or bool) If not None, override default compression
            behavior for the cache.
  *      delete_black_uploads: (bool) If True, on uploading an entirely black chunk,
            issue a DELETE request instead of a PUT. This can be useful for avoiding storing
            tiny files in the region around an ROI. Some storage systems using erasure coding
            don't do well with tiny file sizes.
  *      fill_missing: (bool) If a chunk file is unable to be fetched:
            True: Use a block of zeros
            False: Throw an error
  *      green_threads: (bool) Use green threads instead of preemptive threads. This
          can result in higher download performance for some compression types. Preemptive
          threads seem to reduce performance on multi-core machines that aren't densely
          loaded as the CPython threads are assigned to multiple cores and the thrashing
          + GIL reduces performance. You'll need to add the following code to the top
          of your program to use green threads:

              import gevent.monkey
              gevent.monkey.patch_all(threads=False)
  *      lru_bytes: (int) number of bytes used to cache recently used image
          tiles in memory. This is an in-memory cache and is completely separate from
          the `cache` parameter that handles disk IO. Tiles are stripped over only their
          second stage compression.
  *      info: (dict) In lieu of fetching a neuroglancer info file, use this one.
            This is useful when creating new datasets and for repeatedly initializing
            a new cloudvolume instance.
  *      max_redirects: (int) if > 0, allow up to this many redirects via info file 'redirect'
            data fields. If <= 0, allow no redirections and access the current info file directly
            without raising an error.
  *      mesh_dir: (str) if not None, override the info['mesh'] key before pulling the
          mesh info file.
  *      mip: (int or iterable) Which level of downsampling to read and write from.
            0 is the highest resolution. You can also specify the voxel resolution
            like mip=[6,6,30] which will search for the appropriate mip level.
  *      non_aligned_writes: (bool) Enable non-aligned writes. Not multiprocessing
            safe without careful design. When not enabled, a
            cloudvolume.exceptions.AlignmentError is thrown for non-aligned writes.

            https://github.com/seung-lab/cloud-volume/wiki/Advanced-Topic:-Non-Aligned-Writes

        parallel (int: 1, bool): Number of extra processes to launch, 1 means only
            use the main process. If parallel is True use the number of CPUs
            returned by multiprocessing.cpu_count(). When parallel > 1, shared
            memory (Linux) or emulated shared memory via files (other platforms)
            is used by the underlying download.
  *      progress: (bool) Show progress bars.
            Defaults to True in interactive python, False in script execution mode.
  *      provenance: (string, dict) In lieu of fetching a provenance
            file, use this one.
  *      secrets: (dict) provide per-instance authorization tokens. If not provided,
          defaults to looking in .cloudvolume/secrets for necessary tokens.
  *      skel_dir: (str) if not None, override the info['skeletons'] key before
          pulling the skeleton info file.
  *      spatial_index_db: (str) A path to an sqlite3 or mysql database that follows
          the following uri schema. sqlite is assumed if no scheme is present in
          the uri.
            [sqlite://]filename.db
            mysql://<username>:<password>@<host>:<port>/<db_name>

          Igneous generated datasets include a JSON based spatial
          database that tiles the dataset. This can be fast enough up to about 100 TVx
          datasets. Above that, a proper database is required for efficient queries.
          We provide multiple SQL database types that the index can be hosted on.
  *      use_https: (bool) maps gs:// and s3:// to their respective https paths. The
          https paths hit a cached, read-only version of the data and may be faster.



  Better documentation coming later, but for now, here's a summary of the most useful method calls. Use help(cloudvolume.CloudVolume.$method) for more info.

  * create_new_info (class method) - Helper function for creating info files for creating new data layers.
  * refresh_info - Repull the info file.
  * refresh_provenance - Repull the provenance file.
  * bbox_to_mip - Covert a bounding box or slice from one mip level to another.
  * slices_from_global_coords - *deprecated, why not use bbox_to_mip?* Find the CloudVolume slice from MIP 0 coordinates if you're on a different MIP. Often used in combination with neuroglancer.
  * reset_scales - Delete mips other than 0 in the info file. Does not autocommit.
  * add_scale - Generate a new mip level in the info property. Does not autocommit.
  * commit_info - Push the current info property into the cloud as a JSON file.
  * commit_provenance - Push the current provenance property into the cloud as a JSON file.
  * image - Access image operations directly.
    * download - Download bounding boxes from a given mip level.
    * upload - Upload images to bounding boxes at a given mip level.
    * transfer_to - Transfer data without painting a container array to avoid out of memory errors.
    * exists - Check which chunk files exist in a given bounding box.
    * delete - Delete chunks in a given bounding box at a given mip level.
  * mesh - Access mesh operations
  	* get - Download an object. Can merge multiple segmentids
  	* save - Download an object and save it in `.obj` format. You can combine equivialences into a single object too.
  * skeleton - Access Skeletons
    * get - Download an object.
    * upload - Save a skeleton object to the cloud.
  * cache - Access cache operations
  	* enabled - Boolean switch to enable/disable cache. If true, on reading, check local disk cache before downloading, and save downloaded chunks to cache. When writing, write to the cloud then save the chunks you wrote to cache. If false, bypass cache completely. The cache is located at `$HOME/.cloudvolume/cache`.
  	* path - Property that shows the current filesystem path to the cache
  	* list - List files in cache
  	* num_files - Number of files in cache at this mip level , use all_mips=True to get them all
  	* num_bytes - Return the number of bytes in cache at this mip level, all_mips=True to get them all
  	* flush - Delete the cache at this mip level, preserve=Bbox/slice to save a spatial region
  	* flush_region - Delete a spatial region at this mip level
  * exists - Generate a report on which chunks within a bounding box exist.
  * delete - Delete the chunks within this bounding box.
  * transfer_to - Transfer data from a bounding box to another data storage location. Does not allocate memory and transfers in blocks, so can transfer large volumes of data. May be less efficient than a dedicated tool like `gsutil` or `aws s3`.
  * unlink_shared_memory - Delete shared memory associated with this instance (`vol.shared_memory_id`)
  * generate_shared_memory_location - Create a new unique shared memory identifier string. No side effects.
  * download_to_shared_memory - Instead of using ordinary numpy memory allocations, download to shared memory.
      Be careful, shared memory is like a file and doesn't disappear unless explicitly unlinked. (`vol.unlink_shared_memory()`)
  * upload_from_shared_memory - Upload from a given shared memory block without making a copy.
  * download_point - Download the region around this mip 0 coordinate at a given mip level.



  Accessed as `vol.$PROPERTY` like `vol.mip`. Parens next to each property mean (data type:default, writability). (r) means read only, (w) means write only, (rw) means read/write.

  * mip (uint:0, rw) - Read from and write to this mip level (0 is highest res). Each additional increment in the number is typically a 2x reduction in resolution.
  * bounded (bool:True, rw) - If a region outside of volume bounds is accessed throw an error if True or Fill the region with black (useful for e.g. marching cubes's 1px boundary) if False.
  * autocrop (bool:False, rw) - If bounded is False and this option is True, automatically crop requested uploads and downloads to the volume boundary.
  * fill_missing (bool:False, rw) - If a file inside volume bounds is unable to be fetched use a block of zeros if True, else throw an error.
  * delete_black_uploads (bool:False, rw) - If True, issue a DELETE http request instead of a PUT when an individual uploaded chunk is all zeros.
  * info (dict, rw) - Python dict representation of Neuroglancer info JSON file. You must call `vol.commit_info()` to save your changes to storage.
  * provenance (dict-like, rw) - Data layer provenance file representation. You must call `vol.commit_provenance()` to save your changes to storage.
  * available_mips (list of ints, r) - Query which mip levels are defined for reading and writing.
  * dataset_name (str, rw) - Which dataset (e.g. test_v0, snemi3d_v0) on S3, GS, or FS you're reading and writing to. Known as an "experiment" in BOSS terminology. Writing to this property triggers an info refresh.
  * layer (str, rw) - Which data layer (e.g. image, segmentation) on S3, GS, or FS you're reading and writing to. Known as a "channel" in BOSS terminology. Writing to this property triggers an info refresh.
  * base_cloudpath (str, r) - The cloud path to the dataset e.g. s3://bucket/dataset/
  * layer_cloudpath (str, r) - The cloud path to the data layer e.g. gs://bucket/dataset/image
  * info_cloudpath (str, r) - Generate the cloud path to this data layer's info file.
  * scales (dict, r) - Shortcut to the 'scales' property of the info object
  * scale (dict, rw)* - Shortcut to the working scale of the current mip level
  * shape (Vec4, r)* - Like numpy.ndarray.shape for the entire data layer.
  * volume_size (Vec3, r)* - Like shape, but omits channel (x,y,z only).
  * num_channels (int, r) - The number of channels, the last element of shape.
  * layer_type (str, r) - The neuroglancer info type, 'image' or 'segmentation'.
  * dtype (str, r) - The info data_type of the volume, e.g. uint8, uint32, etc. Similar to numpy.ndarray.dtype.
  * encoding (str, r) - The neuroglancer info encoding. e.g. 'raw', 'jpeg', 'npz'
  * resolution (Vec3, r)* - The 3D physical resolution of a voxel in nanometers at the working mip level.
  * downsample_ratio (Vec3, r) - Ratio of the current resolution to the highest resolution mip available.
  * chunk_size (Vec3, r)* - Size of the underlying chunks that constitute the volume in storage. e.g. Vec(64, 64, 64)
  * key (str, r)* - The 'directory' we're accessing the current working mip level from within the data layer. e.g. '6_6_30'
  * bounds (Bbox, r)* - A Bbox object that represents the bounds of the entire volume.
  * shared_memory_id (str, rw) - Shared memory location used for parallel operation or for output.

  \* These properties can also be accessed with a function named like `vol.mip_$PROPERTY($MIP)`. By default they return the current mip level assigned to the CloudVolume, but any mip level can be accessed via the corresponding `mip_` function. Example: `vol.mip_resolution(2)` would return the resolution of mip 2.



  When you download an image using CloudVolume it gives you a `VolumeCutout`. These are `numpy.ndarray` subclasses that support a few extra properties to help make book keeping easier. The major advantage is `save_images()` which can help you view your dataset as PNG slices.

  * `dataset_name` - The dataset this image came from.
  * `layer` - Which layer it came from.
  * `mip` - Which mip it came from
  * `layer_type` - "image" or "segmentation"
  * `bounds` - The bounding box of the cutout
  * `num_channels` - Alias for `vol.shape[3]`
  * `save_images()` - Save Z slice PNGs of the current image to `./saved_images` for manual inspection
  * `viewer()` - Start a local web server (http://localhost:8080) that can view small volumes interactively. This was recently changed from `view` as `view` is a useful numpy method.



  If you have Precomputed volume onto local disk and would like to point neuroglancer to it:

  ```python
  vol = CloudVolume(...)
  vol.viewer()
  ```

  You can then point any version of neuroglancer at it using `precomputed://http://localhost:1337/NAME_OF_LAYER`.



  CloudVolume includes a built-in dependency free viewer for 3D volumetric datasets smaller than about 2GB uncompressed. It supports bool, uint8, uint16, uint32, float32, and float64 numpy data types for both images and segmentation and can render a composite overlay of image and segmentation.

  You can launch a viewer using the `.viewer()` method of a VolumeCutout object or by using the `view(...)` or `hyperview(...)` functions that come with the cloudvolume module. This launches a web server on `http://localhost:8080`. You can read more [on the wiki](https://github.com/seung-lab/cloud-volume/wiki/%CE%BCViewer).

  ```python3
  from cloudvolume import CloudVolume, view, hyperview

  channel_vol = CloudVolume(...)
  seg_vol = CloudVolume(...)
  img = vol[...]
  seg = vol[...]

  img.viewer() # works on VolumeCutouts
  seg.viewer() # segmentation type derived from info
  view(img) # alternative for arbitrary numpy arrays
  view(seg, segmentation=True)
  hyperview(img, seg) # img and seg shape must match

  >>> Viewer server listening to http://localhost:8080
  ```

  There are also seperate viewers for skeleton and mesh objects that can be invoked by calling `.viewer()` on either object. However, skeletons depend on `matplotlib` and meshes depend on `vtk` and OpenGL to function.

  ```bash
  pip install vtk matplotlib
  ```



  Python 2.7 is no longer supported by CloudVolume. Updated versions of `pip` will download the last supported release 1.21.1. You can read more on the policy page: https://github.com/seung-lab/cloud-volume/wiki/Policy#python-27-end-of-life



  1. [Igneous](https://github.com/seung-lab/igneous): Computational pipeline for visualizing neuroglancer volumes.
  2. [CloudVolume.jl](https://github.com/seung-lab/CloudVolume.jl): CloudVolume in Julia
  3. [fpzip](https://github.com/seung-lab/fpzip): A Python Package for the C++ code by Lindstrom et al.
  4. [compressed_segmentation](https://github.com/seung-lab/compressedseg): A Python Package wrapping the code for the compressed_segmentation format developed by Jeremy Maitin-Shepard and Stephen Plaza.
  5. [Kimimaro](https://github.com/seung-lab/kimimaro): High performance skeletonization of densely labeled 3D volumes.
  6. [compresso](https://github.com/seung-lab/compresso): High lossless compression of connectomics segmentation. Algorithm by and code derived from Matejek et al.
  7. [zfpc](https://github.com/seung-lab/zfpc): Optimized zfp multi-stream container for alignment vector fields (and similar floating point data).
  8. [crackle](https://github.com/seung-lab/crackle): Lossless high compression of connectomics segmentation. (BETA)



  Thank you to everyone that has contributed past or current to CloudVolume or the ecosystem it serves. We love you!

  Jeremy Maitin-Shepard created [Neuroglancer](https://github.com/google/neuroglancer) and defined the Precomputed format. Yann Leprince provided a [pure Python codec](https://github.com/HumanBrainProject/neuroglancer-scripts) for the compressed_segmentation format. Jeremy Maitin-Shepard and Stephen Plaza created C++ code defining the compression and decompression (respectively) protocol for [compressed_segmentation](https://github.com/janelia-flyem/compressedseg). Peter Lindstrom et al. created [the fpzip algorithm](https://computation.llnl.gov/projects/floating-point-compression), and contributed a C++ implementation and advice. Nico Kemnitz adapted our data to fpzip using the "Kempression" protocol (we named it, not him). Dan Bumbarger contributed code and information helpful for getting CloudVolume working on Windows. Fredrik Kihlander's [pure python implementation](https://github.com/wc-duck/pymmh3) of murmurhash3 and [Austin Appleby](https://github.com/aappleby/smhasher) developed murmurhash3 which is necessary for the sharded format. Ben Falk advocated for and did the bulk of the work on brotli compression. Some of the ideas in CloudVolume are based on work by Jingpeng Wu in [BigArrays.jl](https://github.com/seung-lab/BigArrays.jl).  Sven Dorkenwald, Manuel Castro, and Akhilesh Halageri contributed advice and code towards implementing the graphene interface. Oluwaseun Ogedengbe contributed documentation for the sharded format. Eric Perlman wrote the reader for Neuroglancer Multi-LOD meshes. Ignacio Tartavull and William Silversmith wrote the initial version of CloudVolume.


  Please cite the Igneous paper if you used this package in your research:

  [Igneous: Distributed dense 3D segmentation meshing, neuron skeletonization, and hierarchical downsampling](https://www.frontiersin.org/journals/neural-circuits/articles/10.3389/fncir.2022.977700/full)


pkgId: 21da2fab7713b936c2890ec214a1476badd9ea977435f8b2b2e334360c789d00
name: python-cloudcheck-help
arch: noarch
version: 7.0.33
epoch: 0
release: 1
summary: Development documents and examples for cloudcheck
url: https://github.com/blacklanternsecurity/cloudcheck
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloudcheck-7.0.33-1.src.rpm
location_href: Packages/python-cloudcheck-help-7.0.33-1.noarch.rpm
checksum_type: sha256
description:
  A simple Python utility to check whether an IP address or hostname belongs to a cloud provider.

  `cloud_providers.json` contains lists of domains and up-to-date CIDRs for each cloud provider (updated daily via CI/CD).

  Used by [Bighuge BLS OSINT Tool (BBOT)](https://github.com/blacklanternsecurity/bbot).


  ~~~bash
  pip install cloudcheck
  ~~~


  ~~~bash
  $ cloudcheck 168.62.20.37
  168.62.20.37 belongs to Azure (cloud) (168.62.0.0/19)

  $ cloudcheck test.evilcorp.azurewebsites.net
  test.evilcorp.azurewebsites.net belongs to Azure (cloud) (azurewebsites.net)
  ~~~


  ~~~python
  import cloudcheck

  provider, provider_type, subnet = cloudcheck.check("168.62.20.37")
  print(provider) # "Azure"
  print(provider_type) # "cloud"
  print(subnet) # IPv4Network('168.62.0.0/19')
  ~~~


  - Akamai ([source](https://techdocs.akamai.com/property-manager/pdfs/akamai_ipv4_ipv6_CIDRs-txt.zip))
  - Amazon ([source](https://ip-ranges.amazonaws.com/ip-ranges.json))
  - Arvancloud ([source](https://www.arvancloud.ir/en/ips.txt))
  - Azure ([source](https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519))
  - Cloudflare ([source](https://api.cloudflare.com/client/v4/ips))
  - Cloudfront ([source](https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips))
  - DigitalOcean ([source](http://digitalocean.com/geo/google.csv))
  - Fastly ([source](https://api.fastly.com/public-ip-list))
  - Github ([source](https://api.github.com/meta))
  - Google ([source](https://www.gstatic.com/ipranges/cloud.json))
  - Imperva ([source](https://my.imperva.com/api/integration/v1/ips))
  - Oracle Cloud ([source](https://docs.cloud.oracle.com/en-us/iaas/tools/public_ip_ranges.json))
  - Zoho ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/zoho.py))


pkgId: 3ee7f2ae5c6af8c4f7550de858dd592d2b047cce2884f2f68bdf644a613c5c6a
name: python-cloudcix-help
arch: noarch
version: 0.16.3
epoch: 0
release: 1
summary: Development documents and examples for cloudcix
url: https://python-cloudcix.readthedocs.io/en/latest/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloudcix-0.16.3-1.src.rpm
location_href: Packages/python-cloudcix-help-0.16.3-1.noarch.rpm
checksum_type: sha256
description:
  ``cloudcix`` is a Python client for the CloudCIX REST API for rapidly building secure, scalable CloudCIX applications.
  For more information about CloudCIX, see `here <https://www.cloudcix.com/>`__.

rpm_license:
  Copyright 2015 CloudCIX  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


pkgId: 9004f08e44e383556ddf3b02fe692423b865be1f2be12527e1e0c89e4fca0564
name: python-cloudevents-pydantic-help
arch: noarch
version: 0.0.3
epoch: 0
release: 1
summary: Development documents and examples for cloudevents-pydantic
url: https://febus982.github.io/cloudevents-pydantic
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloudevents-pydantic-0.0.3-1.src.rpm
location_href: Packages/python-cloudevents-pydantic-help-0.0.3-1.noarch.rpm
checksum_type: sha256
description:
  ![Static Badge](https://img.shields.io/badge/Python-3.9_%7C_3.10_%7C_3.11_%7C_3.12_%7C_3.13-blue?logo=python&logoColor=white)
  [![Stable Version](https://img.shields.io/pypi/v/cloudevents-pydantic?color=blue)](https://pypi.org/project/cloudevents-pydantic/)
  [![stability-wip](https://img.shields.io/badge/stability-wip-lightgrey.svg)](https://github.com/mkenney/software-guides/blob/master/STABILITY-BADGES.md#work-in-progress)

  [![Python tests](https://github.com/febus982/cloudevents-pydantic/actions/workflows/python-tests.yml/badge.svg?branch=main)](https://github.com/febus982/cloudevents-pydantic/actions/workflows/python-tests.yml)
  [![Maintainability](https://api.codeclimate.com/v1/badges/c7fe3ebcadd850d7ed3f/maintainability)](https://codeclimate.com/github/febus982/cloudevents-pydantic/maintainability)
  [![Test Coverage](https://api.codeclimate.com/v1/badges/c7fe3ebcadd850d7ed3f/test_coverage)](https://codeclimate.com/github/febus982/cloudevents-pydantic/test_coverage)

  [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)

  This is an implementation of the [CloudEvents spec](https://github.com/cloudevents/spec/tree/main) using
  [Pydantic V2](https://docs.pydantic.dev/latest/) for high performance during validation and serialization.

  It is meant to support natively [FastAPI](https://fastapi.tiangolo.com/)
  and [FastStream](https://faststream.airt.ai/latest/) (WIP)

  Currently supported bindings:

  | Binding | Format | Single  |  Batch  |
  |---------|:-------|:-------:|:-------:|
  | HTTP    | JSON   |    ✅    |    ✅    |
  | HTTP    | Binary | planned | planned |
  | KAFKA   | JSON   | planned | planned |
  | KAFKA   | Binary | planned | planned |



  ```shell
  pip install cloudevents-pydantic
  ```

  ```python
  from cloudevents_pydantic.bindings.http import HTTPHandler
  from cloudevents_pydantic.events import CloudEvent

  handler = HTTPHandler()
  minimal_attributes = {
      "type": "com.example.string",
      "source": "https://example.com/event-producer",
  }




  event = CloudEvent.event_factory(**minimal_attributes)


  headers, single_event_as_json = handler.to_json(event)


  headers, batch_of_events_as_json = handler.to_json_batch([event])


  parsed_event = handler.from_json(single_event_as_json)


  parsed_event_list = handler.from_json(batch_of_events_as_json)
  ```

  Refer to the [docs](https://febus982.github.io/cloudevents-pydantic/) for more advanced use cases and
  for details on how to create custom events.



  Using pydantic gives a great performance boost if compared to the official SDK. (there's obviously
  some performance issue in the official serialization using pydantic)

  These results come from a Macbook Pro M3 Max on python 3.12. Feel free to run the `benchmark.py`
  script yourself.

  ```
  Timings for HTTP JSON deserialization:
  This package: 3.0855846670019673
  Official SDK with pydantic model: 15.35431600001175
  Official SDK with http model: 13.728038166998886

  Timings for HTTP JSON serialization:
  This package: 4.292417042001034
  Official SDK with pydantic model: 44.50933354199515
  Official SDK with http model: 8.929204874992138
  ```




  All the common commands used during development can be run using make targets:

  * `make dev-dependencies`: Install dev requirements
  * `make update-dependencies`: Update dev requirements
  * `make fix`: Run code style and lint automatic fixes (where possible)
  * `make test`: Run test suite against system python version
  * `make check`: Run tests against all available python versions, code style and lint checks
  * `make type`, `make format`, `make lint`, `make bandit`: Run the relevant check
  * `make docs`: Render the mkdocs website locally


pkgId: f9a13153aae760bce3c09094f8537764ce094f92775ca3b0b40c3c1ba55777ac
name: python-cloudlanguagetools-help
arch: noarch
version: 11.5.0
epoch: 0
release: 1
summary: Development documents and examples for cloudlanguagetools
url: https://github.com/Language-Tools/cloud-language-tools-core
rpm_license: GPL
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloudlanguagetools-11.5.0-1.src.rpm
location_href: Packages/python-cloudlanguagetools-help-11.5.0-1.noarch.rpm
checksum_type: sha256
description:
  Interface with various cloud APIs for translation, text to speech


  see utils/service_keys.py


  see package.sh


pkgId: 94609f3438013a9b33ba668b37997128c0527faec8614b2ad0ca29943700f8ec
name: python-cloudly-help
arch: noarch
version: 0.0.4
epoch: 0
release: 1
summary: Development documents and examples for cloudly
url: https://pypi.org/project/cloudly/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloudly-0.0.4-1.src.rpm
location_href: Packages/python-cloudly-help-0.0.4-1.noarch.rpm
checksum_type: sha256
description:
  Some utilities for cloud computation.
  Read the `documentation <https://cloudly.readthedocs.io/en/latest/>`_.


pkgId: 09405651dcf7b0342d8c179d91ae2f1307ab22b5581606260783230724be7274
name: python-cloudnetpy-help
arch: noarch
version: 1.67.5
epoch: 0
release: 1
summary: Development documents and examples for cloudnetpy
url: https://github.com/actris-cloudnet/cloudnetpy
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloudnetpy-1.67.5-1.src.rpm
location_href: Packages/python-cloudnetpy-help-1.67.5-1.noarch.rpm
checksum_type: sha256
description:
  [![CloudnetPy CI](https://github.com/actris-cloudnet/cloudnetpy/actions/workflows/test.yml/badge.svg)](https://github.com/actris-cloudnet/cloudnetpy/actions/workflows/test.yml)
  [![PyPI version](https://badge.fury.io/py/cloudnetpy.svg)](https://badge.fury.io/py/cloudnetpy)
  [![DOI](https://zenodo.org/badge/233602651.svg)](https://zenodo.org/badge/latestdoi/233602651)
  [![status](https://joss.theoj.org/papers/959971f196f617dddc0e7d8333ff22b7/status.svg)](https://joss.theoj.org/papers/959971f196f617dddc0e7d8333ff22b7)

  CloudnetPy is Python software designed for producing vertical profiles of cloud properties from ground-based
  remote sensing measurements. The Cloudnet processing combines data from cloud radar, optical lidar,
  microwave radiometer, and numerical weather prediction models.
  Measurements and model data are brought into a common grid and
  classified as ice, liquid, aerosol, insects, and so on.
  Subsequently, geophysical products such as ice water content can be
  retrieved in further processing steps. See [Illingworth et al. (2007)](https://doi.org/10.1175/BAMS-88-6-883) for more details about the concept.

  CloudnetPy is a rewritten version of the original Cloudnet MATLAB code. It features several revised methods, extensive documentation, and more.

  - CloudnetPy documentation: <https://actris-cloudnet.github.io/cloudnetpy/>
  - Cloudnet data portal: <https://cloudnet.fmi.fi>

  ![CloudnetPy example output](https://raw.githubusercontent.com/actris-cloudnet/cloudnetpy/main/docs/source/_static/20230831_lindenberg_classification-9b74f4ac-target_classification.png)





  ```
  python3 -m pip install cloudnetpy
  ```



  ```sh
  git clone https://github.com/actris-cloudnet/cloudnetpy
  cd cloudnetpy/
  python3 -m venv venv
  source venv/bin/activate
  python3 -m pip install --upgrade pip
  python3 -m pip install .
  ```



  To verify the installation:

  ```sh
  cloudnetpy --help
  ```



  If you wish to acknowledge CloudnetPy in your publication, please cite:

  > Tukiainen et al., (2020). CloudnetPy: A Python package for processing cloud remote sensing data. Journal of Open Source Software, 5(53), 2123, https://doi.org/10.21105/joss.02123



  We encourage you to contribute to CloudnetPy! Please check out the [contribution guidelines](CONTRIBUTING.md) about how to proceed.



  Follow the installation instructions from the source above but install with the development dependencies and [pre-commit](https://pre-commit.com/) hooks:

  ```sh
  python3 -m pip install -e .[dev,test]
  pre-commit install
  ```

  Run unit tests:

  ```sh
  python3 -m pytest
  python3 -m pytest tests/unit/test_hatpro.py
  ```

  Run end-to-end tests:

  ```sh
  python3 tests/e2e_test.py
  for f in cloudnetpy/model_evaluation/tests/e2e/*/main.py; do $f; done
  ```

  Force `pre-commit` checks (`ruff`, `mypy`, etc.) for all files:

  ```sh
  pre-commit run --all
  ```



  MIT

rpm_license:
  MIT License  Copyright (c) 2019-2022 Finnish Meteorological Institute  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: 5430f736bff1488c7c0ec0bd3c8e5b6c39237fad1b1d77da8cc5659a636330f7
name: python-cloudnetpy-qc-help
arch: noarch
version: 1.18.3
epoch: 0
release: 1
summary: Development documents and examples for cloudnetpy-qc
url: https://github.com/actris-cloudnet/cloudnetpy-qc
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloudnetpy-qc-1.18.3-1.src.rpm
location_href: Packages/python-cloudnetpy-qc-help-1.18.3-1.noarch.rpm
checksum_type: sha256
description:
  [![CloudnetPy-QC CI](https://github.com/actris-cloudnet/cloudnetpy-qc/actions/workflows/test.yml/badge.svg)](https://github.com/actris-cloudnet/cloudnetpy-qc/actions/workflows/test.yml)
  [![PyPI version](https://badge.fury.io/py/cloudnetpy-qc.svg)](https://badge.fury.io/py/cloudnetpy-qc)

  Software for evaluating quality of [ACTRIS-Cloudnet](https://cloudnet.fmi.fi) data products.



  ```shell
  $ pip3 install cloudnetpy-qc
  ```



  ```python
  import json
  from cloudnetpy_qc import quality
  report = quality.run_tests('cloudnet-file.nc')
  json_object = json.dumps(report.to_dict(), indent=2)
  print(json_object)
  ```



  - `timestamp`: UTC timestamp of the test
  - `qcVersion`: `cloudnetpy-qc` version
  - `tests`: `Test[]`



  - `testId`: Unique name of the test
  - `exceptions`: `Exception[]`



  - `message`: Free-form message about the exception
  - `result`: `"info"`, `"error"` or `"warning"`



  ```json
  {
    "timestamp": "2022-10-13T07:00:26.906815Z",
    "qcVersion": "1.1.2",
    "tests": [
      {
        "testId": "TestUnits",
        "exceptions": []
      },
      {
        "testId": "TestInstrumentPid",
        "exceptions": [
          {
            "message": "Instrument PID is missing.",
            "result": "warning"
          }
        ]
      },
      {
        "testId": "TestTimeVector",
        "exceptions": []
      },
      {
        "testId": "TestVariableNames",
        "exceptions": []
      },
      {
        "testId": "TestCFConvention",
        "exceptions": []
      }
    ]
  }
  ```



  | Test                        | Description                                                                             |
  | --------------------------- | --------------------------------------------------------------------------------------- |
  | `FindAttributeOutliers`     | Find suspicious values in global attributes.                                            |
  | `FindFolding`               | Test for radar folding.                                                                 |
  | `FindVariableOutliers`      | Find suspicious data values.                                                            |
  | `TestBrightnessTemperature` | Test that brightness temperature data are valid.                                        |
  | `TestCFConvention`          | Test compliance with the CF metadata conventions.                                       |
  | `TestDataCoverage`          | Test that file contains enough data.                                                    |
  | `TestDataTypes`             | Check that variables have expected data types.                                          |
  | `TestFillValue`             | Test that fill value is explicitly set for variables with missing data.                 |
  | `TestFloatingPointValues`   | Test for special floating-point values which may indicate problems with the processing. |
  | `TestGlobalAttributes`      | Check that file contains required global attributes.                                    |
  | `TestIfRangeCorrected`      | Test that beta is range corrected.                                                      |
  | `TestInstrumentPid`         | Test that valid instrument PID exists.                                                  |
  | `TestLDR`                   | Test that LDR values are proper.                                                        |
  | `TestLidarBeta`             | Test that one beta variable exists.                                                     |
  | `TestLongNames`             | Check that variables have expected long names.                                          |
  | `TestMWRMultiTemperature`   | Test that temperature data are valid.                                                   |
  | `TestMWRSingleLWP`          | Test that LWP data are valid.                                                           |
  | `TestMask`                  | Test that data are not completely masked.                                               |
  | `TestMedianLwp`             | Test that LWP data are valid.                                                           |
  | `TestModelData`             | Test that model data are valid.                                                         |
  | `TestStandardNames`         | Check that variable have expected standard names.                                       |
  | `TestTimeVector`            | Test that time vector is continuous.                                                    |
  | `TestUnexpectedMask`        | Test if data contain unexpected masked values.                                          |
  | `TestUnits`                 | Check that variables have expected units.                                               |
  | `TestVariableNames`         | Check that file contains required variables.                                            |
  | `TestVariableNamesDefined`  | Check that variables have expected names.                                               |



  MIT

rpm_license:
  MIT License  Copyright (c) 2021-2022 Finnish Meteorological Institute  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: 28eb6e2c8d7a3eec678d8b2041f3ca99585b65c87aa6607480988baac334390a
name: python-cloudreactor-procwrapper-help
arch: noarch
version: 5.4.0
epoch: 0
release: 1
summary: Development documents and examples for cloudreactor-procwrapper
url: https://cloudreactor.io
rpm_license: Dual license, MPL 2.0 or commercial
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloudreactor-procwrapper-5.4.0-1.src.rpm
location_href: Packages/python-cloudreactor-procwrapper-help-5.4.0-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
    <a href="https://github.com/CloudReactor/cloudreactor-procwrapper/actions?query=workflow%3ACI">
      <img src="https://img.shields.io/github/workflow/status/CloudReactor/cloudreactor-procwrapper/CI/main?label=CI&logo=github&style=flat-square" alt="CI Status" >
    </a>
    <a href="https://cloudreactor-procwrapper.readthedocs.io">
      <img src="https://img.shields.io/readthedocs/cloudreactor-procwrapper.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
    </a>
    <a href="https://codecov.io/gh/CloudReactor/cloudreactor-procwrapper">
      <img src="https://img.shields.io/codecov/c/github/CloudReactor/cloudreactor-procwrapper.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
    </a>
  </p>
  <p align="center">
    <a href="https://python-poetry.org/">
      <img src="https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=" alt="Poetry">
    </a>
    <a href="https://github.com/pre-commit/pre-commit">
      <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
    </a>
  </p>
  <p align="center">
    <a href="https://pypi.org/project/cloudreactor-procwrapper/">
      <img src="https://img.shields.io/pypi/v/cloudreactor-procwrapper.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
    </a>
    <img src="https://img.shields.io/pypi/pyversions/cloudreactor-procwrapper.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
    <img src="https://img.shields.io/pypi/l/cloudreactor-procwrapper.svg?style=flat-square" alt="License">
  </p>

  Wraps the execution of processes so that an API server
  ([CloudReactor](https://cloudreactor.io/))
  can monitor and manage them.
  Available as a standalone executable or as a python module.



  * Runs either processes started with a command line or a python function you
  supply
  * Implements retries and time limits
  * Injects secrets from AWS Secrets Manager, AWS S3, or local files and extracts
  them into the process environment (for command-lines) or configuration (for
  functions)
  * When used with the CloudReactor service:
    * Reports when a process/function starts and when it exits, along with the
    exit code and runtime metadata (if running in AWS ECS, AWS Lambda, or AWS CodeBuild)
    * Sends heartbeats, optionally with status information like the number of
    items processed
    * Prevents too many concurrent executions
    * Stops execution when manually stopped in the CloudReactor dashboard
    * Sends CloudReactor the data necessary to start the process / function if running in AWS ECS, AWS Lambda, or AWS CodeBuild



  First, secrets and other configuration are fetched and resolved from
  providers like AWS Secrets Manager, AWS S3, or the local filesystem.

  Just before your code runs, the module requests the API server to create a
  Task Execution associated with the Task name or UUID which you pass to the
  module.
  The API server may reject the request if too many instances of the Task are
  currently running, but otherwise records that a Task Execution has started.
  The module then passes control to your code.

  While your code is running, it may report progress to the API server,
  and the API server may signal that your Task stop execution (due to
  user manually stopping the Task Execution), in which
  case the module terminates your code and exits.

  After your code finishes, the module informs the API server of
  the exit code or result. CloudReactor monitors Tasks to ensure they
  are still responsive, and keeps a history of the Executions of Tasks,
  allowing you to view failures and run durations in the past.



  Before your Task is run (including this module),
  the [AWS ECS CloudReactor Deployer](https://github.com/CloudReactor/aws-ecs-cloudreactor-deployer)
  can be used to set it up in AWS ECS,
  and inform CloudReactor of details of your Task.
  That way CloudReactor can start and schedule your Task, and setup your
  Task as a service.
  See [CloudReactor python ECS QuickStart](https://github.com/CloudReactor/cloudreactor-python-ecs-quickstart)
  for an example.

  However, it may not be possible or desired to change your deployment process.
  Instead, you may configure the Task to be *auto-created*.

  Auto-created Tasks are created the first time your Task runs.
  This means there is no need to inform the API server of the Task details
  (during deployment) before it runs.
  Instead, each time the module runs, it informs the API server of the
  Task details at the same time as it requests the creation of a Task Execution.
  One disadvantage of auto-created Tasks is that they are not available
  in the CloudReactor dashboard until the first time they run.

  When configuring a Task to be auto-created, you must specify the name
  or UUID of the Run Environment in CloudReactor that the Task is
  associated with. The Run Environment must be created ahead of time,
  either by the Cloudreactor AWS Setup Wizard,
  or manually in the CloudReactor dashboard.

  You can also specify more Task properties, such as Alert Methods and
  external links in the dashboard, by setting the environment variable
  `PROC_WRAPPER_AUTO_CREATE_TASK_PROPS` set to a JSON-encoded object that has the
  [CloudReactor Task schema](https://apidocs.cloudreactor.io/#operation/tasks_create).



  CloudReactor currently supports four Execution Methods:

  1) [AWS ECS (in Fargate)](https://aws.amazon.com/fargate/)
  2) [AWS Lambda](https://aws.amazon.com/lambda/)
  3) [AWS CodeBuild](https://aws.amazon.com/codebuild/)
  4) Unknown

  If a Task is running in AWS ECS, CloudReactor is able to run additional
  Task Executions, provided the details of running the Task is provided
  during deployment with the AWS ECS CloudReactor Deployer, or if the
  Task is configured to be auto-created, and this module is run. In the
  second case, this module uses the ECS Metadata endpoint to detect
  the ECS Task settings, and sends them to the API server. CloudReactor
  can also schedule Tasks or setup long-running services using Tasks,
  provided they are run in AWS ECS.

  If a Task is running in AWS Lambda, CloudReactor is able to run additional
  Task Executions after the first run of the function.

  However, a Task may use the Unknown execution method if it is not running
  in AWS ECS, AWS Lambda, or AWS CodeBuild. If that is the case, CloudReactor won't be able to
  start the Task in the dashboard or as part of a Workflow,
  schedule the Task, or setup a service with the Task. But the advantage is
  that the Task code can be executed by any method available to you,
  such as bare metal servers, VM's, or Kubernetes.
  All Tasks in CloudReactor, regardless of execution method, have their
  history kept and are monitored.

  This module detects the execution method your Task is
  running with and sends that information to the API server, provided
  you configure your Task to be auto-created.



  Passive Tasks are Tasks that CloudReactor does not manage. This means
  scheduling and service setup must be handled by other means
  (cron jobs, [supervisord](http://supervisord.org/), etc).
  However, Tasks marked as services or that have a schedule will still be
  monitored by CloudReactor, which will send notifications if
  a service Task goes down or a Task does not run on schedule.

  The module reports to the API server that auto-created Tasks are passive,
  unless you specify the `--force-task-passive` commmand-line option or
  set the environment variable `PROC_WRAPPER_TASK_IS_PASSIVE` to `FALSE`.
  If a Task uses the Unknown Execution Method, it must be marked as passive,
  because CloudReactor does not know how to manage it.



  If you just want to use this module to retry processes, limit execution time,
  or fetch secrets, you can use offline mode, in which case no CloudReactor API
  key is required. But CloudReactor offers a free tier so we hope you
  [sign up](https://dash.cloudreactor.io/signup)
  for a free account to enable monitoring and/or management.

  If you want CloudReactor to be able to start your Tasks, you should use the
  [Cloudreactor AWS Setup Wizard](https://github.com/CloudReactor/cloudreactor-aws-setup-wizard)
  to configure your AWS environment to run Tasks in ECS Fargate.
  You can skip this step if running in passive mode is OK for you.

  If you want to use CloudReactor to manage or just monitor your Tasks,
  you need to create a Run Environment and an API key in the CloudReactor
  dashboard. The API key can be scoped to the Run Environment if you
  wish. The key must have at least the Task access level, but for
  an auto-created Task, it must have at least the Developer access level.





  Standalone executables built by [PyInstaller](https://www.pyinstaller.org/) for 64-bit Linux and Windows are available, located in `bin/pyinstaller`.
  These executables bundle
  python so you don't need to have python installed on your machine. They also
  bundle all optional extras so you can fetch secrets from AWS
  Secrets Manager and extract them with jsonpath-ng, for example.



  To download and run the wrapper on a RHEL/Fedora/Amazon Linux 2 machine:

      RUN wget -nv https://github.com/CloudReactor/cloudreactor-procwrapper/raw/5.4.0/bin/pyinstaller/al2/5.4.0/proc_wrapper.bin
      ENTRYPOINT ["proc_wrapper.bin"]

  Example Dockerfiles of known working environments are available for
  [Amazon Linux 2](tests/integration/pyinstaller_executable/docker_context_al2_amd64/)
  and
  [Fedora](tests/integration/pyinstaller_executable/docker_context_al2_amd64/Dockerfile).

  Fedora 27 or later are supported.



  On a Debian based (including Ubuntu) machine:

      RUN wget -nv https://github.com/CloudReactor/cloudreactor-procwrapper/raw/5.4.0/bin/pyinstaller/debian-amd64/5.4.0/proc_wrapper.bin
      ENTRYPOINT ["proc_wrapper.bin"]

  See the example
  [Dockerfile](tests/integration/pyinstaller_executable/docker_context_debian_amd64/Dockerfile) for a known working Debian environment.

  Debian 10 (Buster) or later are supported.

  Special thanks to
  [wine](https://www.winehq.org/) and
  [PyInstaller Docker Images](https://github.com/cdrx/docker-pyinstaller)
  for making it possible to cross-compile!



  Install this module via pip (or your favorite package manager):

  `pip install cloudreactor-procwrapper`

  `cloudreactor-procwrapper` doesn't have any required dependencies, but it can
  be installed with the following extras:

  `aws`: Support for fetching secrets from AWS Secrets Manager or S3, and
  determining the assumed role, implemented by the
  [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)
  library

  `jsonpath`: Support for secret resolution using JSON Path, implemented by the
  [jsonpath-ng](https://github.com/h2non/jsonpath-ng) library

  `yaml`: Support for configuration files in YAML format, implemented by the
  [pyyaml](https://pyyaml.org/) library

  `dotenv`: Support for environment variables defined in the dotenv format,
  implemented by the [dotenv](https://github.com/theskumar/python-dotenv) library

  `mergedeep`: Support for secret object value merging using alternative
  strategies, implemented by the
  [mergedeep](https://github.com/clarketm/mergedeep) library

  Use brackets after `cloudreactor-procwrapper` to enable support for the desired
  functionality. For example, to install AWS support, JSON Path secret resolution,
  and support for dotenv files:

      pip install cloudreactor-procwrapper[aws,jsonpath,dotenv]

  Or, to install support for everything:

      pip install cloudreactor-procwrapper[allextras]



  There are two ways of using the module: wrapped mode and embedded mode.



  In wrapped mode, you pass a command line to the module which it
  executes in a child process. The command can be implemented in whatever
  programming language the running machine supports.

  Instead of running

      somecommand --somearg x

  you would run

      ./proc_wrapper somecommand --somearg x

  assuming that are using the PyInstaller standalone executable, and that
  you configure the program using environment variables.

  Or, if you have python installed:

      python -m proc_wrapper somecommand --somearg x

  Here are all the options:

      usage: proc_wrapper [-h] [-v] [-n TASK_NAME] [--task-uuid TASK_UUID] [-a] [--auto-create-task-run-environment-name AUTO_CREATE_TASK_RUN_ENVIRONMENT_NAME]
                          [--auto-create-task-run-environment-uuid AUTO_CREATE_TASK_RUN_ENVIRONMENT_UUID] [--auto-create-task-props AUTO_CREATE_TASK_PROPS] [--force-task-active] [--task-execution-uuid TASK_EXECUTION_UUID]
                          [--task-version-number TASK_VERSION_NUMBER] [--task-version-text TASK_VERSION_TEXT] [--task-version-signature TASK_VERSION_SIGNATURE] [--build-task-execution-uuid BUILD_TASK_EXECUTION_UUID]
                          [--deployment-task-execution-uuid DEPLOYMENT_TASK_EXECUTION_UUID] [--execution-method-props EXECUTION_METHOD_PROPS] [--task-instance-metadata TASK_INSTANCE_METADATA] [-s] [--schedule SCHEDULE]
                          [--max-concurrency MAX_CONCURRENCY] [--max-conflicting-age MAX_CONFLICTING_AGE] [--api-base-url API_BASE_URL] [-k API_KEY] [--api-heartbeat-interval API_HEARTBEAT_INTERVAL]
                          [--api-error-timeout API_ERROR_TIMEOUT] [--api-final-update-timeout API_FINAL_UPDATE_TIMEOUT] [--api-retry-delay API_RETRY_DELAY] [--api-resume-delay API_RESUME_DELAY]
                          [--api-task-execution-creation-error-timeout API_TASK_EXECUTION_CREATION_ERROR_TIMEOUT] [--api-task-execution-creation-conflict-timeout API_TASK_EXECUTION_CREATION_CONFLICT_TIMEOUT]
                          [--api-task-execution-creation-conflict-retry-delay API_TASK_EXECUTION_CREATION_CONFLICT_RETRY_DELAY] [--api-request-timeout API_REQUEST_TIMEOUT] [-o] [-p] [-m API_MANAGED_PROBABILITY]
                          [--api-failure-report-probability API_FAILURE_REPORT_PROBABILITY] [--api-timeout-report-probability API_TIMEOUT_REPORT_PROBABILITY] [-d DEPLOYMENT] [--send-pid] [--send-hostname]
                          [--no-send-runtime-metadata] [--runtime-metadata-refresh-interval RUNTIME_METADATA_REFRESH_INTERVAL] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--log-secrets] [--exclude-timestamps-in-log] [-w WORK_DIR]
                          [-c COMMAND_LINE] [--shell-mode {auto,enable,disable}] [--no-strip-shell-wrapping] [--no-process-group-termination] [-t PROCESS_TIMEOUT] [-r PROCESS_MAX_RETRIES] [--process-retry-delay PROCESS_RETRY_DELAY]
                          [--process-check-interval PROCESS_CHECK_INTERVAL] [--process-termination-grace-period PROCESS_TERMINATION_GRACE_PERIOD] [--enable-status-update-listener]
                          [--status-update-socket-port STATUS_UPDATE_SOCKET_PORT] [--status-update-message-max-bytes STATUS_UPDATE_MESSAGE_MAX_BYTES] [--status-update-interval STATUS_UPDATE_INTERVAL] [-e ENV_LOCATIONS]
                          [--config CONFIG_LOCATIONS] [--config-merge-strategy {DEEP,SHALLOW,REPLACE,ADDITIVE,TYPESAFE_REPLACE,TYPESAFE_ADDITIVE}] [--overwrite-env-during-resolution] [--config-ttl CONFIG_TTL]
                          [--no-fail-fast-config-resolution] [--resolved-env-var-name-prefix RESOLVED_ENV_VAR_NAME_PREFIX] [--resolved-env-var-name-suffix RESOLVED_ENV_VAR_NAME_SUFFIX]
                          [--resolved-config-property-name-prefix RESOLVED_CONFIG_PROPERTY_NAME_PREFIX] [--resolved-config-property-name-suffix RESOLVED_CONFIG_PROPERTY_NAME_SUFFIX]
                          [--env-var-name-for-config ENV_VAR_NAME_FOR_CONFIG] [--config-property-name-for-env CONFIG_PROPERTY_NAME_FOR_ENV] [--main-container-name MAIN_CONTAINER_NAME]
                          [--monitor-container-name MONITOR_CONTAINER_NAME] [--sidecar-container-mode] [--rollbar-access-token ROLLBAR_ACCESS_TOKEN] [--rollbar-retries ROLLBAR_RETRIES] [--rollbar-retry-delay ROLLBAR_RETRY_DELAY]
                          [--rollbar-timeout ROLLBAR_TIMEOUT]
                          ...

      Wraps the execution of processes so that a service API endpoint (CloudReactor) is optionally informed of the progress. Also implements retries, timeouts, and secret injection into the environment.

      positional arguments:
        command

      optional arguments:
        -h, --help            show this help message and exit
        -v, --version         Print the version and exit

      task:
        Task settings

        -n TASK_NAME, --task-name TASK_NAME
                              Name of Task (either the Task Name or the Task UUID must be specified
        --task-uuid TASK_UUID
                              UUID of Task (either the Task Name or the Task UUID must be specified)
        -a, --auto-create-task
                              Create the Task even if not known by the API server
        --auto-create-task-run-environment-name AUTO_CREATE_TASK_RUN_ENVIRONMENT_NAME
                              Name of the Run Environment to use if auto-creating the Task (either the name or UUID of the Run Environment must be specified if auto-creating the Task). Defaults to the deployment name if the Run
                              Environment UUID is not specified.
        --auto-create-task-run-environment-uuid AUTO_CREATE_TASK_RUN_ENVIRONMENT_UUID
                              UUID of the Run Environment to use if auto-creating the Task (either the name or UUID of the Run Environment must be specified if auto-creating the Task)
        --auto-create-task-props AUTO_CREATE_TASK_PROPS
                              Additional properties of the auto-created Task, in JSON format. See https://apidocs.cloudreactor.io/#operation/api_v1_tasks_create for the schema.
        --force-task-active   Indicates that the auto-created Task should be scheduled and made a service by the API server, if applicable. Otherwise, auto-created Tasks are marked passive.
        --task-execution-uuid TASK_EXECUTION_UUID
                              UUID of Task Execution to attach to
        --task-version-number TASK_VERSION_NUMBER
                              Numeric version of the Task's source code
        --task-version-text TASK_VERSION_TEXT
                              Human readable version of the Task's source code
        --task-version-signature TASK_VERSION_SIGNATURE
                              Version signature of the Task's source code (such as a git commit hash)
        --build-task-execution-uuid BUILD_TASK_EXECUTION_UUID
                              UUID of Task Execution that built this Task's source code
        --deployment-task-execution-uuid DEPLOYMENT_TASK_EXECUTION_UUID
                              UUID of Task Execution that deployed this Task to the Runtime Environment
        --execution-method-props EXECUTION_METHOD_PROPS
                              Additional properties of the execution method, in JSON format. See https://apidocs.cloudreactor.io/#operation/api_v1_task_executions_create for the schema.
        --task-instance-metadata TASK_INSTANCE_METADATA
                              Additional metadata about the Task instance, in JSON format
        -s, --service         Indicate that this is a Task that should run indefinitely
        --schedule SCHEDULE   Run schedule reported to the API server
        --max-concurrency MAX_CONCURRENCY
                              Maximum number of concurrent Task Executions of the same Task. Defaults to 1.
        --max-conflicting-age MAX_CONFLICTING_AGE
                              Maximum age of conflicting Tasks to consider, in seconds. -1 means no limit. Defaults to the heartbeat interval, plus 60 seconds for services that send heartbeats. Otherwise, defaults to no limit.

      api:
        API client settings

        --api-base-url API_BASE_URL
                              Base URL of API server. Defaults to https://api.cloudreactor.io
        -k API_KEY, --api-key API_KEY
                              API key. Must have at least the Task access level, or Developer access level for auto-created Tasks.
        --api-heartbeat-interval API_HEARTBEAT_INTERVAL
                              Number of seconds to wait between sending heartbeats to the API server. -1 means to not send heartbeats. Defaults to 30 for concurrency limited services, 300 otherwise.
        --api-error-timeout API_ERROR_TIMEOUT
                              Number of seconds to wait while receiving recoverable errors from the API server. Defaults to 300.
        --api-final-update-timeout API_FINAL_UPDATE_TIMEOUT
                              Number of seconds to wait while receiving recoverable errors from the API server when sending the final update before exiting. Defaults to 1800.
        --api-retry-delay API_RETRY_DELAY
                              Number of seconds to wait before retrying an API request. Defaults to 120.
        --api-resume-delay API_RESUME_DELAY
                              Number of seconds to wait before resuming API requests, after retries are exhausted. Defaults to 600. -1 means to never resume.
        --api-task-execution-creation-error-timeout API_TASK_EXECUTION_CREATION_ERROR_TIMEOUT
                              Number of seconds to keep retrying Task Execution creation while receiving error responses from the API server. -1 means to keep trying indefinitely. Defaults to 300.
        --api-task-execution-creation-conflict-timeout API_TASK_EXECUTION_CREATION_CONFLICT_TIMEOUT
                              Number of seconds to keep retrying Task Execution creation while conflict is detected by the API server. -1 means to keep trying indefinitely. Defaults to 1800 for concurrency limited services, 0
                              otherwise.
        --api-task-execution-creation-conflict-retry-delay API_TASK_EXECUTION_CREATION_CONFLICT_RETRY_DELAY
                              Number of seconds between attempts to retry Task Execution creation after conflict is detected. Defaults to 60 for concurrency-limited services, 120 otherwise.
        --api-request-timeout API_REQUEST_TIMEOUT
                              Timeout for contacting API server, in seconds. Defaults to 30.
        -o, --offline-mode    Do not communicate with or rely on an API server
        -p, --prevent-offline-execution
                              Do not start processes if the API server is unavailable or the wrapper is misconfigured.
        -m API_MANAGED_PROBABILITY, --api-managed-probability API_MANAGED_PROBABILITY
                              Sample notifications to the API server with a given probability when starting an execution. Defaults to 1.0 (always send notifications).
        --api-failure-report-probability API_FAILURE_REPORT_PROBABILITY
                              If the notification of an execution was not previously sent on startup and the execution fails, notify the API server with the given probability. Defaults to 1.0 (always send failure notifications).
        --api-timeout-report-probability API_TIMEOUT_REPORT_PROBABILITY
                              If the notification of an execution was not previously sent on startup and the execution times out, notify the API server with given probability. Defaults to 1.0 (always send timeout notifications).
        -d DEPLOYMENT, --deployment DEPLOYMENT
                              Deployment name (production, staging, etc.)
        --send-pid            Send the process ID to the API server
        --send-hostname       Send the hostname to the API server
        --no-send-runtime-metadata
                              Do not send metadata about the runtime environment
        --runtime-metadata-refresh-interval RUNTIME_METADATA_REFRESH_INTERVAL
                              Refresh interval for runtime metadata, in seconds. The default value depends on the execution method.

      log:
        Logging settings

        -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                              Log level
        --log-secrets         Log sensitive information
        --exclude-timestamps-in-log
                              Exclude timestamps in log (possibly because the log stream will be enriched by timestamps automatically by a logging service like AWS CloudWatch Logs)

      process:
        Process settings

        -w WORK_DIR, --work-dir WORK_DIR
                              Working directory. Defaults to the current directory.
        -c COMMAND_LINE, --command-line COMMAND_LINE
                              Command line to execute
        --shell-mode {auto,enable,disable}
                              Indicates if the process command should be executed in a shell. Executing in a shell allows shell scripts, commands, and expressions to be used, with the disadvantage that termination signals may not
                              be propagated to child processes. Options are: enable -- Force the command to be executed in a shell; disable -- Force the command to be executed without a shell; auto -- Auto-detect the shell mode by
                              analyzing the command.
        --no-strip-shell-wrapping
                              Do not strip the command-line of shell wrapping like "/bin/sh -c" that can be introduced by Docker when using shell form of ENTRYPOINT and CMD.
        --no-process-group-termination
                              Send termination and kill signals to the wrapped process only, instead of its process group (which is the default). Sending to the process group allows all child processes to receive the signals, even
                              if the wrapped process does not forward signals. However, if your wrapped process manually handles and forwards signals to its child processes, you probably want to send signals to only your wrapped
                              process.
        -t PROCESS_TIMEOUT, --process-timeout PROCESS_TIMEOUT
                              Timeout for process completion, in seconds. -1 means no timeout, which is the default.
        -r PROCESS_MAX_RETRIES, --process-max-retries PROCESS_MAX_RETRIES
                              Maximum number of times to retry failed processes. -1 means to retry forever. Defaults to 0.
        --process-retry-delay PROCESS_RETRY_DELAY
                              Number of seconds to wait before retrying a process. Defaults to 60.
        --process-check-interval PROCESS_CHECK_INTERVAL
                              Number of seconds to wait between checking the status of processes. Defaults to 10.
        --process-termination-grace-period PROCESS_TERMINATION_GRACE_PERIOD
                              Number of seconds to wait after sending SIGTERM to a process, but before killing it with SIGKILL. Defaults to 30.

      updates:
        Status update settings

        --enable-status-update-listener
                              Listen for status updates from the process, sent on the status socket port via UDP. If not specified, status update messages will not be read.
        --status-update-socket-port STATUS_UPDATE_SOCKET_PORT
                              The port used to receive status updates from the process. Defaults to 2373.
        --status-update-message-max-bytes STATUS_UPDATE_MESSAGE_MAX_BYTES
                              The maximum number of bytes status update messages can be. Defaults to 65536.
        --status-update-interval STATUS_UPDATE_INTERVAL
                              Minimum of number of seconds to wait between sending status updates to the API server. -1 means to not send status updates except with heartbeats. Defaults to -1.

      configuration:
        Environment/configuration resolution settings

        -e ENV_LOCATIONS, --env ENV_LOCATIONS
                              Location of either local file, AWS S3 ARN, or AWS Secrets Manager ARN containing properties used to populate the environment for embedded mode, or the process environment for wrapped mode. By default,
                              the file format is assumed to be dotenv. Specify multiple times to include multiple locations.
        --config CONFIG_LOCATIONS
                              Location of either local file, AWS S3 ARN, or AWS Secrets Manager ARN containing properties used to populate the configuration for embedded mode. By default, the file format is assumed to be in JSON.
                              Specify multiple times to include multiple locations.
        --config-merge-strategy {DEEP,SHALLOW,REPLACE,ADDITIVE,TYPESAFE_REPLACE,TYPESAFE_ADDITIVE}
                              Merge strategy for merging configurations. Defaults to 'DEEP', which does not require mergedeep. Besides the 'SHALLOW' strategy, all other strategies require the mergedeep extra to be installed.
        --overwrite-env-during-resolution
                              Overwrite existing environment variables when resolving them
        --config-ttl CONFIG_TTL
                              Number of seconds to cache resolved environment variables and configuration properties instead of refreshing them when a process restarts. -1 means to never refresh. Defaults to -1.
        --no-fail-fast-config-resolution
                              Continue execution even if an error occurs resolving the configuration
        --resolved-env-var-name-prefix RESOLVED_ENV_VAR_NAME_PREFIX
                              Required prefix for names of environment variables that should resolved. The prefix will be removed in the resolved variable name. Defaults to ''.
        --resolved-env-var-name-suffix RESOLVED_ENV_VAR_NAME_SUFFIX
                              Required suffix for names of environment variables that should resolved. The suffix will be removed in the resolved variable name. Defaults to '_FOR_PROC_WRAPPER_TO_RESOLVE'.
        --resolved-config-property-name-prefix RESOLVED_CONFIG_PROPERTY_NAME_PREFIX
                              Required prefix for names of configuration properties that should resolved. The prefix will be removed in the resolved property name. Defaults to ''.
        --resolved-config-property-name-suffix RESOLVED_CONFIG_PROPERTY_NAME_SUFFIX
                              Required suffix for names of configuration properties that should resolved. The suffix will be removed in the resolved property name. Defaults to '__to_resolve'.
        --env-var-name-for-config ENV_VAR_NAME_FOR_CONFIG
                              The name of the environment variable used to set to the value of the JSON encoded configuration. Defaults to not setting any environment variable.
        --config-property-name-for-env CONFIG_PROPERTY_NAME_FOR_ENV
                              The name of the configuration property used to set to the value of the JSON encoded environment. Defaults to not setting any property.

      container:
        Container settings

        --main-container-name MAIN_CONTAINER_NAME
                              The name of the container that is monitored
        --monitor-container-name MONITOR_CONTAINER_NAME
                              The name of the container that will monitor the main container
        --sidecar-container-mode
                              Indicates that the current container is a sidecar container that will monitor the main container

      rollbar:
        Rollbar settings

        --rollbar-access-token ROLLBAR_ACCESS_TOKEN
                              Access token for Rollbar (used to report error when communicating with API server)
        --rollbar-retries ROLLBAR_RETRIES
                              Number of retries per Rollbar request. Defaults to 2.
        --rollbar-retry-delay ROLLBAR_RETRY_DELAY
                              Number of seconds to wait before retrying a Rollbar request. Defaults to 120.
        --rollbar-timeout ROLLBAR_TIMEOUT
                              Timeout for contacting Rollbar server, in seconds. Defaults to 30.



  These environment variables take precedence over command-line arguments:

  * PROC_WRAPPER_TASK_NAME
  * PROC_WRAPPER_TASK_UUID
  * PROC_WRAPPER_TASK_EXECUTION_UUID
  * PROC_WRAPPER_AUTO_CREATE_TASK (TRUE or FALSE)
  * PROC_WRAPPER_AUTO_CREATE_TASK_RUN_ENVIRONMENT_NAME
  * PROC_WRAPPER_AUTO_CREATE_TASK_RUN_ENVIRONMENT_UUID
  * PROC_WRAPPER_AUTO_CREATE_TASK_PROPS (JSON encoded property map)
  * PROC_WRAPPER_TASK_IS_PASSIVE (TRUE OR FALSE)
  * PROC_WRAPPER_TASK_IS_SERVICE (TRUE or FALSE)
  * PROC_WRAPPER_EXECUTION_METHOD_PROPS (JSON encoded property map)
  * PROC_WRAPPER_TASK_MAX_CONCURRENCY (set to -1 to indicate no limit)
  * PROC_WRAPPER_PREVENT_OFFLINE_EXECUTION (TRUE or FALSE)
  * PROC_WRAPPER_TASK_VERSION_NUMBER
  * PROC_WRAPPER_TASK_VERSION_TEXT
  * PROC_WRAPPER_TASK_VERSION_SIGNATURE
  * PROC_WRAPPER_TASK_INSTANCE_METADATA (JSON encoded property map)
  * PROC_WRAPPER_LOG_LEVEL (TRACE, DEBUG, INFO, WARNING, ERROR, or CRITICAL)
  * PROC_WRAPPER_LOG_SECRETS (TRUE or FALSE)
  * PROC_WRAPPER_INCLUDE_TIMESTAMPS_IN_LOG (TRUE or FALSE)
  * PROC_WRAPPER_DEPLOYMENT
  * PROC_WRAPPER_API_BASE_URL
  * PROC_WRAPPER_API_KEY
  * PROC_WRAPPER_API_HEARTBEAT_INTERVAL_SECONDS
  * PROC_WRAPPER_API_ERROR_TIMEOUT_SECONDS
  * PROC_WRAPPER_API_RETRY_DELAY_SECONDS
  * PROC_WRAPPER_API_RESUME_DELAY_SECONDS
  * PROC_WRAPPER_API_TASK_EXECUTION_CREATION_ERROR_TIMEOUT_SECONDS
  * PROC_WRAPPER_API_TASK_EXECUTION_CREATION_CONFLICT_TIMEOUT_SECONDS
  * PROC_WRAPPER_API_TASK_EXECUTION_CREATION_CONFLICT_RETRY_DELAY_SECONDS
  * PROC_WRAPPER_API_FINAL_UPDATE_TIMEOUT_SECONDS
  * PROC_WRAPPER_API_REQUEST_TIMEOUT_SECONDS
  * PROC_WRAPPER_API_MANAGED_PROBABILITY
  * PROC_WRAPPER_API_FAILURE_REPORT_PROBABILITY
  * PROC_WRAPPER_API_TIMEOUT_REPORT_PROBABILITY
  * PROC_WRAPPER_ENV_LOCATIONS (comma-separated list of locations)
  * PROC_WRAPPER_CONFIG_LOCATIONS (comma-separated list of locations)
  * PROC_WRAPPER_OVERWRITE_ENV_WITH_SECRETS (TRUE or FALSE)
  * PROC_WRAPPER_RESOLVE_SECRETS (TRUE or FALSE)
  * PROC_WRAPPER_MAX_CONFIG_RESOLUTION_DEPTH
  * PROC_WRAPPER_MAX_CONFIG_RESOLUTION_ITERATIONS
  * PROC_WRAPPER_CONFIG_TTL_SECONDS
  * PROC_WRAPPER_FAIL_FAST_CONFIG_RESOLUTION (TRUE or FALSE)
  * PROC_WRAPPER_RESOLVABLE_ENV_VAR_NAME_PREFIX
  * PROC_WRAPPER_RESOLVABLE_ENV_VAR_NAME_SUFFIX
  * PROC_WRAPPER_RESOLVABLE_CONFIG_PROPERTY_NAME_PREFIX
  * PROC_WRAPPER_RESOLVABLE_CONFIG_PROPERTY_NAME_SUFFIX
  * PROC_WRAPPER_ENV_VAR_NAME_FOR_CONFIG
  * PROC_WRAPPER_CONFIG_PROPERTY_NAME_FOR_ENV
  * PROC_WRAPPER_SEND_PID (TRUE or FALSE)
  * PROC_WRAPPER_SEND_HOSTNAME (TRUE or FALSE)
  * PROC_WRAPPER_SEND_RUNTIME_METADATA (TRUE or FALSE)
  * PROC_WRAPPER_MAX_CONFLICTING_AGE_SECONDS
  * PROC_WRAPPER_TASK_COMMAND
  * PROC_WRAPPER_SHELL_MODE (TRUE or FALSE)
  * PROC_WRAPPER_STRIP_SHELL_WRAPPING (TRUE or FALSE)
  * PROC_WRAPPER_WORK_DIR
  * PROC_WRAPPER_PROCESS_MAX_RETRIES
  * PROC_WRAPPER_PROCESS_TIMEOUT_SECONDS
  * PROC_WRAPPER_PROCESS_RETRY_DELAY_SECONDS
  * PROC_WRAPPER_PROCESS_CHECK_INTERVAL_SECONDS
  * PROC_WRAPPER_PROCESS_TERMINATION_GRACE_PERIOD_SECONDS
  * PROC_WRAPPER_PROCESS_GROUP_TERMINATION (TRUE or FALSE)
  * PROC_WRAPPER_STATUS_UPDATE_SOCKET_PORT
  * PROC_WRAPPER_STATUS_UPDATE_MESSAGE_MAX_BYTES
  * PROC_WRAPPER_ROLLBAR_ACCESS_TOKEN
  * PROC_WRAPPER_MAIN_CONTAINER_NAME
  * PROC_WRAPPER_MONITOR_CONTAINER_NAME
  * PROC_WRAPPER_SIDECAR_CONTAINER_MODE (TRUE or FALSE)
  * PROC_WRAPPER_ROLLBAR_TIMEOUT_SECONDS
  * PROC_WRAPPER_ROLLBAR_RETRIES
  * PROC_WRAPPER_ROLLBAR_RETRY_DELAY_SECONDS

  With the exception of the settings for Secret Fetching and Resolution,
  these environment variables are read after Secret Fetching so that they can
  come from secret values.

  The command is executed with the same environment that the wrapper script gets,
  except that these properties are copied/overridden:

  * PROC_WRAPPER_DEPLOYMENT
  * PROC_WRAPPER_API_BASE_URL
  * PROC_WRAPPER_API_KEY
  * PROC_WRAPPER_API_ERROR_TIMEOUT_SECONDS
  * PROC_WRAPPER_API_RETRY_DELAY_SECONDS
  * PROC_WRAPPER_API_RESUME_DELAY_SECONDS
  * PROC_WRAPPER_API_REQUEST_TIMEOUT_SECONDS
  * PROC_WRAPPER_API_MANAGED_PROBABILITY
  * PROC_WRAPPER_API_FAILURE_REPORT_PROBABILITY
  * PROC_WRAPPER_API_TIMEOUT_REPORT_PROBABILITY
  * PROC_WRAPPER_ROLLBAR_ACCESS_TOKEN
  * PROC_WRAPPER_ROLLBAR_TIMEOUT_SECONDS
  * PROC_WRAPPER_ROLLBAR_RETRIES
  * PROC_WRAPPER_ROLLBAR_RETRY_DELAY_SECONDS
  * PROC_WRAPPER_ROLLBAR_RESUME_DELAY_SECONDS
  * PROC_WRAPPER_TASK_EXECUTION_UUID
  * PROC_WRAPPER_TASK_UUID
  * PROC_WRAPPER_TASK_NAME
  * PROC_WRAPPER_TASK_VERSION_NUMBER
  * PROC_WRAPPER_TASK_VERSION_TEXT
  * PROC_WRAPPER_TASK_VERSION_SIGNATURE
  * PROC_WRAPPER_TASK_INSTANCE_METADATA
  * PROC_WRAPPER_SCHEDULE
  * PROC_WRAPPER_PROCESS_TIMEOUT_SECONDS
  * PROC_WRAPPER_TASK_MAX_CONCURRENCY
  * PROC_WRAPPER_PREVENT_OFFLINE_EXECUTION
  * PROC_WRAPPER_PROCESS_TERMINATION_GRACE_PERIOD_SECONDS
  * PROC_WRAPPER_ENABLE_STATUS_UPDATE_LISTENER
  * PROC_WRAPPER_STATUS_UPDATE_SOCKET_PORT
  * PROC_WRAPPER_STATUS_UPDATE_INTERVAL_SECONDS
  * PROC_WRAPPER_STATUS_UPDATE_MESSAGE_MAX_BYTES

  Wrapped mode is suitable for running in a shell on your own (virtual) machine
  or in a Docker container. It requires multi-process support, as the module
  runs at the same time as the command it wraps.

  In AWS ECS, it is possible to run proc_wrapper in sidecar container that
  monitors another (main) container. In that case, proc_wrapper will report the
  status and runtime metadata of the main container. The advantage of running
  proc_wrapper in a sidecar container is that the main container doesn't need
  to be modified to run proc_wrapper. To configure proc_wrapper as a sidecar,
  set the main container name and enable sidecar container mode.



  You can use embedded mode to execute python code from inside a python program.
  Include the `proc_wrapper` package in your python project's
  dependencies. To run a task you want to be monitored:

      from typing import Any, Mapping

      from proc_wrapper import ProcWrapper, ProcWrapperParams


      def fun(wrapper: ProcWrapper, cbdata: dict[str, int],
              config: Mapping[str, Any]) -> int:
          print(cbdata)
          return cbdata['a']


      
      def entrypoint(event: Any, context: Any) -> int:
          params = ProcWrapperParams()
          params.auto_create_task = True

          
          
          
          proc_wrapper_params.task_is_passive = False

          params.task_name = 'embedded_test_production'
          params.auto_create_task_run_environment_name = 'production'

          
          
          params.api_key = 'YOUR_CLOUDREACTOR_API_KEY'

          
          
          proc_wrapper = ProcWrapper(params=params, runtime_context=context,
              input_value=event)

          x = proc_wrapper.managed_call(fun, {'a': 1, 'b': 2})
          
          print(x)

          return x

  This is suitable for running in single-threaded environments like
  AWS Lambda, or as part of a larger process that executes
  sub-routines that should be monitored. See
  [cloudreactor-python-lambda-quickstart](https://github.com/CloudReactor/cloudreactor-python-lambda-quickstart)
  for an example project that uses proc_wrapper in a function run by AWS Lambda.



  In embedded mode, besides setting properties of `ProcWrapperParams` in code,
  `ProcWrapper` can be also configured in two ways:

  First, using environment variables, as in wrapped mode.

  Second, using the configuration dictionary. If the configuration dictionary
  contains the key `proc_wrapper_params` and its value is a dictionary, the
  keys and values in the dictionary will be used to to set these attributes in
  `ProcWrapperParams`:

  | Key                              	               | Type      	| Mutable 	| Uses Resolved Config 	 |
  |--------------------------------------------------|-----------	|---------	|------------------------|
  | log_secrets                      	               | bool      	| No      	| No                   	 |
  | env_locations                    	               | list[str] 	| No      	| No                   	 |
  | config_locations                 	               | list[str] 	| No      	| No                   	 |
  | config_merge_strategy            	               | str       	| No      	| No                   	 |
  | overwrite_env_during_resolution  	               | bool      	| No      	| No                   	 |
  | max_config_resolution_depth      	               | int       	| No      	| No                   	 |
  | max_config_resolution_iterations 	               | int       	| No      	| No                   	 |
  | config_ttl                       	               | int       	| No      	| No                   	 |
  | fail_fast_config_resolution      	               | bool      	| No      	| No                   	 |
  | resolved_env_var_name_prefix     	               | str       	| No      	| No                   	 |
  | resolved_env_var_name_suffix     	               | str       	| No      	| No                   	 |
  | resolved_config_property_name_prefix             | str     	| No      	| No                   	 |
  | resolved_config_property_name_suffix             | str    	| No      	| No                   	 |
  | schedule                                         | str       	| No      	| Yes                  	 |
  | max_concurrency                                  | int       	| No      	| Yes                  	 |
  | max_conflicting_age                              | int       	| No      	| Yes                  	 |
  | offline_mode                                     | bool       	| No      	| Yes                  	 |
  | prevent_offline_execution                        | bool       	| No      	| Yes                  	 |
  | service                                          | bool       	| No      	| Yes                  	 |
  | deployment                                       | str       	| No      	| Yes                  	 |
  | api_base_url                                     | str       	| No      	| Yes                  	 |
  | api_heartbeat_interval                           | int       	| No      	| Yes                  	 |
  | enable_status_listener                           | bool      	| No      	| Yes                  	 |
  | status_update_socket_port                        | int        	| No      	| Yes                  	 |
  | status_update_message_max_bytes                  | int        	| No      	| Yes                  	 |
  | status_update_interval                           | int        	| No      	| Yes                  	 |
  | log_level                                        | str        	| No      	| Yes                  	 |
  | include_timestamps_in_log                        | bool      	| No      	| Yes                  	 |
  | api_key                                          | str        	| Yes     	| Yes                  	 |
  | api_request_timeout                              | int        	| Yes      	| Yes                  	 |
  | api_error_timeout                                | int        	| Yes     	| Yes                  	 |
  | api_retry_delay                                  | int        	| Yes     	| Yes                  	 |
  | api_resume_delay                                 | int        	| Yes     	| Yes                  	 |
  | api_task_execution_creation_error_timeout        | int | Yes     	| Yes                  	 |
  | api_task_execution_creation_conflict_timeout     | int | Yes    | Yes                  	 |
  | api_task_execution_creation_conflict_retry_delay | int| Yes	| Yes                  	 |
  | api-managed-probability                          | float         | No        | Yes                    |
  | api-failure-report-probability                   | float         | No        | Yes                    |
  | api-timeout-report-probability                   | float         | No        | Yes                    |
  | process_timeout                                  | int        	| Yes     	| Yes                  	 |
  | process_max_retries                              | int        	| Yes     	| Yes                  	 |
  | process_retry_delay                              | int        	| Yes     	| Yes                  	 |
  | command                                          | list[str]  	| Yes     	| Yes                  	 |
  | command_line                                     | str        	| Yes     	| Yes                  	 |
  | shell_mode                                       | bool      	| Yes     	| Yes                  	 |
  | strip_shell_wrapping                             | bool      	| Yes     	| Yes                  	 |
  | work_dir                                         | str       	| Yes     	| Yes                  	 |
  | process_termination_grace_period                 | int       	| Yes     	| Yes                  	 |
  | send_pid                                         | bool      	| Yes     	| Yes                  	 |
  | send_hostname                                    | bool      	| Yes     	| Yes                  	 |
  | send_runtime_metadata                            | bool      	| Yes     	| Yes                  	 |

  Keys that are marked with "Mutable" -- "No" in the table above can be
  overridden when the configuration is reloaded after the `config_ttl` expires.

  Keys that are marked as "Uses Resolved Config" -- "Yes" in the table above can
  come from the resolved configuration after secret resolution (see below).



  A common requirement is that deployed code / images do not contain secrets
  internally which could be decompiled. Instead, programs should fetch secrets
  from an external source in a secure manner. If your program runs in AWS, it
  can make use of AWS's roles that have permission to access data in
  Secrets Manager or S3. However, in many scenarios, having your program access
  AWS directly has the following disadvantages:

  1) Your program becomes coupled to AWS, so it is difficult to run locally or
  switch to another infrastructure provider
  2) You need to write code or use a library for each programming language you
  use, so secret fetching is done in a non-uniform way
  3) Writing code to merge and parse secrets from different sources is tedious

  Therefore, proc_wrapper implements Secret Fetching and Resolution to solve
  these problems so your programs don't have to. Both usage modes can fetch secrets from
  [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/),
  AWS S3, or the local filesystem, and optionally extract embedded data
  into the environment or a configuration dictionary. The environment is used to
  pass values to processes run in wrapped mode,
  while the configuration dictionary is passed to the callback function in
  embedded mode.

  proc_wrapper parses secret location strings that specify the how to resolve
  a secret value. Each secret location string has the format:

  `[PROVIDER_CODE:]<Provider specific address>[!FORMAT][|JP:<JSON Path expression>]`



  Providers indicate the raw source of the secret data. The table below lists the
  supported providers:

  | Provider Code 	| Value Prefix              	| Provider                     	| Example Address                                             	| Required extras            | Notes                                                         	|
  |---------------	|---------------------------	|------------------------------	|-------------------------------------------------------------	|-----------------------------------------------------------------------------	|---------------------------------------------------------------	|
  | `AWS_SM`      	| `arn:aws:secretsmanager:` 	| AWS Secrets Manager          	| `arn:aws:secretsmanager:us-east-2:1234567890:secret:config` 	| aws 	| Can also include version suffix like `-PPrpY`                 	|
  | `AWS_S3`      	| `arn:aws:s3:::`           	| AWS S3 Object                	| `arn:aws:s3:::examplebucket/staging/app1/config.json`       	| aws 	|                                                               	|
  | `FILE`        	| `file://`                 	| Local file                   	| `file:///home/appuser/app/.env`                                    	|                                                                             	| The default provider if no provider is auto-detected          	|
  | `ENV`         	|                           	| The process environment      	| `SOME_TOKEN`                                                	|                                                                             	| The name of another environment variable                      	|
  | `CONFIG`      	|                           	| The configuration dictionary 	| `$.db`                                                      	| jsonpath         	| JSON path expression to extract the data in the configuration 	|
  | `PLAIN`       	|                           	| Plaintext                    	| `{"user": "postgres", "password": "badpassword"}`           	|                                                                             	|                                                               	|

  If you don't specify an explicit provider prefix in a secret location
  (e.g. `AWS_SM:`), the provider can be auto-detected from the address portion
  using the Value Prefix. For example the secret location
  `arn:aws:s3:::examplebucket/staging/app1/config.json` will be auto-detected
  to with the AWS_S3 provider because it starts with `arn:aws:s3:::`.



  Formats indicate how the raw string data is parsed into a secret value (which may be
  a string, number, boolean, dictionary, or array). The table below lists the
  supported formats:

  | Format Code 	| Extensions      	| MIME types                                                                            	| Required extras                                        	| Notes                                            	|
  |-------------	|-----------------	|---------------------------------------------------------------------------------------	|------------------------------------------------------	|--------------------------------------------------	|
  | `dotenv`    	| `.env`          	| None                                                                                  	| dotenv 	| Also auto-detected if location includes `.env.`  	|
  | `json`      	| `.json`         	| `application/json`, `text/x-json`                                                     	|                                               	|  	|
  | `yaml`      	| `.yaml`, `.yml` 	| `application/x-yaml`, `application/yaml`, `text/vnd.yaml`, `text/yaml`, `text/x-yaml` 	| yaml                        	| pyyaml's `safe_load()` is used for security               	|

  The format of a secret value can be auto-detected from the extension or by the
  MIME type if available. Otherwise, you may need to an explicit format code
  (e.g. `!yaml`).



  [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)
  is used to fetch secrets when the `aws` extra is installed. It will try to
  access to AWS Secrets Manager or S3 using environment variables
  `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` if they are set, or use the EC2
  instance role, ECS task role, or Lambda execution role if available.

  For Secrets Manager, you can also use "partial ARNs" (without the hyphened
  suffix) as keys. In the example above

      arn:aws:secretsmanager:us-east-2:1234567890:secret:config

  could be used to fetch the same secret, provided there are no conflicting secret ARNs.
  This allows you to get the latest version of the secret.

  If the secret was stored in Secrets Manager as binary, the
  corresponding value will be set to the Base-64 encoded value.

  If you're deploying a python function using AWS Lambda, note that boto3 is
  already included in the available packages, so there's no need to include it
  (unless the bundled version isn't compatible). Also we strongly encourage you
  to add:

      logging.getLogger("botocore").setLevel(logging.INFO)

  to your code if you are using proc_wrapper for secrets resolution. This
  prevent secrets from Secrets Manager from being leaked. For details, see this
  [issue](https://github.com/boto/boto3/issues/2292).



  Fetching secrets can be relatively expensive and it makes sense to group related
  secrets together. Therefore it is common to store dictionaries (formatted
  as JSON or YAML) as secrets. However, each desired environment variable
  or configuration property may only consist of a fragment of the dictionary.
  For example, given the JSON-formatted dictionary

      {
        "username": "postgres",
        "password": "badpassword"
      }

  you may want to populate the environment variable `DB_USERNAME` with
  `postgres`.

  To facilitate this, dictionary fragments can be extracted to individual
  environment variables using [jsonpath-ng](https://github.com/h2non/jsonpath-ng)
  when the `jsonpath` extra is installed.
  To specify that a variable be extracted from a dictionary using
  a JSON Path expression, append `|JP:` followed by the JSON Path expression
  to the secret location string. For example, if the AWS Secrets Manager
  ARN

      arn:aws:secretsmanager:us-east-2:1234567890:secret:db-PPrpY

  contains the dictionary above, then the secret location string

      arn:aws:secretsmanager:us-east-2:1234567890:secret:db-PPrpY|JP:$.username

  will resolve to `postgres` as desired.

  If you do something similar to get the password from the same JSON value,
  proc_wrapper is smart enough to cache the fetched dictionary, so that the
  raw data is only fetched once.

  Since JSON path expressions yield a list of results, the secrets fetcher
  implements the following rules to transform the list to the final value:

  1. If the list of results has a single value, that value is used as the
  final value, unless `[*]` is appended to the JSON path expression.
  2. Otherwise, the final value is the list of results



  In some deployment scenarios, multiple secrets can be injected into a
  single environment variable as a JSON encoded object. In that case,
  the module can extract secrets using the *ENV* secret source. For example,
  you may have arranged to have the environment variable DB_CONFIG injected
  with the JSON encoded value:

      { "username": "postgres", "password": "nohackme" }

  Then to extract the username to the environment variable DB_USERNAME you
  you would add the environment variable DB_USER_FOR_PROC_WRAPPER_TO_RESOLVE
  set to

      ENV:DB_CONFIG|JP:$.username



  Now let's use secret location strings to
  inject the values into the environment (for wrapped mode)
  and/or the the configuration dictionary (for embedded mode). proc_wrapper
  supports two methods of secret injection which can be combined together:

  * Top-level fetching
  * Secrets Resolution



  Top-level fetching refers to fetching a dictionary that contains multiple secrets
  and populating the environment / configuration dictionary with it.
  To use top-level fetching, you specify the secret locations
  from which you want to fetch the secrets and the corresponding values are
  merged together into the environment / configuration.

  To use top-level fetching in wrapped mode, populate the
  environment variables `PROC_WRAPPER_ENV_LOCATIONS` with a comma-separated
  list of secret locations, or use the command-line option
  `--env-locations <secret_location>` one or more times. Secret location
  strings passed in via `PROC_WRAPPER_ENV_LOCATIONS` or `--env-locations`
  will be parsed as `dotenv` files unless format is auto-detected or
  explicitly specified.

  To use top-level fetching in embedded mode, set the `ProcWrapperParams` property
  `config_locations` to a list of secret locations. Alternatively, you can set
  the environment variable `PROC_WRAPPER_CONFIG_LOCATIONS` to a comma-separated
  list, and this will be picked up automatically. Secret location values
  will be parsed as JSON unless the format is auto-detected or explicitly
  specified. The `config` argument
  passed to the your callback function will contain a merged dictionary of all
  fetched and parsed dictionary values. For example:

      def callback(wrapper: ProcWrapper, cbdata: str,
              config: Dict[str, Any]) -> str:
          return "super" + cbdata + config["username"]


      def main():
          params = ProcWrapperParams()

          
          
          params.initial_config = {
              "log_level": "DEBUG"
          }

          
          
          params.config_locations = [
              "arn:aws:secretsmanager:us-east-2:1234567890:secret:db-PPrpY",
              
              
          ]

          wrapper = ProcWrapper(params=params)

          
          return wrapper.managed_call(callback, "duper")



  Top-level fetching can potentially fetch multiple dictionaries which are
  merged together in the final environment / configuration dictionary.
  The default merge strategy (`DEEP`) merges recursively, even dictionaries
  in lists. The `SHALLOW` merge strategy just overwrites top-level keys, with later
  secret locations taking precedence. However, if you install the
  [mergedeep](https://github.com/clarketm/mergedeep) library with the `mergedeep`
  extra, you can also set the merge strategy to one of:

  * `REPLACE`
  * `ADDITIVE`
  * `TYPESAFE_REPLACE`
  * `TYPESAFE_ADDITIVE`

  so that nested lists can be appended to instead of replaced (in the case of the
  `ADDITIVE` strategies), or errors will be raised if incompatibly-typed values
  are merged (in the case of the `TYPESAFE` strategies). In wrapped mode,
  the merge strategy can be set with the `--config-merge-strategy` command-line
  argument or `PROC_WRAPPER_CONFIG_MERGE_STRATEGY` environment variable. In
  embedded mode, the merge strategy can be set in the
  `config_merge_strategy` string property of `ProcWrapperParams`.



  Secret Resolution substitutes configuration or environment values that are
  secret location strings with the computed values of those strings. Compared
  to Secret Fetching, Secret Resolution is more useful when you want more
  control over the names of variables or when you have secret values deep
  inside your configuration.

  In wrapped mode, if you want to set the environment variable `MY_SECRET` with
  a value fetched
  from AWS Secrets Manager, you would set the environment variable
  `MY_SECRET_FOR_PROC_WRAPPER_TO_RESOLVE` to a secret location string
  which is ARN of the secret, for example:

      arn:aws:secretsmanager:us-east-2:1234567890:secret:db-PPrpY

  (The `_FOR_PROC_WRAPPER_TO_RESOLVE` suffix of environment variable names is
  removed during resolution. It can also be configured with the `PROC_WRAPPER_RESOLVABLE_ENV_VAR_NAME_SUFFIX` environment variable.)

  In embedded mode, if you want the final configuration dictionary to look like:

      {
        "db_username": "postgres",
        "db_password": "badpassword",
        ...
      }


  The initial configuration dictionary would look like:

      {
        "db_username__to_resolve": "arn:aws:secretsmanager:us-east-2:1234567890:secret:db-PPrpY|JP:$.username",
        "db_password__to_resolve": "arn:aws:secretsmanager:us-east-2:1234567890:secret:db-PPrpY|JP:$.password",

        ...
      }

  (The `__to_resolve` suffix (with 2 underscores!) of keys is removed during
  resolution. It can also be configured with the `resolved_config_property_name_suffix`
  property of `ProcWrapperParams`.)

  proc_wrapper can also resolve keys in embedded dictionaries, like:

      {
        "db": {
          "username__to_resolve": "arn:aws:secretsmanager:us-east-2:1234567890:secret:config-PPrpY|JP:$.username",
          "password__to_resolve":
          "arn:aws:secretsmanager:us-east-2:1234567890:secret:config-PPrpY|JP:$.password",
          ...
        },
        ...
      }

  up to a maximum depth that you can control with `ProcWrapperParams.max_config_resolution_depth` (which defaults to 5). That would resolve to

      {
        "db": {
          "username": "postgres",
          "password": "badpassword"
          ...
        },
        ...
      }

  You can also inject entire dictionaries, like:

      {
        "db__to_resolve": "arn:aws:secretsmanager:us-east-2:1234567890:secret:config-PPrpY",
        ...
      }

  which would resolve to

      {
        "db": {
          "username": "postgres",
          "password": "badpassword"
        },
        ...
      }

  To enable secret resolution in wrapped mode, set environment variable `PROC_WRAPPER_RESOLVE_SECRETS` to `TRUE`. In embedded mode, secret
  resolution is enabled by default; set the
  `max_config_resolution_iterations` property of `ProcWrapperParams` to `0`
  to disable resolution.

  Secret resolution is run multiple times so that if a resolved value contains
  a secret location string, it will be resolved on the next pass. By default,
  proc_wrapper limits the maximum number of resolution passes to 3 but you
  can control this with the environment variable
  `PROC_WRAPPER_MAX_CONFIG_RESOLUTION_ITERATIONS` in embedded mode,
  or by setting the `max_config_resolution_iterations` property of
  `ProcWrapperParams` in wrapped mode.



  During secret fetching and secret resolution, proc_wrapper internally maintains
  the computed environment as a dictionary which may have embedded lists and
  dictionaries. However, the final environment passed to the process is a flat
  dictionary containing only string values. So proc_wrapper converts
  all top-level values to strings using these rules:

  * Lists and dictionaries are converted to their JSON-encoded string value
  * Boolean values are converted to their upper-cased string representation
  (e.g. the string `FALSE` for the boolean value `false`)
  * The `None` value is converted to the empty string
  * All other values are converted using python's `str()` function



  You can set a Time to Live (TTL) on the duration that secret values are cached.
  Caching helps reduce expensive lookups of secrets and bandwidth usage.

  In wrapped mode, set the TTL of environment variables set from secret locations
  using the `--config-ttl` command-line argument or
  `PROC_WRAPPER_CONFIG_TTL_SECONDS` environment variable.
  If the process exits, you have configured the script to retry,
  and the TTL has expired since the last fetch,
  proc_wrapper will re-fetch the secrets
  and resolve them again, for the environment passed to the next invocation of
  your process.

  In embedded mode, set the TTL of configuration dictionary values set from
  secret locations by setting the `config_ttl` property of
  `ProcWrapperParams`. If 1) your callback function raises an exception, 2) you have
  configured the script to retry; and 3) the TTL has expired since the last fetch,
  proc_wrapper will re-fetch the secrets
  and resolve them again, for the configuration passed to the next invocation of
  the callback function.





  While your process in running, you can send status updates to
  CloudReactor by using the StatusUpdater class. Status updates are shown in
  the CloudReactor dashboard and allow you to track the current progress of a
  Task and also how many items are being processed in multiple executions
  over time.

  In wrapped mode, your application code would send updates to the
  proc_wrapper program via UDP port 2373 (configurable with the PROC_WRAPPER_STATUS_UPDATE_PORT environment variable).
  If your application code is in python, you can use the provided
  StatusUpdater class to do this:

      from proc_wrapper import StatusUpdater

      with StatusUpdater() as updater:
          updater.send_update(last_status_message="Starting ...")
          success_count = 0

          for i in range(100):
              try:
                  do_work()
                  success_count += 1
                  updater.send_update(success_count=success_count)
              except Exception:
                  failed_count += 1
                  updater.send_update(failed_count=failed_count)

          updater.send_update(last_status_message="Finished!")



  In embedded mode, your callback in python code can use the wrapper instance to
  send updates:

      from typing import Any, Mapping

      import proc_wrapper
      from proc_wrapper import ProcWrapper

      def fun(wrapper: ProcWrapper, cbdata: dict[str, int],
              config: Mapping[str, Any]) -> int:
          wrapper.update_status(last_status_message="Starting the fun ...")

          success_count = 0
          error_count = 0
          for i in range(100):
              try:
                  do_work()
                  success_count += 1
              except Exception:

                  error_count += 1
              wrapper.update_status(success_count=success_count,
                      error_count=error_count)

          wrapper.update_status(last_status_message="The fun is over.")

          return cbdata["a"]

      params = ProcWrapperParams()
      params.auto_create_task = True
      params.auto_create_task_run_environment_name = "production"
      params.task_name = "embedded_test"
      params.api_key = "YOUR_CLOUDREACTOR_API_KEY"

      proc_wrapper = ProcWrapper(params=params)
      proc_wrapper.managed_call(fun, {"a": 1, "b": 2})



  In case the wrapped process or embedded function will be execution very frequently,
  it may be advantageous to skip notifications to the API server in order to avoid the
  overhead (delay, bandwidth) of communication with the API server, or to reduce usage of
  API credits. For this purpose, you can configure proc_wrapper to communicate with the API
  server with a  certain probability using the `api-managed-probability` setting. If a
  generated random  number between 0 and 1 is above the probability threshold, the initial
  notification to create a Task Execution will be skipped. If the wrapped process or
  embedded function succeeds, no communication with the API server will be sent.

  However, if the wrapped process or embedded function fails, proc_wrapper will communicate
  with the API server with probability `api-failure-notification-probability`, creating
  a Task Exection at that point with a `FAILED` status. Similarly, if the wrapped process
  times out, proc_wrapper will communicate  with the API server with probability
  `api-timeout-notification-probability`, creating
  a Task Exection at that point with a `TERMINATED_AFTER_TIME_OUT` status.
  (Currently, timing out embedded functions is not supported.)



  These projects contain sample Tasks that use this library to report their
  execution status and results to CloudReactor

  * [cloudreactor-python-ecs-quickstart](https://github.com/CloudReactor/cloudreactor-python-ecs-quickstart)
  runs python code in a Docker container in AWS ECS Fargate (wrapped mode)
  * [cloudreactor-python-lambda-quickstart](https://github.com/CloudReactor/cloudreactor-python-lambda-quickstart)
  runs python code in AWS Lambda (embedded mode)
  * [cloudreactor-java-ecs-quickstart](https://github.com/CloudReactor/cloudreactor-java-ecs-quickstart)
  runs Java code in a Docker container in AWS ECS Fargate (wrapped mode)
  * [aws-otel-collector-cloudreactor](https://github.com/CloudReactor/aws-otel-collector-cloudreactor)
  enhances the AWS OTEL collector to report execution status to CloudReactor, and
  can be used as a sidecar container so that the main container doesn't need to
  run proc_wrapper.



  This software is dual-licensed under open source (MPL 2.0) and commercial
  licenses. See `LICENSE` for details.



  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
  <!-- prettier-ignore-start -->
  <!-- markdownlint-disable -->
  <table>
    <tr>
      <td align="center"><a href="https://github.com/jtsay362"><img src="https://avatars0.githubusercontent.com/u/1079646?s=460&v=4?s=80" width="80px;" alt=""/><br /><sub><b>Jeff Tsay</b></sub></a><br /><a href="https://github.com/CloudReactor/cloudreactor-procwrapper/commits?author=jtsay362" title="Code">💻</a> <a href="https://github.com/CloudReactor/cloudreactor-procwrapper/commits?author=jtsay362" title="Documentation">📖</a> <a href="#infra-jtsay362" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-jtsay362" title="Maintenance">🚧</a></td>
      <td align="center"><a href="https://github.com/mwaldne"><img src="https://avatars0.githubusercontent.com/u/40419?s=460&u=3a5266861feeb27db392622371ecc57ebca09f32&v=4?s=80" width="80px;" alt=""/><br /><sub><b>Mike Waldner</b></sub></a><br /><a href="https://github.com/CloudReactor/cloudreactor-procwrapper/commits?author=mwaldne" title="Code">💻</a></td>
      <td align="center"><a href="https://browniebroke.com/"><img src="https://avatars.githubusercontent.com/u/861044?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Bruno Alla</b></sub></a><br /><a href="https://github.com/CloudReactor/cloudreactor-procwrapper/commits?author=browniebroke" title="Code">💻</a> <a href="#ideas-browniebroke" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/CloudReactor/cloudreactor-procwrapper/commits?author=browniebroke" title="Documentation">📖</a></td>
    </tr>
  </table>

  <!-- markdownlint-restore -->
  <!-- prettier-ignore-end -->

  <!-- ALL-CONTRIBUTORS-LIST:END -->

  This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!



  This package was created with
  [Cookiecutter](https://github.com/audreyr/cookiecutter) and the
  [browniebroke/cookiecutter-pypackage](https://github.com/browniebroke/cookiecutter-pypackage)
  project template.


pkgId: a9247cf172ca239f0539a652b9375538185a4907a826049fcd262188e7b9e12d
name: python-cloudstructs-help
arch: noarch
version: 0.9.24
epoch: 0
release: 1
summary: Development documents and examples for cloudstructs
url: https://github.com/jogold/cloudstructs.git
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloudstructs-0.9.24-1.src.rpm
location_href: Packages/python-cloudstructs-help-0.9.24-1.noarch.rpm
checksum_type: sha256
description:
  High-level constructs for AWS CDK



  `npm install cloudstructs` or `yarn add cloudstructs`

  Version >= 0.2.0 requires AWS CDK v2.



  * [`CodeCommitMirror`](src/codecommit-mirror) Mirror a repository to AWS CodeCommit on schedule
  * [`EcsServiceRoller`](src/ecs-service-roller) Roll your ECS service tasks on schedule or with
    a rule
  * [`EmailReceiver`](src/email-receiver) Receive emails through SES, save them to S3
    and invoke a Lambda function
  * [`MjmlTemplate`](src/mjml-template) SES email template from [MJML](https://mjml.io/)
  * [`SlackApp`](src/slack-app) Deploy Slack apps from manifests
  * [`SlackEvents`](src/slack-events) Send Slack events to Amazon EventBridge
  * [`SlackTextract`](src/slack-textract) Extract text from images posted to Slack
    using Amazon Textract. The extracted text is posted in a thread under the image
    and gets indexed!
  * [`SslServerTest`](src/ssl-server-test) Test a server/host for SSL/TLS on schedule and
    get notified when the overall rating is not satisfactory. [Powered by Qualys SSL Labs](https://www.ssllabs.com/).
  * [`StateMachineCustomResourceProvider`](src/state-machine-cr-provider) Implement custom
    resources with AWS Step Functions state machines
  * [`StaticWebsite`](src/static-website) A CloudFront static website hosted on S3 with
    HTTPS redirect, SPA redirect, HTTP security headers and backend configuration saved
    to the bucket.
  * [`ToolkitCleaner`](src/toolkit-cleaner) Clean unused S3 and ECR assets from your CDK
    Toolkit.
  * [`UrlShortener`](src/url-shortener) Deploy an URL shortener API


pkgId: e68c8b261cf0b15bdf0fc07bfd44542d7df7da068997baf8b3b9ef1619b10eb5
name: python-cloudwash-help
arch: noarch
version: 2.0.1
epoch: 0
release: 1
summary: Development documents and examples for cloudwash
url: https://github.com/RedHatQE/cloudwash
rpm_license: Apache license
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cloudwash-2.0.1-1.src.rpm
location_href: Packages/python-cloudwash-help-2.0.1-1.noarch.rpm
checksum_type: sha256
description:
  VMs:
  	Deletable: ['test-bvhoduliam']
  	Stoppable: ['foremanqe-nightly2']
  DISCs:
  	Deletable: ['test-bvhoduliam-osdisk']
  NICs:
  	Deletable: ['test-axodawttrw-nic0']
  PIPs:


pkgId: dfb4a2b4ddbea605b5e8868d40bc8c384cc2fff62ff52fe3c4b433f4c190c8ce
name: python-clover-api-py-help
arch: noarch
version: 0.0.22
epoch: 0
release: 1
summary: Development documents and examples for clover-api-py
url: https://github.com/NateDemi/clover-api-py
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clover-api-py-0.0.22-1.src.rpm
location_href: Packages/python-clover-api-py-help-0.0.22-1.noarch.rpm
checksum_type: sha256
description:
  - Fetch inventory details and stock levels.
  - Update inventory items, including names, SKUs, and prices.
  - Manage orders and summarize order data.
  - Fetch and manage cash transactions.
  - Retrieve tax rates and other merchant-specific details.


pkgId: 22de0900e2bb7868abc40e95ab08344ec1e7e7edffc3c090bda8c4f9bf657ad7
name: python-cluster-experiments-help
arch: noarch
version: 0.20.2
epoch: 0
release: 1
summary: Development documents and examples for cluster-experiments
url: https://pypi.org/project/cluster-experiments/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cluster-experiments-0.20.2-1.src.rpm
location_href: Packages/python-cluster-experiments-help-0.20.2-1.noarch.rpm
checksum_type: sha256
description:
  <img src="theme/icon-cluster.png" width=200 height=200 align="right">



  [![Downloads](https://static.pepy.tech/badge/cluster-experiments)](https://pepy.tech/project/cluster-experiments)
  [![PyPI](https://img.shields.io/pypi/v/cluster-experiments)](
  https://pypi.org/project/cluster-experiments/)
  [![Unit tests](https://github.com/david26694/cluster-experiments/workflows/Release%20unit%20Tests/badge.svg)](https://github.com/david26694/cluster-experiments/actions)
  [![CodeCov](
  https://codecov.io/gh/david26694/cluster-experiments/branch/main/graph/badge.svg)](https://app.codecov.io/gh/david26694/cluster-experiments/)
  ![License](https://img.shields.io/github/license/david26694/cluster-experiments)
  [![Pypi version](https://img.shields.io/pypi/pyversions/cluster-experiments.svg)](https://pypi.python.org/pypi/cluster-experiments)

  A Python library for end-to-end A/B testing workflows, featuring:
  - Experiment analysis and scorecards
  - Power analysis (simulation-based and normal approximation)
  - Variance reduction techniques (CUPED, CUPAC)
  - Support for complex experimental designs (cluster randomization, switchback experiments)




  - **Simulation-based**: Run Monte Carlo simulations to estimate power
  - **Normal approximation**: Fast power estimation using CLT
  - **Minimum Detectable Effect**: Calculate required effect sizes
  - **Multiple designs**: Support for:
    - Simple randomization
    - Variance reduction techniques in power analysis
    - Cluster randomization
    - Switchback experiments
  - **Dict config**: Easy to configure power analysis with a dictionary


  - **Analysis Plans**: Define structured analysis plans
  - **Metrics**:
    - Simple metrics
    - Ratio metrics
  - **Dimensions**: Slice results by dimensions
  - **Statistical Methods**:
    - GEE
    - Mixed Linear Models
    - Clustered / regular OLS
    - T-tests
    - Synthetic Control
  - **Dict config**: Easy to define analysis plans with a dictionary


  - **CUPED** (Controlled-experiment Using Pre-Experiment Data):
    - Use historical outcome data to reduce variance, choose any granularity
    - Support for several covariates
  - **CUPAC** (Control Using Predictors as Covariates):
    - Use any scikit-learn compatible estimator to predict the outcome with pre-experiment data





  ```python
  import numpy as np
  import pandas as pd
  from cluster_experiments import PowerAnalysis, NormalPowerAnalysis


  N = 1_000
  df = pd.DataFrame({
      "target": np.random.normal(0, 1, size=N),
      "date": pd.to_datetime(
          np.random.randint(
              pd.Timestamp("2024-01-01").value,
              pd.Timestamp("2024-01-31").value,
              size=N,
          )
      ),
  })


  config = {
      "analysis": "ols",
      "perturbator": "constant",
      "splitter": "non_clustered",
      "n_simulations": 50,
  }
  pw = PowerAnalysis.from_dict(config)
  power = pw.power_analysis(df, average_effect=0.1)


  npw = NormalPowerAnalysis.from_dict({
      "analysis": "ols",
      "splitter": "non_clustered",
      "n_simulations": 5,
      "time_col": "date",
  })
  power_normal = npw.power_analysis(df, average_effect=0.1)
  power_line_normal = npw.power_line(df, average_effects=[0.1, 0.2, 0.3])



  mde = npw.mde(df, power=0.8)


  mde_timeline = npw.mde_time_line(
      df,
      powers=[0.8],
      experiment_length=[7, 14, 21]
  )

  print(power, power_line_normal, power_normal, mde, mde_timeline)
  ```



  ```python
  import numpy as np
  import pandas as pd
  from cluster_experiments import AnalysisPlan, SimpleMetric, Variant, Dimension

  N = 1_000
  experiment_data = pd.DataFrame({
      "order_value": np.random.normal(100, 10, size=N),
      "delivery_time": np.random.normal(10, 1, size=N),
      "experiment_group": np.random.choice(["control", "treatment"], size=N),
      "city": np.random.choice(["NYC", "LA"], size=N),
      "customer_id": np.random.randint(1, 100, size=N),
      "customer_age": np.random.randint(20, 60, size=N),
  })


  aov = SimpleMetric(alias="AOV", name="order_value")
  delivery_time = SimpleMetric(alias="Delivery Time", name="delivery_time")


  variants = [
      Variant("control", is_control=True),
      Variant("treatment", is_control=False),
  ]
  city_dimension = Dimension(name="city", values=["NYC", "LA"])


  plan = AnalysisPlan.from_metrics(
      metrics=[aov, delivery_time],
      variants=variants,
      variant_col="experiment_group",
      dimensions=[city_dimension],
      analysis_type="clustered_ols",
      analysis_config={
          "cluster_cols": ["customer_id"],
      },
  )


  results = plan.analyze(experiment_data)
  print(results.to_dataframe())
  ```



  ```python
  import numpy as np
  import pandas as pd
  from cluster_experiments import (
      AnalysisPlan,
      SimpleMetric,
      Variant,
      Dimension,
      TargetAggregation,
      HypothesisTest
  )

  N = 1000

  experiment_data = pd.DataFrame({
      "order_value": np.random.normal(100, 10, size=N),
      "delivery_time": np.random.normal(10, 1, size=N),
      "experiment_group": np.random.choice(["control", "treatment"], size=N),
      "city": np.random.choice(["NYC", "LA"], size=N),
      "customer_id": np.random.randint(1, 100, size=N),
      "customer_age": np.random.randint(20, 60, size=N),
  })

  pre_experiment_data = pd.DataFrame({
      "order_value": np.random.normal(100, 10, size=N),
      "customer_id": np.random.randint(1, 100, size=N),
  })


  cupac_model = TargetAggregation(
      agg_col="customer_id",
      target_col="order_value"
  )

  hypothesis_test = HypothesisTest(
      metric=SimpleMetric(alias="AOV", name="order_value"),
      analysis_type="clustered_ols",
      analysis_config={
          "cluster_cols": ["customer_id"],
          "covariates": ["customer_age", "estimate_order_value"],
      },
      cupac_config={
          "cupac_model": cupac_model,
          "target_col": "order_value",
      },
  )


  plan = AnalysisPlan(
      tests=[hypothesis_test],
      variants=[
          Variant("control", is_control=True),
          Variant("treatment", is_control=False),
      ],
      variant_col="experiment_group",
  )


  results = plan.analyze(experiment_data, pre_experiment_data)
  print(results.to_dataframe())
  ```



  You can install this package via `pip`.

  ```bash
  pip install cluster-experiments
  ```

  For detailed documentation and examples, visit our [documentation site](https://david26694.github.io/cluster-experiments/).



  The library offers the following classes:

  * Regarding power analysis:
      * `PowerAnalysis`: to run power analysis on any experiment design, using simulation
      * `PowerAnalysisWithPreExperimentData`: to run power analysis on a clustered/switchback design, but adding pre-experiment df during split and perturbation (especially useful for Synthetic Control)
      * `NormalPowerAnalysis`: to run power analysis on any experiment design using the central limit theorem for the distribution of the estimator. It can be used to compute the minimum detectable effect (MDE) for a given power level.
      * `ConstantPerturbator`: to artificially perturb treated group with constant perturbations
      * `BinaryPerturbator`: to artificially perturb treated group for binary outcomes
      * `RelativePositivePerturbator`: to artificially perturb treated group with relative positive perturbations
      * `RelativeMixedPerturbator`: to artificially perturb treated group with relative perturbations for positive and negative targets
      * `NormalPerturbator`: to artificially perturb treated group with normal distribution perturbations
      * `BetaRelativePositivePerturbator`: to artificially perturb treated group with relative positive beta distribution perturbations
      * `BetaRelativePerturbator`: to artificially perturb treated group with relative beta distribution perturbations in a specified support interval
      * `SegmentedBetaRelativePerturbator`: to artificially perturb treated group with relative beta distribution perturbations in a specified support interval, but using clusters
  * Regarding splitting data:
      * `ClusteredSplitter`: to split data based on clusters
      * `FixedSizeClusteredSplitter`: to split data based on clusters with a fixed size (example: only 1 treatment cluster and the rest in control)
      * `BalancedClusteredSplitter`: to split data based on clusters in a balanced way
      * `NonClusteredSplitter`: Regular data splitting, no clusters
      * `StratifiedClusteredSplitter`: to split based on clusters and strata, balancing the number of clusters in each stratus
      * `RepeatedSampler`: for backtests where we have access to counterfactuals, does not split the data, just duplicates the data for all groups
      * Switchback splitters (the same can be done with clustered splitters, but there is a convenient way to define switchback splitters using switch frequency):
          * `SwitchbackSplitter`: to split data based on clusters and dates, for switchback experiments
          * `BalancedSwitchbackSplitter`: to split data based on clusters and dates, for switchback experiments, balancing treatment and control among all clusters
          * `StratifiedSwitchbackSplitter`: to split data based on clusters and dates, for switchback experiments, balancing the number of clusters in each stratus
          * Washover for switchback experiments:
              * `EmptyWashover`: no washover done at all.
              * `ConstantWashover`: accepts a timedelta parameter and removes the data when we switch from A to B for the timedelta interval.
  * Regarding analysis methods:
      * `GeeExperimentAnalysis`: to run GEE analysis on the results of a clustered design
      * `MLMExperimentAnalysis`: to run Mixed Linear Model analysis on the results of a clustered design
      * `TTestClusteredAnalysis`: to run a t-test on aggregated data for clusters
      * `PairedTTestClusteredAnalysis`: to run a paired t-test on aggregated data for clusters
      * `ClusteredOLSAnalysis`: to run OLS analysis on the results of a clustered design
      * `OLSAnalysis`: to run OLS analysis for non-clustered data
      * `TargetAggregation`: to add pre-experimental data of the outcome to reduce variance
      * `SyntheticControlAnalysis`: to run synthetic control analysis
  * Regarding experiment analysis workflow:
      * `Metric`: abstract class to define a metric to be used in the analysis
      * `SimpleMetric`: to create a metric defined at the same level of the data used for the analysis
      * `RatioMetric`: to create a metric defined at a lower level than the data used for the analysis
      * `Variant`: to define a variant of the experiment
      * `Dimension`: to define a dimension to slice the results of the experiment
      * `HypothesisTest`: to define a Hypothesis Test with a metric, analysis method, optional analysis configuration, and optional dimensions
      * `AnalysisPlan`: to define a plan of analysis with a list of Hypothesis Tests for a dataset and the experiment variants. The `analyze()` method runs the analysis and returns the results
      * `AnalysisResults`: to store the results of the analysis
  * Other:
      * `PowerConfig`: to conveniently configure `PowerAnalysis` class
      * `ConfidenceInterval`: to store the data representation of a confidence interval
      * `InferenceResults`: to store the structure of complete statistical analysis results


pkgId: 166129d4669d5b756b4c154d0efa6d3eda9a1c0753a173946b5f6d0f383f27c2
name: python-cluster_tools-help
arch: noarch
version: 0.16.2
epoch: 0
release: 1
summary: Development documents and examples for cluster_tools
url: https://pypi.org/project/cluster_tools/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cluster_tools-0.16.2-1.src.rpm
location_href: Packages/python-cluster_tools-help-0.16.2-1.noarch.rpm
checksum_type: sha256
description:
  [![Build Status](https://img.shields.io/github/actions/workflow/status/scalableminds/webknossos-libs/.github/workflows/ci.yml?branch=master)](https://github.com/scalableminds/webknossos-libs/actions?query=workflow%3A%22CI%22)
  [![Code Style](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://docs.astral.sh/ruff/)


  This package provides python `Executor` classes for distributing tasks on a Slurm cluster, Kubernetes, Dask or via multi processing.



  ```python
  import cluster_tools

  def square(n):
    return n * n

  if __name__ == '__main__':
    strategy = "slurm"  # other valid values are "multiprocessing" and "sequential"
    with cluster_tools.get_executor(strategy) as executor:
      result = list(executor.map(square, [2, 3, 4]))
      assert result == [4, 9, 16]
  ```


  The `cluster_tools` package requires at least Python 3.9.

  You can install it from [pypi](https://pypi.org/project/cluster_tools/), e.g. via pip:

  ```bash
  pip install cluster_tools
  ```

  By default only the dependencies for running jobs on Slurm and via multiprocessing are installed.
  For Kubernetes and Dask run:

  ```bash
  pip install cluster_tools[kubernetes]
  pip install cluster_tools[dask]
  ```





  The `cluster_tools` automatically determine the slurm limit for maximum array job size and split up larger job batches into multiple smaller batches.
  Also, the slurm limit for the maximum number of jobs which are allowed to be submitted by a user at the same time is honored by looking up the number of currently submitted jobs and only submitting new batches if they fit within the limit.

  If you would like to configure these limits independently, you can do so by setting the `SLURM_MAX_ARRAY_SIZE` and `SLURM_MAX_SUBMIT_JOBS` environment variables. You can also limit the maximum number of simultaneously running tasks within the slurm array job(s) by using the `SLURM_MAX_RUNNING_SIZE` environment variable.





  | Key                 | Description                                                                                                                                                                                                                                                              | Example                                 |
  | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------- |
  | `namespace`         | Kubernetes namespace for the resources to be created. Will be created if not existent.                                                                                                                                                                                   | `cluster-tools`                         |
  | `node_selector`     | Which nodes to utilize for the processing. Needs to be a [Kubernetes `nodeSelector` object](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).                                                                                                   | `{"kubernetes.io/hostname": "node001"}` |
  | `image`             | The docker image for the containerized jobs to run in. The image needs to have the same version of `cluster_tools` and the code to run installed and in the `PYTHONPATH`.                                                                                                | `scalableminds/voxelytics:latest`       |
  | `mounts`            | Additional mounts for the containerized jobs. The current working directory and the `.cfut` directory are automatically mounted.                                                                                                                                         | `["/srv", "/data"]`                     |
  | `cpu`               | [CPU requirements](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for this job.                                                                                                                                                         | `4`                                     |
  | `memory`            | [Memory requirements](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for this job. Not required, but highly recommended to avoid congestion. Without resource requirements, all jobs will be run in parallel and RAM will run out soon. | `16G`                                   |
  | `python_executable` | The python executable may differ in the docker image from the one in the current environment. For images based of `FROM python`, it should be `python`. Defaults to `python`.                                                                                            | `python3.8`                             |
  | `umask`             | `umask` for the jobs.                                                                                                                                                                                                                                                    | `0002`                                  |



  - The jobs are run with the current `uid:gid`.
  - The jobs are removed 7 days after completion (successful or not).
  - The logs are stored in the `.cfut` directory. This is actually redundant, because Kubernetes also stores them.
  - Pods are not restarted upon error.
  - Requires Kubernetes ≥ 1.23.
  - [Kubernetes cluster configuration](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) is expected to be the same as for `kubectl`, i.e. in `~/.kube/config` or similar.



  ```

  cd dockered-slurm
  docker compose up -d
  docker exec -it slurmctld bash
  docker exec -it c1 bash
  ```

  Make sure to install all extra dependencies, such as Kubernetes, with `uv sync --all-extras`.

  Tests can be executed with `cd tests && uv run pytest -s tests.py` after entering the container.
  Linting can be run with `./lint.sh`.
  Code formatting (black) can be run with `./format.sh`.



  Thanks to [sampsyo/clusterfutures](https://github.com/sampsyo/clusterfutures) for providing the slurm core abstraction and [giovtorres/slurm-docker-cluster](https://github.com/giovtorres/slurm-docker-cluster) for providing the slurm docker environment which we use for CI based testing.


pkgId: 8a10c85afde155bff967b3ff81fd88a1648075e79d197e56b2dbdb3a9926e113
name: python-clusterops-help
arch: noarch
version: 0.1.5
epoch: 0
release: 1
summary: Development documents and examples for clusterops
url: https://github.com/The-Swarm-Corporation/ClusterOps
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-clusterops-0.1.5-1.src.rpm
location_href: Packages/python-clusterops-help-0.1.5-1.noarch.rpm
checksum_type: sha256
description:
  - **CPU Execution**: Dynamically assign tasks to specific CPU cores.
  - **GPU Execution**: Execute tasks on specific GPUs or dynamically select the best available GPU based on memory usage.
  - **Fault Tolerance**: Built-in retry logic with exponential backoff for handling transient errors.
  - **Resource Monitoring**: Real-time CPU and GPU resource monitoring (e.g., free memory on GPUs).
  - **Logging**: Advanced logging configuration with customizable log levels (DEBUG, INFO, ERROR).


pkgId: fd6193c3880ff1061c678d84286183e705eeadaf4207b34b78edcd5055b92e23
name: python-cmbagent-autogen-help
arch: noarch
version: 0.0.6.post1
epoch: 0
release: 1
summary: Development documents and examples for cmbagent-autogen
url: https://github.com/CMBAgents/ag2
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-cmbagent-autogen-0.0.6.post1-1.src.rpm
location_href: Packages/python-cmbagent-autogen-help-0.0.6.post1-1.noarch.rpm
checksum_type: sha256
description:
  <a name="readme-top"></a>

  ![Pypi Downloads](https://img.shields.io/pypi/dm/pyautogen?label=PyPI%20downloads)
  [![PyPI version](https://badge.fury.io/py/autogen.svg)](https://badge.fury.io/py/autogen)
  [![Build](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml/badge.svg)](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml)
  ![Python Version](https://img.shields.io/badge/3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)
  [![Discord](https://img.shields.io/discord/1153072414184452236?logo=discord&style=flat)](https://discord.gg/pAbnFJrkgZ)
  [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40ag2ai)](https://x.com/ag2ai)

  <!-- [![NuGet version](https://badge.fury.io/nu/AutoGen.Core.svg)](https://badge.fury.io/nu/AutoGen.Core) -->



  [📚 Cite paper](#related-papers).
  <!-- <p align="center">
      <img src="https://github.com/ag2ai/ag2/blob/main/website/static/img/flaml.svg"  width=200>
      <br>
  </p> -->

  > **:tada: IMPORTANT**
  >
  > :fire: :tada: **Nov 11, 2024:** We are evolving AutoGen into **AG2**!
  > A new organization [AG2ai](https://github.com/ag2ai) is created to host the development of AG2 and related projects with open governance. Check [AG2's new look](https://ag2.ai/).
  >
  > We invite collaborators from all organizations and individuals to join the development.


  :fire: :tada: AG2 is available via `pyautogen` (or its alias  `autogen` or  `ag2`)  on PyPI!

  ```
  pip install pyautogen
  ```

  📄 **License:**
  We adopt the Apache 2.0 license from v0.3. This enhances our commitment to open-source collaboration while providing additional protections for contributors and users alike.


  :tada: May 29, 2024: DeepLearning.ai launched a new short course [AI Agentic Design Patterns with AutoGen](https://www.deeplearning.ai/short-courses/ai-agentic-design-patterns-with-autogen), made in collaboration with Microsoft and Penn State University, and taught by AutoGen creators [Chi Wang](https://github.com/sonichi) and [Qingyun Wu](https://github.com/qingyun-wu).

  :tada: May 24, 2024: Foundation Capital published an article on [Forbes: The Promise of Multi-Agent AI](https://www.forbes.com/sites/joannechen/2024/05/24/the-promise-of-multi-agent-ai/?sh=2c1e4f454d97) and a video [AI in the Real World Episode 2: Exploring Multi-Agent AI and AutoGen with Chi Wang](https://www.youtube.com/watch?v=RLwyXRVvlNk).

  :tada: May 13, 2024: [The Economist](https://www.economist.com/science-and-technology/2024/05/13/todays-ai-models-are-impressive-teams-of-them-will-be-formidable) published an article about multi-agent systems (MAS) following a January 2024 interview with [Chi Wang](https://github.com/sonichi).

  :tada: May 11, 2024: [AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation](https://openreview.net/pdf?id=uAjxFFing2) received the best paper award at the [ICLR 2024 LLM Agents Workshop](https://llmagents.github.io/).

  <!-- :tada: Apr 26, 2024: [AutoGen.NET](https://ag2ai.github.io/ag2-for-net/) is available for .NET developers! -->

  :tada: Apr 17, 2024: Andrew Ng cited AutoGen in [The Batch newsletter](https://www.deeplearning.ai/the-batch/issue-245/) and [What's next for AI agentic workflows](https://youtu.be/sal78ACtGTc?si=JduUzN_1kDnMq0vF) at Sequoia Capital's AI Ascent (Mar 26).

  :tada: Mar 3, 2024: What's new in AutoGen? 📰[Blog](https://ag2ai.github.io/ag2/blog/2024/03/03/AutoGen-Update); 📺[Youtube](https://www.youtube.com/watch?v=j_mtwQiaLGU).

  <!-- :tada: Mar 1, 2024: the first AutoGen multi-agent experiment on the challenging [GAIA](https://huggingface.co/spaces/gaia-benchmark/leaderboard) benchmark achieved the No. 1 accuracy in all the three levels. -->

  <!-- :tada: Jan 30, 2024: AutoGen is highlighted by Peter Lee in Microsoft Research Forum [Keynote](https://t.co/nUBSjPDjqD). -->

  :tada: Dec 31, 2023: [AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework](https://arxiv.org/abs/2308.08155) is selected by [TheSequence: My Five Favorite AI Papers of 2023](https://thesequence.substack.com/p/my-five-favorite-ai-papers-of-2023).

  <!-- :fire: Nov 24: pyautogen [v0.2](https://github.com/ag2ai/ag2/releases/tag/v0.2.0) is released with many updates and new features compared to v0.1.1. It switches to using openai-python v1. Please read the [migration guide](https://ag2ai.github.io/ag2/docs/Installation#python). -->

  <!-- :fire: Nov 11: OpenAI's Assistants are available in AutoGen and interoperatable with other AutoGen agents! Checkout our [blogpost](https://ag2ai.github.io/ag2/blog/2023/11/13/OAI-assistants) for details and examples. -->

  :tada: Nov 8, 2023: AutoGen is selected into [Open100: Top 100 Open Source achievements](https://www.benchcouncil.org/evaluation/opencs/annual.html) 35 days after spinoff from [FLAML](https://github.com/microsoft/FLAML).

  <!-- :tada: Nov 6, 2023: AutoGen is mentioned by Satya Nadella in a [fireside chat](https://youtu.be/0pLBvgYtv6U). -->

  <!-- :tada: Nov 1, 2023: AutoGen is the top trending repo on GitHub in October 2023. -->

  <!-- :tada: Oct 03, 2023: AutoGen spins off from [FLAML](https://github.com/microsoft/FLAML) on GitHub. -->

  <!-- :tada: Aug 16: Paper about AutoGen on [arxiv](https://arxiv.org/abs/2308.08155). -->

  :tada: Mar 29, 2023: AutoGen is first created in [FLAML](https://github.com/microsoft/FLAML).

  <!--
  :fire: FLAML is highlighted in OpenAI's [cookbook](https://github.com/openai/openai-cookbook#related-resources-from-around-the-web).

  :fire: [autogen](https://ag2ai.github.io/ag2/) is released with support for ChatGPT and GPT-4, based on [Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inference](https://arxiv.org/abs/2303.04673).

  :fire: FLAML supports Code-First AutoML & Tuning – Private Preview in [Microsoft Fabric Data Science](https://learn.microsoft.com/en-us/fabric/data-science/). -->



  AG2 (formerly AutoGen) is an open-source programming framework for building AI agents and facilitating cooperation among multiple agents to solve tasks. AG2 aims to streamline the development and research of agentic AI, much like PyTorch does for Deep Learning. It offers features such as agents capable of interacting with each other, facilitates the use of various large language models (LLMs) and tool use support, autonomous and human-in-the-loop workflows, and multi-agent conversation patterns.

  **Open Source Statement**: The project welcomes contributions from developers and organizations worldwide. Our goal is to foster a collaborative and inclusive community where diverse perspectives and expertise can drive innovation and enhance the project's capabilities. Whether you are an individual contributor or represent an organization, we invite you to join us in shaping the future of this project. Together, we can build something truly remarkable.

  The project is currently maintained by a [dynamic group of volunteers](MAINTAINERS.md) from several organizations. Contact project administrators Chi Wang and Qingyun Wu via [support@ag2.ai](mailto:support@ag2.ai) if you are interested in becoming a maintainer.


  ![AutoGen Overview](https://media.githubusercontent.com/media/ag2ai/ag2/refs/heads/main/website/static/img/autogen_agentchat.png)


  <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
    <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
      ↑ Back to Top ↑
    </a>
  </p>

  <!--

  -->


  The easiest way to start playing is
  1. Click below to use the GitHub Codespace

      [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/ag2ai/ag2?quickstart=1)

   2. Copy OAI_CONFIG_LIST_sample to ./notebook folder, name to OAI_CONFIG_LIST, and set the correct configuration.
   3. Start playing with the notebooks!

  *NOTE*: OAI_CONFIG_LIST_sample lists gpt-4o as the default model. If you use a different model, you may need to revise various system prompts (especially if using weaker models like gpt-4o-mini). Proceed with caution when updating this default and be aware of additional risks related to alignment and safety.

  <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
    <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
      ↑ Back to Top ↑
    </a>
  </p>





  Find detailed instructions for users [here](https://ag2ai.github.io/ag2/docs/installation/Docker#step-1-install-docker), and for developers [here](https://ag2ai.github.io/ag2/docs/Contribute#docker-for-development).



  AG2 requires **Python version >= 3.8, < 3.14**. It can be installed from pip:

  ```bash
  pip install ag2
  ```

  Minimal dependencies are installed without extra options. You can install extra options based on the feature you need.

  <!-- For example, use the following to install the dependencies needed by the [`blendsearch`](https://microsoft.github.io/FLAML/docs/Use-Cases/Tune-User-Defined-Function#blendsearch-economical-hyperparameter-optimization-with-blended-search-strategy) option.
  ```bash
  pip install "autogen[blendsearch]"
  ``` -->

  Find more options in [Installation](https://ag2ai.github.io/ag2/docs/Installation#option-2-install-autogen-locally-using-virtual-environment).

  <!-- Each of the [`notebook examples`](https://github.com/ag2ai/ag2/tree/main/notebook) may require a specific option to be installed. -->

  Even if you are installing and running AG2 locally outside of docker, the recommendation and default behavior of agents is to perform [code execution](https://ag2ai.github.io/ag2/docs/FAQ/#code-execution) in docker. Find more instructions and how to change the default behaviour [here](https://ag2ai.github.io/ag2/docs/Installation#code-execution-with-docker-(default)).

  For LLM inference configurations, check the [FAQs](https://ag2ai.github.io/ag2/docs/FAQ#set-your-api-endpoints).

  <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
    <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
      ↑ Back to Top ↑
    </a>
  </p>



  AG2 enables the next-gen LLM applications with a generic [multi-agent conversation](https://ag2ai.github.io/ag2/docs/Use-Cases/agent_chat) framework. It offers customizable and conversable agents that integrate LLMs, tools, and humans.
  By automating chat among multiple capable agents, one can easily make them collectively perform tasks autonomously or with human feedback, including tasks that require using tools via code.

  Features of this use case include:

  - **Multi-agent conversations**: AG2 agents can communicate with each other to solve tasks. This allows for more complex and sophisticated applications than would be possible with a single LLM.
  - **Customization**: AG2 agents can be customized to meet the specific needs of an application. This includes the ability to choose the LLMs to use, the types of human input to allow, and the tools to employ.
  - **Human participation**: AG2 seamlessly allows human participation. This means that humans can provide input and feedback to the agents as needed.

  For [example](https://github.com/ag2ai/ag2/blob/main/test/twoagent.py),

  ```python
  from autogen import AssistantAgent, UserProxyAgent, config_list_from_json



  config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")

  assistant = AssistantAgent("assistant", llm_config={"config_list": config_list})
  user_proxy = UserProxyAgent("user_proxy", code_execution_config={"work_dir": "coding", "use_docker": False}) # IMPORTANT: set to True to run code in docker, recommended
  user_proxy.initiate_chat(assistant, message="Plot a chart of NVDA and TESLA stock price change YTD.")

  ```

  This example can be run with

  ```python
  python test/twoagent.py
  ```

  After the repo is cloned.
  The figure below shows an example conversation flow with AG2.

  ![Agent Chat Example](https://media.githubusercontent.com/media/ag2ai/ag2/refs/heads/main/website/static/img/chat_example.png)


  Alternatively, the [sample code](https://github.com/ag2ai/build-with-ag2/blob/main/samples/simple_chat.py) here allows a user to chat with an AG2 agent in ChatGPT style.
  Please find more [code examples](https://ag2ai.github.io/ag2/docs/Examples#automated-multi-agent-chat) for this feature.

  <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
    <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
      ↑ Back to Top ↑
    </a>
  </p>



  AG2 also helps maximize the utility out of the expensive LLMs such as gpt-4o. It offers [enhanced LLM inference](https://ag2ai.github.io/ag2/docs/Use-Cases/enhanced_inference#api-unification) with powerful functionalities like caching, error handling, multi-config inference and templating.

  <!-- For example, you can optimize generations by LLM with your own tuning data, success metrics, and budgets.

  ```python

  config, analysis = autogen.Completion.tune(
      data=tune_data,
      metric="success",
      mode="max",
      eval_func=eval_func,
      inference_budget=0.05,
      optimization_budget=3,
      num_samples=-1,
  )

  response = autogen.Completion.create(context=test_instance, **config)
  ```

  Please find more [code examples](https://ag2ai.github.io/ag2/docs/Examples#tune-gpt-models) for this feature. -->

  <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
    <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
      ↑ Back to Top ↑
    </a>
  </p>



  You can find detailed documentation about AG2 [here](https://ag2ai.github.io/ag2/).

  In addition, you can find:

  - [Research](https://ag2ai.github.io/ag2/docs/Research), [blogposts](https://ag2ai.github.io/ag2/blog) around AG2, and [Transparency FAQs](https://github.com/ag2ai/ag2/blob/main/TRANSPARENCY_FAQS.md)

  - [Discord](https://discord.gg/pAbnFJrkgZ)

  - [Contributing guide](https://ag2ai.github.io/ag2/docs/Contribute)

  <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
    <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
      ↑ Back to Top ↑
    </a>
  </p>



  Explore detailed implementations with sample code and applications to help you get started with AG2.
  [Cookbook](https://github.com/ag2ai/build-with-ag2)




  [AutoGen](https://arxiv.org/abs/2308.08155)

  ```
  @inproceedings{wu2023autogen,
        title={AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework},
        author={Qingyun Wu and Gagan Bansal and Jieyu Zhang and Yiran Wu and Beibin Li and Erkang Zhu and Li Jiang and Xiaoyun Zhang and Shaokun Zhang and Jiale Liu and Ahmed Hassan Awadallah and Ryen W White and Doug Burger and Chi Wang},
        year={2023},
        eprint={2308.08155},
        archivePrefix={arXiv},
        primaryClass={cs.AI}
  }
  ```

  [EcoOptiGen](https://arxiv.org/abs/2303.04673)

  ```
  @inproceedings{wang2023EcoOptiGen,
      title={Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inference},
      author={Chi Wang and Susan Xueqing Liu and Ahmed H. Awadallah},
      year={2023},
      booktitle={AutoML'23},
  }
  ```

  [MathChat](https://arxiv.org/abs/2306.01337)

  ```
  @inproceedings{wu2023empirical,
      title={An Empirical Study on Challenging Math Problem Solving with GPT-4},
      author={Yiran Wu and Feiran Jia and Shaokun Zhang and Hangyu Li and Erkang Zhu and Yue Wang and Yin Tat Lee and Richard Peng and Qingyun Wu and Chi Wang},
      year={2023},
      booktitle={ArXiv preprint arXiv:2306.01337},
  }
  ```

  [AgentOptimizer](https://arxiv.org/pdf/2402.11359)

  ```
  @article{zhang2024training,
    title={Training Language Model Agents without Modifying Language Models},
    author={Zhang, Shaokun and Zhang, Jieyu and Liu, Jiale and Song, Linxin and Wang, Chi and Krishna, Ranjay and Wu, Qingyun},
    journal={ICML'24},
    year={2024}
  }
  ```

  [StateFlow](https://arxiv.org/abs/2403.11322)
  ```
  @article{wu2024stateflow,
    title={StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows},
    author={Wu, Yiran and Yue, Tianwei and Zhang, Shaokun and Wang, Chi and Wu, Qingyun},
    journal={arXiv preprint arXiv:2403.11322},
    year={2024}
  }
  ```

  <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
    <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
      ↑ Back to Top ↑
    </a>
  </p>


  <a href="https://github.com/ag2ai/ag2/graphs/contributors">
    <img src="https://contrib.rocks/image?repo=ag2ai/ag2&max=204" />
  </a>

  <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
    <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
      ↑ Back to Top ↑
    </a>
  </p>


  This project is licensed under the [Apache License, Version 2.0 (Apache-2.0)](./LICENSE).

  This project is a spin-off of [AutoGen](https://github.com/microsoft/autogen) and contains code under two licenses:

  - The original code from https://github.com/microsoft/autogen is licensed under the MIT License.  See the [LICENSE_original_MIT](./license_original/LICENSE_original_MIT) file for details.

  - Modifications and additions made in this fork are licensed under the Apache License, Version 2.0. See the  [LICENSE](./LICENSE) file for the full license text.

  We have documented these changes for clarity and to ensure transparency with our user and contributor community. For more details, please see the [NOTICE](./NOTICE.md) file.


