# packages

pkgId: a9c65e22b2e0359357b1e02c3cd2c2f05656f1b633fb848494d20e66bf554d2d
name: python-cdnmon
arch: src
version: 0.5.14
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cdnmon/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdnmon-0.5.14-1.src.rpm
checksum_type: sha256
description:
  This project provides IP range data of multiple CDN vendors via a Python package named `cdnmon`.



  ```
  pip install -i https://pypi.org/simple/ cdnmon
  ```




  ```python
  from cdnmon import CDN


  cloudflare = CDN("cloudflare")


  cloudflare.update()


  cloudflare.ipv4_prefixes()
  cloudflare.ipv6_prefixes()


  cloudflare.subscribers()
  ```



  - [ ] Support downloading ingress / egress nodes list
  - [ ] Add `unchanged_since` in `index.html`
  - [ ] Change `updated_at` in `index.html`
  - [ ] Add example code in `index.html`
  - [x] Add type annotations





  Please contact <wangyihanger@gmail.com>.



  * https://github.com/ImAyrix/cut-cdn
  * https://github.com/j3ssie/cdnstrip
  * https://github.com/projectdiscovery/cdncheck


pkgId: 71c04f01606087ce0f9d2efde863883f8962ef0daa3097283d3d3624e65f3b3c
name: python-cdot
arch: src
version: 0.2.26
epoch: 0
release: 1
summary: Transcripts for HGVS libraries
url: https://github.com/SACGF/cdot
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdot-0.2.26-1.src.rpm
checksum_type: sha256
description:
  [![PyPi version](https://img.shields.io/pypi/v/cdot.svg)](https://pypi.org/project/cdot/) [![Python versions](https://img.shields.io/pypi/pyversions/cdot.svg)](https://pypi.org/project/cdot/)

  cdot provides transcripts for the 2 most popular Python [HGVS](http://varnomen.hgvs.org/) libraries.

  It works by:

  * Converting RefSeq/Ensembl GTFs to JSON
  * Providing loaders for the HGVS libraries, via JSON.gz files, or REST API via [cdot_rest](https://github.com/SACGF/cdot_rest))

  We currently support ~905k transcripts (vs ~141k in UTA v.20210129)



  See [changelog](https://github.com/SACGF/cdot/blob/main/CHANGELOG.md)

  2023-07-05:
  * BioCommons HGVS DataProvider fixes
  * Support for mouse transcripts (Mus Musculus GRCm38 and GRCm39)

  2023-04-03:
  * #41 - Support for T2T CHM13v2.0 [example code](https://github.com/SACGF/cdot/wiki/Biocommons-T2T-CHM13v2.0-example-code)



  ```
  pip install cdot
  ```



  [Biocommons HGVS](https://github.com/biocommons/hgvs) example:

  ```
  import hgvs
  from hgvs.assemblymapper import AssemblyMapper
  from cdot.hgvs.dataproviders import JSONDataProvider, RESTDataProvider

  hdp = RESTDataProvider()  # Uses API server at cdot.cc


  am = AssemblyMapper(hdp,
                      assembly_name='GRCh37',
                      alt_aln_method='splign', replace_reference=True)

  hp = hgvs.parser.Parser()
  var_c = hp.parse_hgvs_variant('NM_001637.3:c.1582G>A')
  am.c_to_g(var_c)
  ```

  [more Biocommons examples](https://github.com/SACGF/cdot/wiki/Biocommons-HGVS-example-code):

  [PyHGVS](https://github.com/counsyl/hgvs) example:

  ```
  import pyhgvs
  from pysam.libcfaidx import FastaFile
  from cdot.pyhgvs.pyhgvs_transcript import JSONPyHGVSTranscriptFactory, RESTPyHGVSTranscriptFactory

  genome = FastaFile("/data/annotation/fasta/GCF_000001405.25_GRCh37.p13_genomic.fna.gz")
  factory = RESTPyHGVSTranscriptFactory()

  pyhgvs.parse_hgvs_name('NM_001637.3:c.1582G>A', genome, get_transcript=factory.get_transcript_grch37)
  ```

  [more PyHGVS examples](https://github.com/SACGF/cdot/wiki/PyHGVS-example-code):



  * UTA public DB: 1-1.5 seconds / transcript
  * cdot REST service: 10/second
  * cdot JSON.gz: 500-1k/second



  [Download from GitHub releases](https://github.com/SACGF/cdot/releases) - RefSeq (37/38) - 72M, Ensembl (37/38) 61M

  Details on what the files contain [here](https://github.com/SACGF/cdot/wiki/GitHub-release-file-details)



  Both projects have similar goals of providing transcripts for loading HGVS, but they approach it from different ways

  * UTA aligns sequences, then stores coordinates in an SQL database.
  * cdot convert existing Ensembl/RefSeq GTFs into JSON

  See [wiki for more details](https://github.com/SACGF/cdot/wiki/cdot-vs-UTA)



  See [wiki page](https://github.com/SACGF/cdot/wiki/Transcript-JSON-format) for the format.

  We think a standard for JSON gene/transcript information would be a great thing, and am keen to collaborate to make it happen!



  cdot, pronounced "see dot" stands for Complete Dict of Transcripts

  This was developed for the [Australian Genomics](https://www.australiangenomics.org.au/) [Shariant](https://shariant.org.au/) project, due to the need to load historical HGVS from lab archives.


pkgId: aebdf3ddffa13dcd45eadd3d84d6c754f7e32813b83f643d70695020bf88f5b8
name: python-cdp-agentkit-core
arch: src
version: 0.0.5
epoch: 0
release: 1
summary: CDP Agentkit core primitives
url: https://pypi.org/project/cdp-agentkit-core/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdp-agentkit-core-0.0.5-1.src.rpm
checksum_type: sha256
description:
  Framework agnostic primitives that are meant to be composable and used via Agentkit framework extensions.

  You can find all of the supported actions under `./cdp_agentkit_core/actions`


  See [CONTRIBUTING.md](../CONTRIBUTING.md) for more information.


pkgId: 829e5e336bb8e6233e965bdf2b53f5f897cbf0c1774438c59a5ffd1ca5b0a3c0
name: python-cdp-backend
arch: src
version: 4.1.3
epoch: 0
release: 1
summary: Data storage utilities and processing pipelines used by CDP instances.
url: https://github.com/CouncilDataProject/cdp-backend
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdp-backend-4.1.3-1.src.rpm
checksum_type: sha256
description:
  Council Data Project is an open-source project dedicated to providing journalists, activists, researchers, and all members of each community we serve with the tools they need to stay informed and hold their Council Members accountable.
  For more information about Council Data Project, please visit [our website](https://councildataproject.org/).

  `cdp-backend` is used to maintain the database models, infrastructure stack, and all pipelines for CDP Instance web applications.
  The central goal is to create a single library that manages the whole backend of any CDP Instance.

  **Stable Release (with just data access dependencies):** `pip install cdp-backend`<br/>
  **Stable Release (with full pipeline dependencies):** `pip install cdp-backend[pipeline]`
  **Development Head:** `pip install git+https://github.com/CouncilDataProject/cdp-backend.git`
  **Dev Installation:** For devs, please ensure that you have [dot / graphviz](https://graphviz.org/download/) installed before working with tests and auto-documentation generation.

  Please see [dev-infrastructure](./dev-infrastructure) for defaults on dev deployments.

  For full package documentation please visit [councildataproject.org/cdp-backend](https://councildataproject.org/cdp-backend).

  See [CONTRIBUTING.md](CONTRIBUTING.md) for information related to development of this repository.

  If you have found CDP software, data, or ideas useful in your own work, please consider citing us:
  Brown et al., (2021). Council Data Project: Software for Municipal Data Collection, Analysis, and Publication. Journal of Open Source Software, 6(68), 3904, https://doi.org/10.21105/joss.03904
  ```bibtex
  @article{Brown2021,
    doi = {10.21105/joss.03904},
    url = {https://doi.org/10.21105/joss.03904},
    year = {2021},
    publisher = {The Open Journal},
    volume = {6},
    number = {68},
    pages = {3904},
    author = {Eva Maxfield Brown and To Huynh and Isaac Na and Brian Ledbetter and Hawk Ticehurst and Sarah Liu and Emily Gilles and Katlyn M. f. Greene and Sung Cho and Shak Ragoler and Nicholas Weber},
    title = {{Council Data Project: Software for Municipal Data Collection, Analysis, and Publication}},
    journal = {Journal of Open Source Software}
  }
  ```

  **MIT License**


pkgId: 0167d45259f546ab5e9a1c332c359424f2162c94b72cc4a6ba1dbfebb969ab20
name: python-cdp-langchain
arch: src
version: 0.0.6
epoch: 0
release: 1
summary: CDP Agentkit Langchain Extension
url: https://pypi.org/project/cdp-langchain/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdp-langchain-0.0.6-1.src.rpm
checksum_type: sha256
description:
  CDP integration with Langchain to enable agentic workflows using the core primitives defined in `cdp-agentkit-core`.

  This toolkit contains tools that enable an LLM agent to interact with the [Coinbase Developer Platform](https://docs.cdp.coinbase.com/). The toolkit provides a wrapper around the CDP SDK, allowing agents to perform onchain operations like transfers, trades, and smart contract interactions.




  - Python 3.10 or higher
  - [CDP API Key](https://portal.cdp.coinbase.com/access/api)



  ```bash
  pip install cdp-langchain
  ```



  Set the following environment variables:

  ```bash
  export CDP_API_KEY_NAME=<your-api-key-name>
  export CDP_API_KEY_PRIVATE_KEY=$'<your-private-key>'
  export OPENAI_API_KEY=<your-openai-api-key>
  export NETWORK_ID=base-sepolia  # Optional: Defaults to base-sepolia
  ```





  ```python
  from cdp_langchain.agent_toolkits import CdpToolkit
  from cdp_langchain.utils import CdpAgentkitWrapper


  cdp = CdpAgentkitWrapper()


  toolkit = CdpToolkit.from_cdp_agentkit_wrapper(cdp)
  ```

  View available tools:
  ```python
  tools = toolkit.get_tools()
  for tool in tools:
      print(tool.name)
  ```

  The toolkit provides the following tools:

  1. **get_wallet_details** - Get details about the MPC Wallet
  2. **get_balance** - Get balance for specific assets
  3. **request_faucet_funds** - Request test tokens from faucet
  4. **transfer** - Transfer assets between addresses
  5. **trade** - Trade assets (Mainnet only)
  6. **deploy_token** - Deploy ERC-20 token contracts
  7. **mint_nft** - Mint NFTs from existing contracts
  8. **deploy_nft** - Deploy new NFT contracts
  9. **register_basename** - Register a basename for the wallet
  10. **wow_create_token** - Deploy a token using Zora's Wow Launcher (Bonding Curve)
  11. **wow_buy_token** - Buy Zora Wow ERC20 memecoin with ETH
  12. **wow_sell_token** - Sell Zora Wow ERC20 memecoin for ETH



  ```python
  from langchain_openai import ChatOpenAI
  from langgraph.prebuilt import create_react_agent


  llm = ChatOpenAI(model="gpt-4o-mini")


  tools = toolkit.get_tools()
  agent_executor = create_react_agent(llm, tools)


  events = agent_executor.stream(
      {"messages": [("user", "Send 0.005 ETH to john2879.base.eth")]},
      stream_mode="values"
  )

  for event in events:
      event["messages"][-1].pretty_print()
  ```
  Expected output:
  ```
  Transferred 0.005 of eth to john2879.base.eth.
  Transaction hash for the transfer: 0x78c7c2878659a0de216d0764fc87eff0d38b47f3315fa02ba493a83d8e782d1e
  Transaction link for the transfer: https://sepolia.basescan.org/tx/0x78c7c2878659a0de216d0764fc87eff0d38b47f3315fa02ba493a83d8e782d1
  ```



  The toolkit maintains an MPC wallet that persists between sessions:

  ```python

  wallet_data = cdp.export_wallet()


  values = {"cdp_wallet_data": wallet_data}
  cdp = CdpAgentkitWrapper(**values)
  ```


  The toolkit supports [multiple networks](https://docs.cdp.coinbase.com/cdp-sdk/docs/networks).


  The following operations support gasless transactions on Base Mainnet:
  - USDC transfers
  - EURC transfers
  - cbBTC transfers


  See [CONTRIBUTING.md](../CONTRIBUTING.md) for detailed setup instructions and contribution guidelines.


pkgId: 49186a31ff41e02e65c8db136ec882cf9a8a9ef46342c9b780aed856f9274e16
name: python-cdp-scrapers
arch: src
version: 0.8.1
epoch: 0
release: 1
summary: Scratchpad for scraper development and general utilities.
url: https://github.com/CouncilDataProject/cdp-scrapers
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdp-scrapers-0.8.1-1.src.rpm
checksum_type: sha256
description:
  **Stable Release:** `pip install cdp-scrapers`<br>
  **Development Head:** `pip install git+https://github.com/CouncilDataProject/cdp-scrapers.git`

  Council Data Project is an open-source project dedicated to providing journalists,
  activists, researchers, and all members of each community we serve with the tools they
  need to stay informed and hold their Council Members accountable.
  For more information about Council Data Project, please visit
  [our website](https://councildataproject.org/).

  `cdp-scrapers` is a collection of utilities and in-progress or actively maintained
  CDP instance event scrapers. The purpose of this library is to help new CDP instance
  maintainers have a quick plethora of examples for getting started on developing their
  event scraper functions.


  General Legistar utility functions.
  ```python
  from cdp_scrapers.legistar_utils import get_legistar_events_for_timespan
  from cdp_scrapers.instances import get_seattle_events
  from datetime import datetime



  seattle_legistar_events = get_legistar_events_for_timespan(
      client="seattle",
      timezone="America/Los_Angeles",
      start=datetime(2021, 7, 12),
      end=datetime(2021, 7, 14),
  )

  seattle_cdp_parsed_events = get_seattle_events(
      from_dt=datetime(2021, 7, 12),
      to_dt=datetime(2021, 7, 14),
  )
  ```


  Our current event scraper structure is as follows. The main function `get_events`
  gets all the required data and it calls the `get_content_uris` function to return the
  required video data.
  If your city uses Legistar and the Legistar data is publicly available.
  - You may be able to reuse our scraper with minimal modifications, such as providing the
  correct Legistar client ID for your municipality.
  - If the Legistar data returned only does not include the EventVideoPath field for the
  `Session.video_uri` data, you will only need to implement `get_content_uris`.
  If your city does not use Legistar.
  - You will need to build your own event scraper.
  Example of a completed scraper: [cdp_scrapers.instances.seattle.SeattleScraper](https://councildataproject.org/cdp-scrapers/_modules/cdp_scrapers/instances/seattle.html#SeattleScraper)
  For more details about creating a custom scraper for your municipality's Legistar data,
  please visit [here](https://councildataproject.org/cdp-scrapers/legistar_scraper.html).
  If you would like to deploy a CDP instance or would like to use this library as a
  method for retrieving formatted legislative data, please feel free to contribute a new
  custom municipality scraper!

  If it isn't possible to use our generalized Legistar tooling to write your scraper,
  you will need to create your own event scraper to proceed with the deployment.
  1. Please see our documentation on the
  [minimum data required for CDP event ingestion](https://councildataproject.org/cdp-backend/ingestion_models.html)
  to understand what data your scraper should return.
  2. From there, begin with our
  [empty custom scraper function template](https://councildataproject.org/cdp-scrapers/_modules/cdp_scrapers/instances/empty.html#get_events)
  and fill in your scraper.
  3. After your scraper is completed, you can create a pull request to add your scraper
  into the [cdp-scrapers repo](https://github.com/CouncilDataProject/cdp-scrapers)
  so it can be added into the final repo for your CDP instance.
  4. Our automated action will run your scraper to verify it returns the correct data.
  If it is successful, you may proceed to the next deployment step. If not, we will
  automatically share the error message so you can fix the issue and the scraper can be
  tested again afterwards.

  **Stable Release:** `pip install cdp-scrapers`<br>
  **Development Head:** `pip install git+https://github.com/CouncilDataProject/cdp-scrapers.git`

  For full package documentation please visit [councildataproject.org/cdp-scrapers](https://councildataproject.org/cdp-scrapers).

  Refer to [CONTRIBUTING.md](CONTRIBUTING.md) for information related to developing the code.
  **MPLv2 License**


pkgId: 7627ff9e8288d21499d9ac0d74ec66e6f5354b71fcafe8388c5feac72c2f30cc
name: python-cdp-sdk
arch: src
version: 0.10.4
epoch: 0
release: 1
summary: CDP Python SDK
url: https://docs.cdp.coinbase.com/cdp-sdk/docs/welcome
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdp-sdk-0.10.4-1.src.rpm
checksum_type: sha256
description:
  The CDP Python SDK enables the simple integration of crypto into your app.
  By calling Coinbase's CDP APIs, the SDK allows you to provision crypto wallets,
  send crypto into/out of those wallets, track wallet balances, and trade crypto from
  one asset into another.

  **CDP SDK v0 is a pre-alpha release, which means that the APIs and SDK methods are subject to change. We will continuously release updates to support new capabilities and improve the developer experience.**



  - [CDP API Documentation](https://docs.cdp.coinbase.com/platform-apis/docs/welcome)
  - [CDP SDK Python Documentation](https://coinbase.github.io/cdp-sdk-python/)



  - Python 3.10+



  Before using the SDK, ensure that you have the correct version of Python installed. The SDK requires Python 3.10 or higher. You can check your Python version by running the following code:

  ```bash
  python --version
  pip --version
  ```

  If you need to upgrade your Python version, you can download and install the latest version of Python from the [official Python website](https://www.python.org/downloads/).
  For `pip`, refer to the [official pip documentation](https://pip.pypa.io/en/stable/installation/) for installation instructions.



  ```bash
  pip install cdp-sdk
  ```



  To start a Python REPL:

  ```bash
  python
  ```





  To start, [create a CDP API key](https://portal.cdp.coinbase.com/access/api). Then, initialize the CDP SDK by passing your API key name and API key's private key via the `configure` method:

  ```python
  from cdp import *

  api_key_name = "Copy your API key name here."

  api_key_private_key = "Copy your API key's private key here."

  Cdp.configure(api_key_name, api_key_private_key)

  print("CDP SDK has been successfully configured with CDP API key.")
  ```

  Another way to initialize the SDK is by sourcing the API key from the JSON file that contains your API key,
  downloaded from the CDP portal.

  ```python
  Cdp.configure_from_json("~/Downloads/cdp_api_key.json")

  print("CDP SDK has been successfully configured from JSON file.")
  ```

  This will allow you to authenticate with the Platform APIs.

  If you are using a CDP [Server-Signer](https://docs.cdp.coinbase.com/mpc-wallet/docs/serversigners) to manage your private keys, enable it with

  ```python
  Cdp.use_server_signer = True
  ```

  Now create a wallet. Wallets are created with a single default address.

  ```python

  wallet1 = Wallet.create()

  print(f"Wallet successfully created: {wallet1}")
  ```

  Wallets come with a single default address, accessible via `default_address`:

  ```python

  address = wallet1.default_address
  ```



  Wallets do not have funds on them to start. For Base Sepolia testnet, we provide a `faucet` method to fund your wallet with
  testnet ETH. You are allowed one faucet claim per 24-hour window.

  ```python

  faucet_tx = wallet1.faucet()


  faucet_tx.wait()

  print(f"Faucet transaction successfully completed: {faucet_tx}")
  ```



  See [Transfers](https://docs.cdp.coinbase.com/wallets/docs/transfers) for more information.

  Now that your faucet transaction has successfully completed, you can send the funds in your wallet to another wallet.
  The code below creates another wallet, and uses the `transfer` function to send testnet ETH from the first wallet to
  the second:

  ```python

  wallet2 = Wallet.create()

  print(f"Wallet successfully created: {wallet2}")

  transfer = wallet1.transfer(0.00001, "eth", wallet2).wait()

  print(f"Transfer successfully completed: {transfer}")
  ```



  To transfer USDC without needing to hold ETH for gas, you can use the `transfer` method with the `gasless` option set to `True`.

  ```python

  wallet3 = Wallet.create()

  print(f"Wallet successfully created: {wallet3}")


  usdc_faucet_tx = wallet1.faucet("usdc")


  usdc_faucet_tx.wait()

  print(f"Faucet transaction successfully completed: {usdc_faucet_tx}")

  transfer = wallet1.transfer(0.00001, "usdc", wallet3, gasless=True).wait()
  ```



  ```python

  list(address.transfers())
  ```



  See [Trades](https://docs.cdp.coinbase.com/wallets/docs/trades) for more information.

  ```python
  wallet = Wallet.create("base-mainnet")

  print(f"Wallet successfully created: {wallet}")
  print(f"Send `base-mainnet` ETH to wallets default address: {wallet.default_address.address_id}")

  trade = wallet.trade(0.00001, "eth", "usdc").wait()

  print(f"Trade successfully completed: {trade}")
  ```



  ```python

  list(address.trades())
  ```



  The SDK creates wallets with [Developer-Managed (1-1)](https://docs.cdp.coinbase.com/mpc-wallet/docs/wallets#developer-managed-wallets) keys by default, which means you are responsible for securely storing the keys required to re-instantiate wallets. The below code walks you through how to export a wallet and store it in a secure location.

  ```python

  data = wallet.export_data()
  ```

  In order to persist the data for the wallet, you will need to implement a store method to store the data export in a secure location. If you do not store the wallet in a secure location you will lose access to the wallet and all of the funds on it.

  ```python



  store(data.to_dict())
  ```

  For convenience during testing, we provide a `save_seed` method that stores the wallet's seed in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes.

  To encrypt the saved data, set encrypt to `True`. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking `save_seed` and `load_seed`.

  ```python

  file_path = "my_seed.json"


  wallet.save_seed(file_path, encrypt=True)

  print(f"Seed for wallet {wallet.id} successfully saved to {file_path}.")
  ```

  The below code demonstrates how to re-instantiate a wallet from the data export.

  ```python


  fetched_data = fetch(wallet.id)


  imported_wallet = Wallet.import_data(fetched_data)
  ```

  To import Wallets that were persisted to your local file system using `save_seed`, use the below code.

  ```python

  fetched_wallet = Wallet.fetch(wallet.id)



  fetched_wallet.load_seed(file_path)
  ```


  A webhook is a way to provide other applications with real-time information from the blockchain. When an event occurs on a blockchain address, it can send a POST request to a URL you specify. You can create a webhook to receive notifications about events that occur in your wallet or crypto address, such as when a user makes a transfer.
  ```python
  from cdp.client.models.webhook import WebhookEventType
  from cdp.client.models.webhook import WebhookEventFilter

  wh1 = Webhook.create(
      notification_uri="https://your-app.com/callback",
      event_type=WebhookEventType.ERC20_TRANSFER,
      event_filters=[WebhookEventFilter(from_address="0x71d4d7d5e9ce0f41e6a68bd3a9b43aa597dc0eb0")]
  )
  print(wh1)
  ```


  A webhook can be attached to an existing wallet to monitor events that occur on the wallet, i.e. all addresses associated with this wallet. A list of supported blockchain events can be found [here](https://docs.cdp.coinbase.com/get-started/docs/webhooks/event-types).
  ```python
  import cdp

  wallet1 = Wallet.create()
  wh1 = wallet1.create_webhook("https://your-app.com/callback")
  print(wh1)
  ```


  Examples, demo apps, and further code samples can be found in the [CDP SDK Python Documentation](https://docs.cdp.coinbase.com/cdp-apis/docs/welcome).



  See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.

rpm_license:
  Apache-2.0 License  Copyright 2024 Coinbase  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: 2e018e8d49466bb4b74869f2a9a68daa5951a6d42929e5e42dffe58b8e029ae7
name: python-cdp-sdk
arch: src
version: 0.12.0
epoch: 0
release: 1
summary: CDP Python SDK
url: https://pypi.org/project/cdp-sdk/
rpm_license: LICENSE.md
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdp-sdk-0.12.0-1.src.rpm
checksum_type: sha256
description:
  The CDP Python SDK enables the simple integration of crypto into your app.
  By calling Coinbase's CDP APIs, the SDK allows you to provision crypto wallets,
  send crypto into/out of those wallets, track wallet balances, and trade crypto from
  one asset into another.

  **CDP SDK v0 is a pre-alpha release, which means that the APIs and SDK methods are subject to change. We will continuously release updates to support new capabilities and improve the developer experience.**



  - [CDP API Documentation](https://docs.cdp.coinbase.com/platform-apis/docs/welcome)
  - [CDP SDK Python Documentation](https://coinbase.github.io/cdp-sdk-python/)



  - Python 3.10+
  - Poetry for package management and tooling
    - [Poetry Installation Instructions](https://python-poetry.org/docs/#installation)



  Before using the SDK, ensure that you have the correct version of Python installed. The SDK requires Python 3.10 or higher. You can check your Python version by running the following code:

  ```bash
  python --version
  pip --version
  ```

  If you need to upgrade your Python version, you can download and install the latest version of Python from the [official Python website](https://www.python.org/downloads/).
  For `pip`, refer to the [official pip documentation](https://pip.pypa.io/en/stable/installation/) for installation instructions.



  ```bash
  pip install cdp-sdk
  ```

  if you prefer to manage dependencies with Poetry:
  ```bash
  poetry add cdp-sdk
  ```



  To start a Python REPL:

  ```bash
  python
  ```





  To start, [create a CDP API key](https://portal.cdp.coinbase.com/access/api). Then, initialize the CDP SDK by passing your API key name and API key's private key via the `configure` method:

  ```python
  from cdp import *

  api_key_name = "Copy your API key name here."

  api_key_private_key = "Copy your API key's private key here."

  Cdp.configure(api_key_name, api_key_private_key)

  print("CDP SDK has been successfully configured with CDP API key.")
  ```

  Another way to initialize the SDK is by sourcing the API key from the JSON file that contains your API key,
  downloaded from the CDP portal.

  ```python
  Cdp.configure_from_json("~/Downloads/cdp_api_key.json")

  print("CDP SDK has been successfully configured from JSON file.")
  ```

  This will allow you to authenticate with the Platform APIs.

  If you are using a CDP [Server-Signer](https://docs.cdp.coinbase.com/mpc-wallet/docs/serversigners) to manage your private keys, enable it with

  ```python
  Cdp.use_server_signer = True
  ```

  Now create a wallet. Wallets are created with a single default address.

  ```python

  wallet1 = Wallet.create()

  print(f"Wallet successfully created: {wallet1}")
  ```

  Wallets come with a single default address, accessible via `default_address`:

  ```python

  address = wallet1.default_address
  ```



  Wallets do not have funds on them to start. For Base Sepolia testnet, we provide a `faucet` method to fund your wallet with
  testnet ETH. You are allowed one faucet claim per 24-hour window.

  ```python

  faucet_tx = wallet1.faucet()


  faucet_tx.wait()

  print(f"Faucet transaction successfully completed: {faucet_tx}")
  ```



  See [Transfers](https://docs.cdp.coinbase.com/wallets/docs/transfers) for more information.

  Now that your faucet transaction has successfully completed, you can send the funds in your wallet to another wallet.
  The code below creates another wallet, and uses the `transfer` function to send testnet ETH from the first wallet to
  the second:

  ```python

  wallet2 = Wallet.create()

  print(f"Wallet successfully created: {wallet2}")

  transfer = wallet1.transfer(0.00001, "eth", wallet2).wait()

  print(f"Transfer successfully completed: {transfer}")
  ```



  To transfer USDC without needing to hold ETH for gas, you can use the `transfer` method with the `gasless` option set to `True`.

  ```python

  wallet3 = Wallet.create()

  print(f"Wallet successfully created: {wallet3}")


  usdc_faucet_tx = wallet1.faucet("usdc")


  usdc_faucet_tx.wait()

  print(f"Faucet transaction successfully completed: {usdc_faucet_tx}")

  transfer = wallet1.transfer(0.00001, "usdc", wallet3, gasless=True).wait()
  ```



  ```python

  list(address.transfers())
  ```



  See [Trades](https://docs.cdp.coinbase.com/wallets/docs/trades) for more information.

  ```python
  wallet = Wallet.create("base-mainnet")

  print(f"Wallet successfully created: {wallet}")
  print(f"Send `base-mainnet` ETH to wallets default address: {wallet.default_address.address_id}")

  trade = wallet.trade(0.00001, "eth", "usdc").wait()

  print(f"Trade successfully completed: {trade}")
  ```



  ```python

  list(address.trades())
  ```



  The SDK creates wallets with [Developer-Managed (1-1)](https://docs.cdp.coinbase.com/mpc-wallet/docs/wallets#developer-managed-wallets) keys by default, which means you are responsible for securely storing the keys required to re-instantiate wallets. The below code walks you through how to export a wallet and store it in a secure location.

  ```python

  data = wallet.export_data()
  ```

  In order to persist the data for the wallet, you will need to implement a store method to store the data export in a secure location. If you do not store the wallet in a secure location you will lose access to the wallet and all of the funds on it.

  ```python



  store(data.to_dict())
  ```

  For convenience during testing, we provide a `save_seed` method that stores the wallet's seed in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes.

  To encrypt the saved data, set encrypt to `True`. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking `save_seed` and `load_seed`.

  ```python

  file_path = "my_seed.json"


  wallet.save_seed(file_path, encrypt=True)

  print(f"Seed for wallet {wallet.id} successfully saved to {file_path}.")
  ```

  The below code demonstrates how to re-instantiate a wallet from the data export.

  ```python


  fetched_data = fetch(wallet.id)


  imported_wallet = Wallet.import_data(fetched_data)
  ```

  To import Wallets that were persisted to your local file system using `save_seed`, use the below code.

  ```python

  fetched_wallet = Wallet.fetch(wallet.id)



  fetched_wallet.load_seed(file_path)
  ```


  A webhook is a way to provide other applications with real-time information from the blockchain. When an event occurs on a blockchain address, it can send a POST request to a URL you specify. You can create a webhook to receive notifications about events that occur in your wallet or crypto address, such as when a user makes a transfer.
  ```python
  from cdp.client.models.webhook import WebhookEventType
  from cdp.client.models.webhook import WebhookEventFilter

  wh1 = Webhook.create(
      notification_uri="https://your-app.com/callback",
      event_type=WebhookEventType.ERC20_TRANSFER,
      event_filters=[WebhookEventFilter(from_address="0x71d4d7d5e9ce0f41e6a68bd3a9b43aa597dc0eb0")]
  )
  print(wh1)
  ```


  A webhook can be attached to an existing wallet to monitor events that occur on the wallet, i.e. all addresses associated with this wallet. A list of supported blockchain events can be found [here](https://docs.cdp.coinbase.com/get-started/docs/webhooks/event-types).
  ```python
  import cdp

  wallet1 = Wallet.create()
  wh1 = wallet1.create_webhook("https://your-app.com/callback")
  print(wh1)
  ```


  Examples, demo apps, and further code samples can be found in the [CDP SDK Python Documentation](https://docs.cdp.coinbase.com/cdp-apis/docs/welcome).



  See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.


pkgId: ebf216e18ad93b29a253405c56cfa8018632a3762b56da3afedf843430393949
name: python-cdp-socket
arch: src
version: 1.2.8
epoch: 0
release: 1
summary: socket for handling chrome-developer-protocol connections
url: https://github.com/kaliiiiiiiiii/CDP-Socket
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdp-socket-1.2.8-1.src.rpm
checksum_type: sha256
description:
  * Handle [Chrome-Developer-Protocol](https://chromedevtools.github.io/devtools-protocol/) connections







  * [Python >= 3.7](https://www.python.org/downloads/)
  * [Chrome-Browser](https://www.google.de/chrome/) installed



  * [Windows] Install [Chrome-Browser](https://www.google.de/chrome/)
  * ```pip install cdp-socket```


  ```python
  from cdp_socket.utils.utils import launch_chrome, random_port
  from cdp_socket.utils.conn import get_websock_url

  from cdp_socket.socket import SingleCDPSocket

  import os
  import asyncio


  async def main():
      data_dir = os.getcwd()+"/data_dir"
      PORT = random_port()
      process = launch_chrome(data_dir,PORT)

      websock_url = await get_websock_url(PORT, timeout=5)
      async with SingleCDPSocket(websock_url, timeout=5) as sock:
          targets = await sock.exec("Target.getTargets")
          print(targets)

      os.kill(process.pid, 15)


  asyncio.run(main())
  ```


  ```python
  from cdp_socket.socket import SingleCDPSocket

  def on_closed(code, reason):
      print("Closed with: ", code, reason)

  async with SingleCDPSocket(websock_url, timeout=5) as sock:
      sock.on_closed.append(on_closed)
      
      targets = await sock.exec("Target.getTargets")
      print(targets)
  ```


  ```python
  from cdp_socket.socket import SingleCDPSocket
  import asyncio

  def on_detached(params):
      print("Detached with: ", params)

  async with SingleCDPSocket(websock_url, timeout=5) as sock:
          
          sock.add_listener('Inspector.detached', on_detached)
          await asyncio.sleep(1000)
  ```


  ```python
  from cdp_socket.socket import SingleCDPSocket

  async with SingleCDPSocket(websock_url, timeout=5) as sock:
      async for i in sock.method_iterator('Inspector.detached'):
          print(i)
          break
  ```


  ```python
  from cdp_socket.socket import SingleCDPSocket

  async with SingleCDPSocket(websock_url, timeout=5) as sock:
      res = await sock.wait_for('Inspector.detached')
      print(res)
  ```


  ```python
  from cdp_socket.utils.utils import launch_chrome, random_port
  from cdp_socket.utils.conn import get_websock_url

  from cdp_socket.socket import SingleCDPSocket

  import os
  import shutil
  import asyncio

  data_dir = os.getcwd()+"/data_dir"
  PORT = random_port()
  process = launch_chrome(data_dir,PORT)

  loop = asyncio.get_event_loop()
  websock_url = loop.run_until_complete(get_websock_url(PORT, timeout=5))

  conn = loop.run_until_complete(SingleCDPSocket(websock_url, timeout=5, loop=loop))
  targets = loop.run_until_complete(conn.exec("Target.getTargets"))
  print(targets)

  os.kill(process.pid, 15)
  shutil.rmtree(data_dir)
  ```


  ```python
  from cdp_socket.utils.utils import launch_chrome, random_port
  from cdp_socket.socket import CDPSocket

  import os
  import asyncio

  async def main():
      data_dir = os.getcwd()+"/data_dir"
      PORT = random_port()
      process = launch_chrome(data_dir,PORT)

      async with CDPSocket(PORT) as base_socket:
          targets = await base_socket.targets
          sock1 = await base_socket.get_socket(targets[0])
          targets = await sock1.exec("Target.getTargets")
          print(targets)
      os.kill(process.pid, 15)


  asyncio.run(main())
  ```


  You can implement custom exception handling as following

  ```python
  import cdp_socket
  import sys

  sys.modules["cdp_socket"].EXC_HANDLER = lambda e: print(f'Exception in event-handler:\n{e.__class__.__module__}.{e.__class__.__name__}: {e}', file=sys.stderr)
  ```



  Please feel free to open an issue or fork!


  On a Win10 Laptop

  executing `"Browser.getVersion"`
  ```
  Static benchmark:
  passed 3_640.0 mB  in 2.74 s, 13_308.958 mB/sec
  3_656 (each 364 bytes) exec per sec.
  ```
  for returning a big (static) object over javascript
  ```
  JS benchmark:
  passed 22_990.0 mB in 3.16 s, 7_284.5374 mB/sec
  1_584 (each 4.598 mB) exec (JS) per s
  ```




  [Aurin Aegerter](mailto:aurinliun@gmx.ch)



  I am not responsible what you use the code for!!! Also no warranty!



  Inspiration, code snippets, etc.
  - [Chrome-Developer-Protocol](https://chromedevtools.github.io/devtools-protocol/)



  - thanks to [@Redrrx](https://github.com/Redrrx) who gave me some starting-points


pkgId: b722f0b68d6fa4d1c30c5318e9941cdcd194a50d5a75be78c3e43d06ab5f27dc
name: python-cdpcli
arch: src
version: 0.9.124
epoch: 0
release: 1
summary: Cloudera CDP Command Line Interface
url: https://console.cdp.cloudera.com/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdpcli-0.9.124-1.src.rpm
checksum_type: sha256
description:
  This package provides a unified command line interface to the Cloudera Data
  Platform (CDP) control plane API.



  * Python 3.6 or higher

  Earlier versions of Python are no longer supported for new releases, as of
  January 2021. Previous CLI releases shall continue to work under earlier Python
  versions.

  Starting with version 0.9.24, the requests and urllib3 libraries are no longer
  bundled with the CLI. When upgrading, watch for those new dependencies to be
  installed.



  To install using `pip` from the
  [cdpcli PyPI project](https://pypi.org/project/cdpcli/):

  ```
  $ pip install cdpcli
  ```

  To install from source:

  ```
  $ git clone git@github.com:cloudera/cdpcli.git
  $ cd cdpcli
  $ pip install .
  ```



  An alternative CLI exposing beta functionality is available in its own package.

  ```
  $ pip install cdpcli-beta
  ```

  Do not install both the regular and beta CLIs in the same Python environment,
  as they use the same entry points and therefore conflict.

  Any features exposed in the beta CLI that are not available in the regular CLI
  are still under development. They are not yet supported, may not work, and are
  subject to change in incompatible ways, including removal. Do not rely on beta
  features for production use.



  API calls through the CDP CLI require a key pair issued from the CDP control
  plane. Use the CDP console to generate keys, following [documented
  instructions](https://docs.cloudera.com/cdp/latest/cli/topics/mc-cli-generating-an-api-access-key.html).
  Then, run `cdp configure` to provide the credentials to the CLI.

  ```
  $ cdp configure
  CDP Access Key ID [None]: xxx
  CDP Private Key [None]: yyy
  ```

  Credentials are stored under the "default" profile in *$HOME/.cdp/credentials*,
  using the ini file format.

  ```
  [default]
  cdp_access_key_id = xxx
  cdp_private_key = yyy
  ```



  If you need to access the API as more than one user, set up a named profile for
  each user. Each profile stores a separate set of credentials.

  ```
  $ cdp configure --profile my-other-user
  ```

  The credentials for a profile are stored in *$HOME/.cdp/credentials* under a
  section named for the profile.



  An alternative to storing credentials in *$HOME/.cdp/credentials* is to pass
  them using the environment variables `CDP_ACCESS_KEY_ID` and `CDP_PRIVATE_KEY`.
  However, these variables are ignored when the `--profile` option is used when
  running the CLI (see below).



  The CLI may be used to access
  [CDP Private Cloud](https://docs.cloudera.com/cdp-private-cloud/latest/overview/topics/cdppvc-overview.html)
  control planes. Contact your control plane administrator to obtain the required
  base endpoint URL value for your installation. Set the value in
  *$HOME/.cdp/config*, another configuration file that uses the ini file format.
  Create a section named for the profile which should work with the private cloud
  control plane.

  ```
  [profile private1]
  cdp_endpoint_url = https://cdp-private.example.com
  ```

  The CLI guesses whether it is using CDP Public Cloud or CDP Private Cloud based
  on the base endpoint URL. If you find that it is guessing incorrectly, you can
  configure use of either *form factor* in *$HOME/.cdp/config*. Valid form factor
  values are "public" and "private".

  ```
  [profile private1]
  form_factor = private
  ```



  Basic syntax:

  ```
  cdp [options] <command> <subcommand> [parameters]
  ```

  Examples:

  ```
  $ cdp iam get-user
  $ cdp environments describe-environments --environment-name myenv1
  ```



  For general help, use any of these commands.

  ```
  $ cdp help
  $ cdp --help
  $ cdp # no arguments
  ```

  Most CLI commands correspond to API services. Subcommands correspond to
  operations in services.

  * For help on any command, run its `help` subcommand, or pass the `--help` parameter.
  * For help on any subcommand, pass the `help` or `--help` parameter.

  The same help content is available in online
  [API documentation](https://cloudera.github.io/cdp-dev-docs/api-docs/).



  By default, the CLI uses credentials in the "default" profile. Use a different
  profile by passing the `--profile` option.

  ```
  $ cdp --profile my-other-user iam get-user
  ```



  By default, the CLI works with
  [CDP Public Cloud](https://docs.cloudera.com/cdp/latest/overview/topics/cdp-overview.html)
  and calculates API endpoints accordingly. If you are using CDP Private Cloud, be
  sure to provide the base endpoint URL for your private cloud control plane. You
  can do so by setting it in *$HOME/.cdp/config* for the desired profile, or
  through the `--endpoint-url` option, which supersedes the configuration.

  ```
  $ cdp --endpoint-url https://other.cdp-private.example.com ...
  ```

  The CLI guesses whether it is using CDP Public Cloud or CDP Private Cloud based
  on the base endpoint URL. If you find that it is guessing incorrectly, you can
  force use of either *form factor* by either setting it in *$HOME/.cdp/config*
  for the desired profile, or through the `--form-factor` option, which supersedes
  the configuration. Specifying a form factor does not alter the base endpoint URL
   in use.

  ```
  $ cdp --form-factor private ...
  ```



  The CDP CLI is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
  with a [supplemental license disclaimer](https://console.cdp.cloudera.com/downloads/LICENSE_SUPPLEMENTAL_DISCLAIMER.txt).


pkgId: 00f322a1a6e5e52aaf3127bc0a440ac4a1d7b8f4922522000bfbbb106e69d72d
name: python-cdps
arch: src
version: 1.0.18
epoch: 0
release: 1
summary: Composite Disaster Prevention Server
url: https://pypi.org/project/cdps/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdps-1.0.18-1.src.rpm
checksum_type: sha256
description:
  - 複合式防災伺服器
  **中文** | [日本語](https://github.com/ExpTechTW/CDPS/blob/master/README-ja.md)

  - [環境](#環境)
  - [開始](#開始)
    - [安裝](#安裝)
    - [初始化](#初始化)
  - [更新](#更新)
  - [目錄樹](#目錄樹)
  - [擴充](#擴充)
  - [貢獻者](#貢獻者)
  - [發佈規則](#發佈規則)
  - [合作](#合作)

  > [!WARNING]
  > 3.10.0 為 `開發環境` 其他版本未經測試
  - `Python 3.10.0 (AMD64 on win32)`


  ```
  pip install cdps
  ```

  ```
  cd ./my_cdps
  cdps init
  ```

  ```
  cdps
  ```

  ```
  pip install --upgrade cdps
  ```

  - [directory tree](https://github.com/ExpTechTW/CDPS/blob/master/docs/zh/developer/tree.md)

  - [plugins](https://github.com/ExpTechTW/CDPS/blob/master/docs/zh/user/plugins.md)

  - whes1015 `程式開發` `文檔`
  - yayacat `程式開發` `文檔`
  - PiscesXD `程式開發` `文檔`


pkgId: 4c681bb1a37ad8bcc5b19fd2f1cf6f54fb0237d9d143a994918393dc938b12ba
name: python-cdqspy
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: climate-data-query-service.
url: https://gitee.com/yingzi1/highlyquery.git
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdqspy-0.1.0-1.src.rpm
checksum_type: sha256
description:
  本组件旨在使用Python查询和处理存储在NetCDF（.nc）文件中的气候业务数据，特别利用xarray库和其他第三方库进行高效的数据操作和分析。



  - 读取包含气候数据的NetCDF文件。
  - 利用xarray处理多维数据。
  - 集成其他第三方库以扩展功能。
  - 提供简单的数据查询和处理接口。



  开始之前，请确保满足以下要求：

  - Python（≥3.9版本）
  - 安装了xarray库
  - 安装了其他第三方库（指定名称和版本）
  - 安装了NetCDF4库以处理.nc文件



  ```
  pip install highlyQuery -i https://pypi.org/project
  ```

  你可以使用pip安装所需的库：

  ```bash
  pip install xarray netCDF4 TODO


pkgId: 790d1a82473774136dcdbccaa6de09f3bf63f68f1881b459fef553752ffcdb76
name: python-cdrc
arch: src
version: 0.1.15
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cdrc/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdrc-0.1.15-1.src.rpm
checksum_type: sha256
description:
  `cdrc` is a Python wrapper client library designed to connect to the CriticalMAAS Data Repository (CDR) and programmatically pull data. It can build GeoJSON files and GeoPackages for features extracted from COGs (Cloud Optimized GeoTIFF files of maps).

  All georeferenced data returned will be in ESPG:4326 projection. Projected maps used to georeference features will be returned as the original projection they were projected with.

  CDR github:
  https://github.com/DARPA-CRITICALMAAS/cdr



  - Connect to the CDR with a token
  - Pull data programmatically from COGs
  - Build GeoJSON files
  - Build GeoPackages
  - Download COG images in pixel space and projected COGs if features are projected



  To install the `cdrc` library, use pip:

  ```
  pip install cdrc
  ```



  To import the library and set up the client:
  ```
  import cdrc

  client = cdrc.CDRClient(token="your bearer token")
  ```
  If you want to view data for a specific cog you can use the client.build_cog_geopackages function. It will download data from the cdr and convert it to a ready to use geopackage or geojson files you can load directly into QGIS.

  This query can return a lot of data and take a long time to complete so if you only care about certain feature types or data from specific system/versions those should be set.

  Parameters:

  **cog_id**: Cog id.

  **feature_types**: An array of the features you want. Options are: line, point, polygon.

  **system_versions**: An array of tuples with system and system_version. An empty array will return results from all systems.

  **validated**: Return validated features or not validated. None will return both validated and not validated features/legend_items.

  ```
  cog_id = "specify what cog you want"
  system =  "system_name"
  system_version = "0.0.1"

  client.build_cog_geopackages(
      cog_id=cog_id,
      feature_types=['polygon', 'point', 'line'],
      system_versions=[(system, system_version)],
      validated=None
  )
  ```


  If you want to view data for a specific CMA area you can use the client.build_cma_geopackages function. It will download data from the cdr and convert it to a ready to use geopackage or geojson files you can load directly into QGIS.

  This query can return a lot of data and take a long time to complete so if you only care about certain feature types or data from specific system/versions those should be set.

  Parameters:

  **cog_ids**: List of cog ids that you want results for.

  **feature_type**: Provide an the type of feature you want. Options are line, point, polygon.

  **system_versions**: An array of tuples with system and system_version. An empty array will return results from all systems

  **validated**: Return validated features or not validated. None will return both validated and not validated features.

  **search_text**: String to be searched over the Legend description/label/abbreviation fields.

  **intersect_polygon**: Geojson polygon to intersect over the features. EPSG:4326

  **cma_name**: Name of the output folder for this search.

  ```
  cog_ids = ["specify list of cogs you want","..."]

  client.build_cma_geopackages(
      cog_ids=cog_ids,
      feature_type='line',
      system_versions=[(system, system_version)],
      validated=None,
      search_text="",
      intersect_polygon= {
          "type": "Polygon",
          "coordinates": [
              [
                  [-94.23558192118045, 48.0],
                  [-94.24500827925175, 48.0],
                  [-94.24500827925175, 49.0],
                  [-95.24500827925175, 49.0],
                  [-95.24500827925175, 48.0],
                  [-94.23558192118045, 48.0]
              ]
          ]
          },
      cma_name="cma_test"
  )
  ```


pkgId: 771e162c58ba8c59b08d8482fe3d88351ef9f02d87cad9b0b43ad6cfd232d5eb
name: python-cdrouter
arch: src
version: 0.9.7
epoch: 0
release: 1
summary: Python client for the CDRouter Web API
url: https://github.com/qacafe/cdrouter.py
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdrouter-0.9.7-1.src.rpm
checksum_type: sha256
description:
  Simple Python wrapper for the CDRouter Web
  API. https://support.qacafe.com/cdrouter/cdrouter-web-api/
  For more information on CDRouter, please visit http://www.qacafe.com/.


pkgId: 35f3266c1247b7fc9bdbcb9e9be3520bdfa0ae2cf57af0c7c33d06a0bb02cbdb
name: python-cdscore
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: Cloudisense core modules
url: https://pypi.org/project/cdscore/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdscore-0.0.1-1.src.rpm
checksum_type: sha256
description:
  Cloudisense core files. These files are required by the Cloudisense main program for core functionality and is also contains class files shared with other components. This can also be used as a dependency when building modules for cloudisense.



  * Intents
  * Actions
  * Events
  * Exceptions
  * Helpers
  * Core components
  * Reaction Rules




  ```bash
  pip install cdscore
  ```




  * [tornado] (https://www.tornadoweb.org/en/stable/)
  * [smalluuid] (https://pypi.org/project/smalluuid/)
  * [typing-extensions] (https://pypi.org/project/typing-extensions/)
  * [jsonschema] (https://pypi.org/project/jsonschema/)


pkgId: 781d8ef16ff0906b43f46fb67047ce874ef79eac032e660c9aa1e2332e528a9f
name: python-cdsetool
arch: src
version: 0.2.13
epoch: 0
release: 1
summary: Tools & CLI for interacting with CDSE product APIs
url: https://github.com/CDSETool/CDSETool
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdsetool-0.2.13-1.src.rpm
checksum_type: sha256
description:
  This script downloads copernicus data from the Copernicus Data Space Ecosystem



  ```python
  from cdsetool.query import query_features, shape_to_wkt
  from cdsetool.credentials import Credentials
  from cdsetool.download import download_features
  from cdsetool.monitor import StatusMonitor
  from datetime import date

  features = query_features(
      "Sentinel1",
      {
          "startDate": "2020-12-20",
          "completionDate": date(2020, 12, 25),
          "processingLevel": "LEVEL1",
          "sensorMode": "IW",
          "productType": "IW_GRDH_1S",
          "geometry": shape_to_wkt("path/to/shapefile.shp"),
      },
  )

  list(
      download_features(
          features,
          "path/to/output/folder/",
          {
              "concurrency": 4,
              "monitor": StatusMonitor(),
              "credentials": Credentials("username", "password"),
          },
      )
  )
  ```

  Or use the CLI:

  ```bash
  cdsetool query search Sentinel2 --search-term startDate=2020-01-01 --search-term completionDate=2020-01-10 --search-term processingLevel=S2MSI2A --search-term box="4","51","4.5","52"

  cdsetool download Sentinel2 PATH/TO/DIR --concurrency 4 --search-term startDate=2020-01-01 --search-term completionDate=2020-01-10 --search-term processingLevel=S2MSI2A --search-term box="4","51","4.5","52"
  ```



  - [CDSETool](#cdsetool)
    * [About CDSETool](#about-cdsetool)
    * [Quick Start](#quick-start)
    * [Table of Contents](#table-of-contents)
    * [Installatson](#installation)
    * [Usage](#usage)
      + [Querying features](#querying-features)
        - [Querying by shapes](#querying-by-shapes)
        - [Querying by lists of parameters](#querying-by-lists-of-parameters)
        - [Querying by dates](#querying-by-dates)
        - [Listing search terms](#listing-search-terms)
      + [Downloading features](#downloading-features)
        - [Authenticating](#authenticating)
        - [Concurrently downloading features](#concurrently-downloading-features)
        - [Sequentially downloading features](#sequentially-downloading-features)
    * [Roadmap](#roadmap)
    * [Contributing](#contributing)
    * [LICENSE](#license)



  Install `cdsetool` using pip:

  ```bash
  pip install cdsetool==0.2.13
  ```





  Querying is always done in batches, returning `len(results) <= maxRecords` records each time.
  A local buffer is filled and gradually emptied as results are yielded. When the buffer is empty,
  more results will be requested and the process repeated until no more results are available, or
  the iterator is discarded.

  Since downloading features is the most common use-case, `query_features` assumes that the query will run till the end.
  Because of this, the batch size is set to `2000`, which is the size limit set by CDSE.

  ```python
  from cdsetool.query import query_features

  collection = "Sentinel2"
  search_terms = {
      "maxRecords": "100", # batch size, between 1 and 2000 (default: 2000).
      "startDate": "1999-01-01",
      "processingLevel": "S2MSI1C"
  }


  for feature in query_features(collection, search_terms):
      


  features = list(query_features(collection, search_terms))


  iterator = query_features(collection, search_terms)

  featureA = next(iterator)
  featureB = next(iterator)

  ```



  To query by shapes, you must first convert your shape to Well Known Text (WKT). The included
  `shape_to_wkt` can solve this.

  ```python
  from cdsetool.query import query_features, shape_to_wkt

  geometry = shape_to_wkt("path/to/shape.shp")

  features = query_features("Sentinel3", {"geometry": geometry})
  ```



  Most search terms only accept a single argument. To query by a list of arguments, loop the arguments
  and pass them one by one to the query function.

  ```python
  from cdsetool.query import query_features

  tile_ids = ["32TPT", "32UPU", "32UPU", "31RFL", "37XDA"]

  for tile_id in tile_ids:
      features = query_features("Sentinel2", {"tileId": tile_id})
      for feature in features:
          
  ```



  Its quite common to query for features created before, after or between dates.

  ```python
  from cdsetool.query import query_features
  from datetime import date, datetime

  date_from = date(2020, 1, 1) # or datetime(2020, 1, 1, 23, 59, 59, 123456) or "2020-01-01" or "2020-01-01T23:59:59.123456Z"
  date_to = date(2020, 12, 31)

  features = query_features("Sentinel2", {"startDate": date_from, "completionDate": date_to})
  ```



  To get a list of all search terms for a given collection, you may either use the `describe_collection` function or
  use the CLI:

  ```python
  from cdsetool.query import describe_collection

  search_terms = describe_collection("Sentinel2").keys()
  print(search_terms)
  ```

  And the CLI:
  ```bash
  $ cdsetool query search-terms Sentinel2
  ```





  An account is required to download features from the Copernicus distribution service.

  To authenticate using an account, instantiate `Credentials` and pass your username and password

  ```python
  from cdsetool.credentials import Credentials

  username = "konata@izumi.com"
  password = "password123"
  credentials = Credentials(username, password)
  ```

  Alternatively, `Credentials` can pull from `~/.netrc` when username and password are left blank.

  ```python

  machine https://identity.dataspace.copernicus.eu/auth/realms/CDSE/protocol/openid-connect/token
  login konata@izumi.com
  password password123


  from cdsetool.credentials import Credentials

  credentials = Credentials()
  ```

  The credentials object may then be passed to a download function. If left out, the download
  functions will default to using `.netrc`.

  ```python
  credentials = Credentials()

  download_features(features, "/some/download/path", {"credentials": credentials})
  ```

  Credentials can be validated using the `validate_credentials` function which will return a boolean.

  ```python
  from cdsetool.credentials import validate_credentials

  validate_credentials(username='user', password='password')
  ```

  If None are passed to username and password, `validate_credentials` will validate `.netrc`



  CDSETool provides a method for concurrently downloading features. The concurrency level
  should match your accounts privileges.
  See [CDSE quotas](https://documentation.dataspace.copernicus.eu/Quotas.html)

  The downloaded feature ids are yielded, so its required to await the results.

  ```python
  from cdsetool.query import query_features
  from cdsetool.download import download_features

  features = query_features("Sentinel2")

  download_path = "/path/to/download/folder"
  downloads = download_features(features, download_path, {"concurrency": 4})

  for id in downloads:
      print(f"feature {id} downloaded")



  list(downloads)
  ```



  Its possible to download features sequentially in a single thread if desired.

  ```python
  from cdsetool.query import query_features
  from cdsetool.download import download_feature

  features = query_features("Sentinel2")

  download_path = "/path/to/download/folder"
  for feature in features:
      download_feature(feature, download_path)
  ```



  - [X] Query schema validation
  - [ ] High-level API
      - [ ] Query features
      - [ ] Download features
          - [ ] Download single feature
          - [ ] Download list of features
          - [ ] Download by ID
          - [ ] Download by URL
  - [ ] Command-Line Interface
      - [ ] Update to match the high-level API
      - [ ] Better `--help` messages
      - [ ] Quickstart guide in README.md
  - [ ] Test suite
      - [ ] Query
      - [ ] Credentials
      - [ ] Download
      - [ ] Monitor
  - [ ] Strategy for handling HTTP and connection errors



  Any contributions you make are **greatly appreciated**.

  If you have a suggestion that would make this better, please fork the repo and create a pull request.
  You can also simply open an issue with the tag "enhancement".

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



  Distributed under the MIT License. See [LICENSE](LICENSE) for more information.


pkgId: ba7bc02f86bfc37546799fafe3f375fa7fbcd58608beb7571ed5d910924ae409
name: python-cdt
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: A Toolbox for causal graph inference
url: https://github.com/FenTechSolutions/CausalDiscoveryToolbox
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdt-0.6.0-1.src.rpm
checksum_type: sha256
description:
  Documentation available at https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/index.html


pkgId: 9d156a358364b8a66d9c91d225f965d2f3b804fd1d0348e7e5b1de5ca2533cc4
name: python-cdx-toolkit
arch: src
version: 0.9.37
epoch: 0
release: 1
summary: A toolkit for working with CDX indices
url: https://github.com/cocrawler/cdx_toolkit
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdx-toolkit-0.9.37-1.src.rpm
checksum_type: sha256
description:
  [![build](https://github.com/cocrawler/cdx_toolkit/actions/workflows/ci.yaml/badge.svg)](https://github.com/cocrawler/cdx_toolkit/actions/workflows/ci.yaml) [![coverage](https://codecov.io/gh/cocrawler/cdx_toolkit/graph/badge.svg?token=M1YJB998LE)](https://codecov.io/gh/cocrawler/cdx_toolkit) [![Apache License 2.0](https://img.shields.io/github/license/cocrawler/cdx_toolkit.svg)](LICENSE)

  cdx_toolkit is a set of tools for working with CDX indices of web
  crawls and archives, including those at the Common Crawl Foundation
  (CCF) and those at the Internet Archive's Wayback Machine.

  Common Crawl uses Ilya Kreymer's pywb to serve the CDX API, which is
  somewhat different from the Internet Archive's CDX API server.
  cdx_toolkit hides these differences as best it can. cdx_toolkit also
  knits together the monthly Common Crawl CDX indices into a single,
  virtual index.

  Finally, cdx_toolkit allows extracting archived pages from CC and IA
  into WARC files. If you're looking to create subsets of CC or IA data
  and then further process them, this is a feature you'll find useful.



  ```
  $ pip install cdx_toolkit
  ```

  or clone this repo and use `pip install .`



  ```
  $ cdxt --cc size 'commoncrawl.org/*'
  $ cdxt --cc --limit 10 iter 'commoncrawl.org/*'  # returns the most recent year
  $ cdxt --crawl 3 --limit 10 iter 'commoncrawl.org/*'  # returns the most recent 3 crawls
  $ cdxt --cc --limit 10 --filter '=status:200' iter 'commoncrawl.org/*'

  $ cdxt --ia --limit 10 iter 'commoncrawl.org/*'  # will show the beginning of IA's crawl
  $ cdxt --ia --limit 10 warc 'commoncrawl.org/*'
  ```

  cdxt takes a large number of command line switches, controlling
  the time period and all other CDX query options. cdxt can generate
  WARC, jsonl, and csv outputs.

  If you don't specify much about the crawls or dates or number of
  records you're interested in, some default limits will kick in to
  prevent overly-large queries. These default limits include a maximum
  of 1000 records (`--limit 1000`) and a limit of 1 year of CC indexes.
  To exceed these limits, use `--limit` and `--crawl` or `--from` and
  `--to`.

  If it seems like nothing is happening, add `-v` or `-vv` at the start:

  ```
  $ cdxt -vv --cc size 'commoncrawl.org/*'
  ```



  Common Crawl's data is divided into "crawls", which were yearly at the
  start, and are currently done monthly. There are over 100 of them.
  [You can find details about these crawls here.](https://data.commoncrawl.org/crawl-data/index.html)

  Unlike some web archives, CCF doesn't have a single CDX index that
  covers all of these crawls -- we have 1 index per crawl. The way
  you ask for a particular crawl is:

  ```
  $ cdxt --crawl CC-MAIN-2024-33 iter 'commoncrawl.org/*'
  ```

  - `--crawl CC-MAIN-2024-33` is a single crawl.
  - `--crawl 3` is the latest 3 crawls.
  - `--crawl CC-MAIN-2018` will match all of the crawls from 2018.
  - `--crawl CC-MAIN-2018,CC-MAIN-2019` will match all of the crawls from 2018 and 2019.

  CCF also has a hive-sharded parquet index (called the columnar index)
  that covers all of our crawls. Querying broad time ranges is much
  faster with the columnar index. You can find more information about
  this index at [the blog post about it](https://commoncrawl.org/blog/index-to-warc-files-and-urls-in-columnar-format).

  The Internet Archive cdx index is organized as a single crawl that goes
  from the very beginning until now. That's why there is no `--crawl` for
  `--ia`. Note that cdx queries to `--ia` will default to one year year
  and limit 1000 entries if you do not specify `--from`, `--to`, and `--limit`.



  In most cases you'll probably use --crawl to select the time range for
  Common Crawl queries, but for the Internet Archive you'll need to specify
  a time range like this:

  ```
  $ cdxt --ia --limit 1 --from 2008 --to 200906302359 iter 'commoncrawl.org/*'
  ```

  In this example the time range starts at the beginning of 2008 and
  ends on June 30, 2009 at 23:59. All times are in UTC. If you do not
  specify a time range (and also don't use `--crawl`), you'll get the
  most recent year.



  ```
  $ cdxt --help
  $ cdxt iter --help
  $ cdxt warc --help
  $ cdxt size --help
  ```

  for full details. Note that argument order really matters; each switch
  is valid only either before or after the {iter,warc,size} command.

  Add -v (or -vv) to see what's going on under the hood.



  Everything that you can do on the command line, and much more, can
  be done by writing a Python program.

  ```
  import cdx_toolkit

  cdx = cdx_toolkit.CDXFetcher(source='cc')
  url = 'commoncrawl.org/*'

  print(url, 'size estimate', cdx.get_size_estimate(url))

  for obj in cdx.iter(url, limit=1):
      print(obj)
  ```

  at the moment will print:

  ```
  commoncrawl.org/* size estimate 36000
  {'urlkey': 'org,commoncrawl)/', 'timestamp': '20180219112308', 'mime-detected': 'text/html', 'url': 'http://commoncrawl.org/', 'status': '200', 'filename': 'crawl-data/CC-MAIN-2018-09/segments/1518891812584.40/warc/CC-MAIN-20180219111908-20180219131908-00494.warc.gz', 'mime': 'text/html', 'length': '5365', 'digest': 'FM7M2JDBADOQIHKCSFKVTAML4FL2HPHT', 'offset': '81614902'}
  ```

  You can also fetch the content of the web capture as bytes:

  ```
      print(obj.content)
  ```

  There's a full example of iterating and selecting a subset of captures
  to write into an extracted WARC file in [examples/iter-and-warc.py](examples/iter-and-warc.py)



  Filters can be used to limit captures to a subset of the results.

  Any field name listed in `cdxt iter --all-fields` can be used in a
  filter.  These field names are appropriately renamed if the source is
  'ia'.  The different syntax of filter modifiers for 'ia' and 'cc' is
  not fully abstracted away by cdx_toolkit.

  The basic syntax of a filter is `[modifier]field:expression`, for
  example `=status:200` or `!=status:200`.

  'cc'-style filters (pywb) come in six flavors: substring match, exact
  string, full-match regex, and their inversions. These are indicated by
  a modifier of nothing, '=', '\~', '!', '!=', and '!\~', respectively.

  'ia'-style filters (Wayback/OpenWayback) come in two flavors, a full-match
  regex and an inverted full-match regex: 'status:200' and '!status:200'

  Multiple filters will be combined with AND. For example, to limit
  captures to those which do not have status 200 and do not have status 404,

  ```
  $ cdxt --cc --filter '!=status:200' --filter '!=status:404' iter ...
  ```

  Note that filters that discard large numbers of captures put a high
  load on the CDX server -- for example, a filter that returns just a
  few captures from a domain that has tens of millions of captures is
  likely to run very slowly and annoy the owner of the CDX server.

  See https://github.com/webrecorder/pywb/wiki/CDX-Server-API#filter (pywb)
  and https://github.com/internetarchive/wayback/tree/master/wayback-cdx-server#filtering (wayback)
  for full details of filter modifiers.



  cdx_toolkit supports all (ok, most!) of the options and fields discussed
  in the CDX API documentation:

  * https://github.com/webrecorder/pywb/wiki/CDX-Server-API
  * https://github.com/internetarchive/wayback/tree/master/wayback-cdx-server

  A **capture** is a single crawled url, be it a copy of a webpage, a
  redirect to another page, an error such as 404 (page not found), or a
  revisit record (page identical to a previous capture.)

  The **url** used by cdx_tools can be wildcarded in two ways. One way
  is `*.example.com`, which in CDX jargon sets **matchType='domain'**,
  and will return captures for example.com and blog.example.com and
  support.example.com. The other, `example.com/*`, will return captures
  for any page on example.com.

  A **timestamp** represents year-month-day-time as a string of digits run togther.
  Example: January 5, 2016 at 12:34:56 UTC is 20160105123456. These timestamps are
  a field in the index, and are also used to pick specify the dates used
  by **--from=**, **--to**, and **--closest** on the command-line. (Programmatically,
  use **from_ts=**, to=, and closest=.)

  An **urlkey** is a SURT, which is a munged-up url suitable for
  deduplication and sorting. This sort order is how CDX indices
  efficiently support queries like `*.example.com`. The SURTs for
  www.example.com and example.com are identical, which is handy when
  these 2 hosts actually have identical web content. The original url
  should be present in all records, if you want to know exactly what it
  is.

  The **limit** argument limits how many captures will be returned.  To
  help users not shoot themselves in the foot, a limit of 1,000 is
  applied to --get and .get() calls.

  A **filter** allows a user to select a subset of CDX records, reducing
  network traffic between the CDX API server and the user. For example,
  filter='!status:200' will only show captures whose http status is not
  200. Multiple filters can be specified as a list (in the api) and on
  the command line (by specifying --filter more than once). Filters and
  **limit** work together, with the limit applying to the count of
  captures after the filter is applied. Note that revisit records have a
  status of '-', not 200.

  CDX API servers support a **paged interface** for efficient access to
  large sets of URLs. cdx_toolkit iterators always use the paged interface.
  cdx_toolkit is also polite to CDX servers by being single-threaded and
  serial. If it's not fast enough for you, consider downloading Common
  Crawl's index files directly.

  A **digest** is a sha1 checksum of the contents of a capture. The
  purpose of a digest is to be able to easily figure out if 2 captures
  have identical content.

  Common Crawl publishes a new index each month. cdx_toolkit will start
  using new ones as soon as they are published. **By default,
  cdx_toolkit will use the most recent 12 months of Common Crawl**; you
  can change that using **--from** or **from_ts=** and **--to** or
  **to=**.

  CDX implementations do not efficiently support reversed sort orders,
  so cdx_toolkit results will be ordered by ascending SURT and by
  ascending timestamp. However, since CC has an individual index for
  each month, and because most users want more recent results,
  cdx_toolkit defaults to querying CC's CDX indices in decreasing month
  order, but each month's result will be in ascending SURT and ascending
  timestamp. This default sort order is named 'mixed'. If you'd like
  pure ascending, set **--cc-sort** or **cc_sort=** to 'ascending'. You
  may want to also specify **--from** or **from_ts=** to set a starting
  timestamp.

  The main problem with this ascending sort order is that it's a pain to
  get the most recent N captures: --limit and limit= will return the
  oldest N captures. With the 'mixed' ordering, a large enough limit=
  will get close to returning the most recent N captures.



  Content downloading needs help with charset issues, preferably
  figuring out the charset using an algorithm similar to browsers.

  WARC generation should do smart(er) things with revisit records.

  Right now the CC code selects which monthly CC indices to use based
  solely on date ranges. It would be nice to have an alternative so that
  a client could iterate against the most recent N CC indices, and
  also have the default one-year lookback use an entire monthly index
  instead of a partial one.



  cdx_toolkit has reached the beta-testing stage of development.



  Copyright 2018-2020 Greg Lindahl and others

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this software 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: ecde3254a98bcf1e05cb34bb6108f25d9d808a43cf9698e05c64bc77601ed2fd
name: python-cdxbasics
arch: src
version: 0.2.113
epoch: 0
release: 1
summary: Basic Python tools
url: https://github.com/hansbuehler/cdxbasics
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cdxbasics-0.2.113-1.src.rpm
checksum_type: sha256
description:
  Collection of basic tools for Python development.
  Install by

      pip install cdxbasics




  Tools for dynamic (animated) plotting in Jupyer/IPython. The aim of the toolkit is making it easy to develop visualization with `matplotlib` which dynamically updates, for example during training with machine learing kits such as `tensorflow`. This has been tested with Anaconda's JupyterHub and `%matplotlib inline`.

  Some users reported that the package does not work in some versions of Jupyter. In this case, please try setting `dynaplot.DynamicFig.MODE = 'canvas'`. I appreciate if you let me know whether this resolved
  the problem.

  The package now contains a lazy method to manage updates. Instead of updating individual names, we recommend to simply remove the previous element and redraw. This is implemented as follows
  * Once a figure `fig` is created, call `fig.store()` to return a element store.
  * When creating new matplotlib elements such as plots, figures, fills, lines, add them to the store with `store +=`.
  * Before the next update call `store.remove()` to remove all old updates; create the renewed elements, and only then call `fig.render()` or `fig.close()`.



  See the jupyter notebook [notebooks/DynamicPlot.ipynb](https://github.com/hansbuehler/cdxbasics/blob/master/cdxbasics/notebooks/DynamicPlot.ipynb) for some applications.

  ![dynamic line plot](https://raw.githubusercontent.com/hansbuehler/cdxbasics/master/media/dynaplot.gif)
  ![dynamic 3D plot](https://raw.githubusercontent.com/hansbuehler/cdxbasics/master/media/dynaplot3D.gif)

      %matplotlib inline
      import numpy as np
      import cdxbasics.dynaplot as dynaplot

      x  = np.linspace(0,1,100)
      pm = 0.2

      fig = dynaplot.figure(col_size=10)
      ax = fig.add_subplot()
      ax2 = fig.add_subplot()
      ax2.sharey(ax)
      store = fig.store()

      fig.render()

      import time
      for i in range(5):
          y = np.random.random(size=(100,))
          ax.set_title(f"Test {i}")
          ax2.set_title(f"Test {i}")

          store.remove() # delete all prviously stored elements
          store += ax.plot(x,y,":", label=f"data {i}")
          store += ax2.plot(x,y,"-",color="red", label=f"data {i}")
          store += ax2.fill_between( x, y-pm, y+pm, color="blue", alpha=0.2 )
          store += ax.legend()

          fig.render()
          time.sleep(1)
      fig.close()

  See example notebook for how to use the package for lines, confidence intervals, and 3D graphs.



  The package lets you create sub plots without having to know the number of plots in advance: you do not need to specify `rol, col, num` when calling `add_subplot`. The underlying figure object will automatically arrange them on a grid for you.

      
      from cdxbasics.dynaplot import figure
      fig = figure(col_size=4, row_size=4, col_num=3, title="Figure title")
                                      
      ax  = fig.add_subplot()         # no need to specify row,col,num
      ax.plot( x, y )
      ax  = fig.add_subplot()         # no need to specify row,col,num
      ax.plot( x, y )
      ...
      fig.next_row()                  # another row
      ax  = fig.add_subplot()         # no need to specify row,col,num
      ax.plot( x, y )
      ...

      fig.render()                    # draws the plots





  There are a number of other functions to aid plotting

  * `figure()` which returns a `DynamicFig` object:

      Function to replace `matplotlib.figure()` which will defer creation of the figure until the first call of `render()`. The effect is that we no longer need to provide  the total number of rows and columns in advance - i.e. you won't need to call the equivalent of `fig.add_subplot(3,4,14)` but can just call `fig.add_subplot()`. You can also pass a `title` argument.

      Instead of `figsize` the function `figure()` accepts `row_size`, `col_size` and `col_nums` to dynamically generate an appropriate figure size.

      Key member functions of `DynamicFig` are:
      * `add_subplot()` to add a new plot without having to specify the grid, e.g. you do not need to provide any arguments. Supports an additional `title` argument for plot titles.
      * `next_row()` to skip to the next row.
      * `render()` to draw the figure. When called the first time will create all the underlying matplotlib objects. Subsequent calls will re-draw the canvas if the figure was modified. See examples in https://github.com/hansbuehler/cdxbasics/blob/master/cdxbasics/notebooks/DynamicPlot.ipynb
      * `close()` to close the figure. If not called, Jupyter creates an unseemly second copy of the graph when the current cell is finished running.

  * `color_css4, color_base, color_tableau, color_xkcd`:

      Each function returns the _i_'th element of the respective matplotlib color
      table. The purpose is to simplify using consistent colors accross different plots.

      **Example:**

          fig = dynaplot.figure()
          ax = fig.add_subplot()
          
          for i in range(10):
              ax.plot( x, y[i], color=color_css4(i), label=labels[i] )
          ax.legend()
          
          ax = fig.add_subplot()
          for i in range(10):
              ax.plot( x, z[i], color=color_css4(i) )
          fig.render()

  * `colors_css4, colors_base, colors_tableau, colors_xkcd`:

      Generator versions of the `color_` functions.



  The `DynamicFig` object returned by `dynaplot.figure()` will keep track of all function calls and other operations, and will defer them until the first time `render()`. It does this so it can figure out the desired layout before actually creating any plots. Each deferred function call in turn returns a deferring object. Read the Python comments in `deferred.py` for implementation details.



  A number of simple extensions to standard dictionaries which allow accessing any element of the dictionary with "." notation. The purpose is to create a functional-programming style method of generating complex objects.

      from cdxbasics.prettydict import PrettyDict
      pdct = PrettyDict(z=1)
      pdct['a'] = 1       # standard dictionary write access
      pdct.b = 2          # pretty write access
      _ = pdct.b          # read access
      _ = pdct("c",3)     # short cut for pdct.get("c",3)

  There are three versions:

  * `PrettyDict`:
      Pretty version of standard dictionary.
  * `PrettyOrderedDict`:
      Pretty version of ordered dictionary.
  * `PrettySortedDict`:
      Pretty version of sorted dictionary.



  "Pretty" objects also allow assigning bona fide member functions by a simple semantic of the form:

      def mult_b( self, x ):
          return self.b * x
      pdct = mult_a

  Calling `pdct.mult_a(3)` with above config will return `6` as expected. This only works when using the member synthax for assigning values
  to a pretty dictionary; if the standard `[]` operator is used then functions will be assigned to the dictionary as usual, hence they are static members of the object.

  The reason for this is as follows: consider

      def mult( a, b ):
          return a*b
      pdct.mult = mult
      mult(3,4) --> produces am error as three arguments as are passed if we count 'self'

   In this case, use:

      pdct['mult'] = mult
      pdct.mult(3,4) --> 12




  Tooling for setting up program-wide configuration. Aimed at machine learning programs to ensure consistency of code accross experimentation.

      from cdxbasics.config import Config
      config = Config()

  **Key features**

  * Detect misspelled parameters by checking that all parameters of a config have been read.
  * Provide summary of all values read, including summary help for what they were for.
  * Nicer synthax than dictionary notation, in particular for nested configurations.
  * Simple validation to ensure values are within a given range or from a list of options.



  Set data with both dictionary and member notation:

      config = Config()
      config['features']           = [ 'time', 'spot' ]
      config.weights               = [ 1, 2, 3 ]

  Create sub configurations with member notation

      config.network.depth         = 10
      config.network.activation    = 'relu'
      config.network.width         = 100

  This is equivalent to

      config.network               = Config()
      config.network.depth         = 10
      config.network.activation    = 'relu'
      config.network.width         = 100



  When reading the value of a `key` from  config, `config.__call__()` uses a default value, and a cast type. It first attempts to find `key` in the `config`.
  * If `key` is found, it casts the value provided for `key` using the `cast` type and returned.
  * If `key` is not found, then the default value will be cast using `cast` type and returned.

  The function also takes a `help` text which allows providing live information on what variable are read from the config. The latter is used by the function  `usage_report()` which therefore provides live documentation of the code which uses the config object.

      class Network(object):
          def __init__( self, config ):
              
              self.features = config("features", [], list, "Features for the agent" )
              self.weights  = config("weights", [], np.asarray, "Weigths for the agent", help_default="no initial weights")
              config.done() # see below

  In above example any data provided for they keywords `weigths` will be cast using `numpy.asarray`.

  Further parameters of `()` are the help text, plus ability to provide text versions of the default with `help_default` (e.g. if the default value is complex), and the cast operator with `help_cast` (again if the
  respective operation is complex).

  __Important__: the `()` operator does not have a default value unless specified. If no default value is specified, and the key is not found, then a KeyError is generated.

  You can read sub-configurations with the previsouly introduced member notation:

      self.activation = config.network("activation", "relu", str, "Activation function for the network")

  An alternative is the explicit:

      network  = config.network
      self.depth = network('depth', 10000, int, "Depth for the network")



  We can impose simple restrictions to any values read from a config. To this end, import the respective type operators:

      from cdxbasics.config import Int, Float

  One-sided restriction:

      
      self.width = network('width', 100, Int>3, "Width for the network")

  Restrictions on both sides of a scalar:

      
      self.percentage = network('percentage', 0.5, ( Float >= 0. ) & ( Float <= 1.), "A percentage")

  Enforce the value being a member of a list:

      
      self.ntype = network('ntype', 'fastforward', ['fastforward','recurrent','lstm'], "Type of network")

  We can allow a returned value to be one of several casting types by using tuples. The most common use case is that `None` is a valid value for a config, too. For example, assume that the `name` of the network model should be a string or `None`. This is implemented as

      
      self.keras_name = network('name', None, (None, str), "Keras name of the network model")

  We can combine conditional expressions with the tuple notation:

      
      self.batch_size = network('batch_size', None, (None, Int>0), "Batch size or None for TensorFlow's default 32", help_cast="Positive integer, or None")




  A common issue when using dictionary-based code is that we might misspell one of the parameters. Unless this is a mandatory parameter we might not notice that we have not actually changed its value in the code below.

  To check that all values of `config` are read use `done()`

      config.done()    # checks that we have read all keywords.

  It will alert you if there are keywords or children which haven't been read. Most likely, those will be typos. Consider the following example where `width` is misspelled in our config:

      class Network(object):
          def __init__( self, config ):
              
              self.depth     = config("depth", 1, Int>=1, "Depth of the network")
              self.width     = config("width", 3, Int>=1, "Width of the network")
              self.activaton = config("activation", "relu", help="Activation function", help_cast="String with the function name, or function")
              config.done() # <-- test that all members of config where read

      config                       = Config()
      config.features              = ['time', 'spot']
      config.network.depth         = 10
      config.network.activation    = 'relu'
      config.network.widht         = 100   # (intentional typo)

      n = Network(config.network)

  Since `width` was misspelled in setting up the config, you will get a warning to this end:

      Error closing 'config.network': the following config arguments were not read: ['widht']

      Summary of all variables read from this object:
      config.network['activation'] = relu # Activation function; default: relu
      config.network['depth'] = 10 # Depth of the network; default: 1
      config.network['width'] = 3 # Width of the network; default: 3

  Note that you can also call `done()` at top level:

      class Network(object):
          def __init__( self, config ):
              
              self.depth     = config("depth", 1, Int>=1, "Depth of the network")
              self.width     = config("width", 3, Int>=1, "Width of the network")
              self.activaton = config("activation", "relu", help="Activation function", help_cast="String with the function name, or function")

      config                       = Config()
      config.features              = ['time', 'spot']
      config.network.depth         = 10
      config.network.activation    = 'relu'
      config.network.widht         = 100   # (intentional typo)

      n = Network(config.network)
      test_features = config("features", [], list, "Features for my network")
      config.done()

  produces

      ERROR:x:Error closing 'config.network': the following config arguments were not read: ['widht']

      Summary of all variables read from this object:
      config.network['activation'] = relu # Activation function; default: relu
      config.network['depth'] = 10 # Depth of the network; default: 1
      config.network['width'] = 3 # Width of the network; default: 3
      
      config['features'] = ['time', 'spot'] #  Default: 2

  You can check the status of the use of the config by using the `not_done` property.




  You can also detach a child config, which allows you to store it for later use without triggering `done()` errors:

          def read_config(  self, confg ):
              ...
              self.config_training = config.training.detach()
              config.done()

  `detach()` will mark he original child as 'done'. Therefore, we will need to call `done()` again, when we finished processing the detached child:

          def training(self)
              epochs     = self.config_training("epochs", 100, int, "Epochs for training")
              batch_size = self.config_training("batch_size", None, help="Batch size. Use None for default of 32" )

              self.config_training.done()

  Use `copy()` to make a bona fide copy of a child, without marking the source child as 'done'. `copy()` will return a config which shares the same status as the source object. If you want an "unused" copy, use `clean_copy()`. A virtual clone is created via `clone()`. A cloned config stores information on usage in the same place for the original object. This is also the semantic of the copy constructor.



  Once your program ran, you can read the summary of all values, their defaults, and their help texts.

          print( config.usage_report( with_cast=True ) )

  Prints:

          config.network['activation'] = relu # (str) Activation function for the network; default: relu
          config.network['depth'] = 10 # (int) Depth for the network; default: 10000
          config.network['width'] = 100 # (int>3) Width for the network; default: 100
          config.network['percentage'] = 0.5 # (float>=0. and float<=1.) Width for the network; default: 0.5
          config.network['ntype'] = 'fastforward' # (['fastforward','recurrent','lstm']) Type of network; default 'fastforward'
          config.training['batch_size'] = None # () Batch size. Use None for default of 32; default: None
          config.training['epochs'] = 100 # (int) Epochs for training; default: 100
          config['features'] = ['time', 'spot'] # (list) Features for the agent; default: []
          config['weights'] = [1 2 3] # (asarray) Weigths for the agent; default: no initial weights



          def create_network( depth=20, activation="relu", width=4 ):
              ...

  We may use

          create_network( **config.network )

  However, there is no magic - this function will mark all direct members (not children) as 'done' and will not record the default values of the function `create_network`. Therefore `usage_report` will be somewhat useless. This method will still catch unused variables as "unexpected keyword arguments".



  Another common use case is that we wish to cache some process in a complex operation. Assuming that the `config` describes all relevant parameters
  we can use `config.unique_id()` to obtain a unique hash ID for the given config.

  This can be used, for example, as file name for caching. See also `cdxbasics.subdir` below.



  The `Config` class can be used to improve `kwargs` handling.
  Assume we have

          def f(**kwargs):
              a = kwargs.get("difficult_name", 10)
              b = kwargs.get("b", 20)

  We run the usual risk of somebody mispronouncing the parameter name which we would never know. Therefore we may improve upon the above with

          def f(**kwargs):
              kwargs = Config(kwargs)
              a = kwargs("difficult_name", 10)
              b = kwargs("b", 20)
              kwargs.done()

  If now a user calls `f` with a misspelled `config(difficlt_name=5)` an error will be raised.

  Another pattern is to allow both `config` and `kwargs`:

          def f( config=Config(), **kwargs):
              kwargs = config.detach.update(kwargs)
              a = kwargs("difficult_name", 10)
              b = kwargs("b", 20)
              kwargs.done()



  Tools for defensive programming a'la the C++ ASSERT/VERIFY macros. Aim is to provide one line validation of inputs to functions with intelligible error messages:

      from cdxbasics.logger import Logger
      _log = Logger(__file__)
      ...
      def some_function( a, ...):
          _log.verify( a==1, "'a' is not one but %s", a)
          _log.warn_if( a!=1, "'a' was not one but %s", a)



  Exceptions independent of logging level

          verify( cond, text, *args, **kwargs )
              If cond is not met, raise an exception with util.fmt( text, *args, **kwargs ). This is the Python version of C++ VERIFY

          throw_if(cond, text, *args, **kwargs )
              If cond is met, raise an exception with util.fmt( text, *args, **kwargs )

          throw( text, *args, **kwargs )
              Just throw an exception with util.fmt( text, *args, **kwargs )

  Unconditional logging

          debug( text, *args, **kwargs )
          info( text, *args, **kwargs )
          warning( text, *args, **kwargs )
          error( text, *args, **kwargs )
          critical( text, *args, **kwargs )

          throw( text, *args, **kwargs )

  Verify-conditional functions

          
          verify( cond, text, *args, **kwargs )

          
          verify_debug( cond, text, *args, **kwargs )
          verify_info( cond, text, *args, **kwargs )
          verify_warning( cond, text, *args, **kwargs )

  If-conditional functions

          
          throw_if( cond, text, *args, **kwargs )

          
          debug_if( cond, text, *args, **kwargs )
          info_if( cond, text, *args, **kwargs )
          warning_if( cond, text, *args, **kwargs )

          
          prnt_if( cond, text, *args, **kwargs )      # with EOL
          write_if( cond, text, *args, **kwargs )     # without EOL



  A few tools to handle file i/o in a transparent way. The key idea is to provide transparent, concise pickle access to the file system in a manner similar to dictionary access - hence core file names are referred to as 'keys'. Files managed by `subdir` all have the same extension. From 0.2.60 `SubDir` supports different file formats specified with the `fmt=` keyword to `SubDir`:

  * PICKLE: standard pickling. Default extension 'pck'
  * JSON_PICKLE: uses the `jsonpickle` package. Default extension 'jpck'. The advantage of this format over PICKLE is that it is somewhat human-readable. However, `jsonpickle` uses compressed formats for complex objects such as `numpy` arrays, hence readablility is somewhat limited. It comes at cost of slower writing speeds.
  * JSON_PLAIN: calls `cdxbasics.util.plain()` to convert objects into plain Python objects before using `json` to write them. That means that deserialized data does not have the correct object structure. However, such files are much easier to read.
  * BLOSC: uses [blosc](https://github.com/blosc/python-blosc) to write compressed binary data. The blosc compression algorithm is very fast, hence using this mode will not usually lead to notably slower performanbce than using PICKLE but will generate smaller files, depending on your data structure.



  You can create directories using the `SubDir` class. Simply write

      from cdxbasics.subdir import SubDir
      subdir = SubDir("my_directory")      # relative to current working directory
      subdir = SubDir("./my_directory")    # relative to current working directory
      subdir = SubDir("~/my_directory")    # relative to home directory
      subdir = SubDir("!/my_directory")    # relative to default temp directory

  You can specify a parent for relative path names:

      from cdxbasics.subdir import SubDir
      subdir = SubDir("my_directory", "~")      # relative to home directory
      subdir2 = SubDir("my_directory", subdir)  # subdir2 is relative to `subdir`

  Change the extension to `bin`

      from cdxbasics.subdir import SubDir
      subdir = SubDir("~/my_directory;*.bin")
      subdir = SubDir("~/my_directory", ext="bin")
      subdir = SubDir("my_directory", "~", ext="bin")

  You can turn off extension management by setting the extension to "":

      from cdxbasics.subdir import SubDir
      subdir = SubDir("~/my_directory", ext="")

  You may specify the file format; in this case the extension will be automaticall set to `pck`, `jpck` or `json`, respectively. See discussion above about the relative merits of each format:

      from cdxbasics.subdir import SubDir
      subdir = SubDir("~/my_directory", fmt=SubDir.PICKLE)
      subdir = SubDir("~/my_directory", fmt=SubDir.JSON_PICKLE)
      subdir = SubDir("~/my_directory", fmt=SubDir.JSON_PLAIN)

  You can also use the `()` operator to generate sub directories. This operator is overloaded: for a single argument, it creates a relative sub-directory:

      from cdxbasics.subdir import SubDir
      parent = SubDir("~/parent")
      subdir = parent("subdir")                                # shares extension and format with parent
      subdir = parent("subdir", ext="bin", fmt=SubDir.PICKLE)  # change extension and format

  Be aware that when the operator `()` is called with two arguments, then it reads files; see below.

  You can obtain a list of all sub directories in a directory by using `subDirs()`.



  To read the data contained in a file 'file' in our subdirectory with the extension used for the sub directory, use either of the following

      data = subdir.read("file")                 # returns the default if file is not found
      data = subdir.read("file", default=None)   # returns the default if file is not found

  This function will return `None` or the default if 'file' does not exist with the respective extension. You can make it throw an error by calling `subdir.read("file", throwOnError=True)` instead.

  You may specify a different extension:

      data = subdir.read("file", ext="bin")

  Specifying a different format for `read` does *not* change the extension automatically, hence you may want to set this explicitly at the same time:

      data = subdir.read("file", ext="json", fmt=Subdir.JSON_PLAIN )

  You can also use the `()` operator, in which case you must specify a default value (if you don't, then the operator will return a sub directory):

      data = subdir("file", None)   # returns None if file is not found

  You can also use both member and item notation to access files. In this case, though, an error will be thrown if the file does not exist

      data = subdir.file      # raises AtttributeError if file is not found
      data = subdir['file']   # raises KeyError if file is not found

  You can read a range of files in one function call:

      data = subdir.read( ["file1", "file2"] )

  Finally, you can also iterate through all existing files:

      for file in subdir:
          data = subdir.read(file)
          ...

  To obtain a list of all files in our directory which have the correct extension, use `files()` or `keys()`.



  To write data, use any of

      subdir.write("file", data)
      subdir.file    = data
      subdir['file'] = data

  You may specifify different extensions:

      subdir.write("file", data, ext="bin)

  You can also specify the file format. Note that this will not automatically change the extension, so you may want to set this at the same time:

      subdir.write("file", data, fmt=SubDir.JSON_PLAIN, ext="json")

  To write several files at once, write

      subdir.write(["file1", "file"], [data1, data2])

  Note that when writing to an object, `subdir` will first write to a temporary file, and then rename this file into the target file name. The temporary file name is a `util.uniqueHash48` generated from the target file name, current time, process and thread ID, as well as the machines's UUID. This is done to reduce collisions between processes/machines accessing the same files. It does not remove collision risk entirely, though.



  `SubDir` handles core file names for you as "keys" and adds directories and extensions as required. You can obtain the full qualified filename given a "key" by calling `fullFileName()`
  or `fullKeyName()`.



  From 0.2.64 `SubDir` supports versioned files. If versions are used, then they *must* be used for both reading and writing.

  If `version=` is provided, then `write()` will write it in a block ahead of the main content of the file. In case of the PICKLE format, this is a byte string. In case of JSON_PLAIN and JSON_PICKLE this is line of text starting with `#` ahead of the file. (Note that this violates
   the JSON file format.)
  The point of writing short block ahead of the main data is that `read()` can read this version information back quickly before attempting to read the entire file. `read()` does attempt so if its called with `version=` as well. In this case it will compare the read version with the provided version, and only return the main content of the file if versions match.

  Use `is_version()` to check whether a given file has a specific version. This function only reads the information required to obtain the information and will be much faster than reading the whole file if the file size is big.

  **Examples:**

  Writing a versioned file:

      from cdxbasics.subdir import sub_dir
      sub_dir = SubDir("!/test_version)
      sub_dir.write("test", [1,2,3], version="0.0.1" )

  To read `[1,2,3]` from "test" we need to use the correct version:

      _ = sub_dir.read("test", version="0.0.1")

  We now try to use:

      _ = sub_dir.read("test", version="0.0.2")

  This fails reading `[1,2,3]` from "test" as the versions do not match.
  Moreoever, `read()` will then attempt to delete the file "test". This can be turned off
  with the keyword `delete_wrong_version`.
  We do not do that below, so the file will be deleted, and `read()` will then return the default value `None`.

  You can ignoore the version used to write a file by using `*` as version:

      _ = sub_dir.read("test", version="*")

  Note that reading files which have been written with a version back without `version=` keyword will fail because `SubDir` will only append additional information to the chosen file format if required.



  To test existence of 'file' in a directory, use one of

      subdir.exist('file')
      'file' in subdir



  To delete a 'file', use any of the following:

      subdir.delete(file)
      del subdir.file
      del subdir['file']

  All of these are _silent_, and will not throw errors if 'file' does not exist. In order to throw an  error use

      subdir.delete(file, raiseOnError=True)



  * `deleteAllKeys`: delete all files in the directory, but do not delete sub directories or files with extensions different to our own.
  * `deleteAllContent`: delete all files with our extension, and all sub directories.
  * `eraseEverything`: delete everything



  A system wide resource lock using a simplistic but robust implementation via a file lock.



  The `FileLock` represents a lock implemented using a file with exclusive access under both Linux and Windows. The `filename` supports short-hand root directory references to the current temp directory (`!/`) or the user directory (`~/`).



  Simplest form - will throw an exception if the lock could not be attained:

      from cdxbasics.filelock import FileLock
      fl = FileLock("!/resource.lock", acquire=True, wait=False)

  With timeout up to 5*10 seconds:

      from cdxbasics.filelock import FileLock
      fl = FileLock("!/resource.lock", acquire=True, wait=True, timeout_seconds=5, timeout_repeat=10 )

  Wait forever

      from cdxbasics.filelock import FileLock
      fl = FileLock("!/resource.lock", acquire=True, wait=True, timeout_seconds=5, timeout_repeat=None )

  A more verbose use case is to not automatically aqcuire the lock upon construction.
  In this case call `acquire()` to obtain a lock:

      from cdxbasics.filelock import FileLock
      fl = FileLock("!/resource.lock")

      if not fl.acquire():
          print("Failed to acquire lock")
          return

      ...

      fl.release()

  The lock will keep count of the number of times `acquire` and `release` are called, respectively. The number of current (net) acquisitions can be obtained using the `num_acquisitions` property.

  Note that a `FileLock` will by default release the lock upon destruction of the lock. However, due to Python's garbage collection that even might not be immediate. To enforce releasing a lock use `release()`. This is handled more elegantly by using it as a context manager:



  A better method is to use `FileLock` is as a context manager in which case the lock will be released upon leaving the while block.
  *Note that unless `acquire` is set to `True` the lock is not obtained.*

      from cdxbasics.filelock import FileLock
      with FileLock("!/resource.lock", acquire=True):
          ...
          ...




  To debug usage of the lock one may use a `Context` object from the `verbose` sub-module. To display all verbose information, pass `None`:

      from cdxbasics.filelock import FileLock
      fl = FileLock("!/resource.lock", aqcuire=True, verbose=None )





  A collection of utility functions.



      uniqueHash( *kargs, **kwargs )
      uniqueHash32( *kargs, **kwargs )
      uniqueHash48( *kargs, **kwargs )
      uniqueHash64( *kargs, **kwargs )

  Each of these functions returns a unique hash key for the arguments provided for the respective function. The functions *32,*48,*64 return hashes of the respective length, while `uniqueHash` returns the hashes of standard length. These functions will make an effort to robustify the hashes against Python particulars: for example, dictionaries are hashed with sorted keys.

  **These functions will ignore all dictionary or object members starting with "`_`".** They also will by default not hash _functions_ or _properties_.
  This is sometimes undesitable, for example when functions are configuration elements:

      config = Config()
      config.f = lambda x : x**2

  To change default behaviour, use

      myUniqueHash = uniqueHashExt( length = 48, parse_functions = True, parse_underscore = "protected")

   The returned function `myUniqueHash` will parse functions, and will also include `protect` members.



  A simple enum-type class to help implement a standard caching pattern.
  It implements the following decision matrix

  |                                        |on    |off     |update   |clear   |readonly|
  |----------------------------------------|------|--------|---------|--------|--------|
  |load cache from disk if exists          |x     |-       |-        |-       |x|
  |write updates to di.sk                   |x     |-       |x        |-       |-|
  |delete existing object                  |-     |-       |-        |x       |-|
  |delete existing object if incompatible  |x     |-       |x        |x       |-|

  (For debugging purposes, an additional mode `gen` behaves like `on` except that it does not delete files with the wrong version.)

  Typically, the user is allowed to set the desired `CacheMode` using a `Config` element. The corresponding `CacheMode` object then implements the properties `read`, `write`, `delete` and `del_incomp`.
  Caching of versioned functions with the above logic is implemented in `cdxbasics.cached`, see below. It used `cdxbasics.version` to determine the version of a function, and all its dependencies.


  **Prototype code is to be implemented as follows:**

      from cdxbasics.util import CacheMode, uniqueHash48
      from cdxbasics.subdir import SubDir
      from cdxbasics.version import version

      @version("0.0.1")
      def compute( *kargs, **kwargs ):
          ... my function
          return ...

      def compute_cached( *kargs, cache_mode : CacheMode, cache_dir : SubDir, **kargs ):
          
          
          

          unique_id  = unqiueHash48( kargs, kwarg )

          
          

          version_id = compute.version.unique_id48

          
          

          if cache_mode.delete:
              cache_dir.delete(unique_id)

          
          
          
          

          if cache_mode.read:
              ret = cache_dir.read(unique_id,
                                   default=None,
                                   version=version_id,
                                   delete_wrong_version=cache_model.del_incomp
                                   )
              if not ret is None:
                  return ret

          
          

          ret = compute( *kargs, **kwargs )

          
          

          if cache_mode.write:
              cache_dir.write(unique_id, ret, version=version_id )

          return ret

  A decorator with associated behaviour is being built.



  A simple utility class to manage printing in a given line with carriage returns (`\r`).
  Essentially, it keeps track of the length what was printed so far at the current line. If a `\r` is encountered it will clear the rest of the line to avoid having residual text from the previous line.

  Example 1 (how to use \r and \n)

      write = WriteLine("Initializing...")
      import time
      for i in range(10):
          time.sleep(1)
          write("\rRunning %g% ...", round(float(i+1)/float(10)*100,0))
      write(" done.\nProcess finished.\n")

  Example 2 (line length is getting shorter)

      write = WriteLine("Initializing...")
      import time
      for i in range(10):
          time.sleep(1)
          write("\r" + ("#" * (9-i)))
      write("\rProcess finished.\n")



  * `fmt()`: C++ style format function.
  * `plain()`: converts most combinations of standards elements or objects into plain list/dict structures.
  * `isAtomic()`: whether something is string, float, int, bool or date.
  * `isFloat()`: whether something is a float, including a numpy float.
  * `isFunction()`: whether something is some function.
  * `bind()`: simple shortcut to bind function parameters, e.g.

          def f(a, b, c):
              pass
          f_a = bind(f, a=1)

  * `fmt_list()` returns a nicely formatted list, e.g. `fmt_list([1,2,3])` returns `1, 2 and 3`.

  * `fmt_dict()` returns a nicely formatted dictionary, e.g. `fmt_dict({'a':1,'b':'test'})` returns `a: 1, b: test`.
  * `fmt_seconds()` returns string for seconds, e.g. `fmt_seconds(10)` returns `10s` while `fmt_seconds(61)` returns `1:00`.
  * `fmt_digits()` inserts ',' or another separator in thousands, i.e. `fmt_digits(12345)` returns `12,345`.
  * `fmt_big_number()` converts a large integer into an abbreviated string with terminating `K`, `M`, `B`, `T` as appropriate, using base 10. For example `fmt_big_number(12345)` returns `12.35K`.
  * `fmt_big_byte_number()` converts a large integer into an abbreviated string with terminating `K`, `M`, `G`, `T` as appropriate, here using base 16. For example `fmt_big_byte_number(12345)` returns `12.06K`.
  * `fmt_date()` returns a date string in natural order e.g. YYYY-MM-DD.
  * `fmt_time()` returns a time string in natural order HH:MM:SS. The colon can be changed into another character if required, e.g. for file names.
  * `fmt_datetime()` returns a datetime string in natural order e.g. YYYY-MM-DD HH:SS. It returns the respective simplification if just a `date` or `time` is passed instead of a `datetime`.
  * `fmt_filename()` returns a valid filename for both Windows and Linux by replacing unsupported characters with alternatives. Instead of our default alternatives you can pass a dictionary of your own.

  * `is_jupyter()` tries to assess whether the current environment is a jupyer IPython environment.
  This is experimental as it appears there is no safe way to do this. The current implemenentation checks whether the command which started the current process contains the string `jupyter`.


  A small number of statistical numpy functions which take a weight vector (distribution) into account, namely

  * `mean(P,x,axis)` computes the mean of `x` using the distribution `P`. If `P` is None, it returns `numpy.mean(x,axis)`.
  * `var(P,x,axis)` computes the variance of `x` using the distribution `P`. If `P` is None, it returns `numpy.var(x,axis)`.
  * `std(P,x,axis)` computes the standard deviation of `x` using the distribution `P`. If `P` is None, it returns `numpy.std(x,axis)`.
  * `err(P,x,axis)` computes the standard error of `x` using the distribution `P`. If `P` is None, it returns `numpy.std(x,axis)/sqrt(x.shape[axis])`.

  * `quantile(P,x,quantiles,axis)` computes `P`-quantiles of `x`. If `P` is None, it returns `numpy.quantile(x,quantiles,axis)`.
  * `median(P,x,axis)` computes the `P`-median of `x`. If `P` is None, it returns `numpy.median(x,axis)`.
  * `mad(P,x,axis)` computes the [median absolute deviation](https://en.wikipedia.org/wiki/Median_absolute_deviation) of `x` with respect to the distribution `P`. Note that `mad` returned by this function is scaled to be an estimator of `std`.

  Two further functions are used to compute binned statistics:

  * `mean_bins(x,bins,axis,P)` computes the means of `x` over equidistant `bins` using the distribition `P`.
  * `mean_std_bins(x,bins,axis,P)` computes the means and standard deviations of `x` over equidistant `bins` using the distribition `P`.

  For derivative pricing:

  * `np_european(...)` computes European option prices and greeks.


  Hard efficency numpy file i/io functions. They offer unbuffereed reading/writing numpy arrays in their native byte form from and to disk.

  * `tofile(file,array)` writes a numpy `array` in an efficient native binary format to `file` without buffering. The [unbuffered 2GB Linux write limit](https://man7.org/linux/man-pages/man2/write.2.html) is circumvented.
  * `fromfile(file, dtype)` reads from a numpy binary file into a new numpy array given a known dtype. The [unbuffered 2GB Linux read limit](https://man7.org/linux/man-pages/man2/read.2.html) is circumvented.
  * `readinto(file, array)` reads `file` into an existing target `array`.
  * `readfromfile(file, target)` reads `file` into an existing numpy array, or into a new one.



  **The `verbose` interface has changed in 0.2.36**
  Since 0.2.95 verbose is using `CRMan` to manage messages containing '\r'.

  This module provides the `Context` utility class for printing 'verbose' information, with indentation depending on the detail level.

  The basic idea is that the root context has level 0, with increasing levels for sub-contexts. When printing information, we can (a) limit printing up to a given level and (b) automatically indent the output to reflect the current level of detail.

  * Create a `Context` model, and define its verbosity in its constructor, e.g. `all`, `none` or a number. A negative number means that no outout will be generated (`quiet`), while `None` means all output will be printed (`all`). Sub-contexts inherent verbosity from their parents.
  * To write a text at current level to `stdout` use `write()`.
  * To write a text at a sub-level use `report()`. You can also use the overloaded call operator.
  * To create a sub-context, either call `sub()` or use the overloaded call operator.

  Here is an example:

      from cdxbasics.verbose import Context, quiet

      def f_sub( num=10, context = quiet ):
              context.report(0, "Entering loop")
              for i in range(num):
                  context.report(1, "Number %ld", i)

      def f_main( context = quiet ):
          context.write( "First step" )
          
          context.report( 1, "Intermediate step 1" )
          context.report( 1, "Intermediate step 2\nwith newlines" )
          
          f_sub( context=context(1) ) # call function f_sub with a sub-context
          
          context.write( "Final step" )

      print("Verbose=1")
      context = Context(1)
      f_main(context)

      print("\nVerbose=2")
      context = Context(2)
      f_main(context)

      print("\nVerbose='all'")
      context = Context('all')
      f_main(context)

      print("\nVerbose='quiet'")
      context = Context('quiet')
      f_main(context)

  Returns

      Verbose=1
      00: First step
      01:   Intermediate step 1
      01:   Intermediate step 2
      01:   with newlines
      01:   Entering loop
      00: Final step

      Verbose=2
      00: First step
      01:   Intermediate step 1
      01:   Intermediate step 2
      01:   with newlines
      01:   Entering loop
      02:     Number 0
      02:     Number 1
      02:     Number 2
      02:     Number 3
      02:     Number 4
      02:     Number 5
      02:     Number 6
      02:     Number 7
      02:     Number 8
      02:     Number 9
      00: Final step

      Verbose='all'
      00: First step
      01:   Intermediate step 1
      01:   Intermediate step 2
      01:   with newlines
      01:   Entering loop
      02:     Number 0
      02:     Number 1
      02:     Number 2
      02:     Number 3
      02:     Number 4
      02:     Number 5
      02:     Number 6
      02:     Number 7
      02:     Number 8
      02:     Number 9
      00: Final step

      Verbose='quiet'

  The purpose of initializing functions usually with `quiet` is that they can be used accross different contexts without printing anything by default.



  Framework to keep track of versions of functions, and their dependencies. Main use case is a data pipeline where a changes in versions down a dependency tree should trigger an update of the "full" version of the respective top level calculation.

  The framework relies on the `@version` decorator which works for both classes and functions.
  Applied to either a function or class it will add a member `version` which has the following properties:

  * `version.input`: the input version as defined with `@version`.
  * `version.full`: a fully qualified version with all dependent functions and classes in human readable form.
  * `version.unique_id48`, `version.unique_id64`: unique hashes of `version.full` of 48 or 64 characters, respectively. You can use the function `version.unique_id()` to compute hash IDs of any length.
  * `version.dependencies`: a hierarchical list of dependencies for systematic inspection.

  Note that dependencies and all other information will only be resolved upon a first call to any of these properties.

  Usage is straight forward:

      from cdxbasics.version import version

      @version("0.0.1")
      def f(x):
          return x

      print( f.version.input ) --> 0.0.1
      print( f.version.full ) --> 0.0.1

  Dependencies are declared with the `dependencies` keyword:

      @version("0.0.2", dependencies=[f])
      def g(x):
          return f(x)

      print( g.version.input ) --> 0.0.2
      print( g.version.full ) --> 0.0.2 { f: 0.0.01 }

  You have access to `version` from within the function:

      @version("0.0.2", dependencies=[f])
      def g(x):
          print(g.version.full) --> 0.0.2 { f: 0.0.01 }
          return f(x)

  This works with classes, too:

      @version("0.0.3", dependencies=[f] )
      class A(object):
          def h(self, x):
              return f(x)

      print( A.version.input ) --> 0.0.3
      print( A.version.full ) --> 0.0.3 { f: 0.0.01 }

      a = A()
      print( a.version.input ) --> 0.0.3
      print( a.version.full ) --> 0.0.3 { f: 0.0.01 }

  You can also use strings to refer to dependencies. This functionality depends on visibility of the referred dependencies by the function in the function's `__global__` scope. Currently, it does not work with local function definitions.

      @version("0.0.4", dependencies=['f'])
      def r(x)
          return x

      print( r.version.full ) --> 0.0.4 { f: 0.0.01 }

  Dependencies on base classes are automatic:

      @version("0.0.1")
      class A(object):
          pass

      @version("0.0.2")
      class B(A):
          pass

      print( A.version.full ) --> 0.0.1
      print( B.version.full ) --> 0.0.2 { A: 0.0.1 }



  As a direct use case you can provide `version.unqiue_id48` to the `version` keyword of `SubDir.read` and `SubDir.write`. The latter will write the version string into the output file. The former will then read it back (by reading a small block of data), and check that the version written to the file matches the current version. If not, the file will be considered invalid; depending on the parameters to `read` the function will either return a default value, or will throw an exception.

      from cdxbasics.util import uniqueHash48
      from cdxbasics.version import version
      from cdxbasics.subdir import SubDir

      @version("0.0.1")
      def f( path, x, y, z ):

          unique_file = uniqueHash48( x,y,z )
          unique_ver  = f.version.unique_id48
          subdir      = SubDir(path)
          data        = subdir.read( unique_file, None, version=unique_ver )
          if not data is None:
              return data

          data = compute(x,y,z)

          subdir.write( unique_file, data, version=unique_ver )
          return data

  This functionality is used in `cdxbasics.cached`, below.



  Framework for caching versioned functions.

  The core tennets are:

  1. Cached functions have versions. If the version of a cached file differs from the current function version, do not use it. Versioning is implemented using `cdxbasics.version.version`.

  2. Ability to control the use of the cache dynamically. The user can chose to use, ignore or update the cache. This is controlled using `cdxbasics.util.CacheMode`.
  Control extends to dependent functions, i.e. we can force an update of a top level function if a dependent function needs an update.

  3. Transparent tracing: by default caching will provide detailled information about what is happening. This can be controlled using the `cache_verbose` parameter to `Cache`, which uses `cdxbasics.verbose.Context`.

  Here are some examples for managing caching:

      from cdxbasics.cached import version, cached, Cache

      
      @version("0.0.1")
      def f(x,y):
          return x*y
      @version("0.0.2", dependencies=[f])
      def g(x,y):
          return f(-x,y)

      
      @cached("0.0.3", dependencies=[g])
      def my_func( x,y, cache=None ):
          return g(2*x,y)

      
      @cached("0.0.4", dependencies=[my_func])
      def my_big_func(x,y,z, cache=None ):
          r = my_func(x,y,cache=cache)
          return r*z

      
      print("Version", my_big_func.version) # --> 0.0.4 { my_func: 0.0.3 { g: 0.0.2 { f: 0.0.1 } } }

      
      r = my_big_func(2,3,4)                # does not generate a cache: 'cache' argument not provided

      
      print("\nDelete existing cache")
      cache = Cache(cache_mode="clear")     # path defaults to !/.cached (e.g. tempdir/.cached)
      r = my_big_func(2,3,4,cache=cache)    # generates the cache for my_big_func and my_func

      
      print("\nGenerate new cache")
      cache = Cache()                       # path defaults to !/.cached (e.g. tempdir/.cached)
      r = my_big_func(2,3,4,cache=cache)    # generates the cache for my_big_func and my_func
      print("\nReading cache")
      r = my_big_func(2,3,4,cache=cache)    # reads cache for my_big_func

      
      print("\nUpdating all cached objects")
      cache_u = Cache(cache_mode="update")
      r = my_big_func(2,3,4,cache=cache_u)  # updates the caches for my_big_func, my_func
      print("\nReading cache")
      r = my_big_func(2,3,4,cache=cache)    # reads cache for my_big_func

      
      print("\nUpdating only 'my_big_func'")
      cache_lu = Cache(cache_mode="on", update=[my_big_func] )
      r = my_big_func(2,3,4,cache=cache_lu) # updates the cache for my_big_func using the cache for my_func
      print("\nReading cache")
      r = my_big_func(2,3,4,cache=cache)    # reads cached my_big_func

  Here is the output of above code block: it also shows the aforementioned transparent trading.

      Version 0.0.4 { my_func: 0.0.3 { g: 0.0.2 { f: 0.0.1 } } }

      Delete existing cache
      00: Deleted existing 'my_big_func' cache C:/Users/hansb/AppData/Local/Temp/.cache/my_big_func_6ac240bc128ec33ca37c17c5aab243e46b976893ccf0c40a.pck
      01:   Deleted existing 'my_func' cache C:/Users/hansb/AppData/Local/Temp/.cache/my_func_47317c662192f51fddd527cb89369f77c547fc58cca962d7.pck

      Generate new cache
      01:   Wrote 'my_func' cache C:/Users/hansb/AppData/Local/Temp/.cache/my_func_47317c662192f51fddd527cb89369f77c547fc58cca962d7.pck
      00: Wrote 'my_big_func' cache C:/Users/hansb/AppData/Local/Temp/.cache/my_big_func_6ac240bc128ec33ca37c17c5aab243e46b976893ccf0c40a.pck

      Reading cache
      00: Successfully read cache for 'my_big_func' from 'C:/Users/hansb/AppData/Local/Temp/.cache/my_big_func_6ac240bc128ec33ca37c17c5aab243e46b976893ccf0c40a.pck'

      Updating cache
      00: Deleted existing 'my_big_func' cache C:/Users/hansb/AppData/Local/Temp/.cache/my_big_func_6ac240bc128ec33ca37c17c5aab243e46b976893ccf0c40a.pck
      01:   Deleted existing 'my_func' cache C:/Users/hansb/AppData/Local/Temp/.cache/my_func_47317c662192f51fddd527cb89369f77c547fc58cca962d7.pck
      01:   Wrote 'my_func' cache C:/Users/hansb/AppData/Local/Temp/.cache/my_func_47317c662192f51fddd527cb89369f77c547fc58cca962d7.pck
      00: Wrote 'my_big_func' cache C:/Users/hansb/AppData/Local/Temp/.cache/my_big_func_6ac240bc128ec33ca37c17c5aab243e46b976893ccf0c40a.pck

      Reading cache
      00: Successfully read cache for 'my_big_func' from 'C:/Users/hansb/AppData/Local/Temp/.cache/my_big_func_6ac240bc128ec33ca37c17c5aab243e46b976893ccf0c40a.pck'

      Updating only 'my_big_func'
      00: Caching mode for function 'my_big_func' set to 'update' as it depends on 'my_big_func'
      00: Deleted existing 'my_big_func' cache C:/Users/hansb/AppData/Local/Temp/.cache/my_big_func_6ac240bc128ec33ca37c17c5aab243e46b976893ccf0c40a.pck
      01:   Successfully read cache for 'my_func' from 'C:/Users/hansb/AppData/Local/Temp/.cache/my_func_47317c662192f51fddd527cb89369f77c547fc58cca962d7.pck'
      00: Wrote 'my_big_func' cache C:/Users/hansb/AppData/Local/Temp/.cache/my_big_func_6ac240bc128ec33ca37c17c5aab243e46b976893ccf0c40a.pck

      Reading cache
      00: Successfully read cache for 'my_big_func' from 'C:/Users/hansb/AppData/Local/Temp/.cache/my_big_func_6ac240bc128ec33ca37c17c5aab243e46b976893ccf0c40a.pck'


pkgId: f5007f34296f9eccf264368e5f5e0da62c4a49693c4d62d48b182a3a73e042e4
name: python-ce-bnch-sdk
arch: src
version: 2.2.0b0
epoch: 0
release: 1
summary: SDK for interacting with the Benchling Platform.
url: https://pypi.org/project/ce-bnch-sdk/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ce-bnch-sdk-2.2.0b0-1.src.rpm
checksum_type: sha256
description:
  This is the Customer Engineering team's branch of the Benchling SDK, containing features that we are not yet ready to release to customers.

  Currently, the only difference from the main Benchling SDK is the Benchling Apps CLI.


  The SDK comes with a CLI for managing Benchling Apps, which is still under alpha testing.

  Each integration corresponds to a Benchling App. You declare the app's dependencies in a manifest file, typically a top-level file named `manifest.yaml`. For example:
  ```yaml
  manifestVersion: 1  # Currently only version 1 exists

  info:
    name: My App

    version: 0.0.1
    description: Cure cancer  # Optional

  configuration:
    - name: My Plasmid  # Should match the actual name in Benchling, if possible, as apps tries to find the dependency by name
      type: entity_schema  # Corresponds to the API namespace, in this case /entity-schemas
      subtype: dna_sequence  # This section is only used by resources with type "entity-schema"
                             
      description: Plasmid schema of interest  # Optional
      fieldDefinitions:
        - name: My Backbone
        - name: My Resistances
    - name: Optical Density Assay
      type: assay_run_schema
      fieldDefinitions:
        - name: optical_density  # Run, result, and request schemas use the snake-cased "warehouse name"
    - name: Resistance
      type: dropdown
      options:
        - name: 1 - Ampicillin
        - name: 2 - Penicillin
    - name: My Project
      type: project
  ```
  Any resource type which is served by the Benchling API can be referenced, using its kebab-cased name. Below is the full list of possible values for `resourceType`. Schema types:
  - entity_schema
  - container_schema
  - plate_schema
  - box_schema
  - location_schema
  - assay_result_schema
  - assay_run_schema
  - request_schema
  - entry_schema
  - workflow_task_schema
  - dropdown
  - workflow_task_status

  Individual resource types:
  - aa_sequence
  - assay_result
  - assay_run
  - automation_input_generator
  - automation_output_processor
  - blob
  - box
  - container
  - custom_entity
  - dna_alignment
  - dna_oligo
  - dna_sequence
  - entry
  - folder
  - label_printer
  - label_template
  - location
  - plate
  - project
  - registry
  - request

  Once you've declared the dependencies, you can generate the `dependencies.py` file and the model classes (in this case `my_plasmid.py`, `optical_density_assay.py`, and `resistance.py`) using the command:
  ```bash

  poetry run benchling-sdk app dependencies scaffold
  ```

  Next, once a Benchling tenant has been set up where you want to run the integration, you can link each dependency to its corresponding Benchling API ID by using the configuration UI for Benchling Apps in the tenant.

  Now the integration will have full access to all its required dependencies. See the documentation in the generated files for more detailed instructions on usage in the integration code.



  For more detailed usage of the SDK, refer to the [public release notes](https://pypi.org/project/benchling-sdk/), which are stored as part of the project
  in `publish/README.public.md`.

  Simple usage example iterating through DNA sequences:

  ```python
  from benchling_sdk.auth.api_key_auth import ApiKeyAuth
  from benchling_sdk.benchling import Benchling

  benchling = Benchling(url="https://my.benchling.com", auth_method=ApiKeyAuth("api_key"))

  dna_sequence_pages = benchling.dna_sequences.list()

  for page in dna_sequence_pages:
      for dna_sequence in page:
          print(dna_sequence.bases)
  ```



  The `benching_sdk.benchling.Benchling` object serves as the point of entry for the SDK. API calls are organized into
  services that generally correspond to [Capillary documentation](https://docs.benchling.com/reference).

  Each method calling the API is wrapped with an `@api_method` decorator. This decorator applies several global
  behaviors which may not be readily obvious including:
  * Conditionally adding some logging on each method call
  * Applying retries via the backoff library when `RetryStrategy` is configured

  Logging in the SDK follows the [Python best practice](https://docs.python-guide.org/writing/logging/#logging-in-a-library)
  of only adding the `logging.NullHandler()`. An example of enabling basic logging:

  ```python
  import logging
  logging.basicConfig(level=logging.INFO)
  ```

  For more details on configuring or disabling `RetryStrategy`, refer to *Advanced Use Cases* in `publish/README.public.md`.

  HTTP errors like `404` not found are all caught via `raise_for_status()` and transformed into
  a standardized `BenchlingError` which wraps the underlying error for a better general error handling experience.
  A caught BenchlingError can be inspected to learn the status triggering it, and the full contents of the error
  response returned from the Benchling server.



  Although generated models are packaged in `benchling_api_client.models`
  and its files, we externalize the models via `benchling_sdk.models` in
  order to abstract `benchling_api_client` from users such that they may
  simply import `benchling_sdk.models.ExampleModelClass`.

  This is accomplished in `benchling_sdk/models/__init__.py`. This file
  is automatically generated from a Jinja template in `templates/` by
  running `poetry run task models`. Changes should be committed to source
  control. All tasks should be run from the root directory of the project.

  Missing models from `benchling_api_client` are verified by unit
  test in `benchling-sdk/tests/unit/test_models.py`.



  ```bash
  poetry run pre-commit install --hook-type pre-push
  ```



  To create a release of the SDK, create a tag in Git from the `main` branch. CI will then
  initiate a build, generate the client, and publish the resulting packages.

  The published version will reflect the tag, so a tag of `1.0.4` will publish version `1.0.4`. Tags that do not meet
  Poetry's [version format](https://semver.org/) will create a failed build when publishing is attempted.

  This README will not be published alongside the public package. To modify the public README, modify
  `publish/README.public.md`. The changes will be copied over when preparing for publishing.

  *NOTE*: There are some scripts executed that make changes to the working directory and its files with the intention
  of them being discarded (e.g., during CI). If running the scripts locally, exercise caution and save your changes
  first.



  This project uses a feature of the `openapi-python-client` dependency to override one of the templates used for code
  generation in that project.  Since this project alters how code generation works, it includes unit testing around that
  generation in the form of diffing against a known-good version of the generated code, referred to as the `golden-record`
  (taken from the upstream's naming for their version of this test).  Unit testing will break if the overridden template
  which lives under `benchling_sdk/codegen/templates` is altered in a way which changes the output of the generated code.

  In the event that the breaking changes to this test are intentional, you can regenerate the golden-record:

  ```
  poetry run task regenerate_golden_record
  ```



  Integration tests must be run manually, either via IDE test runners or by command line:

  ```bash
  poetry run task integration
  ```

  Integration tests will not run under CI yet and are currently tightly coupled to cesdktest.bnch.org. They
  are most effective for quickly running manual regression testing.


pkgId: 4589cb8e235f1242d72b79db60751428c2449d86b8c3149d23a94bba3c1a9b80
name: python-ceasium
arch: src
version: 0.16.0
epoch: 0
release: 1
summary: A hassle free C (gcc) JSON build system.
url: https://pypi.org/project/ceasium/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ceasium-0.16.0-1.src.rpm
checksum_type: sha256
description:
  A hassle free JSON based GCC build system.



  C is a great language, but tooling around it like CMake or Make are a bit
  complicated. While CMake is great when it comes to being able to specify a
  complicated build, its syntax has a steep learning curve and is quite cumbersome
  and non-intuitive. Thus I created Ceasium.



  Ceasium features most of the things that are regularly needed.

  - pkg-config to resolve C_FLAGS and LD_FLAGS
  - Ability to specify your own C_FLAGS and LD_FLAGS
  - Build executables, static and dynamic libraries
  - .c file discovery within a given directory
  - Caching based on modification date including dependency discovery
  - Exclusion of certain .o files when linking



  ```
  pip install ceasium
  ```



  - Python
  - GCC compiler
  - pkg-config



  Ceasium provides these commands:

  - `cs init`
  - `cs build`
    - [Optional] `<src.json/test.json/whatever.json>` specify which json file to build
  - `cs clean`



  Example config:

  ```json
  {
    "name": "game-engine",
    "type": "exe",
    "cflags": [
      "-I./include",
      "-g",
      "-W",
      "-Wall",
      "-O3",
      "-fopenmp",
      "-fdiagnostics-color=always"
    ],
    "ldflags": ["-lopengl32", "-fopenmp"],
    "libs": ["glew", "sdl2", "glib-2.0", "assimp"]
  }
  ```


pkgId: adaca3b0ac2df6619f836414caa7057044ab906d523b87c0a24da18558644845
name: python-cebra
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Consistent Embeddings of high-dimensional Recordings using Auxiliary variables
url: https://github.com/AdaptiveMotorControlLab/CEBRA
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cebra-0.4.0-1.src.rpm
checksum_type: sha256
description:
  <div align="center">


  <p align="center">
  <img src="https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/6f3943a1-b76d-4674-9df9-87aebd33e517/cebralogo.png?format=2500w" width="95%">
  </p>



  [📚Documentation](https://cebra.ai/docs/) |
  [💡DEMOS](https://cebra.ai/docs/demos.html) |
  [🛠️ Installation](https://cebra.ai/docs/installation.html) |
  [🌎 Home Page](https://www.cebra.ai) |
  [🚨 News](https://cebra.ai/docs/index.html) |
  [🪲 Reporting Issues](https://github.com/AdaptiveMotorControlLab/CEBRA)


  [![Downloads](https://static.pepy.tech/badge/cebra)](https://pepy.tech/project/cebra)
  [![Downloads](https://static.pepy.tech/badge/cebra/month)](https://pepy.tech/project/cebra)
  [![PyPI version](https://badge.fury.io/py/cebra.svg)](https://badge.fury.io/py/cebra)
  ![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-red)
  [![Twitter Follow](https://img.shields.io/twitter/follow/CEBRAAI.svg?label=CEBRAai&style=social)](https://twitter.com/CEBRAAI)



  </div>



  **CEBRA** is a library for estimating **C**onsistent **E**m**B**eddings of high-dimensional **R**ecordings using **A**uxiliary variables. It contains self-supervised learning algorithms implemented in PyTorch, and has support for a variety of different datasets common in biology and neuroscience.

  To receive updates on code releases, please 👀 watch or ⭐️ star this repository!

  ``cebra`` is a self-supervised method for non-linear clustering that allows for label-informed time series analysis.
  It can jointly use behavioral and neural data in a hypothesis- or discovery-driven manner to produce consistent, high-performance latent spaces. While it is not specific to neural and behavioral data, this is the first domain we used the tool in. This application case is to obtain a consistent representation of latent variables driving activity and behavior, improving decoding accuracy of behavioral variables over standard supervised learning, and obtaining embeddings which are robust to domain shifts.




  - 📄 **Publication May 2023**:
    [Learnable latent embeddings for joint behavioural and neural analysis.](https://doi.org/10.1038/s41586-023-06031-6)
    Steffen Schneider*, Jin Hwa Lee* and Mackenzie Weygandt Mathis. Nature 2023.

  - 📄 **Preprint April 2022**:
    [Learnable latent embeddings for joint behavioral and neural analysis.](https://arxiv.org/abs/2204.00673)
    Steffen Schneider*, Jin Hwa Lee* and Mackenzie Weygandt Mathis



  - Since version 0.4.0, CEBRA is open source software under an Apache 2.0 license.
  - Prior versions 0.1.0 to 0.3.1 were released for academic use only (please read the license file).


pkgId: 321bf61373c76c244089fca44deecb29b67c4bcf00a50d7b9c2ca32b3925b3cf
name: python-ceda-datapoint
arch: src
version: 0.3.1
epoch: 0
release: 1
summary: DataPoint provides python-based search/access tools for using data primarily from the CEDA Archive.
url: https://pypi.org/project/ceda-datapoint/
rpm_license: {file = "LICENSE"}
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ceda-datapoint-0.3.1-1.src.rpm
checksum_type: sha256
description:
  **ceda-datapoint** is a Python package which provides python-based search/access tools for using data primarily from the CEDA Archive. For some time we've been generating so-called
  Cloud Formats which act as representations, references or mappers to data stored in the CEDA Archive. Most of our data is in archival formats like NetCDF/HDF which makes them great for use with the HPC architecture on which the archive resides (see the [JASMIN homepage](https://jasmin.ac.uk/>) for more details), but not so good for open access outside of JASMIN.

  See the documentation at https://cedadev.github.io/datapoint for more information.



  The DataPoint module is now an installable module with pip!
  ```
  pip install ceda-datapoint
  ```



  See the documentation for a more in-depth description of how to run a search query and access data.
  ```
  from ceda_datapoint import DataPointClient
  client = DataPointClient(org='CEDA)

  ```


pkgId: 887c7e5ce308ed4e7bf75d08421cdef9f5616acd846012ccd99ab6991189dce9
name: python-cedar-backup3
arch: src
version: 3.8.2
epoch: 0
release: 1
summary: Implements local and remote backups to CD/DVD and Amazon S3
url: https://pypi.org/project/cedar-backup3/
rpm_license: GPL-2.0-only
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cedar-backup3-3.8.2-1.src.rpm
checksum_type: sha256
description:
  [![pypi](https://img.shields.io/pypi/v/cedar-backup3.svg)](https://pypi.org/project/cedar-backup3/)
  [![license](https://img.shields.io/pypi/l/cedar-backup3.svg)](https://github.com/pronovic/cedar-backup3/blob/master/LICENSE)
  [![wheel](https://img.shields.io/pypi/wheel/cedar-backup3.svg)](https://pypi.org/project/cedar-backup3/)
  [![python](https://img.shields.io/pypi/pyversions/cedar-backup3.svg)](https://pypi.org/project/cedar-backup3/)
  [![Test Suite](https://github.com/pronovic/cedar-backup3/workflows/Test%20Suite/badge.svg)](https://github.com/pronovic/cedar-backup3/actions?query=workflow%3A%22Test+Suite%22)
  [![docs](https://readthedocs.org/projects/cedar-backup3/badge/?version=stable&style=flat)](https://cedar-backup3.readthedocs.io/en/stable/)
  [![coverage](https://coveralls.io/repos/github/pronovic/cedar-backup3/badge.svg?branch=master)](https://coveralls.io/github/pronovic/cedar-backup3?branch=master)
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)

  [Cedar Backup](https://github.com/pronovic/cedar-backup3) is a software package
  designed to manage system backups for a pool of local and remote machines.
  Cedar Backup understands how to back up filesystem data as well as MySQL and
  PostgreSQL databases and Subversion repositories.  It can also be easily
  extended to support other kinds of data sources.

  Cedar Backup is focused around weekly backups to a single CD or DVD disc,
  with the expectation that the disc will be changed or overwritten at the
  beginning of each week.  If your hardware is new enough, Cedar Backup can
  write multisession discs, allowing you to add incremental data to a disc on
  a daily basis.  Alternately, Cedar Backup can write your backups to the Amazon
  S3 cloud rather than relying on physical media.  See
  the [Cedar Backup v3 Software Manual](https://cedar-backup3.readthedocs.io/en/stable/manual/index.html) for details.

  Besides offering command-line utilities to manage the backup process, Cedar
  Backup provides a well-organized library of backup-related functionality.
  For more information, see
  the [API Reference](https://cedar-backup3.readthedocs.io/en/stable/autoapi/index.html).

  There are many different backup software systems in the open source world.
  Cedar Backup aims to fill a niche: it aims to be a good fit for people who need
  to back up a limited amount of important data on a regular basis. Cedar Backup
  isn’t for you if you want to back up your huge MP3 collection every night, or
  if you want to back up a few hundred machines.  However, if you administer a
  small set of machines and you want to run daily incremental backups for things
  like system configuration, current email, small web sites, source code
  repositories, or small databases, then Cedar Backup is probably worth your
  time.


pkgId: eb56b8d9e0072b1da38e2fd39b7d9a03ff24dc021aa521b8558992db9166ef88
name: python-cedarscript-ast-parser
arch: src
version: 0.5.3
epoch: 0
release: 1
url: https://github.com/CEDARScript/cedarscript-ast-parser-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cedarscript-ast-parser-0.5.3-1.src.rpm
checksum_type: sha256
summary:
  A library for parsing and interpreting CEDARScript, a SQL-like language for code analysis and transformations

description:
  [![PyPI version](https://badge.fury.io/py/cedarscript-ast-parser.svg)](https://pypi.org/project/cedarscript-ast-parser/)
  [![Python Versions](https://img.shields.io/pypi/pyversions/cedarscript-ast-parser.svg)](https://pypi.org/project/cedarscript-ast-parser/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

  `CEDARScript AST Parser` is a Python library for parsing and interpreting `CEDARScript`, a SQL-like language designed for concise code analysis, manipulation, and refactoring tasks.



  [CEDARScript](https://github.com/CEDARScript/cedarscript-grammar#readme) (_Concise Examination, Development, And Refactoring Script_) is a domain-specific language that
  aims to improve how AI coding assistants interact with codebases and communicate their code modification intentions.
  It provides a standardized way to express complex code modification and analysis operations, making it easier for
  AI-assisted development tools to understand and execute these tasks.



  - Parse `CEDARScript` Abstract Syntax Tree (`AST`) that was generated by Tree-Sitter into a list of commands
  - Support for various code manipulation and analysis commands (CREATE, UPDATE, RM, MV, SELECT)
  - Return results in `XML` format for easier parsing and processing by LLM systems



  You can install CEDARScript Parser using pip:

  ```
  pip install cedarscript-ast-parser
  ```



  Here's a quick example of how to use CEDARScript Parser:

  ```python
  from cedarscript_ast_parser import CEDARScriptASTParser

  parser = CEDARScriptASTParser()
  code = """
  CREATE FILE "example.py"
  UPDATE FILE "example.py"
      INSERT AT END OF FILE
          CONTENT
              print("Hello, World!")
          END CONTENT
  END UPDATE
  """

  commands, errors = parser.parse_script(code)

  if errors:
      for error in errors:
          print(f"Error: {error}")
  else:
      for command in commands:
          print(f"Parsed command: {command}")
  ```



  Contributions are welcome! Please feel free to submit a Pull Request.



  This project is licensed under the MIT License.


pkgId: 9c74b404bc34e6761ac4f6b2fff40435aff7d48bdfdd2c02808ced8648d65ed0
name: python-cedarscript-ast-parser
arch: src
version: 0.5.6
epoch: 0
release: 1
url: https://github.com/CEDARScript/cedarscript-ast-parser-python
rpm_license: AGPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cedarscript-ast-parser-0.5.6-1.src.rpm
checksum_type: sha256
summary:
  A library for parsing and interpreting CEDARScript, a SQL-like language for code analysis and transformations

description:
  [![PyPI version](https://badge.fury.io/py/cedarscript-ast-parser.svg)](https://pypi.org/project/cedarscript-ast-parser/)
  [![Python Versions](https://img.shields.io/pypi/pyversions/cedarscript-ast-parser.svg)](https://pypi.org/project/cedarscript-ast-parser/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

  `CEDARScript AST Parser` is a Python library for parsing and interpreting `CEDARScript`, a SQL-like language designed for concise code analysis, manipulation, and refactoring tasks.



  [CEDARScript](https://bit.ly/cedarscript) (_Concise Examination, Development, And Refactoring Script_) is a domain-specific language that
  aims to improve how AI coding assistants interact with codebases and communicate their code modification intentions.
  It provides a standardized way to express complex code modification and analysis operations, making it easier for
  AI-assisted development tools to understand and execute these tasks.



  - Parse `CEDARScript` Abstract Syntax Tree (`AST`) that was generated by Tree-Sitter into a list of commands
  - Support for various code manipulation and analysis commands (CREATE, UPDATE, RM, MV, SELECT)
  - Return results in `XML` format for easier parsing and processing by LLM systems



  You can install CEDARScript Parser using pip:

  ```
  pip install cedarscript-ast-parser
  ```



  Here's a quick example of how to use CEDARScript Parser:

  ```python
  from cedarscript_ast_parser import CEDARScriptASTParser

  parser = CEDARScriptASTParser()
  code = """
  CREATE FILE "example.py"
  UPDATE FILE "example.py"
      INSERT AT END OF FILE
          CONTENT
              print("Hello, World!")
          END CONTENT
  END UPDATE
  """

  commands, errors = parser.parse_script(code)

  if errors:
      for error in errors:
          print(f"Error: {error}")
  else:
      for command in commands:
          print(f"Parsed command: {command}")
  ```



  Contributions are welcome! Please feel free to submit a Pull Request.



  This project is licensed under the MIT License.


pkgId: 54fd247c3852007e2b7b4d9e40411ebe5c4b50f624d264f8c8d8f7c1b15145d7
name: python-cedarscript-editor
arch: src
version: 1.2.1
epoch: 0
release: 1
summary: A library for executing CEDARScript, a SQL-like language for code analysis and transformations
url: https://github.com/CEDARScript/cedarscript-editor-python
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cedarscript-editor-1.2.1-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/cedarscript-editor.svg)](https://pypi.org/project/cedarscript-editor/)
  [![Python Versions](https://img.shields.io/pypi/pyversions/cedarscript-editor.svg)](https://pypi.org/project/cedarscript-editor/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

  `CEDARScript Editor (Python)` is a [CEDARScript](https://github.com/CEDARScript/cedarscript-grammar#readme) runtime
  for interpreting `CEDARScript` scripts and performing code analysis and modification operations on a codebase.

  CEDARScript enables offloading _low-level code syntax and structure concerns_, such as indentation and line counting,
  from the LLMs.
  The CEDARScript runtime _bears the brunt of file editing_ by locating the exact line numbers and characters to change,
  which indentation levels to apply to each line and so on, allowing the _CEDARScript commands_ to focus instead on
  **higher levels of abstraction**, like identifier names, line markers, relative indentations and positions
  (`AFTER`, `BEFORE`, `INSIDE` a function, its `BODY`, at the `TOP` or `BOTTOM` of it...).

  It acts as an _intermediary_ between the **LLM** and the **codebase**, handling the low-level details of code
  manipulation and allowing the AI to focus on higher-level tasks.



  [CEDARScript](https://github.com/CEDARScript/cedarscript-grammar#readme) (_Concise Examination, Development, And Refactoring Script_)
  is a domain-specific language that aims to improve how AI coding assistants interact with codebases and communicate
  their code modification intentions.

  It provides a standardized way to express complex code modification and analysis operations, making it easier for
  AI-assisted development tools to understand and execute these tasks.



  - Given a `CEDARScript` script and a base directory, executes the script commands on files inside the base directory;
  - Return results in `XML` format for easier parsing and processing by LLM systems



  You can install `CEDARScript` Editor using pip:

  ```
  pip install cedarscript-editor
  ```



  Here's a quick example of how to use `CEDARScript` Editor:

  ```python
  from cedarscript_editor import CEDARScriptEdior

  parser = CEDARScriptEdior()
  code = """
  CREATE FILE "example.py"
  UPDATE FILE "example.py"
      INSERT AT END OF FILE
          CONTENT
              print("Hello, World!")
          END CONTENT
  END UPDATE
  """

  commands, errors = parser.parse_script(code)

  if errors:
      for error in errors:
          print(f"Error: {error}")
  else:
      for command in commands:
          print(f"Parsed command: {command}")
  ```



  Contributions are welcome! Please feel free to submit a Pull Request.



  This project is licensed under the MIT License.


pkgId: 5e29a8c476a9a38556db64c88daae8ee67dbe04382feac97d895106bb601bae6
name: python-cedarscript-editor
arch: src
version: 1.2.3
epoch: 0
release: 1
summary: A library for executing CEDARScript, a SQL-like language for code analysis and transformations
url: https://github.com/CEDARScript/cedarscript-editor-python
rpm_license: AGPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cedarscript-editor-1.2.3-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/cedarscript-editor.svg)](https://pypi.org/project/cedarscript-editor/)
  [![Python Versions](https://img.shields.io/pypi/pyversions/cedarscript-editor.svg)](https://pypi.org/project/cedarscript-editor/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

  `CEDARScript Editor (Python)` is a [CEDARScript](https://bit.ly/cedarscript) runtime
  for interpreting `CEDARScript` scripts and performing code analysis and modification operations on a codebase.

  CEDARScript enables offloading _low-level code syntax and structure concerns_, such as indentation and line counting,
  from the LLMs.
  The CEDARScript runtime _bears the brunt of file editing_ by locating the exact line numbers and characters to change,
  which indentation levels to apply to each line and so on, allowing the _CEDARScript commands_ to focus instead on
  **higher levels of abstraction**, like identifier names, line markers, relative indentations and positions
  (`AFTER`, `BEFORE`, `INSIDE` a function, its `BODY`, at the `TOP` or `BOTTOM` of it...).

  It acts as an _intermediary_ between the **LLM** and the **codebase**, handling the low-level details of code
  manipulation and allowing the AI to focus on higher-level tasks.



  [CEDARScript](https://github.com/CEDARScript/cedarscript-grammar#readme) (_Concise Examination, Development, And Refactoring Script_)
  is a domain-specific language that aims to improve how AI coding assistants interact with codebases and communicate
  their code modification intentions.

  It provides a standardized way to express complex code modification and analysis operations, making it easier for
  AI-assisted development tools to understand and execute these tasks.



  - Given a `CEDARScript` script and a base directory, executes the script commands on files inside the base directory;
  - Return results in `XML` format for easier parsing and processing by LLM systems



  You can install `CEDARScript` Editor using pip:

  ```
  pip install cedarscript-editor
  ```



  Here's a quick example of how to use `CEDARScript` Editor:

  ```python
  from cedarscript_editor import CEDARScriptEdior

  parser = CEDARScriptEdior()
  code = """
  CREATE FILE "example.py"
  UPDATE FILE "example.py"
      INSERT AT END OF FILE
          CONTENT
              print("Hello, World!")
          END CONTENT
  END UPDATE
  """

  commands, errors = parser.parse_script(code)

  if errors:
      for error in errors:
          print(f"Error: {error}")
  else:
      for command in commands:
          print(f"Parsed command: {command}")
  ```



  Contributions are welcome! Please feel free to submit a Pull Request.



  This project is licensed under the MIT License.


pkgId: 0897cc10987fecb8cf96a5c8051510a3eabdc0540b8130971faf7bf0014b9f5b
name: python-cedarscript-integration-aider
arch: src
version: 1.3.0
epoch: 0
release: 1
summary: Allows `Aider` to use CEDARScript as an edit format
url: https://github.com/CEDARScript/cedarscript-integration-aider
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cedarscript-integration-aider-1.3.0-1.src.rpm
checksum_type: sha256
description:
  +++ 2024-10-22-05-13-37--gemini-1.5-flash-refactoring-cedarscript-i0.0.9-e0.3.3



  @@ Improved, now PASSED (36) @@
  ++analyzer_cli_DebugAnalyzer__make_source_table: -4 -> 0
  ++autodetector_MigrationAutodetector__trim_to_apps: -4 -> 0
  ++backends_ModelBackend_with_perm: -4 -> 0
  ++builtin_BuiltinVariable_call_setattr: -4 -> 0
  ++checks_BaseModelAdminChecks__check_ordering_item: -4 -> 0
  ++checks_BaseModelAdminChecks__check_raw_id_fields_item: -4 -> 0
  ++checks_ModelAdminChecks__check_action_permission_methods: -4 -> 0
  ++checks_ModelAdminChecks__check_inlines_item: -4 -> 0
  ++checks_ModelAdminChecks__check_list_display_item: -4 -> 0
  ++clustering_ops_KMeans__mini_batch_training_op: -4 -> 0
  ++codeeditor_CodeEditor___get_brackets: -4 -> 0
  ++config_AppConfig__path_from_module: -4 -> 0
  ++config_ConfigCLI__get_settings_vars: -4 -> 0
  ++coordinator_HERETransitDataUpdateCoordinator__parse_transit_response: -4 -> 0
  ++cuda_cpp_scheduling_CUDACPPScheduling__can_fuse_epilogue_impl: -4 -> 0
  ++dataframeeditor_DataFrameView_next_index_name: -4 -> 0
  ++diffsettings_Command_output_hash: -4 -> 0
  ++dim2_Dim2CompatTests_test_reductions_2d_axis0: -4 -> 3
  ++distribution_DistributionFiles_parse_distribution_file_SUSE: -4 -> 0
  ++doc_DocCLI_get_role_man_text: -4 -> 0
  ++figure_FigureBase_colorbar: -4 -> 0
  ++functional_Functional__conform_to_reference_input: -4 -> 0
  ++galaxy_GalaxyCLI_execute_list_collection: -4 -> 0
  ++kernel_SpyderKernel_get_fault_text: -4 -> 1
  ++main_widget_PylintWidget_parse_output: -4 -> 0
  ++methods_BaseMethodsTests_test_where_series: -4 -> 0
  ++ogrinspect_Command_add_arguments: -4 -> 0
  ++onnxfunction_dispatcher_OnnxFunctionDispatcher__get_aten_name: -4 -> 1
  ++operations_DatabaseOperations_last_executed_query: -4 -> 0
  ++polar_RadialTick__determine_anchor: -4 -> 0
  ++profile_analyzer_cli_ProfileAnalyzer__get_list_profile_lines: -4 -> 0
  ++split_cat_SplitCatSimplifier_replace_cat: -4 -> 0
  ++split_cat_SplitCatSimplifier_replace_split: -4 -> 0
  ++text_CountVectorizer__limit_features: -4 -> 0
  ++triton_TritonScheduling_define_kernel: -4 -> 0
  ++triton_TritonScheduling_generate_node_schedule: -4 -> 0
  @@ Improved, minor (3) @@
  + checks_BaseModelAdminChecks__check_autocomplete_fields_item: 3 -> 0
  + dataloader_DataLoader__is_role: 2 -> 0
  + operations_OracleOperations_convert_extent: 1 -> 0
  @@ Worsened, now FAILED (7) @@
  --base_BaseHandler_adapt_method_mode: 0 -> -4
  --feedgenerator_Atom1Feed_add_item_elements: 0 -> -4
  --generic_bsd_GenericBsdIfconfigNetwork_parse_inet_line: 0 -> -4
  --graph_drawer_FxGraphDrawer__stringify_tensor_meta: 0 -> -4
  --group_batch_fusion_GroupLinearFusion_fuse: 0 -> -4
  --inspectdb_Command_normalize_col_name: 0 -> -4
  --introspection_DatabaseIntrospection__parse_column_or_constraint_definition: 0 -> -4
  @@ Stable: PASSED (30) @@
  =+autosave_AutosaveForPlugin_get_files_to_recover: 0
  =+base_BaseHandler_check_response: 0
  =+baseconv_BaseConverter_convert: 0
  =+compile_utils_MetricsContainer__get_metric_object: 0
  =+concat__Concatenator__clean_keys_and_objs: 0
  =+config_NetworkConfig_parse: 0
  =+csrf_CsrfViewMiddleware__set_csrf_cookie: 0
  =+dumpdata_Command_add_arguments: 0
  =+finders_FileSystemFinder_check: 0
  =+gateway_Gateway_get_and_delete_all_sms: 0
  =+getitem_BaseGetitemTests_test_get: 0
  =+grad_scaler_GradScaler__unscale_grads_: 0
  =+gradient_checker_GradientChecker__assertInferTensorChecks: 0
  =+graph_MigrationGraph_iterative_dfs: 0
  =+grpc_debug_server_EventListenerBaseServicer__process_tensor_event_in_chunks: 0
  =+i18n_JavaScriptCatalog_get_paths: 0
  =+inspectdb_Command_get_field_type: 0
  =+inspectdb_Command_get_meta: 0
  =+introspection_DatabaseIntrospection__get_column_collations: 0
  =+load_v1_in_v2__EagerSavedModelLoader__extract_signatures: 0
  =+makemessages_Command_add_arguments: 0
  =+makemigrations_Command_add_arguments: 0
  =+migrate_Command_add_arguments: 0
  =+operations_DatabaseOperations_bulk_insert_sql: 0
  =+operations_DatabaseOperations_check_expression_support: 0
  =+reshaping_BaseReshapingTests_test_concat_mixed_dtypes: 0
  =+schema_DatabaseSchemaEditor_quote_value: 0
  =+shell_Command_python: 0
  =+special_RunSQL__run_sql: 0
  =+weather_NWSWeather__forecast: 0
  @@ Stable: FAILED (13) @@
  =-autodetector_MigrationAutodetector_check_dependency: -4 -> -4
  =-checks_ModelAdminChecks__check_list_editable_item: -4 -> -4
  =-common_methods_invocations_foreach_inputs_sample_func__sample_rightmost_arg: -4 -> -4
  =-common_utils_TestCase_genSparseTensor: -4 -> -4
  =-doc_DocCLI_display_plugin_list: -4 -> -4
  =-generator_GenOpTestCase_out_variant_op_test_case_generator: -4 -> -4
  =-options_ModelAdmin_message_user: -4 -> -4
  =-patches__Curve__get_arrow_wedge: -4 -> -4
  =-quiver_Barbs__make_barbs: -4 -> -4
  =-reshaping_BaseReshapingTests_test_unstack: -4 -> -4
  =-sharding_policies_MaxShardSizePolicy__add_partition: -4 -> -4
  =-split_cat_SplitCatSimplifier_get_transform_params: -4 -> -4


pkgId: 89cc1d8a05be8366c1965e2ab6c7ad58d286a944f438ccd9ca26d4ba443f54e7
name: python-cedartl
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: Minimally intrusive templating language thought for interactive use in LLM chats
url: https://github.com/CedarVerse/cedartl
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cedartl-0.0.1-1.src.rpm
checksum_type: sha256
description:
  A minimally-intrusive templating language thought for interactive use in LLM chats

  CedarTL is a recursive, minimally-intrusive templating language tailored to interactive use, like in an LLM chat session.
  It's got a straightforward syntax that's easy to grasp.


  1. **Minimal syntax overhead**: The syntax is designed to blend naturally with the target text, minimizing typing overhead
  2. **Recursive**: It can process templates within templates, allowing for nested template structures
  3. **Hierarchical** key access and function calls
  4. **Directory-based** templating through `FolderDict` (accessing local directories, tar/zip files, and remote servers via WebDAV, HTTP, FTP, etc)
  5. **Direct shell** command integration
  6. **LLM integration**

  You provide the `CedarTL` runtime a _root context_: a `dict`, a `list`, an object, or a `FolderDict`
  (a path to a directory where its contained files are the keys, and the file contents are the values)


  To escape to `CedarTL` syntax, you type a backslash and then a symbol. Examples:


  `\name`: Key lookup.
  `\path/to/key`: Nested Key lookup
  `\!(shell commands)`: Shell escape hatch


  `\*chat(some text)`: LLM chat (starts a separate LLM session)
  `\*temp(<float>)`: LLM temperature control

  ... more to come


pkgId: 936cce1d6c1a039c552ac9456c07ba23cee0f9e05609cc82c31fce1ed74510d8
name: python-cefeste
arch: src
version: 1.2.4
epoch: 0
release: 1
summary: Feature Selection and Elimination
url: https://dev.azure.com/credem-data/DAT/_git/ce-feste
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cefeste-1.2.4-1.src.rpm
checksum_type: sha256
description:
  This repo contains the 'FeSTE' python package which helps in the features management from the pre-filtering to the pre-processing and feature elimination.



  To install it:

  1) **Optional**: create a new Python virtual environment (through bash terminal run: "py -m venv your_env_name" and then "source your_env_name/Scripts/activate )
  2) Install the package:
      - User Mode:
  ```pip install cefeste```




  The .py package is stored in src and contains 3 sub-modules:
  - **selection**: contains the feature preliminary selection functions
  - **transform**: contains the feature pre-processing functions
  - **elimination**: contains the feature elimination functions





  The main class of this module is FeatureSelection. It applies several filters that can be grouped in the following:

  - Univariate filters:
      - No constant features
      - Number of distinct value too low
      - Number of missing values too high
      - Too concentrate in the most frequent value
      - Unstable between sets
  - Multivariate filters:
      - Spearman Correlation for numerical features
      - Cramer's V for categorical features
      - R2 for mixed features
      - VIF
  - Explanatory filters:
      - Feature AUROC for classification
      - Feature Correlation with target for regression



  It is more a technical module which contains 3 classes useful for generating the production pipeline:

  - ColumnExtractor: to extract columns from a pd.DataFrame
  - ColumnRenamer: to rename columns and to transform a np.ndarray to a pd.DataFrame
  - Categorizer: to trasform the dtype of pd.DataFrame columns from 'object' to 'category'



  The main class of this module is FeatureElimination which is useful for selecting the most useful feature to keep in the model and optimize the hyperparams in the meanwhile.

  It is a recursive method that at each iteration can:

  - Perform the hyperparameters optimization using user-defined model, grid, gridsearch method, evaluation measure
  - Calculate the feature shap importance value
  - Identify the last importance feature(/s) and Delete them for the next iteration


pkgId: 5fc9f7bc8216e802c53d4feeddc9c86363a903fa4262dece3d890f84975472d5
name: python-cefevent
arch: src
version: 0.5.6
epoch: 0
release: 1
summary: ArcSight Common Event Format library
url: https://github.com/kamushadenes/cefevent
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cefevent-0.5.6-1.src.rpm
checksum_type: sha256
description:
  platform darwin -- Python 3.9.12, pytest-7.1.2, pluggy-1.0.0 -- /opt/homebrew/opt/python@3.9/bin/python3.9
  cachedir: .pytest_cache
  rootdir: /Users/henrique.goncalves/Dropbox/Projects/Personal/Code/cefevent
  collected 9 items
  test_event.py::test_load PASSED                                                                                                                   [ 11%]
  test_event.py::test_source_address PASSED                                                                                                         [ 22%]
  test_event.py::test_source_mac_address PASSED                                                                                                     [ 33%]
  test_event.py::test_source_port PASSED                                                                                                            [ 44%]
  test_event.py::test_message PASSED                                                                                                                [ 55%]
  test_event.py::test_strict PASSED                                                                                                                 [ 66%]
  test_generator.py::test_random_addr PASSED                                                                                                        [ 77%]
  test_generator.py::test_generate_random_events PASSED                                                                                             [ 88%]


pkgId: a213dfabc255ba3bbfddec0976da3c7ba480314ba4b86feecd154836d8c99d3e
name: python-cefi
arch: src
version: 4.14.2
epoch: 0
release: 1
summary: A python library, to interact with Crypto Exchanges (CCXT library) and brokers (IB & Capital.com)
url: https://pypi.org/project/cefi/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cefi-4.14.2-1.src.rpm
checksum_type: sha256
description:
  <br>
    <table style="border: 1px solid transparent">
      <tr>
        <td>
    <a href="http://talky.readthedocs.io"><img src="https://img.shields.io/badge/Wiki-%23000000.svg?style=for-the-badge&logo=wikipedia&logoColor=white"></a>
    <a href="https://github.com/mraniki/tt/"><img src="https://img.shields.io/badge/github-%23000000.svg?style=for-the-badge&logo=github&logoColor=white"></a><br>
    <a href="https://hub.docker.com/r/mraniki/tt"><img src="https://img.shields.io/docker/pulls/mraniki/tt?style=for-the-badge"></a>
    <br>
        </td>
        <td align="center"><img width="200" alt="Logo" src="https://github.com/mraniki/cefi/blob/main/docs/_static/logo-full.png"></td>
      </tr>
      <tr>
        <td>
          <a href="https://pypi.org/project/cefi/"><img src="https://img.shields.io/pypi/v/cefi?style=for-the-badge&logo=PyPI&logoColor=white"></a><br>
          <a href="https://pypi.org/project/cefi/"><img src="https://img.shields.io/pypi/dm/cefi?style=for-the-badge&logo=PyPI&logoColor=white&label=pypi&labelColor=grey"></a><br>
          <a href="https://github.com/mraniki/cefi/"><img src="https://img.shields.io/github/actions/workflow/status/mraniki/cefi/%F0%9F%91%B7Flow.yml?style=for-the-badge&logo=GitHub&logoColor=white"></a><br>
      <a href="https://talky.readthedocs.io/"><img src="https://readthedocs.org/projects/cex/badge/?version=latest&style=for-the-badge"></a><br>
      <a href="https://codebeat.co/projects/github-com-mraniki-cefi-main"><img src="https://codebeat.co/badges/6aecf822-ea11-499c-80d9-37cd3f35b923"/></a><br>
      <a href="https://app.codacy.com/gh/mraniki/cefi/dashboard"><img src="https://app.codacy.com/project/badge/Grade/2e375e4df911416980496bfd568f0d76"/></a><br>
      <a href="https://codecov.io/gh/mraniki/cefi"> <img src="https://codecov.io/gh/mraniki/cefi/branch/main/graph/badge.svg?token=BTIoKrcXNq"/></a><br>
        </td>
        <td align="left">
          Interact with centralized trading platforms (CEX)<br>
          supported by CCXT, Capital.com, DEGIRO, IBKR and others.
        </td>
      </tr>
    </table>

    <h5>How to use it</h5>
    <pre>
    <code>


      cex = CexTrader()

      balance = await cex.get_balances()
      print("balance ", balance)

      symbol = "BTC"
      quote = await cex.get_quotes(symbol)
      print("quote ", quote)

      order = {
          "action": "BUY",
          "instrument": "BTC",
          "quantity": 1,
      }
      order = await cex.submit_order(order)
      print("order ", order)

    </code>
    </pre>
    <h5>Documentation</h5>
    <a href="https://talky.readthedocs.io/projects/cefi/en/latest/"><img src="https://img.shields.io/badge/Documentation-000000?style=for-the-badge&logo=readthedocs&logoColor=white"></a><br>


pkgId: be4bf5e8c6e4f98fbde73426e8ea69bb4749fa22a8a02b7a239f8e66fcb9acc6
name: python-cegal-keystoneauth
arch: src
version: 1.0.13
epoch: 0
release: 1
summary: A Python package to handle Cegal Keystone tokens
url: https://docs.prizm.cegal-geo.com/authentication/keystone.html
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cegal-keystoneauth-1.0.13-1.src.rpm
checksum_type: sha256
description:
  A Python client to use with Cegal Keystone.



  1. (Optional) Configure logging
  2. Define an OidcOptions object
  3. Instantiate an OidcClient object passing in the previously created OidcOptions object
     - If you need to select another flow use the OidcFlow enum
  4. There is only one method required, use the OidcClient object to call get_access_token()
  5. Use the access token returned

  You should always call .get_access_token() each time you need to use the token. This method takes care of expiration and renewal.



  ```python
  import logging
  import sys


  from cegal.keystone_auth import OidcClient, OidcOptions


  logging.getLogger()
  logging.basicConfig(
      format="s s s",
      level=logging.DEBUG,
      stream=sys.stdout,
  )


  options = OidcOptions(
      "python_rp",
      OidcClient.KEYSTONE_URL,
      extra_scopes=["scope1"],
      audiences=["api1"],
  )

  client = OidcClient(options)

  token = client.get_access_token()

  ```



  ```python
  import logging
  import sys
  from time import sleep

  from cegal.keystone_auth import OidcClient, OidcOptions, OidcFlow

  logging.getLogger()
  logging.basicConfig(
      format="s s s",
      level=logging.DEBUG,
      stream=sys.stdout,
  )

  options = OidcOptions(
      "python_rp",
      OidcClient.KEYSTONE_STG_URL,
      extra_scopes=["hub_connector_api", "keystone.portal_api.version_scope"],
      audiences=["hub_connector_api"],
      oidc_flow=OidcFlow.device_code,
      no_cache=True,
  )

  client = OidcClient(options)

  token = client.get_access_token()
  print(token)

  ```



  If you are requesting access to APIs then you will need to include these as a list of strings in the extra_scopes OidcOptions arg.\
  In Keystone, API scopes are by default associated with an API Resource which will return an audience claim in the access token. You must therefore also supply the API Resource names as the audience when specifying extra_scopes.\
  An API Resource can have multiple API scopes and they are not necessarily named the same, so you will need to obtain this information from the person setting up the application in Keystone.



  When using interactive login, the library opens an authentication request page at the specified identity server.  This server then requests the user's password (or skips this if the browser has the details) and redirects the browser page back to a local web server with the auth code specified in the URL.   (This way, the auth-code is communicated to the local process without the local server needing any connection to the internet).

  By default, the browser upon successful authentication displays a simple message.  You can customize the behaviour by supplying a `page_handler` object in the OidcClient constructor.

  The default page handler is in the `cegal.keystone_auth.responses` module.  A more sophisticated example is `TwoStagePageHandler` which redirects back to a different page.   This is designed currently to be used to PythonToolPro to display a 'welcome' page with version details.   Since the page handler is supplied with the auth state (and therefore auth code) the handler can query Keystone for up-to-date version details.

  N.b. This API feels very immature;  it obviously *wants* to be a full-fledged http stack with routing, responses and templating etc.



  If you are currently developing something and the client settings are changing often there is a helper method available within the client.\
  Call client.destroy_tokens_for_client() and this will clear your client_id's tokens from disk and memory.



  Start a shell in the root of the repository working directory.

  Create a venv:

  `python -m venv .venv`

  Activate it (varies according to OS and shell):

  `.venv\Scripts\activate.ps1`

  Upgrade pip and setuptools:

  ```
  python -m pip install --upgrade pip
  python install --setuptools
  pip install -r requirements.txt
  ```

  Install as live development package:

  `pip install -e .`



  Install pipenv if you don't have it already:
  ```bash
  pip install pipenv
  ```

  Init/activate the environment:
  ```bash
  pipenv shell
  ```

  Installing (from pipfile):
  ```bash
  pipenv install
  ```

  To add any packages:
  ```bash
  pipenv install packagename
  ```

  Exit the environment by running: exit



  Run `pytest` to run all the non-interactive tests.  Those tests requiring user interaction (e.g. a browser, or device-flow login) can be run using `pytest --interactive`



  This repository includes a devcontainer which can be used within VSCode.  `pytest --interactive` currently will not function correctly:  the browser is launched outside of the container on the developer's machine and the redirect is not able to reach the local server.  A future fix for this might be to include firefox in the devcontainer, set $BROWSER to be firefox, and require an X-server on the developer's machine.


  Copyright (2024) Cegal, As. This library (the "Software") may not be used except in connection with the Licensees use of Cegal software pursuant to an Agreement (defined below) between Licensee (defined below) and Cegal, AS. ("Cegal"). This Software shall be deemed part of the "Subscription Services" under the Agreement. Licensees use of the Software must comply at all times with any restrictions applicable to the Subscription Services, generally, and must be used in accordance with any applicable documentation. If you have not agreed to an Agreement or otherwise do not agree to these terms, you may not use the Software. This license terminates automatically upon the termination of the Agreement or Licensees breach of these terms. Agreement: the agreement between Cegal and Licensee governing the use of the Cegal software, which shall be, with respect to Cegal, and the Cegal Terms of Service located at https://cegal.com/about/terms-and-conditions , in each case unless Licensee has entered into a separate written agreement with Cegal governing the use of the applicable Cegal Services. Licensee: the user of the Software, or, if the Software is being used on behalf of a company, the company.


pkgId: e29a4f71e8cffbbbce0f0ab3598672c570d7e40edae0b77066defe0e8e4b3e2f
name: python-cegpy
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: Package for creating, manipulating, and analysing Chain Event Graphs. Built on networkx.
url: https://github.com/g-walley/cegpy
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cegpy-1.1.0-1.src.rpm
checksum_type: sha256
description:
  [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dwyl/esta/issues)[![Documentation Status](https://readthedocs.org/projects/cegpy/badge/?version=latest)](https://cegpy.readthedocs.io/en/latest/)[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg)](#contributors-)

  Cegpy (/segpaɪ/) is a Python package for working with Chain Event Graphs. It supports learning the graphical structure of a Chain Event Graph from data, encoding of parametric and structural priors, estimating its parameters, and performing inference.

  It is built on top of the Python network modelling package [NetworkX](https://networkx.org/ "https://networkx.org/").



  Documentation is hosted on [read the docs](https://cegpy.readthedocs.io/en/stable/ "https://cegpy.readthedocs.io/en/stable/").

  We have also written a paper to explain the statistical methods and algorithms included in the package;
  [ARXIV - cegpy: Modelling with Chain Event Graphs in Python](https://arxiv.org/abs/2211.11366 "https://arxiv.org/abs/2211.11366").



  If you'd like to get started using the packages, the best place to start is the [quick-start documentation](https://cegpy.readthedocs.io/en/latest/quickstart/quickstart_st.html "https://cegpy.readthedocs.io/en/latest/quickstart/quickstart_st.html").



  Use cases have been demonstrated in a [binder](https://github.com/peterrhysstrong/cegpy-binder).

  The following image is an example of a chain event graph that is produced by this package:

  ![Image](Example_CEG.png)



  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://ashenvi10.github.io/"><img src="https://avatars.githubusercontent.com/u/39489147?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aditi Shenvi</b></sub></a><br /><a href="https://github.com/g-walley/cegpy/commits?author=ashenvi10" title="Code">💻</a> <a href="https://github.com/g-walley/cegpy/commits?author=ashenvi10" title="Tests">⚠️</a> <a href="https://github.com/g-walley/cegpy/issues?q=author%3Aashenvi10" title="Bug reports">🐛</a> <a href="#projectManagement-ashenvi10" title="Project Management">📆</a></td>
      <td align="center"><a href="https://github.com/g-walley"><img src="https://avatars.githubusercontent.com/u/83537018?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gareth Walley</b></sub></a><br /><a href="https://github.com/g-walley/cegpy/commits?author=g-walley" title="Code">💻</a> <a href="https://github.com/g-walley/cegpy/commits?author=g-walley" title="Documentation">📖</a> <a href="#design-g-walley" title="Design">🎨</a> <a href="https://github.com/g-walley/cegpy/commits?author=g-walley" title="Tests">⚠️</a> <a href="#maintenance-g-walley" title="Maintenance">🚧</a></td>
      <td align="center"><a href="https://github.com/kasia-kobalczyk"><img src="https://avatars.githubusercontent.com/u/62558622?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kasia Kobalczyk</b></sub></a><br /><a href="https://github.com/g-walley/cegpy/commits?author=kasia-kobalczyk" title="Code">💻</a> <a href="https://github.com/g-walley/cegpy/issues?q=author%3Akasia-kobalczyk" title="Bug reports">🐛</a> <a href="https://github.com/g-walley/cegpy/commits?author=kasia-kobalczyk" title="Tests">⚠️</a></td>
      <td align="center"><a href="https://github.com/peterrhysstrong"><img src="https://avatars.githubusercontent.com/u/43751009?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Peter Strong</b></sub></a><br /><a href="https://github.com/g-walley/cegpy/commits?author=peterrhysstrong" title="Code">💻</a> <a href="https://github.com/g-walley/cegpy/issues?q=author%3Apeterrhysstrong" title="Bug reports">🐛</a> <a href="#example-peterrhysstrong" title="Examples">💡</a> <a href="https://github.com/g-walley/cegpy/commits?author=peterrhysstrong" title="Tests">⚠️</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!


pkgId: 1320fa15beda008e7b3e065f9f544ae5990c4a6057ba1642a3c0d593c69caf37
name: python-cehrbert
arch: src
version: 1.2.6
epoch: 0
release: 1
summary: CEHR-BERT: Incorporating temporal information from structured EHR data to improve prediction tasks
url: https://github.com/cumc-dbmi/cehr-bert
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cehrbert-1.2.6-1.src.rpm
checksum_type: sha256
description:
  CEHR-BERT is a large language model developed for the structured EHR data, the work has been published
  at https://proceedings.mlr.press/v158/pang21a.html. CEHR-BERT currently only supports the structured EHR data in the
  OMOP format, which is a common data model used to support observational studies and managed by the Observational Health
  Data Science and Informatics (OHDSI) open-science community.
  There are three major components in CEHR-BERT, data generation, model pre-training, and model evaluation with
  fine-tuning, those components work in conjunction to provide an end-to-end model evaluation framework. The CEHR-BERT
  framework is designed to be extensible, users could write their
  own [pretraining models](trainers/README.md), [evaluation procedures](evaluations/README.md),
  and [downstream prediction tasks](spark_apps/README.md) by extending the abstract classes, see click on the links for
  more details. For a quick start, navigate to the [Get Started](#getting-started) section.



  For each patient, all medical codes were aggregated and constructed into a sequence chronologically.
  In order to incorporate temporal information, we inserted an artificial time token (ATT) between two neighboring visits
  based on their time interval.
  The following logic was used for creating ATTs based on the following time intervals between visits, if less than 28
  days, ATTs take on the form of $W_n$ where n represents the week number ranging from 0-3 (e.g. $W_1$); 2) if between 28
  days and 365 days, ATTs are in the form of **$M_n$** where n represents the month number ranging from 1-11 e.g $M_{11}$;

  3) beyond 365 days then a **LT** (Long Term) token is inserted. In addition, we added two more special tokens — **VS**
     and **VE** to represent the start and the end of a visit to explicitly define the visit segment, where all the
     concepts
     associated with the visit are subsumed by **VS** and **VE**.

  !["patient_representation"](https://raw.githubusercontent.com/cumc-dbmi/cehr-bert/main/images/tokenization_att_generation.png)



  Overview of our BERT architecture on structured EHR data. To distinguish visit boundaries, visit segment embeddings are
  added to concept embeddings. Next, both visit embeddings and concept embeddings go through a temporal transformation,
  where concept, age and time embeddings are concatenated together. The concatenated embeddings are then fed into a fully
  connected layer. This temporal concept embedding becomes the input to BERT. We used the BERT learning objective Masked
  Language Model as the primary learning objective and introduced an EHR specific secondary learning objective visit type
  prediction.

  !["cehr-bert architecture diagram"](https://raw.githubusercontent.com/cumc-dbmi/cehr-bert/main/images/cehr_bert_architecture.png)



  The project is built in python 3.10, and project dependency needs to be installed

  Create a new Python virtual environment

  ```console
  python3.10 -m venv .venv;
  source .venv/bin/activate;
  ```

  Build the project

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

  Download [jtds-1.3.1.jar](jtds-1.3.1.jar) into the spark jars folder in the python environment
  ```console
  cp jtds-1.3.1.jar .venv/lib/python3.10/site-packages/pyspark/jars/
  ```





  If you don't have the MEDS dataset, you could convert the OMOP dataset to the MEDS
  using [meds_etl](https://github.com/Medical-Event-Data-Standard/meds_etl).
  We have prepared a synthea dataset with 1M patients for you to test, you could download it
  at [omop_synthea.tar.gz](https://drive.google.com/file/d/1k7-cZACaDNw8A1JRI37mfMAhEErxKaQJ/view?usp=share_link)
  ```console
  tar -xvf omop_synthea.tar .
  ```
  Convert the OMOP dataset to the MEDS format
  ```console
  pip install meds_etl==0.3.6;
  meds_etl_omop omop_synthea synthea_meds;
  ```
  Convert MEDS to the meds_reader database to get the patient level data
  ```console
  meds_reader_convert synthea_meds synthea_meds_reader --num_threads 4
  ```

  ```console
  mkdir test_dataset_prepared;
  mkdir test_synthea_results;
  python -m cehrbert.runners.hf_cehrbert_pretrain_runner sample_configs/hf_cehrbert_pretrain_runner_meds_config.yaml
  ```





  We created a spark app to download OMOP tables from SQL Server as parquet files. You need adjust the properties
  in `db_properties.ini` to match with your database setup.

  ```console
  PYTHONPATH=./: spark-submit tools/download_omop_tables.py -c db_properties.ini -tc person visit_occurrence condition_occurrence procedure_occurrence drug_exposure measurement observation_period concept concept_relationship concept_ancestor -o ~/Documents/omop_test/
  ```

  We have prepared a synthea dataset with 1M patients for you to test, you could download it
  at [omop_synthea.tar.gz](https://drive.google.com/file/d/1k7-cZACaDNw8A1JRI37mfMAhEErxKaQJ/view?usp=share_link)

  ```console
  tar -xvf omop_synthea.tar ~/Document/omop_test/
  ```



  We order the patient events in chronological order and put all data points in a sequence. We insert artificial tokens
  VS (visit start) and VE (visit end) to the start and the end of the visit. In addition, we insert artificial time
  tokens (ATT) between visits to indicate the time interval between visits. This approach allows us to apply BERT to
  structured EHR as-is.
  The sequence can be seen conceptually as [VS] [V1] [VE] [ATT] [VS] [V2] [VE], where [V1] and [V2] represent a list of
  concepts associated with those visits.

  ```console
  PYTHONPATH=./: spark-submit spark_apps/generate_training_data.py -i ~/Documents/omop_test/ -o ~/Documents/omop_test/cehr-bert -tc condition_occurrence procedure_occurrence drug_exposure -d 1985-01-01 --is_new_patient_representation -iv
  ```


  If you don't have your own OMOP instance, we have provided a sample of patient sequence data generated using Synthea
  at `sample/patient_sequence` in the repo. CEHR-BERT expects the data folder to be named as `patient_sequence`

  ```console
  mkdir test_dataset_prepared;
  mkdir test_results;
  python -m cehrbert.runners.hf_cehrbert_pretrain_runner sample_configs/hf_cehrbert_pretrain_runner_config.yaml
  ```

  If your dataset is large, you could add ```--use_dask``` in the command above


  If you don't have your own OMOP instance, we have provided a sample of patient sequence data generated using Synthea
  at `sample/hf_readmissioon` in the repo

  ```console
  PYTHONPATH=./:$PYTHONPATH spark-submit spark_apps/prediction_cohorts/hf_readmission.py -c hf_readmission -i ~/Documents/omop_test/ -o ~/Documents/omop_test/cehr-bert -dl 1985-01-01 -du 2020-12-31 -l 18 -u 100 -ow 360 -ps 0 -pw 30 --is_new_patient_representation
  ```



  ```console
  mkdir test_finetune_results;
  python -m cehrbert.runners.hf_cehrbert_finetune_runner sample_configs/hf_cehrbert_finetuning_runner_config.yaml
  ```



  If you have any questions, feel free to contact us at CEHR-BERT@lists.cumc.columbia.edu



  Please acknowledge the following work in papers

  Chao Pang, Xinzhuo Jiang, Krishna S. Kalluri, Matthew Spotnitz, RuiJun Chen, Adler
  Perotte, and Karthik Natarajan. "Cehr-bert: Incorporating temporal information from
  structured ehr data to improve prediction tasks." In Proceedings of Machine Learning for
  Health, volume 158 of Proceedings of Machine Learning Research, pages 239–260. PMLR,
  04 Dec 2021.


pkgId: b6fb355bda11867e551e702ebbfd4c53ff7d764beddd552a8f0047d6a9a96678
name: python-celai
arch: src
version: 0.3.14
epoch: 0
release: 1
summary: AI Driven Communication Platform. Assistants made easy.
url: https://github.com/cel-ai/celai
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celai-0.3.14-1.src.rpm
checksum_type: sha256
description:
  <!-- A centered logo of celia -->
  <!-- <p align="center">
    <img src="https://raw.githubusercontent.com/cel-ai/celai/30b489b21090e3c3f00ffea66d0ae4ac812bd839/cel/assets/celia_logo.png" width="250" />
  </p> -->
  <p align="center">
    <img src="https://raw.githubusercontent.com/cel-ai/celai/d11d1c81f8193e3de580f6a21376a246fa2d473f/cel/assets/celai_connectors.png" width="600" />
  </p>




  Cel.ai is a AI Driven Communication Platform. Designed to accelerate the development of omnichannel virtual assistants. Whether you need to integrate with messaging platforms like WhatsApp, Telegram, or VoIP services such as VAPI.com, Cel.ai provides the tools and flexibility to get your assistant up and running quickly.

  Don't waste time building on top of hosted platforms that limit your control and flexibility. Cel.ai is designed to be self-hosted, giving you the freedom to customize and extend the platform to meet your needs.

  Supported Connectors:
  - WhatsApp
  - Telegram
  - VAPI.ai
  - Chatwoot

  Off the shelf, Cel.ai provides a powerful tools such as:

  - Multi Asssitant Router
    - Logic Router based on state variables
    - Agentic Router based on user itent and context
    - Semantic Router (coming soon)
  - Tooling
  - Events: `message`, `image`, `new_conversation`, and more
  - Powered by Langchain
  - Langsmith user tracing
  - Moderation Middlewares
  - Blacklist Middlewares
  - Invitations
  - Ngrok native integration
  - User Sequential Message Processing

  [Documentation](https://cel-ai.github.io/celai/)




  Cel.ai provides a powerful multi-assistant router that allows you to create complex conversational assistants easily. This architecture allows you to scale in a modular way, adding new assistants as needed. The routing can be done based on state variables, user intent, or context.

  Agentic Router is the most powerful router in Cel.ai. It allows you to triage messages to different assistants based on user intent and context. It keeps prompts small and focused, allowing for more accurate responses.

  Keep prompts at mininal length and focused on a single task will ensure that the user experience is optimal and the response cost are kept low.

  For example, if you are building a virtual assistant for a hotel, you can have different assistants for booking/reservation, cancellation, room service, and check-out. The Agentic Router will automatically route messages to the correct assistant based on the user's intent.


  <p align="center">
    <img src="https://raw.githubusercontent.com/cel-ai/celai/refs/heads/main/cel/assets/celai_router_diagram.png" width="700" />
  </p>



  Cel.ai provides a powerful in-context routing system. Messages are routed to the correct assistant based on the user's intent and context.

  Assistant can have its own set of prompts and responses, but share the same context.

  State and History stores are shared between all assistants, allowing for a seamless user experience. Ensuring all assistants are in sync with the user's context.




  pip install from github:
  ```bash
  pip install celai
  ```


  Let's create a simple assistant that can be accessed via Telegram. First, you'll need to create a new Telegram bot and get the API token. You can do this by following the instructions in the [Telegram documentation](https://core.telegram.org/bots#6-botfather).

  This example uses OpenAI's GPT-4o model to create a simple assistant that can help users buy Bitcoins. To use the OpenAI API, you'll need to sign up for an API key on the [OpenAI website](https://platform.openai.com/).





  Make sure to set the `OPENAI_API_KEY` environment variable with your OpenAI API key:

  ```bash
  export OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
  ```



  The easy way to get a public HTTPS URL for your assistant is to use [ngrok](https://ngrok.com/). Cel.ai has built-in support for ngrok, so you can easily delegate the public URL creation to Cel.ai. To use ngrok, you'll need a Ngrok authtoken. You can get one by signing up on the [ngrok website](https://ngrok.com/). Then set the `NGROK_AUTH_TOKEN` environment variable:

  ```bash
  export NGRO_AUTH_TOKEN=<YOUR_NGROK_AUTH_TOKEN>
  ```

  Then you can create a new Python script with the following code, don't forget to
  replace `<YOUR_TELEGRAM_TOKEN>` with the token you received from Telegram:

  ```python

  import os
  from cel.connectors.telegram import TelegramConnector
  from cel.gateway.message_gateway import MessageGateway
  from cel.assistants.macaw.macaw_assistant import MacawAssistant
  from cel.prompt.prompt_template import PromptTemplate



  prompt = """You are an AI assistant. Called Celia. You can help a user to buy Bitcoins."""
  prompt_template = PromptTemplate(prompt)




  ast = MacawAssistant(prompt=prompt_template)

  gateway = MessageGateway(
      assistant=ast,
      host="127.0.0.1", port=5004,
  )


  conn = TelegramConnector(
      token="<YOUR_TELEGRAM_TOKEN>"
  )


  gateway.register_connector(conn)




  gateway.run(enable_ngrok=True)
  ```


pkgId: bc906cbe0d6621191a638059000c0057cfa116a6b2a6729613b7712c1322e1f5
name: python-celai
arch: src
version: 0.3.25
epoch: 0
release: 1
summary: AI Driven Communication Platform. Assistants made easy.
url: https://github.com/cel-ai/celai
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celai-0.3.25-1.src.rpm
checksum_type: sha256
description:
  <!-- A centered logo of celia -->
  <!-- <p align="center">
    <img src="https://raw.githubusercontent.com/cel-ai/celai/30b489b21090e3c3f00ffea66d0ae4ac812bd839/cel/assets/celia_logo.png" width="250" />
  </p> -->
  <div align="center">
      <img src="https://github.com/cel-ai/celai/actions/workflows/python-package.yml/badge.svg">
  </div>
  <hr>

  <p align="center">
    <img src="https://raw.githubusercontent.com/cel-ai/celai/d11d1c81f8193e3de580f6a21376a246fa2d473f/cel/assets/celai_connectors.png" width="600" />
  </p>




  Cel.ai is a AI Driven Communication Platform. Designed to accelerate the development of omnichannel virtual assistants. Whether you need to integrate with messaging platforms like WhatsApp, Telegram, or VoIP services such as VAPI.com, Cel.ai provides the tools and flexibility to get your assistant up and running quickly.

  Don't waste time building on top of hosted platforms that limit your control and flexibility. Cel.ai is designed to be self-hosted, giving you the freedom to customize and extend the platform to meet your needs.

  Supported Connectors:
  - WhatsApp
  - Telegram
  - VAPI.ai
  - Chatwoot

  Off the shelf, Cel.ai provides a powerful tools such as:

  - Multi Asssitant Router
    - Logic Router based on state variables
    - Agentic Router based on user itent and context
    - Semantic Router (coming soon)
  - Tooling
  - Events: `message`, `image`, `new_conversation`, and more
  - Powered by Langchain
  - Langsmith user tracing
  - Moderation Middlewares
  - Blacklist Middlewares
  - Invitations
  - Ngrok native integration
  - User Sequential Message Processing

  [Documentation](https://cel-ai.github.io/celai/)




  Cel.ai provides a powerful multi-assistant router that allows you to create complex conversational assistants easily. This architecture allows you to scale in a modular way, adding new assistants as needed. The routing can be done based on state variables, user intent, or context.

  Agentic Router is the most powerful router in Cel.ai. It allows you to triage messages to different assistants based on user intent and context. It keeps prompts small and focused, allowing for more accurate responses.

  Keep prompts at mininal length and focused on a single task will ensure that the user experience is optimal and the response cost are kept low.

  For example, if you are building a virtual assistant for a hotel, you can have different assistants for booking/reservation, cancellation, room service, and check-out. The Agentic Router will automatically route messages to the correct assistant based on the user's intent.


  <p align="center">
    <img src="https://raw.githubusercontent.com/cel-ai/celai/refs/heads/main/cel/assets/celai_router_diagram.png" width="700" />
  </p>



  Cel.ai provides a powerful in-context routing system. Messages are routed to the correct assistant based on the user's intent and context.

  Assistant can have its own set of prompts and responses, but share the same context.

  State and History stores are shared between all assistants, allowing for a seamless user experience. Ensuring all assistants are in sync with the user's context.




  pip install from github:
  ```bash
  pip install celai
  ```


  Let's create a simple assistant that can be accessed via Telegram. First, you'll need to create a new Telegram bot and get the API token. You can do this by following the instructions in the [Telegram documentation](https://core.telegram.org/bots#6-botfather).

  This example uses OpenAI's GPT-4o model to create a simple assistant that can help users buy Bitcoins. To use the OpenAI API, you'll need to sign up for an API key on the [OpenAI website](https://platform.openai.com/).





  Make sure to set the `OPENAI_API_KEY` environment variable with your OpenAI API key:

  ```bash
  export OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
  ```



  The easy way to get a public HTTPS URL for your assistant is to use [ngrok](https://ngrok.com/). Cel.ai has built-in support for ngrok, so you can easily delegate the public URL creation to Cel.ai. To use ngrok, you'll need a Ngrok authtoken. You can get one by signing up on the [ngrok website](https://ngrok.com/). Then set the `NGROK_AUTH_TOKEN` environment variable:

  ```bash
  export NGRO_AUTH_TOKEN=<YOUR_NGROK_AUTH_TOKEN>
  ```

  Then you can create a new Python script with the following code, don't forget to
  replace `<YOUR_TELEGRAM_TOKEN>` with the token you received from Telegram:

  ```python

  import os
  from cel.connectors.telegram import TelegramConnector
  from cel.gateway.message_gateway import MessageGateway
  from cel.assistants.macaw.macaw_assistant import MacawAssistant
  from cel.prompt.prompt_template import PromptTemplate



  prompt = """You are an AI assistant. Called Celia. You can help a user to buy Bitcoins."""
  prompt_template = PromptTemplate(prompt)




  ast = MacawAssistant(prompt=prompt_template)

  gateway = MessageGateway(
      assistant=ast,
      host="127.0.0.1", port=5004,
  )


  conn = TelegramConnector(
      token="<YOUR_TELEGRAM_TOKEN>"
  )


  gateway.register_connector(conn)




  gateway.run(enable_ngrok=True)
  ```


pkgId: 809601d6d8eac00b5dc71b1f46f414b859f33bd005336a2c178446f6e10a408a
name: python-celai-chatwoot
arch: src
version: 0.1.10
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/cel-ai/celai-chatwoot
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celai-chatwoot-0.1.10-1.src.rpm
checksum_type: sha256
description:
  <!-- A centered logo of celia -->
  <p align="center">
    <img src="https://raw.githubusercontent.com/cel-ai/celai/30b489b21090e3c3f00ffea66d0ae4ac812bd839/cel/assets/celia_logo.png" width="250" />
  </p>



  `celai-chatwoot` is Python package that provides a connector for integrating the Cel.ai framework with Chatwoot. This allows seamless communication between your Cel.ai assistants and Chatwoot, enabling you to leverage Chatwoot's powerful customer support features.
  - [Cel.ai](https://github.com/cel-ai/celai)
  - [Chatwoot](https://www.chatwoot.com/)



  - Easy integration with Chatwoot Bot API
  - Full stream mode support
  - Customizable bot settings



  You can install the `celai-chatwoot` package using pip:

  ```bash
  pip install celai-chatwoot
  ```



  To use the `celai-chatwoot` connector, you need to create an instance of `WootConnector` and register it with the Cel.ai gateway. Below is an example of how to do this:

  ```python
  import os
  from celai_chatwoot.connector import WootConnector


  conn = WootConnector(
      bot_name="Bot Name",
      access_key=os.environ.get("CHATWOOT_ACCESS_KEY"),
      account_id=os.environ.get("CHATWOOT_ACCOUNT_ID"),
      chatwoot_url=os.environ.get("CHATWOOT_URL"),
      bot_description="This is a test bot",
      stream_mode=StreamMode.FULL
  )


  gateway.register_connector(conn)
  ```



  The `WootConnector` requires the following environment variables to be set:

  - `CHATWOOT_ACCESS_KEY`: Your Chatwoot access key
  - `CHATWOOT_ACCOUNT_ID`: Your Chatwoot account ID
  - `CHATWOOT_URL`: The URL of your Chatwoot instance

  Run your Cel.ai assistant, then a new Chatwoot bot called "Bot Name" will be created in your Chatwoot instance. Assign the bot to any Inbox you want to use it with.



  |                     | RECEIVE | SEND  |
  |---------------------|:-------:|:-----:|
  | **Text**            |    ✅    |   ✅   |
  | **Image**           |    ✅    |   ✅   |
  | **Audio**           |    ✅    |   ✅   |
  | **Files**           |    ✅    |   ❌   |
  | **Custom Attributes** |    ❌    |   ✅   |
  | **Video**           |    ❌    |   ❌   |
  | **Location**        |    ✅    |   ❌   |
  | **Buttons**         |    -    |   ✅   |
  | **Templates**       |    -    |   ❌   |



  Current version: 0.1.0 supports basic Chatwoot features such as sending and receiving text messages. Future versions will include the following features:

    - Image and file uploads
    - Custom attributes
    - Audio and video messages




  We welcome contributions to the `celai-chatwoot` project. If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.



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



  Special thanks to the Cel.ai and Chatwoot teams for their amazing frameworks and support.



  For any questions or inquiries, please contact us at [alejamp@gmail.com].


pkgId: c7f3df1c6ea719298a972801475193df7f0e6ff98841cf04ee3120312f0c7901
name: python-celerity
arch: src
version: 0.26.0
epoch: 0
release: 1
url: https://github.com/michaelroberts/celerity
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celerity-0.26.0-1.src.rpm
checksum_type: sha256
summary:
  Celerity is a lightweight, zero-dependency and type-safe Python library for astronomical calculations.

description:
  Celerity can be installed using `pip`:
  ```console
  pip install celerity
  ```
   or `poetry`:
  ```console
  poetry add celerity
  ```

  The API has been designed to be written in an idiomatic and natural way for English speakers, as well as idiomatic to Python.
  It has been specifically designed to only depend on the core set of Python modules, such that it is not strictly dependent on other popular astronomical libraries, e.g., astropy (although it can compliment the usage of these libraries).
  It's important to note that the API does not perform string parsing of times and coordinates, but instead requires the user to provide the correct data types. This is to ensure that the API is type-safe and that the user is aware of the data types being used at all times.
  For example, to find out the horizontal coordinate for the star Betelgeuse on the 14th May 2021 at 12:00 UTC, at Mauna Kea, Hawaii, you would write:
  ```python
  from datetime import datetime, timezone
  from celerity import Observer, Time

  observer = Observer(
      latitude=19.82,
      longitude=-155.47,
      elevation=4205,
  )

  time = Time(
      when=datetime(2021, 5, 14, 12, 0, 0, tzinfo=timezone.utc)
  )

  betelgeuse = { ra: 88.792938, dec: 7.407064 }

  betelgeuse = observer.at(time).observe({ ra: 88.792938, dec: 7.407064 })

  { alt, az } = betelgeuse.altAz()

  lst = observer.at(time).LST()

  jd = observer.at(time).JD()
  ```

  Celerity is designed such that fundamental SI units of measurement are used, e.g., degrees, metres, seconds, etc. This is to ensure that the API is as accurate as possible, and that the user is aware of the units being used at all times.
  The `Observer` class requires the user to provide the latitude and longitude in degrees, and the elevation in metres. Latitude is positive for the northern hemisphere, and negative for the southern hemisphere between -90° at the southern pole and +90° at the northern pole. Longitude is always positive for the eastern hemisphere (east of the Prime Meridian), and negative for the western hemisphere (west of the Prime Meridian) representing a longitude between -180° and +180°.
  The `Time` class requires the user to provide the time in UTC, and not in any other timezone. The user can, once the `Time` object has been created, convert the time to any other timezone using the provided class methods.


pkgId: 9538c0959f363a5a6f5cee37a42445288aee8c048da189d4b062b9a67c5434e4
name: python-celery
arch: src
version: 5.4.0
epoch: 0
release: 1
summary: Distributed Task Queue.
url: https://docs.celeryq.dev/
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-5.4.0-1.src.rpm
checksum_type: sha256
description:
  This project relies on your generous donations.
  If you are using Celery to create a commercial product, please consider becoming our `backer`_ or our `sponsor`_ to ensure Celery's future.


pkgId: 27f75e0d2932c8f770af16b446393a0fd43357d25ac2ba2676d8c53bd1999b29
name: python-celery-aio-pool
arch: src
version: 0.1.0rc7
epoch: 0
release: 1
summary: Celery worker pool with support for asyncio coroutines as tasks
url: https://github.com/the-wondersmith/celery-aio-pool
rpm_license: AGPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-aio-pool-0.1.0rc7-1.src.rpm
checksum_type: sha256
description:
  ![python](https://img.shields.io/pypi/pyversions/celery-aio-pool.svg)
  ![version](https://img.shields.io/pypi/v/celery-aio-pool.svg)
  ![downloads](https://img.shields.io/pypi/dm/celery-aio-pool.svg)
  ![format](https://img.shields.io/pypi/format/celery-aio-pool.svg)

  <p align="center" width="100%">
      <img width="55%" src="https://raw.githubusercontent.com/the-wondersmith/celery-aio-pool/main/icon.svg">
  </p>

  > Free software: GNU Affero General Public License v3+







  ```
  poetry add celery-aio-pool
  ```



  ```
  pip install celery-aio-pool
  ```



  ```
  pip install git+https://github.com/the-wondersmith/celery-aio-pool.git
  ```



  ```
  git clone https://github.com/the-wondersmith/celery-aio-pool.git
  cd celery-aio-pool
  pip install -e "$(pwd)"
  ```






  - Import `celery_aio_pool` in the same module where your Celery "app" is defined
  - Ensure that the `patch_celery_tracer` utility is called **_before_** any other
    Celery code is called

  ```python
  """My super awesome Celery app."""


  from celery import Celery


  import celery_aio_pool as aio_pool




  assert aio_pool.patch_celery_tracer() is True

  app = Celery(
      "my-super-awesome-celery-app",
      broker="amqp://guest@localhost//",
      
      worker_pool=aio_pool.pool.AsyncIOPool,
  )
  ```



  At the time of writing, [Celery](https://github.com/celery/celery) does not have
  built-in support for out-of-tree pools like `celery-aio-pool`, but support should
  be included starting with the first non-beta release of Celery 5.3. (note: [PR #7880](https://github.com/celery/celery/pull/7880) was merged on `2022-11-15`).

  The official release of Celery 5.3 enables the configuration of custom worker pool classes thusly:

  - Set the environment variable `CELERY_CUSTOM_WORKER_POOL` to the name of
    your desired worker pool implementation implementation.
    - **NOTE:** _The value of the environment variable must be formatted in
                the standard Python/Celery format of_ `package:class`
    - ```bash
      % export CELERY_CUSTOM_WORKER_POOL='celery_aio_pool.pool:AsyncIOPool'
      ```

  - Tell Celery to use your desired pool by specifying `--pool=custom` when running your worker instance(s)
    - ```bash
      % celery worker --pool=custom --loglevel=INFO --logfile="$(pwd)/worker.log"
      ```

  To verify the pool implementation, examine the output of the `celery inspect stats`
  command:

  ```bash
  % celery --app=your_celery_project inspect stats
  ->  celery@freenas: OK
      {
          ...
          "pool": {
             ...
              "implementation": "celery_aio_pool.pool:AsyncIOPool",
      ...
  ```




  > **NOTE:** _Our preferred packaging and dependency manager is [Poetry](https://python-poetry.org/)._
  >           _Installation instructions can be found [here](https://python-poetry.org/docs/#installing-with-the-official-installer)._



  Clone the repo and install the dependencies
  ```bash
  $ git clone https://github.com/the-wondersmith/celery-aio-pool.git \
    && cd celery-aio-pool \
    && poetry install --sync
  ```

  Optionally, if you do not have or prefer _not_ to use Poetry, `celery-aio-pool` is
  fully PEP-517 compliant and can be installed directly by any PEP-517-compliant package
  manager.

  ```bash
  $ cd celery-aio-pool \
    && pip install -e "$(pwd)"
  ```

  > **TODO:** _Coming Soon™_



  To run the test suite:

  ```bash
  $ poetry run pytest tests/
  ```



  > **TODO:** _Coming Soon™_


pkgId: c2a51a422888dff45d84d5d583833d118ec8732788fea60a027071d01fc86356
name: python-celery-aws-xray-sdk-extension
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: Extension for AWS X-Ray SDK which enables tracing of Celery tasks
url: https://github.com/druids/celery-aws-xray-sdk-extension
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-aws-xray-sdk-extension-0.1.2-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/celery-aws-xray-sdk-extension)](https://pypi.org/project/celery-aws-xray-sdk-extension/) ![PyPI license](https://img.shields.io/pypi/l/celery-aws-xray-sdk-extension)

  Celery signal handlers that integrate Celery task lifecycle with AWS X-Ray tracing.

  There's a tiny example in the directory `example`.



  You can install it easily with `pip`: `pip install celery-aws-xray-sdk-extension`. For latest version visit [PyPI](https://pypi.org/project/celery-aws-xray-sdk-extension/).



  This guide doesn't cover setting up AWS X-Ray SDK for Python or AWS X-Ray daemon. It's expected that you've already got some experience with it. If you don't have any experience with AWS X-Ray, please visit [Amazon documentation](https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html).

  1. You have to have [Celery signals](https://docs.celeryq.dev/en/stable/userguide/signals.html) enabled.
  2. Connect Celery signals to signal handlers from `celery_aws_xray_sdk_extension` module in your Celery setup. Example code is below this list.
  3. You're good to go!



  ```python
  signals.after_task_publish.connect(xray_after_task_publish)
  signals.before_task_publish.connect(xray_before_task_publish)
  signals.task_failure.connect(xray_task_failure)
  signals.task_postrun.connect(xray_task_postrun)
  signals.task_prerun.connect(xray_task_prerun)
  ```



  Before making any changes, please prepare your environment (no global changes are made!) with `make setup-dev`. Feel free to check what the target does in the `Makefile`.

  This repository uses [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).


pkgId: 1e17d03bc788813e8f6c0ef4999f013210b7bbc4735fec0c34c763f320182f50
name: python-celery-batches
arch: src
version: 0.9
epoch: 0
release: 1
summary: Experimental task class that buffers messages and processes them as a list.
url: https://github.com/clokep/celery-batches
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-batches-0.9-1.src.rpm
checksum_type: sha256
description:
  Celery Batches provides a ``Task`` class that allows processing of multiple
  Celery task calls together as a list. The buffer of tasks calls is flushed on a
  timer and based on the number of queued tasks.
  Some potential use-cases for batching of task calls include:
  * De-duplicating tasks.
  * Accumulating / only handling the latest task with similar arguments.
  * Bulk inserting / updating of data.
  * Tasks with expensive setup that can run across a range of arguments.


pkgId: 9b7a52a8724982f4ea086226b95344fb968290cc881df7b2feac796d8ca5d8bf
name: python-celery-director
arch: src
version: 0.9.0
epoch: 0
release: 1
summary: Celery Director
url: https://github.com/ovh/celery-director
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-director-0.9.0-1.src.rpm
checksum_type: sha256
description:
  Director is a simple and rapid framework used to manage tasks and build workflows using Celery.
  The objective is to make Celery easier to use by providing :
  - a WebUI, an API and a CLI to manage and execute the workflows,
  - a WebUI to track the tasks states,
  - a YAML syntax used to combine tasks into workflows,
  - the ability to periodically launch a whole workflow,
  - and many others.
  See how to use Director with the quickstart and guides in the [documentation](https://ovh.github.io/celery-director/).

  Install the latest version of Director with pip (requires at least `Python 3.7`):
  ```bash
  pip install celery-director
  ```


  ```python

  from director import task
  from .utils import Order, Mail
  @task(name="ORDER_PRODUCT")
  def order_product(*args, **kwargs):
      order = Order(
        user=kwargs["payload"]["user"],
        product=kwargs["payload"]["product"]
      ).save()
      return {"id": order.id}
  @task(name="SEND_MAIL")
  def send_mail(*args, **kwargs):
      order_id = args[0]["id"]
      mail = Mail(
        title=f"Your order #{order_id} has been received",
        user=kwargs["payload"]["user"]
      )
      mail.send()
  ```

  ```yaml

  product.ORDER:
    tasks:
      - ORDER_PRODUCT
      - SEND_MAIL
  ```

  You can simply test your workflow in local :
  ```bash
  $ director workflow run product.ORDER '{"user": 1234, "product": 1000}'
  ```
  And run it in production using the director API :
  ```bash
  $ curl --header "Content-Type: application/json" \
    --request POST \
    --data '{"project": "product", "name": "ORDER", "payload": {"user": 1234, "product": 1000}}' \
    http://localhost:8000/api/workflows
  ```
  Read the [documentation](https://ovh.github.io/celery-director/) to try the quickstart and see advanced usages of Celery Director.

      .env                # The configuration file.
      workflows.yml       # The workflows definition.
      tasks/
          example.py      # A file containing some tasks.

  * `director init [path]` - Create a new project.
  * `director celery [worker|beat|flower]` - Start Celery daemons.
  * `director webserver` - Start the webserver.
  * `director workflow [list|show|run]` - Manage your project workflows.

  See https://github.com/ovh/celery-director/blob/master/LICENSE


pkgId: ee71c5f8fcce1328edc3b9aab3bc69f523234b83e132d2fe71a8582f5fedb642
name: python-celery-dispatcher
arch: src
version: 1.1.3
epoch: 0
release: 1
summary: An extension for celery to dispatch large amount of subtasks within a main task
url: https://github.com/gsfish/celery-dispatcher
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-dispatcher-1.1.3-1.src.rpm
checksum_type: sha256
description:
  An extension for celery to dispatch large amount of subtasks within a main task, and process the results separately.



  ```
  pip install celery-dispatcher
  ```



  > NOTICE: `celery-dispatcher` use tls to store running info, so the pool implementation using coroutines(like eventlet/gevent) can not be used

  Firstly, yield subtask and its parameters in tuple from the main task by following order:

  1. `task`: signature
  2. `args`: tupple/list
  3. `kwargs`: dict
  4. `options`: dict

  Then register the result handler for each subtask using signal:

  ```
  from celery import shared_task
  from celery_dispatcher import dispatch
  from celery_dispatcher.signals import subtask_success

  @shared_task
  def sqrt(i):
      return i * i

  @dispatch
  @shared_task
  def calc():
      for i in range(10):
          yield sqrt, (i,)

  @subtask_success.connect(sender=calc)
  def handle_result(root_id, task_id, retval, **kwargs):
      print(retval)
  ```

  Or register in the decorator directly:

  ```
  from celery import shared_task
  from celery_dispatcher import dispatch

  @shared_task
  def sqrt(i):
      return i * i

  def handle_result(root_id, task_id, retval, **kwargs):
      print(retval)

  @dispatch(receiver=handle_result)
  @shared_task
  def calc():
      for i in range(10):
          yield sqrt, (i,)
  ```

  If you want to revoke all subtasks, call revoke with specific signal:

  ```
  import signal
  from celery import shared_task
  from celery_dispatcher import dispatch

  @shared_task
  def subtask(i):
      ...

  @dispatch
  @shared_task
  def maintask():
      for i in range(10):
          yield subtask, (i,)

  result = maintask.delay()
  result.revoke(terminate=True, signal=signal.SIGUSR1)
  ```



  The `dispatch` accepts the following parameters:

  - `options`: dict
  - `receiver`: callable
  - `backend`: str
  - `auto_ignore`: bool





  Default: No result backend enabled by default.

  The backend used to store subtask info. Can be one of the following:

  - redis: Use [Redis](https://redis.io/) to store the results. See [Redis backend settings](https://docs.celeryproject.org/en/stable/userguide/configuration.html#conf-redis-result-backend).



  Default: 100

  The batch size of subtask dispatching, or the result retrieving.



  Default: 100

  The queue size of subtasks in result retrieving. `celery-dispatcher` put the unfinished subtasks into a queue, polling it continuously for completion of subtasks.



  Default: 10

  The default timeout for polling subtasks.



  Default: 3600

  The default timeout in seconds before `celery-dispatcher` gives up retrieving the result of each subtask.



  Default: False

  Whether raise exception when subtask timeout.



  Default: False

  Whether raise exception from subtask.



  Default: 1

  The number of steps to record. `celery-dispatcher` only actually store the updated progress in the background at most every N steps.


pkgId: ed9f8e04c2bc58eccf699d857809bfd87f694a15855ec880aed222f38d78bf3a
name: python-celery-heimdall
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: Helpful celery extensions.
url: https://github.com/tktech/celery-heimdall
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-heimdall-1.0.1-1.src.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/TkTech/celery-heimdall/branch/main/graph/badge.svg?token=1A2CVHQ25Q)](https://codecov.io/gh/TkTech/celery-heimdall)
  ![GitHub](https://img.shields.io/github/license/tktech/celery-heimdall)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/celery-heimdall)

  Celery Heimdall is a set of common utilities useful for the Celery background
  worker framework, built on top of Redis. It's not trying to handle every use
  case, but to be an easy, modern, and maintainable drop-in solution for 90% of
  projects.



  - Globally unique tasks, allowing only 1 copy of a task to execute at a time, or
    within a time period (ex: "Don't allow queuing until an hour has passed")
  - Global rate limiting. Celery has built-in rate limiting, but it's a rate limit
    _per worker_, making it unsuitable for purposes such as limiting requests to
    an API.



  `pip install celery-heimdall`





  Imagine you have a task that starts when a user presses a button. This task
  takes a long time and a lot of resources to generate a report. You don't want
  the user to press the button 10 times and start 10 tasks. In this case, you
  want what Heimdall calls a unique task:

  ```python
  from celery import shared_task
  from celery_heimdall import HeimdallTask

  @shared_task(base=HeimdallTask, heimdall={'unique': True})
  def generate_report(customer_id):
      pass
  ```

  All we've done here is change the base Task class that Celery will use to run
  the task, and passed in some options for Heimdall to use. This task is now
  unique - for the given arguments, only 1 will ever run at the same time.



  What happens if our task dies, or something goes wrong? We might end up in a
  situation where our lock never gets cleared, called [deadlock][]. To work around
  this, we add a maximum time before the task is allowed to be queued again:


  ```python
  from celery import shared_task
  from celery_heimdall import HeimdallTask

  @shared_task(
    base=HeimdallTask,
    heimdall={
      'unique': True,
      'unique_timeout': 60 * 60
    }
  )
  def generate_report(customer_id):
    pass
  ```

  Now, `generate_report` will be allowed to run again in an hour even if the
  task got stuck, the worker ran out of memory, the machine burst into flames,
  etc...



  By default, a hash of the task name and its arguments is used as the lock key.
  But this often might not be what you want. What if you only want one report at
  a time, even for different customers? Ex:

  ```python
  from celery import shared_task
  from celery_heimdall import HeimdallTask

  @shared_task(
    base=HeimdallTask,
    heimdall={
      'unique': True,
      'key': lambda args, kwargs: 'generate_report'
    }
  )
  def generate_report(customer_id):
    pass
  ```
  By specifying our own key function, we can completely customize how we determine
  if a task is unique.



  By default, if you try to queue up a unique task that is already running,
  Heimdall will return the existing task's `AsyncResult`. This lets you write
  simple code that doesn't need to care if a task is unique or not. Imagine a
  simple API endpoint that starts a report when it's hit, but we only want it
  to run one at a time. The below is all you need:

  ```python
  import time
  from celery import shared_task
  from celery_heimdall import HeimdallTask

  @shared_task(base=HeimdallTask, heimdall={'unique': True})
  def generate_report(customer_id):
    time.sleep(10)

  def my_api_call(customer_id: int):
    return {
      'status': 'RUNNING',
      'task_id': generate_report.delay(customer_id).id
    }
  ```

  Everytime `my_api_call` is called with the same `customer_id`, the same
  `task_id` will be returned by `generate_report.delay()` until the original task
  has completed.

  Sometimes you'll want to catch that the task was already running when you tried
  to queue it again. We can tell Heimdall to raise an exception in this case:

  ```python
  import time
  from celery import shared_task
  from celery_heimdall import HeimdallTask, AlreadyQueuedError


  @shared_task(
    base=HeimdallTask,
    heimdall={
      'unique': True,
      'unique_raises': True
    }
  )
  def generate_report(customer_id):
    time.sleep(10)


  def my_api_call(customer_id: int):
    try:
      task = generate_report.delay(customer_id)
      return {'status': 'STARTED', 'task_id': task.id}
    except AlreadyQueuedError as exc:
      return {'status': 'ALREADY_RUNNING', 'task_id': exc.likely_culprit}
  ```

  By setting `unique_raises` to `True` when we define our task, an
  `AlreadyQueuedError` will be raised when you try to queue up a unique task
  twice. The `AlreadyQueuedError` has two properties:

  - `likely_culprit`, which contains the task ID of the already-running task,
  - `expires_in`, which is the time remaining (in seconds) before the
    already-running task is considered to be expired.



  What if we want the task to only run once in an hour, even if it's finished?
  In those cases, we want it to run, but not clear the lock when it's finished:

  ```python
  from celery import shared_task
  from celery_heimdall import HeimdallTask

  @shared_task(
    base=HeimdallTask,
    heimdall={
      'unique': True,
      'unique_timeout': 60 * 60,
      'unique_wait_for_expiry': True
    }
  )
  def generate_report(customer_id):
    pass
  ```

  By setting `unique_wait_for_expiry` to `True`, the task will finish, and won't
  allow another `generate_report()` to be queued until `unique_timeout` has
  passed.



  Celery offers rate limiting out of the box. However, this rate limiting applies
  on a per-worker basis. There's no reliable way to rate limit a task across all
  your workers. Heimdall makes this easy:

  ```python
  from celery import shared_task
  from celery_heimdall import HeimdallTask, RateLimit

  @shared_task(
    base=HeimdallTask,
    heimdall={
      'rate_limit': RateLimit((2, 60))
    }
  )
  def download_report_from_amazon(customer_id):
    pass
  ```

  This says "every 60 seconds, only allow this task to run 2 times". If a task
  can't be run because it would violate the rate limit, it'll be rescheduled.

  It's important to note this does not guarantee that your task will run _exactly_
  twice a second, just that it won't run _more_ than twice a second. Tasks are
  rescheduled with a random jitter to prevent the [thundering herd][] problem.




  Just like you can dynamically provide a key for a task, you can also
  dynamically provide a rate limit based off that key.


  ```python
  from celery import shared_task
  from celery_heimdall import HeimdallTask, RateLimit


  @shared_task(
    base=HeimdallTask,
    heimdall={
      
      
      'rate_limit': RateLimit(lambda args: (1, 30) if args[0] == 10 else (2, 30)),
      'key': lambda args, kwargs: f'customer_{args[0]}'
    }
  )
  def download_report_from_amazon(customer_id):
    pass
  ```




  These are more mature projects which inspired this library, and which may
  support older versions of Celery & Python then this project.

  - [celery_once][], which is unfortunately abandoned and the reason this project
    exists.
  - [celery_singleton][]
  - [This snippet][snip] by Vigrond, and subsequent improvements by various
    contributors.


  [celery_once]: https://github.com/cameronmaske/celery-once
  [celery_singleton]: https://github.com/steinitzu/celery-singleton
  [deadlock]: https://en.wikipedia.org/wiki/Deadlock
  [thundering herd]: https://en.wikipedia.org/wiki/Thundering_herd_problem
  [snip]: https://gist.github.com/Vigrond/2bbea9be6413415e5479998e79a1b11a


pkgId: 8c3b330d72c95407c25a5e90ff86b13afafda104ba1d9292d4c5fb4c077ee16d
name: python-celery-local-exporter
arch: src
version: 1.0
epoch: 0
release: 1
summary: A Prometheus exporter that lives inside your Celery process.
url: https://pypi.org/project/celery-local-exporter/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-local-exporter-1.0-1.src.rpm
checksum_type: sha256
description:
  A Prometheus metrics exporter for Celery which lives directly in the celery processes. Unlike other Celery exporters, this does not require use of the events system or a result backend.



  To install:

  ```
  pip install celery-local-exporter
  ```

  To set up the exporter, in your celeryconfig.py or other settings file:

  ```
  from celery_exporter import CeleryExporter
  CeleryExporter.install()
  ```

  The `prefork` concurrency pool is not supported at this time, I recommend using `-P threads`.


pkgId: 3d3a76cef1ae47f952cc3f3562576bdcb9744d0e8317f96b8ad1c7868a0fd942
name: python-celery-message-consumer
arch: src
version: 1.2.1
epoch: 0
release: 1
summary: Tool for using the bin/celery worker to consume vanilla AMQP messages (i.e. not Celery tasks)
url: https://github.com/depop/celery-message-consumer
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-message-consumer-1.2.1-1.src.rpm
checksum_type: sha256
description:
  |PyPI Version| |Build Status|
  Tool for using the ``bin/celery`` worker to consume vanilla AMQP
  messages (i.e. not Celery tasks)
  While `writing a simple consumer
  script <https://medium.com/python-pandemonium/building-robust-rabbitmq-consumers-with-python-and-kombu-part-1-ccd660d17271>`__
  using Kombu can be quite easy, the Celery worker provides many features
  around process pools, queue/routing connections etc as well as being
  known to run reliably over long term.
  It seems safer to re-use this battle-tested consumer than try to write
  our own and have to learn from scratch all the ways that such a thing
  can fail.


pkgId: 88e33db729e13e1fa8926c0373c60b0fdcdd475a20d43460633c3d225f2969c0
name: python-celery-pool-asyncio
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Celery pool to run coroutine tasks
url: https://github.com/kai3341/celery-pool-asyncio
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-pool-asyncio-0.2.0-1.src.rpm
checksum_type: sha256
description:
  ![python](https://img.shields.io/pypi/pyversions/celery-pool-asyncio.svg)
  ![version](https://img.shields.io/pypi/v/celery-pool-asyncio.svg)
  ![downloads](https://img.shields.io/pypi/dm/celery-pool-asyncio.svg)
  ![format](https://img.shields.io/pypi/format/celery-pool-asyncio.svg)
  ![Logo](https://repository-images.githubusercontent.com/198568368/35298e00-c1e8-11e9-8bcf-76c57ee28db8)
  * Free software: Apache Software License 2.0


pkgId: c21c58da319901f7885c894fab2e9140b98279e8a525a08747bb95d707c10685
name: python-celery-prometheus
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: Celery with your own prometheus metrics
url: https://pypi.org/project/celery-prometheus/
rpm_license: BSD-Derived
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-prometheus-1.1.0-1.src.rpm
checksum_type: sha256
description:
  This module expose the Prometheus HTTP server to expose metrics of your Celery backends.

  To install `celery-prometheus` with pip, use the command:

  ```
  pip install celery-prometheus
  ```

  With Poetry:

  ```
  poetry add celery-prometheus
  ```



  To setup `celery-prometheus` to your backend, simply call the method `add_prometheus_option`
  after the init of the `Celery` object.

  Example:

  ```python

  from celery import Celery
  from celery_prometheus import add_prometheus_option

  app = Celery()
  add_prometheus_option(app)



  ```

  Before starting your backend, you will need to expose the `PROMETHEUS_MULTIPROC_DIR` environment
  variable to indicate which folder the Prometheus Client will use to store the metrics
  (see [Multiprocess Mode (E.g. Gunicorn) of the Promehteus Client documentation](https://github.com/prometheus/client_python#multiprocess-mode-eg-gunicorn)).

  To start and expose the Prometheus HTTP Server, you need to use the `--prometheus-collector-addr`
  argument when starting your Celery backend:

  ```bash
  export PROMETHEUS_MULTIPROC_DIR=/var/cache/my_celery_app
  celery worker -A my_celery_backend.backend --prometheus-collector-addr 0.0.0.0:6543
  ```

  Now that your backend is started, you can configure your Prometheus scrappers to scrappe your
  Celery backend.



  This project is open to external contributions. Feel free to submit us a
  [Pull request](https://github.com/Gandi/celery-prometheus/pulls) if you want to contribute and
  improve with us this project.

  In order to maintain an overall good code quality, this project use the following tools:

   - [Black](https://github.com/psf/black)
   - [Isort](https://github.com/PyCQA/isort)
   - [Flake8](https://flake8.pycqa.org/en/latest/)

  Linting and formatting tools are configured to match the [current default rules of Black](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html).

  We also use [Mypy](https://mypy.readthedocs.io/en/stable/) as a static type checker.

  Please ensure to run these tools before commiting and submiting a Pull request. In case one of
  these mentionned tools report an error, the CI will automatically fail.

  If you're making your first contribution to this project, please add your name to the
  [contributors list](CONTRIBUTORS.txt).



  This project is released by [Gandi.net](https://www.gandi.net/en) tech team under the
  [BSD-3 license](LICENSE).


pkgId: 468ad5fa9f7391f04311a72601349b7381df455607fe35025b2295f5e9abb0a6
name: python-celery-redbeat
arch: src
version: 2.2.0
epoch: 0
release: 1
summary: A Celery Beat Scheduler using Redis for persistent storage
url: https://github.com/sibson/redbeat
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-redbeat-2.2.0-1.src.rpm
checksum_type: sha256
description:
  `RedBeat <https://github.com/sibson/redbeat>`_ is a
  `Celery Beat Scheduler <http://celery.readthedocs.org/en/latest/userguide/periodic-tasks.html>`_
  that stores the scheduled tasks and runtime metadata in `Redis <http://redis.io/>`_.


pkgId: d37bf001815cda7f0d7329cd2d80d4a99ac6f34c45dee0bb1b8f8fde6b1c08ca
name: python-celery-redundant-scheduler
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: Celery beat scheduler with redundency
url: https://github.com/MnogoByte/celery-redundant-scheduler
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-redundant-scheduler-0.0.1-1.src.rpm
checksum_type: sha256
description:
  [Celery](http://celeryproject.org) beat scheduler providing ability to run multiple `celerybeat` instances.



  Production level deployment requires redundancy and fault-tolerance environment. Unfortunately [Celery](http://celeryproject.org) doesn't provide periodic tasks scheduling redundancy out of the box. Running multiple `celerybeat` instances results multiple scheduled tasks queuing. This package provides synchronized scheduler class. By default `redis` backend used, but developers are free too use their own based on package primitives.



  ```#bash
  pip install celery-redundant-scheduler
  pip install git+https://github.com/MnogoByte/celery-redundant-scheduler.git
  ```



  1. Setup scheduler synchronization backend:
  ```
      CELERYBEAT_REDUNDANT_BACKEND_OPTIONS = {
          'HOST': 'localhost',
          'PORT': 6379,
          'DB': 0,
          'PASSWORD': 'secret'
      }
  ```
  2. Provide `--scheduler=celery_redundant_scheduler:RedundantScheduler` option running your `worker` or `beat` instance.



  - `CELERYBEAT_REDUNDANT_BACKEND_OPTIONS` - redis connection options.
  - `CELERYBEAT_REDUNDANT_REDIS_KEYPREFIX` - prefix for redis keys. Default is `redundant-scheduler`.
  - `CELERYBEAT_REDUNDANT_REDIS_LOCK_EXPIRES` - redis lock timeout. Default is 60 seconds.



  1. Define subclass of `celery_redundant_scheduler.backends.base:BaseBackend`.
  2. Override back-end interaction methods.
  3. Provide backend options with `CELERYBEAT_REDUNDANT_BACKEND_OPTIONS`
  4. Claim using your subclass providing `CELERYBEAT_REDUNDANT_BACKEND` setting or environment variable.




  [Antonov Mikhail](https://github.com/atin65536)



  BSD - 3


pkgId: 0c83126762f0aceb1ccd7d3bf0e12063fed96f7bcc77cbb80914b1b516f6d8cd
name: python-celery-slack
arch: src
version: 0.4.1
epoch: 0
release: 1
summary: A Slack extension for Celery.
url: https://github.com/crflynn/celery-slack
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-slack-0.4.1-1.src.rpm
checksum_type: sha256
description:
  |travis| |rtd| |codecov| |pypi| |pyversions|
  Celery-slack is a `Celery <http://docs.celeryproject.org/en/latest/index.html>`_
  extension that posts messages to a Slack channel
  regarding a Celery application, its beat schedule, and its worker task
  execution. Optionally those messages can link to
  `Flower <http://flower.readthedocs.io/en/latest/>`_ task pages.


pkgId: 51e5013a405a81a3b5e548f4eb5968e4d05b22af2585ed4bca55ebff4bdf8b08
name: python-celery-sqlcommenter
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: instrument sql queries running on celery
url: https://pypi.org/project/celery-sqlcommenter/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-sqlcommenter-0.1.0-1.src.rpm
checksum_type: sha256
description:
  Attach SQL comments to correlate celery tasks with SQL statements.


  This helps in easily correlating slow performance with async tasks and giving insights into backend database performance. In short it provides some observability into the state of your client-side applications and their impact on the database’s server-side.


  You're using [celery](https://docs.celeryq.dev/en/stable/) with django, and want to trace the origin of database queries.



  No. I've been using sqlcommenter in production and it lacked the ability to annotate queries that were run in non-http context. Meaning all queries that originated from async flows were untagged.

  This package fills that gap.



  In a simple celery setup, just passing the `BaseTask` when declaring a celery object will do the job.
  ```py

  from celery_sqlcommenter import BaseTask
  app = Celery("my-awsome-application", task_cls=BaseTask)

  ```


  If you already have a custom `BaseTask` with specific functionality, replace the original `celery.Task` with `celery_sqlcommenter.BaseTask`
  ```py

  from celery import Task
  class MyBaseTask(Task):

      
      def on_failure(self, exc, task_id, args, kwargs):
          pass



  from celery_sqlcommenter import BaseTask



  class MyBaseTask(BaseTask):

      
      def on_failure(self, exc, task_id, args, kwargs):
          pass

  ```
  _Internally BaseTask inherits `celery.Task` so all functionality stays intact_



  Install the package from pypi
  ```

  pip install celery-sqlcommenter


  poetry add celery-sqlcommenter
  ```


  ![a simple celery task that takes a while](https://private-user-images.githubusercontent.com/14032427/393391701-f024f48f-6e68-4830-ba68-5c85381bc639.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzM1MTY2MTksIm5iZiI6MTczMzUxNjMxOSwicGF0aCI6Ii8xNDAzMjQyNy8zOTMzOTE3MDEtZjAyNGY0OGYtNmU2OC00ODMwLWJhNjgtNWM4NTM4MWJjNjM5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMjA2VDIwMTgzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhNWE5ODE5YzZmYTY4ZDAwMTE4MjU5ZjU1YTc0ZTBkODZlYWFiNjkyOGIwMzYzMDQ0NTcwMzk3ZDRlZjE3NzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-tHzhAV9Uciq-TBtqbCIvFlqXAZ-2oJNc94cmWPOHe8)


  Please open an issue or drop a message on my socials, will be happy to help.

  [![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/yash-kumar-verma/)
  [![X](https://img.shields.io/badge/X-%23000000.svg?style=for-the-badge&logo=X&logoColor=white)](https://x.com/yash_kr_verma)


pkgId: 127b97d032f82a72dce9f3d2b3cf3b65379fe778bd3f2f9edba2ee8bb1621296
name: python-celery-starter
arch: src
version: 1.0.9
epoch: 0
release: 1
summary: Django command to launch celery worker, beat, flower
url: https://github.com/Friskes/celery-starter
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-starter-1.0.9-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

  | Project   |     | Status                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
  |-----------|:----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | CI/CD     |     | [![Latest Release](https://github.com/Friskes/celery-starter/actions/workflows/publish-to-pypi.yml/badge.svg)](https://github.com/Friskes/celery-starter/actions/workflows/publish-to-pypi.yml)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | Quality   |     | [![Coverage](https://codecov.io/github/Friskes/celery-starter/graph/badge.svg?token=vKez4Pycrc)](https://codecov.io/github/Friskes/celery-starter)                                                                                                                                                                                                                                                                                                                               |
  | Package   |     | [![PyPI - Version](https://img.shields.io/pypi/v/celery-starter?labelColor=202235&color=edb641&logo=python&logoColor=edb641)](https://badge.fury.io/py/celery-starter) ![PyPI - Support Python Versions](https://img.shields.io/pypi/pyversions/celery-starter?labelColor=202235&color=edb641&logo=python&logoColor=edb641) ![Project PyPI - Downloads](https://img.shields.io/pypi/dm/celery-starter?logo=python&label=downloads&labelColor=202235&color=edb641&logoColor=edb641)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | Meta      |     | [![types - Mypy](https://img.shields.io/badge/types-Mypy-202235.svg?logo=python&labelColor=202235&color=edb641&logoColor=edb641)](https://github.com/python/mypy) [![License - MIT](https://img.shields.io/badge/license-MIT-202235.svg?logo=python&labelColor=202235&color=edb641&logoColor=edb641)](https://spdx.org/licenses/) [![code style - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/format.json&labelColor=202235)](https://github.com/astral-sh/ruff) |

  </div>


  > 1. The ability to run up to three servers (worker, beat, flower) simultaneously in one terminal, instead of running by default in three different terminals.
  > 2. Automatic reboot of these servers when your codebase changes.


  1. Install package
      ```bash
      pip install celery-starter
      ```

  2. Add app name to `INSTALLED_APPS`
      ```python
      INSTALLED_APPS = [
          'celery_starter',
      ]
      ```


  ```
  python manage.py runcelery
  ```

  Arguments can be passed in any order, it doesn't matter.


  `-h` or `--help` Show help message.<br/>
  `-w <cmd>` or `--worker <cmd>` Full command line to run worker or options that extend the default command line.<br/>
  `-b <cmd>` or `--beat <cmd>` Full command line to run beat or options that extend the default command line.<br/>
  `-f <cmd>` or `--flower <cmd>` Full command line to run flower or options that extend the default command line.<br/>
  `-eb` or `--exclude_beat` Excludes the beat server at startup.<br/>
  `-ef` or `--exclude_flower` Excludes the flower server at startup.<br/>
  `-d` or `--debug` Displays information about successful/unsuccessful completion of processes.<br/>




  > default commands:

  ```shell





  celery -A <CELERY_APP> worker -E -l INFO -P solo


  celery -A <CELERY_APP> beat --pidfile=celerybeat.pid -l INFO


  celery --broker=redis://localhost:6379// flower -A <CELERY_APP> --url_prefix=flower
  ```

  > valid commands:
  ```shell


  python manage.py runcelery -w "-A <CELERY_APP> -P gevent --broker=redis://localhost:6379//"


  python manage.py runcelery -w "celery -A <CELERY_APP> worker"
  ```




  We would love you to contribute to `celery-starter`, pull requests are very welcome! Please see [CONTRIBUTING.md](https://github.com/Friskes/celery-starter/blob/main/CONTRIBUTING.md) for more information.

rpm_license:
  MIT License  Copyright (c) 2024 Friskes  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: fbdf069ffdc91d13fb6226c12203b2899629c67145aec661d6579254af936b08
name: python-celery-task-manager
arch: src
version: 1.8.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/celery-task-manager/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-task-manager-1.8.0-1.src.rpm
checksum_type: sha256
description:
  **Table of Contents**
  - [Installation](#installation)
  - [License](#license)

  ```console
  pip install celery-task-manager
  ```

  `task-manager` is distributed under the terms of the [LGPL 3.0](https://spdx.org/licenses/LGPL-3.0-or-later.html) license.


pkgId: b44d933bc77f7d84056d244f168718222f226410150ba50810f7de9e6f518b78
name: python-celery-types
arch: src
version: 0.22.0
epoch: 0
release: 1
summary: Type stubs for Celery and its related packages
url: https://github.com/sbdchd/celery-types
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-types-0.22.0-1.src.rpm
checksum_type: sha256
description:
  Type stubs for celery related projects:

  - [`celery`](https://github.com/celery/celery)
  - [`django-celery-results`](https://github.com/celery/django-celery-results)
  - [`amqp`](http://github.com/celery/py-amqp)
  - [`kombu`](https://github.com/celery/kombu)
  - [`billiard`](https://github.com/celery/billiard)
  - [`vine`](https://github.com/celery/vine)
  - [`ephem`](https://github.com/brandon-rhodes/pyephem)



  ```shell
  pip install celery-types
  ```

  You'll also need to monkey patch `Task` so generic params can be provided:

  ```python
  from celery.app.task import Task
  Task.__class_getitem__ = classmethod(lambda cls, *args, **kwargs: cls) # type: ignore[attr-defined]
  ```





  ```shell

  curl -sSL https://install.python-poetry.org | python3 -


  npm install --global yarn


  yarn
  ```



  ```shell
  poetry config virtualenvs.in-project true
  poetry install


  s/lint


  poetry publish --build
  ```



  - <https://github.com/sbdchd/django-types>
  - <https://github.com/sbdchd/djangorestframework-types>
  - <https://github.com/sbdchd/mongo-types>
  - <https://github.com/sbdchd/msgpack-types>


pkgId: 37497550eae77834ba42c5118f5abac4a11125b3d961a1cb9590030e9695fc1a
name: python-celery-valkey-backend
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: A custom Celery result backend using Valkey as the storage engine
url: https://github.com/vuonglv1612/celery-valkey-backend
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery-valkey-backend-0.1.0-1.src.rpm
checksum_type: sha256
description:
  A custom result backend for Celery using ValKey as the storage engine. This backend provides a scalable, high-performance alternative to traditional result backends by leveraging ValKey's distributed key-value store capabilities.



  - Python >= 3.8
  - Celery >= 4.4.0
  - ValKey >= 6.0.0



  Install the package using pip:

  ```bash
  pip install celery-valkey-backend
  ```



  Use the ValKey backend in your Celery application:

  ```python
  from celery import Celery

  app = Celery('your_app', backend='valkey://localhost:6379/0')

  @app.task
  def add(x, y):
      return x + y


  result = add.delay(4, 4)
  print(result.get())  # Output: 8
  ```



  The backend URL format:
  ```
  valkey://host:port/db
  ```

  Example:
  ```
  valkey://localhost:6379/0
  ```



  ```bash

  git clone https://github.com/vuonglv1612/celery-valkey-backend.git
  cd celery-valkey-backend


  pip install -e ".[dev]"


  pytest
  ```



  This project is licensed under the MIT License.



  If you encounter any problems or have questions, please open an issue on [GitHub Issues](https://github.com/vuonglv1612/celery-valkey-backend/issues).


pkgId: e12d1b1d1aad4f0099c35c63eec73ef5a7c3ade45217733aa86e1d77eba7ec4c
name: python-celery_once
arch: src
version: 3.0.1
epoch: 0
release: 1
summary: Allows you to prevent multiple execution and queuing of celery tasks.
url: https://github.com/cameronmaske/celery-once
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celery_once-3.0.1-1.src.rpm
checksum_type: sha256
description:
  |Build Status| |Coverage Status|
  Celery Once allows you to prevent multiple execution and queuing of `celery <http://www.celeryproject.org/>`_ tasks.


pkgId: d614f342a116fb3b7429d01d6c674d153a45fd297206328da74e10adb0b8be26
name: python-celitech-sdk
arch: src
version: 1.3.18
epoch: 0
release: 1
url: https://pypi.org/project/celitech-sdk/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celitech-sdk-1.3.18-1.src.rpm
checksum_type: sha256
summary:
  Welcome to the CELITECH API documentation!  Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:support@celitech.com) | [Blog](https://www.celitech.com/blog/)

description:
  Welcome to the Celitech SDK documentation. This guide will help you get started with integrating and using the Celitech SDK in your project.



  - API version: `1.1.0`
  - SDK version: `1.3.18`



  Welcome to the CELITECH API documentation! Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:support@celitech.com) | [Blog](https://www.celitech.com/blog/)



  - [Setup & Configuration](#setup--configuration)
    - [Supported Language Versions](#supported-language-versions)
    - [Installation](#installation)
  - [Authentication](#authentication)
    - [OAuth Authentication](#oauth-authentication)
    - [Environment Variables](#environment-variables)
  - [Setting a Custom Timeout](#setting-a-custom-timeout)
  - [Sample Usage](#sample-usage)
  - [Services](#services)
  - [Models](#models)
  - [License](#license)





  This SDK is compatible with the following versions: `Python >= 3.7`



  To get started with the SDK, we recommend installing using `pip`:

  ```bash
  pip install celitech-sdk
  ```





  The Celitech API uses OAuth for authentication.

  You need to provide the OAuth parameters when initializing the SDK.

  ```py
  sdk = Celitech(
      client_id="CLIENT_ID",
      client_secret="CLIENT_SECRET"
  )
  ```

  If you need to set or update the OAuth parameters after the SDK initialization, you can use:

  ```py
  sdk.set_client_id("CLIENT_ID")
  sdk.set_client_secret("CLIENT_SECRET")
  ```



  These are the environment variables for the SDK:

  | Name          | Description             |
  | :------------ | :---------------------- |
  | CLIENT_ID     | Client ID parameter     |
  | CLIENT_SECRET | Client Secret parameter |

  Environment variables are a way to configure your application outside the code. You can set these environment variables on the command line or use your project's existing tooling for managing environment variables.

  If you are using a `.env` file, a template with the variable names is provided in the `.env.example` file located in the same directory as this README.



  You can set a custom timeout for the SDK's HTTP requests as follows:

  ```py
  from celitech import Celitech

  sdk = Celitech(timeout=10000)
  ```



  Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:

  ```py
  from celitech import Celitech

  sdk = Celitech(
      client_id="CLIENT_ID",
      client_secret="CLIENT_SECRET"
  )

  result = sdk.destinations.list_destinations()

  print(result)

  ```



  The SDK provides various services to interact with the API.

  <details>
  <summary>Below is a list of all available services:</summary>

  | Name         |
  | :----------- |
  | o_auth       |
  | destinations |
  | packages     |
  | purchases    |
  | e_sim        |

  </details>



  The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

  <details>
  <summary>Below is a list of all available models:</summary>

  | Name                             | Description |
  | :------------------------------- | :---------- |
  | GetAccessTokenRequest            |             |
  | GetAccessTokenOkResponse         |             |
  | ListDestinationsOkResponse       |             |
  | ListPackagesOkResponse           |             |
  | ListPurchasesOkResponse          |             |
  | CreatePurchaseRequest            |             |
  | CreatePurchaseOkResponse         |             |
  | TopUpEsimRequest                 |             |
  | TopUpEsimOkResponse              |             |
  | EditPurchaseRequest              |             |
  | EditPurchaseOkResponse           |             |
  | GetPurchaseConsumptionOkResponse |             |
  | GetEsimOkResponse                |             |
  | GetEsimDeviceOkResponse          |             |
  | GetEsimHistoryOkResponse         |             |
  | GetEsimMacOkResponse             |             |

  </details>



  This SDK is licensed under the MIT License.

  See the [LICENSE](LICENSE) file for more details.


pkgId: 72cc4acf01a287b721abb8cbba5ffe6f51cf2c5740020c167cf6c434b768f34a
name: python-celitech-sdk
arch: src
version: 1.3.8
epoch: 0
release: 1
url: https://pypi.org/project/celitech-sdk/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celitech-sdk-1.3.8-1.src.rpm
checksum_type: sha256
summary:
  Welcome to the CELITECH API documentation!  Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:support@celitech.com) | [Blog](https://www.celitech.com/blog/)

description:
  Welcome to the Celitech SDK documentation. This guide will help you get started with integrating and using the Celitech SDK in your project.



  - API version: `1.1.0`
  - SDK version: `1.3.8`



  Welcome to the CELITECH API documentation! Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:support@celitech.com) | [Blog](https://www.celitech.com/blog/)



  - [Setup & Configuration](#setup--configuration)
    - [Supported Language Versions](#supported-language-versions)
    - [Installation](#installation)
  - [Authentication](#authentication)
    - [OAuth Authentication](#oauth-authentication)
    - [Environment Variables](#environment-variables)
  - [Setting a Custom Timeout](#setting-a-custom-timeout)
  - [Sample Usage](#sample-usage)
  - [Services](#services)
  - [Models](#models)
  - [License](#license)





  This SDK is compatible with the following versions: `Python >= 3.7`



  To get started with the SDK, we recommend installing using `pip`:

  ```bash
  pip install celitech-sdk
  ```





  The Celitech API uses OAuth for authentication.

  You need to provide the OAuth parameters when initializing the SDK.

  ```py
  sdk = Celitech(
      client_id="CLIENT_ID",
      client_secret="CLIENT_SECRET"
  )
  ```

  If you need to set or update the OAuth parameters after the SDK initialization, you can use:

  ```py
  sdk.set_client_id("CLIENT_ID")
  sdk.set_client_secret("CLIENT_SECRET")
  ```



  These are the environment variables for the SDK:

  | Name          | Description             |
  | :------------ | :---------------------- |
  | CLIENT_ID     | Client ID parameter     |
  | CLIENT_SECRET | Client Secret parameter |

  Environment variables are a way to configure your application outside the code. You can set these environment variables on the command line or use your project's existing tooling for managing environment variables.

  If you are using a `.env` file, a template with the variable names is provided in the `.env.example` file located in the same directory as this README.



  You can set a custom timeout for the SDK's HTTP requests as follows:

  ```py
  from celitech import Celitech

  sdk = Celitech(timeout=10000)
  ```



  Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:

  ```py
  from celitech import Celitech

  sdk = Celitech(
      client_id="CLIENT_ID",
      client_secret="CLIENT_SECRET"
  )

  result = sdk.destinations.list_destinations()

  print(result)

  ```



  The SDK provides various services to interact with the API.

  <details>
  <summary>Below is a list of all available services:</summary>

  | Name         |
  | :----------- |
  | o_auth       |
  | destinations |
  | packages     |
  | purchases    |
  | e_sim        |

  </details>



  The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

  <details>
  <summary>Below is a list of all available models:</summary>

  | Name                             | Description |
  | :------------------------------- | :---------- |
  | GetAccessTokenRequest            |             |
  | GetAccessTokenOkResponse         |             |
  | ListDestinationsOkResponse       |             |
  | ListPackagesOkResponse           |             |
  | ListPurchasesOkResponse          |             |
  | CreatePurchaseRequest            |             |
  | CreatePurchaseOkResponse         |             |
  | TopUpEsimRequest                 |             |
  | TopUpEsimOkResponse              |             |
  | EditPurchaseRequest              |             |
  | EditPurchaseOkResponse           |             |
  | GetPurchaseConsumptionOkResponse |             |
  | GetEsimOkResponse                |             |
  | GetEsimDeviceOkResponse          |             |
  | GetEsimHistoryOkResponse         |             |
  | GetEsimMacOkResponse             |             |

  </details>



  This SDK is licensed under the MIT License.

  See the [LICENSE](LICENSE) file for more details.


pkgId: 37f3f11efa458c6695319df6660c7d9b06b5b22ef5b298c0f0f48c3cbb785ef1
name: python-cell-AAP
arch: src
version: 0.0.8
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cell-AAP/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cell-AAP-0.0.8-1.src.rpm
checksum_type: sha256
description:
  Utilities for the semi-automated generation of instance segmentation annotations to be used for neural network training. Utilities are built ontop of [UMAP](https://github.com/lmcinnes/umap), [HDBSCAN](https://arxiv.org/abs/1911.02282) and a finetuned encoder version of FAIR's [Segment Anything Model](https://github.com/facebookresearch/segment-anything/tree/main?tab=readme-ov-file) developed by Computational Cell Analytics for the project [micro-sam](https://github.com/computational-cell-analytics/micro-sam/tree/master/micro_sam/sam_annotator). In addition to providing utilies for annotation building, we train a network, FAIR's [detectron2](https://github.com/facebookresearch/detectron2) to
  1. Demonstrate the efficacy of our utilities.
  2. Be used for microscopy annotation of supported cell lines

  Supported cell lines currently include:
  1. HeLa

  In development cell lines currently include:
  1. U2OS
  2. HT1080
  3. Yeast

  We've developed a napari application for the usage of this pre-trained network and propose a transfer learning schematic for the handling of new cell lines.




  We highly recommend installing cell-AAP in a clean conda environment. To do so you must have [miniconda](https://docs.anaconda.com/free/miniconda/#quick-command-line-install) or [anaconda](https://docs.anaconda.com/free/anaconda/) installed.

  If a conda distribution has been installed:

  1. Create and activate a clean environment

          conda create -n cell-aap-env
          conda activate cell-app-env

  2. Within this enviroment install pip

          conda install pip

  3. Then install cell-AAP from PyPi

          pip install cell-AAP --upgrade

  4. Finally detectron2 must be built from source, atop cell-AAP

          
          CC=clang CXX=clang++ ARCHFLAGS="-arch arm64" python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'

          
          python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'





  1. To open napari simply type "napari" into the command line, ensure that you are working the correct environment
  2. To instantiate the plugin navigate to the "Plugins" menu and select "cell-AAP"
  3. You should now see the Plugin, where you can select an image, display it, and run inference on it.




  If running inference on large volumes of data, i.e. timeseries data >= 300 MB in size, we recommed to procceed in the following manner.

  1. Assemble a small, < 100 MB, substack of your data using python or a program like [ImageJ](https://imagej.net/ij/download.html)
  2. Use this substack to find the optimal parameters for your data, (Number of Cells, Confidence)
  3. Run Inference over the volume using the discovered optimal parameters

  Note: Finding the optimal set of parameters requires some trial and error, to assist we've created a table.

  | Classifications $\Downarrow$ Detections $\Rightarrow$ | **Too few**                            | **Too many**                             |
  |----------------------------|----------------------------------------|------------------------------------------|
  | **Dropping M-phase**       | Confidence $\Downarrow$ <br> Number of Cells $\Uparrow$ | Confidence $\Downarrow$ <br> Number of cells $\Downarrow$ |
  | **Missclasifying M-phase** | Confidence $\Uparrow$ <br> Number of Cells $\Uparrow$   | Confidence $\Uparrow$ <br> Number of Cells $\Downarrow$   |




  Once inference is complete the following colors indicate class prediction
  - Red: Non-mitotic
  - Blue: Mitotic
  - Purple: Interclass double prediction

  Note: Interclass double predictions are often early prophase cells that the network is not "confident" in, to mitigate such predictions increase the minimum confidence threshold. This will typically result in most double predictions regressing to the Non-mitotic class.


pkgId: b9fe0505f1400a33568ca39cc947520e8038cde1365580c968ef411b38d49ddf
name: python-cell-data-loader
arch: src
version: 0.0.18
epoch: 0
release: 1
summary: Converts general images of cells into formats and labels for deep learning pipelines
url: https://github.com/mleming/CellDataLoader
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cell-data-loader-0.0.18-1.src.rpm
checksum_type: sha256
description:
  Cell Data Loader is a simple AI support tool in Python that can take in images of cells (or other image types) and output them with minimal effort to formats that can be read by Pytorch (Tensor) or Tensorflow (Numpy) format. With Cell Data Loader, users have the option to output their cell images as whole images, sliced images, or, with the support of [CellPose](https://github.com/MouseLand/cellpose), segment their images by cell and output those individually.
  It can also be used for normal computer vision research, which is why CellPose is not a strict dependency.
  To install Cell Data Loader, simply type into a standard UNIX terminal
      pip install cell-data-loader
  The simplest way to use Cell Data Loader is to instantiate a dataloader as such:
  ~~~python
  from cell_data_loader import CellDataloader
  imfolder = '/path/to/my/images'
  dataloader = CellDataloader(imfolder)
  for image in dataloader:
  ~~~
  And viola!
  Lists of files are also supported:
  ~~~python
  imfiles = ['/path/to/image1.png','/path/to/image2.png','/path/to/image3.png']
  dataloader = CellDataloader(imfiles)
  for image in dataloader:
  ~~~


pkgId: 3058ae825eef353766b4b8bfbdcc885a5782873ef10014a28183a01e2874e36a
name: python-cell-gears
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: GEARS
url: https://github.com/snap-stanford/GEARS
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cell-gears-0.1.2-1.src.rpm
checksum_type: sha256
description:
  This repository hosts the official implementation of GEARS, a method that can predict transcriptional response to both single and multi-gene perturbations using single-cell RNA-sequencing data from perturbational screens.


  <p align="center"><img src="https://github.com/snap-stanford/GEARS/blob/master/img/gears.png" alt="gears" width="900px" /></p>




  Install [PyG](https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html), and then do `pip install cell-gears`.



  - Fixed training breakpoint bug from v0.1.0
  - Preprocessed dataloader now available for Replogle 2022 RPE1 and K562 essential datasets
  - Added custom split, fixed no-test split



  Using the API, you can (1) reproduce the results in our paper and (2) train GEARS on your perturbation dataset using a few lines of code.

  ```python
  from gears import PertData, GEARS


  pert_data = PertData('./data')

  pert_data.load(data_name = 'norman')

  pert_data.prepare_split(split = 'simulation', seed = 1)

  pert_data.get_dataloader(batch_size = 32, test_batch_size = 128)


  gears_model = GEARS(pert_data, device = 'cuda:8')
  gears_model.model_initialize(hidden_size = 64)
  gears_model.train(epochs = 20)


  gears_model.save_model('gears')
  gears_model.load_pretrained('gears')


  gears_model.predict([['CBL', 'CNN1'], ['FEV']])
  gears_model.GI_predict(['CBL', 'CNN1'], GI_genes_file=None)
  ```

  To use your own dataset, create a scanpy adata object with a `gene_name` column in `adata.var`, and two columns `condition`, `cell_type` in `adata.obs`. Then run:

  ```python
  pert_data.new_data_process(dataset_name = 'XXX', adata = adata)

  pert_data.load(data_path = './data/XXX')
  ```



  | Name | Description |
  |-----------------|-------------|
  | [Dataset Tutorial](demo/data_tutorial.ipynb) | Tutorial on how to use the dataset loader and read customized data|
  | [Model Tutorial](demo/model_tutorial.ipynb) | Tutorial on how to train GEARS |
  | [Plot top 20 DE genes](demo/tutorial_plot_top20_DE.ipynb) | Tutorial on how to plot the top 20 DE genes|
  | [Uncertainty](demo/tutorial_uncertainty.ipynb) | Tutorial on how to train an uncertainty-aware GEARS model |




  | Name | Description |
  |-----------------|-------------|
  | [Using Trained Model](https://colab.research.google.com/drive/11LlzGEUGoBk_Uj6DzlzizAeWse5_E9MK?usp=sharing) | Use a model trained on Norman et al. 2019 to make predictions (Needs Colab Pro)|





  ```
  @article{roohani2023predicting,
    title={Predicting transcriptional outcomes of novel multigene perturbations with gears},
    author={Roohani, Yusuf and Huang, Kexin and Leskovec, Jure},
    journal={Nature Biotechnology},
    year={2023},
    publisher={Nature Publishing Group US New York}
  }
  ```
  Paper: [Link](https://www.nature.com/articles/s41587-023-01905-6)

  Code for reproducing figures: [Link](https://github.com/yhr91/gears_misc)


pkgId: 626018cc19a867534f091d738b9ab75764910050b9d839e828dd9ad54f1b4307
name: python-cell-machine-levels
arch: src
version: 0.7.1
epoch: 0
release: 1
summary: A library for manipulating modded cell machine level codes.
url: https://github.com/BlockOG/cell_machine_levels
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cell-machine-levels-0.7.1-1.src.rpm
checksum_type: sha256
description:
  A library for manipulating modded cell machine level codes.

  To install do:

  ```bash
  pip3 install cell_machine_levels
  ```

  Or just `pip` on some OSes



  Currently supports the main 3 types (V1, V2, V3), support is going to be added for more than just these

  Level creation example:

  ```py
  from cell_machine_levels import level
  test = level.Level(10, 10, "test", level.WallEffect.wrap)
  print(test.save("V3"))
  ```

  Level importing example:

  ```py
  from cell_machine_levels import level
  test = level.open("V3;a;a;;;test;2")
  print(f"{test.name}: {test.size}, {test.wall_effect}")
  ```


pkgId: 6becd13663749d38f8dc49eb81834ca750bfdb9941a31dc4bfd61b78a529e4f0
name: python-cell2cell
arch: src
version: 0.7.4
epoch: 0
release: 1
summary: TBD
url: https://pypi.org/project/cell2cell/
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cell2cell-0.7.4-1.src.rpm
checksum_type: sha256
description:
  [![PyPI Version][pb]][pypi]
  [![Documentation Status](https://readthedocs.org/projects/cell2cell/badge/?version=latest)](https://cell2cell.readthedocs.io/en/latest/?badge=latest)
  [![Downloads](https://pepy.tech/badge/cell2cell/month)](https://pepy.tech/project/cell2cell)


  [pb]: https://badge.fury.io/py/cell2cell.svg
  [pypi]: https://pypi.org/project/cell2cell/


  For tutorials and documentation, visit [**cell2cell ReadTheDocs**](https://cell2cell.readthedocs.org/) or our [**cell2cell website**](https://earmingol.github.io/cell2cell).





  <details>
  <summary><b>Step 1: Install Anaconda</b> :snake:</summary>

  First, [install Anaconda following this tutorial](https://docs.anaconda.com/anaconda/install/)
  </details>

  <details>
  <summary><b>Step 2: Create and Activate a New Conda Environment</b> :computer:</summary>

  ```

  conda create -n cell2cell -y python=3.7 jupyter


  conda activate cell2cell
  ```
  </details>

  <details> <summary><b>Step 3: Install cell2cell</b> :arrow_down:</summary>

  ```
  pip install cell2cell
  ```
  </details>



  | cell2cell Examples | Tensor-cell2cell Examples |
  | --- | --- |
  | ![cell2cell Logo](https://github.com/earmingol/cell2cell/blob/master/Logo.png?raw=true) | ![Tensor-cell2cell Logo](https://github.com/earmingol/cell2cell/blob/master/LogoTensor.png?raw=true) |
  | - [Step-by-step Pipeline](https://github.com/earmingol/cell2cell/blob/master/examples/cell2cell/Toy-Example.ipynb)<br>- [Interaction Pipeline for Bulk Data](https://earmingol.github.io/cell2cell/tutorials/Toy-Example-BulkPipeline)<br>- [Interaction Pipeline for Single-Cell Data](https://earmingol.github.io/cell2cell/tutorials/Toy-Example-SingleCellPipeline)<br>- [Whole Body of *C. elegans*](https://github.com/LewisLabUCSD/Celegans-cell2cell) | - [Obtaining patterns of cell-cell communication](https://earmingol.github.io/cell2cell/tutorials/ASD/01-Tensor-Factorization-ASD/)<br>- [Downstream 1: Factor-specific analyses](https://earmingol.github.io/cell2cell/tutorials/ASD/02-Factor-Specific-ASD/)<br>- [Downstream 2: Patterns to functions (GSEA)](https://earmingol.github.io/cell2cell/tutorials/ASD/03-GSEA-ASD/)<br>- [Tensor-cell2cell in Google Colab (**GPU**)](https://colab.research.google.com/drive/1T6MUoxafTHYhjvenDbEtQoveIlHT2U6_?usp=sharing)<br>- [Communication patterns in **Spatial Transcriptomics**](https://earmingol.github.io/cell2cell/tutorials/Tensor-cell2cell-Spatial/) |

  Reproducible runs of the analyses in the [Tensor-cell2cell paper](https://doi.org/10.1038/s41467-022-31369-2) are available at [CodeOcean.com](https://doi.org/10.24433/CO.0051950.v2)



  Explore our tutorials for using Tensor-cell2cell with [LIANA](https://github.com/saezlab/liana-py) at [ccc-protocols.readthedocs.io](https://ccc-protocols.readthedocs.io/).



  - **Memory Errors with Tensor-cell2cell:** If you encounter memory errors when performing tensor factorizations, try replacing `init='svd'` with `init='random'`.


  Find a curated list of ligand-receptor pairs for your analyses at our [GitHub Repository](https://github.com/LewisLabUCSD/Ligand-Receptor-Pairs).



  Please cite our work using the following references:

  - **cell2cell**: [Inferring a spatial code of cell-cell interactions across a whole animal body](https://doi.org/10.1371/journal.pcbi.1010715).
    *PLOS Computational Biology, 2022*

  - **Tensor-cell2cell**: [Context-aware deconvolution of cell-cell communication with Tensor-cell2cell](https://doi.org/10.1038/s41467-022-31369-2).
    *Nature Communications, 2022.*

  - **LIANA & Tensor-cell2cell tutorials**: [Combining LIANA and Tensor-cell2cell to decipher cell-cell communication across multiple samples](https://doi.org/10.1016/j.crmeth.2024.100758).
    *Cell Reports Methods, 2024*


pkgId: c2fb191cc3f0f737ae4bafb826a7ec6fa064f8c3fec6be5ef780fa64053a184b
name: python-cell2location
arch: src
version: 0.1.4
epoch: 0
release: 1
summary: cell2location: High-throughput spatial mapping of cell types
url: https://github.com/BayraktarLab/cell2location
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cell2location-0.1.4-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
     <img src="https://github.com/BayraktarLab/cell2location/blob/master/docs/logo.svg?raw=True" width="200">
  </p>



  [![Stars](https://img.shields.io/github/stars/BayraktarLab/cell2location?logo=GitHub&color=yellow)](https://github.com/BayraktarLab/cell2location/stargazers)
  ![Build Status](https://github.com/BayraktarLab/cell2location/actions/workflows/test.yml/badge.svg?event=push)
  [![Documentation Status](https://readthedocs.org/projects/cell2location/badge/?version=latest)](https://cell2location.readthedocs.io/en/stable/?badge=latest)
  [![Downloads](https://pepy.tech/badge/cell2location)](https://pepy.tech/project/cell2location)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/BayraktarLab/cell2location/blob/master/docs/notebooks/cell2location_tutorial.ipynb)
  [![Docker image on quay.io](https://img.shields.io/badge/container-quay.io/vitkl/cell2location-brightgreen "Docker image on quay.io")](https://quay.io/vitkl/cell2location)

  If you use cell2location please cite our paper:

  Kleshchevnikov, V., Shmatko, A., Dann, E. et al. Cell2location maps fine-grained cell types in spatial transcriptomics. Nat Biotechnol (2022). https://doi.org/10.1038/s41587-021-01139-4
  https://www.nature.com/articles/s41587-021-01139-4

  Please note that cell2locations requires 2 user-provided hyperparameters (N_cells_per_location and detection_alpha) - for detailed guidance on setting these hyperparameters and their impact see [the flow diagram and the note](https://github.com/BayraktarLab/cell2location/blob/master/docs/images/Note_on_selecting_hyperparameters.pdf). Many real datasets (especially human) show within-slide variability in RNA detection sensitivity - requiring you to try both recommended settings of the `detection_alpha` parameter: `detection_alpha=200` for low within-slide technical variability and `detection_alpha=20` for high within-slide technical variability.

  Cell2location is a principled Bayesian model that can resolve fine-grained cell types in spatial transcriptomic data and create comprehensive cellular maps of diverse tissues. Cell2location accounts for technical sources of variation and borrows statistical strength across locations, thereby enabling the integration of single cell and spatial transcriptomics with higher sensitivity and resolution than existing tools. This is achieved by estimating which combination of cell types in which cell abundance could have given the mRNA counts in the spatial data, while modelling technical effects (platform/technology effect, contaminating RNA, unexplained variance).

  <p align="center">
     <img src="https://github.com/BayraktarLab/cell2location/blob/master/docs/images/Fig1_v2_white_bg.png?raw=True">
  </p>
  Overview of the spatial mapping approach and the workflow enabled by cell2location. From left to right: Single-cell RNA-seq and spatial transcriptomics profiles are generated from the same tissue (1). Cell2location takes scRNA-seq derived cell type reference signatures and spatial transcriptomics data as input (2, 3). The model then decomposes spatially resolved multi-cell RNA counts matrices into the reference signatures, thereby establishing a spatial mapping of cell types (4).



  The tutorial covering the estimation of expresson signatures of reference cell types, spatial mapping with cell2location and the downstream analysis can be found here and tried on [Google Colab](https://colab.research.google.com/github/BayraktarLab/cell2location/blob/master/docs/notebooks/cell2location_tutorial.ipynb): https://cell2location.readthedocs.io/en/latest/

  Please report bugs via https://github.com/BayraktarLab/cell2location/issues and ask any usage questions about [cell2location](https://discourse.scverse.org/c/ecosytem/cell2location/42), [scvi-tools](https://discourse.scverse.org/c/help/scvi-tools/7) or [Visium data](https://discourse.scverse.org/c/general/visium/32) in scverse community discourse.

  Cell2location package is implemented in a general way (using https://pyro.ai/ and https://scvi-tools.org/) to support multiple related models - both for spatial mapping, estimating reference cell type signatures and downstream analysis.



  We suggest using a separate conda environment for installing cell2location.

  Create conda environment and install `cell2location` package

  ```bash
  conda create -y -n cell2loc_env python=3.10

  conda activate cell2loc_env
  pip install cell2location[tutorials]
  ```

  Finally, to use this environment in jupyter notebook, add jupyter kernel for this environment:

  ```bash
  conda activate cell2loc_env
  python -m ipykernel install --user --name=cell2loc_env --display-name='Environment (cell2loc_env)'
  ```

  If you do not have conda please install Miniconda first:

  ```bash
  cd /path/to/software
  wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  bash Miniconda3-latest-Linux-x86_64.sh

  ```

  Before installing cell2location and it's dependencies, it could be necessary to make sure that you are creating a fully isolated conda environment by telling python to NOT use user site for installing packages by running this line before creating conda environment and every time before activatin conda environment in a new terminal session:

  ```bash
  export PYTHONNOUSERSITE="literallyanyletters"
  ```




  User documentation is availlable on https://cell2location.readthedocs.io/en/latest/.

  Cell2location architecture is designed to simplify extended versions of the model that account for additional technical and biologial information. We plan to provide a tutorial showing how to add new model classes but please get in touch if you would like to contribute or build on top our package.



  We thank all paper authors for their contributions:
  Vitalii Kleshchevnikov, Artem Shmatko, Emma Dann, Alexander Aivazidis, Hamish W King, Tong Li, Artem Lomakin, Veronika Kedlian, Mika Sarkin Jain, Jun Sung Park, Lauma Ramona, Liz Tuck, Anna Arutyunyan, Roser Vento-Tormo, Moritz Gerstung, Louisa James, Oliver Stegle, Omer Ali Bayraktar

  We also thank Pyro developers (Fritz Obermeyer, Martin Jankowiak), Krzysztof Polanski, Luz Garcia Alonso, Carlos Talavera-Lopez, Ni Huang for feedback on the package, Martin Prete for dockerising cell2location and other software support.



  See https://github.com/BayraktarLab/cell2location/discussions


  Future developments of cell2location are focused on 1) scalability to 100k-mln+ locations using amortised inference of cell abundance (same ideas as used in VAE), 2) extending cell2location to related spatial analysis tasks that require modification of the model (such as using cell type hierarchy information), and 3) incorporating features presented by more recently proposed methods (such as CAR spatial proximity modelling). We are also experimenting with Numpyro and JAX (https://github.com/vitkl/cell2location_numpyro).





  ```bash
  export PYTHONNOUSERSITE="True"
  conda create -y -n cell2location_cuda118_torch22 python=3.10
  conda activate cell2location_cuda118_torch22

  pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

  pip3 install scvi-tools==1.1.2

  pip install git+https://github.com/BayraktarLab/cell2location.git#egg=cell2location[tutorials,dev]
  python -m ipykernel install --user --name=cell2location_cuda118_torch22 --display-name='Environment (cell2location_cuda118_torch22)'
  ```



  Before installing cell2location and it's dependencies, it could be necessary to make sure that you are creating a fully isolated conda environment by telling python to NOT use user site for installing packages by running this line before creating conda environment and every time before activatin conda environment in a new terminal session:

  ```bash
  export PYTHONNOUSERSITE="True"
  ```



  Keeping info on distinct sections in a csv file (Google Sheet).

  ```python
  sample_annot = pd.read_csv('./sample_annot.csv')

  from glob import glob
  sample_annot['path'] = pd.Series(
      glob(f'{sp_data_folder}*'),
      index=[sub('^.+WTSI_', '', sub('_GRCh38-2020-A$', '', i)) for i in glob(f'{sp_data_folder}*')]
  )[sample_annot['Sample_ID']].values
  import os
  sample_annot['file'] = [os.path.basename(i) for i in sample_annot['path']]

  sample_annot['Sample_ID'].unique()
  ```

  Reading and concatenating samples.

  ```python
  def read_and_qc(sample_name, file, path=sp_data_folder):
      """
      Read one Visium file and add minimum metadata and QC metrics to adata.obs
      NOTE: var_names is ENSEMBL ID as it should be, you can always plot with sc.pl.scatter(gene_symbols='SYMBOL')
      """

      adata = sc.read_visium(path + str(file) +'/',
                             count_file='filtered_feature_bc_matrix.h5',
                             load_images=True)
      adata.obs['sample'] = sample_name
      adata.var['SYMBOL'] = adata.var_names
      adata.var.rename(columns={'gene_ids': 'ENSEMBL'}, inplace=True)
      adata.var_names = adata.var['ENSEMBL']
      adata.var.drop(columns='ENSEMBL', inplace=True)

      
      adata.var_names_make_unique()

      
      sc.pp.calculate_qc_metrics(adata, inplace=True)
      adata.var['mt'] = [gene.startswith('mt-') for gene in adata.var['SYMBOL']]
      adata.obs['mt_frac'] = adata[:, adata.var['mt'].tolist()].X.sum(1).A.squeeze()/adata.obs['total_counts']

      
      adata.obs["sample"] = [str(i) for i in adata.obs['sample']]
      adata.obs_names = 's' + adata.obs["sample"] \
                            + '_' + adata.obs_names
      adata.obs.index.name = 'spot_id'

      file = list(adata.uns['spatial'].keys())[0]
      adata.uns['spatial'][sample_name] = adata.uns['spatial'][file].copy()
      del adata.uns['spatial'][file]
      print(adata.uns['spatial'].keys())

      return adata

  def read_all_and_qc(
      sample_annot, Sample_ID_col, file_col, sp_data_folder,
      count_file='filtered_feature_bc_matrix.h5',
  ):
      """
      Read and concatenate all Visium files.
      """
      
      adata = read_and_qc(
          sample_annot[Sample_ID_col][0], sample_annot[file_col][0],
          path=sp_data_folder
      )

      
      slides = {}
      for i, s in enumerate(sample_annot[Sample_ID_col][1:]):
          adata_1 = read_and_qc(s, sample_annot[file_col][i], path=sp_data_folder)
          slides[str(s)] = adata_1

      adata_0 = adata.copy()

      
      
      adata = adata.concatenate(
          list(slides.values()),
          batch_key="sample",
          uns_merge="unique",
          batch_categories=sample_annot[Sample_ID_col],
          index_unique=None
      )

      sample_annot.index = sample_annot[Sample_ID_col]
      for c in sample_annot.columns:
          sample_annot.loc[:, c] = sample_annot[c].astype(str)
      adata.obs[sample_annot.columns] = sample_annot.reindex(index=adata.obs['sample']).values

      return adata

  adata = read_all_and_qc(
      sample_annot=sample_annot,
      Sample_ID_col='Sample_ID',
      file_col='file',
      sp_data_folder=sp_data_folder,
      count_file='filtered_feature_bc_matrix.h5',
  )

  adata_incl_nontissue = read_all_and_qc(
      sample_annot=sample_annot,
      Sample_ID_col='Sample_ID',
      file_col='file',
      sp_data_folder=sp_data_folder,
      count_file='raw_feature_bc_matrix.h5',
  )
  ```

  Since Version 0.9.0 (released on 2023-04-11), the function `AnnData.concatenate()` has been deprecated in favour of `anndata.concat()` as per the official release notes ([Reference](https://anndata.readthedocs.io/en/latest/release-notes/index.html#id4)). Here is the updated code snippet of `read_all_and_qc`:

  ```python
  from anndata import concat

  def read_all_and_qc(
      sample_annot, Sample_ID_col, file_col, sp_data_folder,
      count_file='filtered_feature_bc_matrix.h5',
  ):
      """
      Read and concatenate all Visium files.
      """

      
      adatas = []
      for i, s in enumerate(sample_annot[Sample_ID_col]):
          adata_i = read_and_qc(s, Sample_ID_col[file_col][i], path=sp_data_folder)
          adatas.append(adata_i)
      
      adata = concat(
          adatas,
          merge="unique",
          uns_merge="unique",
          label="batch",
          keys=sample_annot[Sample_ID_col].tolist(),
          index_unique=None
      )

      sample_annot.index = sample_annot[Sample_ID_col]
      for c in sample_annot.columns:
          sample_annot.loc[:, c] = sample_annot[c].astype(str)
      adata.obs[sample_annot.columns] = sample_annot.reindex(index=adata.obs['sample']).values

      return adata

  adata = read_all_and_qc(
      sample_annot=sample_annot,
      Sample_ID_col='Sample_ID',
      file_col='file',
      sp_data_folder=sp_data_folder,
      count_file='filtered_feature_bc_matrix.h5',
  )

  cell2location.models.Cell2location.setup_anndata(
      adata=adata_vis,
      batch_key="batch")
  ```


pkgId: 862ce5056adfa4a53ebcf3a1982cd8e87dcf83a0a7dd3c34bb73c47171814444
name: python-cellar-extractor
arch: src
version: 1.2.1
epoch: 0
release: 1
summary: Library for extracting cellar data
url: https://pypi.org/project/cellar-extractor/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellar-extractor-1.2.1-1.src.rpm
checksum_type: sha256
description:
  This library contains two functions to get cellar case law data from eurlex.



  Python 3.9+



  ![Workflow Status](https://github.com/maastrichtlawtech/extraction_libraries/actions/workflows/github-actions.yml/badge.svg)



  <table>
     <tr>
        <td align="center"> <a href="https://github.com/pranavnbapat"> <img src="https://avatars.githubusercontent.com/u/7271334?v=4" width="100;" alt="pranavnbapat"/> <br />
           <sub><b>Pranav Bapat</b></sub> </a>
        </td>
        <td align="center"> <a href="https://github.com/Cloud956"> <img src="https://avatars.githubusercontent.com/u/24865274?v=4" width="100;" alt="Cloud956"/> <br /> <sub><b>Piotr Lewandowski</b></sub> </a> </td>
        <td align="center"> <a href="https://github.com/shashankmc"> <img src="https://avatars.githubusercontent.com/u/3445114?v=4" width="100;" alt="shashankmc"/> <br /> <sub><b>shashankmc</b></sub> </a> </td>
        <td align="center"> <a href="https://github.com/gijsvd"> <img src="https://avatars.githubusercontent.com/u/31765316?v=4" width="100;" alt="gijsvd"/> <br /> <sub><b>gijsvd</b></sub> </a> </td>
        <td align="center"> <a href="https://github.com/venvis"> <img src="https://avatars.githubusercontent.com/venvis" width="100;" alt="venvis"/> <br /> <sub><b>venvis</b></sub> </a> </td>
     </tr>
  </table>



  ``pip install cellar-extractor``



  1. ``get_cellar``
      Gets all the ECLI data from the eurlex sparql endpoint and saves them in the CSV or JSON format, in-memory or as a saved file.
  2. ``get_cellar_extra``
      Gets all the ECLI data from the eurlex sparql endpoint, and on top of that scrapes the eurlex websites to acquire
      the full text, keywords, case law directory code and eurovoc identifiers. If the user does have an eurlex account with access to the eurlex webservices, he can also
      pass his webservices login credentials to the method, in order to extract data about works citing work and works
      being cited by work. The full text is returned as a JSON file, rest of data as a CSV.  Can be in-memory or as saved files.
  3. ``get_nodes_and_edges_lists``
      Gets 2 list objects, one for the nodes and edges of the citations within the passed dataframe.
      Allows the creation of a network graph of the citations. Can only be returned in-memory.
  4. ``filter_subject_matter``
      Returns a dataframe of cases only containing a certain phrase in the column containing the subject of cases.



  1. ``FetchOperativePart``
      A class whose instance(declaration) when called returns a list of the all the text contained within the operative part for each European Court of Justice (CJEU, formerly known as European Court of Justice (ECJ)) judgement (English only).  The ``FetchOperativePart`` class has eleven functions - each function scrapes for the operative part depending on the html structure of the page :
      - ``html_page_structure_one`` -  This function retreives operative part from documents of the respected celex id's. This function scrapes/parse the operative part from a nested table structure . The relevant text lies inside the coj-bold class of the span tag.
      - ``html_page_structure_two`` - This function retreives operative part from documents of the respected celex id's. This function scrapes/parse the operative part from a paragraph (p) structure. The relevant text lies inside the normal class of the p tag which comes after the keyword operative of the previous span tag.
      - ``structure_three`` - This function retreives operative part from documents of the respected celex id's. This function scrapes/parse the operative part from a nested table structure. The relevant text lies inside the coj-bold class of the span tag.
      - `structure_four` - This function retrieves the operative part from documents of the respected celex ids. This function scrapes/parses the operative part from a paragraph (p) structure. The relevant text lies inside the p tag which comes after the keyword operative of the previous span tag.
      - `structure_five` - This function retrieves the operative part from documents of the respected celex ids. This function scrapes/parses the operative part from a paragraph (p) structure. The relevant text lies inside the normal class of the p tag which comes after the keyword operative of the previous span tag.
      - `structure_six` - This function retrieves the operative part from documents of the respected celex ids. This function scrapes/parses the operative part from a h2 (header) structure. The relevant text lies inside the p tag which comes after the keyword operative part of the respective h2 tag.
      - `structure_seven` - This function retrieves the operative part from documents of the respected celex ids. This function scrapes/parses the operative part from a table (table) structure. The relevant text lies inside the span tag which comes after the p tag, with the class name=normal.
      - `structure_eight` - This function retrieves the operative part from documents of the respected celex ids. The text is extracted from the span tag nested inside the tbody tag. Returns a list as output.
      - `structure_nine` - This function retrieves the operative part from documents of the respected celex ids. The operative part is under the bold (b) tag after the p tag where the keywords "on those grounds" exist.
      - `structure_ten` - This function retrieves the operative part from documents of the respected celex ids. Since the content is preloaded using js/client server side functions, the text from the current page is retrieved and the operative part is scraped after the occurrence of the phrase "On those grounds".
      - `structure_eleven` - This function retrieves the operative part from documents of the respected celex ids. The operative part is under the paragraph (p) tag after the b tag where the keywords "operative part" exist.

  2. ``Writing``
  A class which writes the text for the operative part for each European Case law case(En-English only) into csv,json and txt files(Generated upon initialization). The ``Writing`` class has three functions:
      - ``to_csv()`` - Writes the operative part along with celex id into a csv file.
      - ``to_json()`` - Writes the operative part along with celex id into a json file.
      - ``to_txt()`` - Writes the operative part along with celex id into a txt file

  3. ``CellarSparqlQuery``
  A class which includes methods to extract extra data for each court case using a sparql query.
        - ``get_endorsements`` - Fetches endorsements of the judgement
        - ``get_subjects`` - Fetches subjects of the judgement
        - ``get_parties`` - Fetches parties of the judgement
        - ``get_keywords`` - Fetches keywords of the judgement
        - ``get_citations`` - Fetches court cases cited by the source judgement
        - ``get_grounds`` - Fetches grounds of the judgement



  1. ``get_cellar``
      **Parameters**:
      - **max_ecli**: **int, optional, default 100**
      Maximum number of ECLIs to retrieve.
      - **sd: date, optional, default '2022-05-01'**
      The start last modification date (yyyy-mm-dd).
      - **ed: date, optional, default current date**
      The end last modification date (yyyy-mm-dd).
      - **save_file: ['y', 'n'],optional, default 'y'**
      Save data in a data folder, or return in-memory.
      - **file_format: ['csv', 'json'],optional, default 'csv'**
      Returns the data as a JSON/dictionary, or as a CSV/Pandas Dataframe object.

  2. ``get_cellar_extra``
      - **max_ecli: int, optional, default 100**
      Maximum number of ECLIs to retrieve.
      - **sd: date, optional, default '2022-05-01'**
      The start last modification date (yyyy-mm-dd).
      - **ed: date, optional, default current date**
      The end last modification date (yyyy-mm-dd).
      - **save_file: ['y', 'n'],optional, default 'y'**
      Save the full text of cases as JSON file / return as a dictionary and save the rest ofthe data as a CSV file / return as a Pandas Dataframe object.
      - **threads: int ,optional, default 10**
      Extracting the additional data takes a lot of time. The use of multi-threading can cut down this time. Even with this, the method may take a couple of minutes for a couple of hundred cases. A maximum number of 10 recommended, as this method may also affect the device's internet connection.
      - **username: string, optional, default empty string**
      The username to the eurlex webservices.
      - **password: string, optional, default empty string**
      The password to the eurlex webservices.

  3. ``get_nodes_and_edges_lists``
      - **df: DataFrame object, required, default None**
      DataFrame of cellar metadata acquired from the ``get_cellar_extra`` method with eurlex webservice credentials passed. This method will only work on dataframes with citations data.
      - **only_local: boolean, optional, default False**
      Flag for nodes and edges generation. If set to True, the network created will only include nodes and edges between
      cases exclusively inside the given dataframe.

  4. ``filter_subject_matter``
      - **df: DataFrame object, required, default None**
      DataFrame of cellar metadata acquired from any of the cellar extraction methods listed above.
      - **phrase: string, required, default None**
      The phrase which has to be present in the subject matter of cases. Case insensitive.

  5. ``Analyzer``
      - **celex id: str, required**
          - Pass as a constructor upon initializing the class

  6. ``Writing``
      - **celex id: str, required**
          - Pass as a constructor upon initializing the class



  ```python
  import cellar_extractor as cell



  cell.get_cellar(save_file='y', max_ecli=200, sd='2022-01-01', file_format='csv')
  cell.get_cellar_extra(max_ecli=100, sd='2022-01-01', threads=10)



  df = cell.get_cellar(save_file='n', file_format='csv', sd='2022-01-01', max_ecli=1000)
  df,json = cell.get_cellar_extra(save_file='n', max_ecli=100, sd='2022-01-01', threads=10)
  ```

  Create a callback of the instance of the class initiated and pass a list as it's value.

  ```python
  import cellar_extractor as cell
  instance=cell.FetchOperativePart(celex_id:str)
  output_list=instance()
  print(output_list) # prints operative part of the Case as a list
  ```

  The Writing Class also takes a celex id , upon initializing the class , through the means of the constructor and writes the content of its operative part into different files, depending on the function called.

  ```python
  import cellar_extractor as cell
  instance=cell.Writing(celex_id:str)
  output=instance.to_csv() # for csv
  output=instance.to_txt() # for txt
  output=instance.to_json() # for json
  ```


  [![License: Apache 2.0](https://img.shields.io/github/license/maastrichtlawtech/extraction_libraries)](https://opensource.org/licenses/Apache-2.0)

  Previously under the [MIT License](https://opensource.org/licenses/MIT), as of 28/10/2022 this work is licensed under a [Apache License, Version 2.0](https://opensource.org/licenses/Apache-2.0).
  ```
  Apache License, Version 2.0

  Copyright (c) 2022 Maastricht Law & Tech Lab

  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.
  ```

rpm_license:
[cell repeats an earlier one in this file: 10254 characters]


pkgId: 38da6d3dcef963fd20019912b5da9e3ee8c26f278ed265d7f4c0111d1c3be7dc
name: python-cellarr
arch: src
version: 0.2.7
epoch: 0
release: 1
summary: TileDB-based array storage for genomics data collections.
url: https://github.com/BiocPy/cellarr
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellarr-0.2.7-1.src.rpm
checksum_type: sha256
description:
  [![PyPI-Server](https://img.shields.io/pypi/v/cellarr.svg)](https://pypi.org/project/cellarr/)
  ![Unit tests](https://github.com/BiocPy/cellarr/actions/workflows/pypi-test.yml/badge.svg)



  Cell Arrays is a Python package that provides a TileDB-backed store for large collections of genomic experimental data, such as millions of cells across multiple single-cell experiment objects.

  The `CellArrDataset` is designed to store single-cell RNA-seq
  datasets but can be generalized to store any 2-dimensional experimental data.



  To get started, install the package from [PyPI](https://pypi.org/project/cellarr/)

  ```bash
  pip install cellarr


  pip install cellarr[optional]
  ```





  Building a `CellArrDataset` generates 4 TileDB files in the specified output directory:

  - `gene_annotation`: A TileDB file containing feature/gene annotations.
  - `sample_metadata`: A TileDB file containing sample metadata.
  - `cell_metadata`: A TileDB file containing cell metadata including mapping to the samples
  they are tagged with in ``sample_metadata``.
  - A matrix TileDB file named by the `layer_matrix_name` parameter. This allows the package
  to store multiple different matrices, e.g. 'counts', 'normalized', 'scaled' for the same cell,
  gene, sample metadata attributes.

  The organization is inspired by the [MultiAssayExperiment](https://bioconductor.org/packages/release/bioc/html/MultiAssayExperiment.html) data structure.

  The TileDB matrix file is stored in a **cell X gene** orientation. This orientation
  is chosen because the fastest-changing dimension as new files are added to the
  collection is usually the cells rather than genes.

  ![`CellArrDataset` structure](./assets/cellarr.png "CellArrDataset")

  ***Note: Currently only supports either paths to H5AD or `AnnData` objects***

  To build a `CellArrDataset` from a collection of `H5AD` or `AnnData` objects:

  ```python
  import anndata
  import numpy as np
  import tempfile
  from cellarr import build_cellarrdataset, CellArrDataset, MatrixOptions



  tempdir = tempfile.mkdtemp()


  adata1 = anndata.read_h5ad("path/to/object1.h5ad", "r")

  adata2 = "path/to/object2.h5ad"


  dataset = build_cellarrdataset(
      output_path=tempdir,
      files=[adata1, adata2],
      matrix_options=MatrixOptions(dtype=np.float32),
  )
  ```

  The build process usually involves 4 steps:

  1. **Scan the Collection**: Scan the entire collection of files to create
  a unique set of feature ids (e.g. gene symbols). Store this set as the
  `gene_annotation` TileDB file.

  2. **Sample Metadata**: Store sample metadata in `sample_metadata`
  TileDB file. Each file is typically considered a sample, and an automatic
  mapping is created between files and samples if metadata is not provided.

  3. **Store Cell Metadata**: Store cell metadata in the `cell_metadata`
  TileDB file.

  4. **Remap and Orient Data**: For each dataset in the collection,
  remap and orient the feature dimension using the feature set from Step 1.
  This step ensures consistency in gene measurement and order, even if
  some genes are unmeasured or ordered differently in the original experiments.

  ***Note: The objects to build the `CellArrDataset` are expected to be fairly consistent, especially along the feature dimension.
  if these are `AnnData` or `H5AD`objects, all objects must contain an index (in the `var` slot) specifying the gene symbols.***



  If the cell metadata is inconsistent across datasets, you can provide a list of
  columns to standardize during extraction. Any missing columns will be filled with
  the default value `'NA'`, and their data type should be specified as `'ascii'` in
  `CellMetadataOptions`. For example, this build process will create a TileDB store
  for cell metadata containing the columns `'cellids'` and `'tissue'`. If any dataset
  lacks one of these columns, the missing values will be automatically filled with `'NA'`.

  ```python
  dataset = build_cellarrdataset(
      output_path=tempdir,
      files=[adata1, adata2],
      matrix_options=MatrixOptions(dtype=np.float32),
      cell_metadata_options=CellMetadataOptions(
          column_types={"cellids": "ascii", "tissue": "ascii"}
      ),
  )

  print(dataset)
  ```

  Check out the [documentation](https://biocpy.github.io/cellarr/tutorial.html) for more details.



  Users have the option to reuse the `dataset` object retuned when building the dataset or by creating a `CellArrDataset` object by initializing it to the path where the files were created.

  ```python

  dataset = CellArrDataset(dataset_path=tempdir)


  gene_list = ["gene_1", "gene_95", "gene_50"]
  expression_data = dataset[0:10, gene_list]

  print(expression_data.matrix)

  print(expression_data.gene_annotation)
  ```

       
       <11x3 sparse matrix of type '<class 'numpy.float32'>'
            with 9 stored elements in COOrdinate format>

       
       	cellarr_gene_index
       0	gene_1
       446	gene_50
       945	gene_95



  The package includes a dataloader in the `pytorch-lightning` framework for single cells expression profiles, training labels, and study labels. The dataloader uniformly samples across training labels and study labels to create a diverse batch of cells.

  This dataloader can be used as a template to create custom dataloaders specific to your needs.

  ```python
  from cellarr.dataloader import DataModule

  datamodule = DataModule(
      dataset_path="/path/to/cellar/dir",
      cell_metadata_uri="cell_metadata",
      gene_annotation_uri="gene_annotation",
      matrix_uri="counts",
      label_column_name="label",
      study_column_name="study",
      batch_size=1000,
      lognorm=True,
      target_sum=1e4,
  )
  ```

  The package also includes a simple autoencoder in the `pytorch-lightning` which makes use of the dataloader. This can be used as a template to create custom architectures and models.

  ```python
  import pytorch_lightning as pl
  from cellarr.autoencoder import AutoEncoder

  autoencoder = AutoEncoder(
      n_genes=len(datamodule.gene_indices),
      latent_dim=128,
      hidden_dim=[1024, 1024, 1024],
      dropout=0.5,
      input_dropout=0.4,
      residual=False,
  )

  model_path = "/path/to/model/mymodel/"
  params = {
      "max_epochs": 500,
      "logger": True,
      "log_every_n_steps": 1,
      "limit_train_batches": 100, # to specify number of batches per epoch
  }
  trainer = pl.Trainer(**params)
  trainer.fit(autoencoder, datamodule=datamodule)
  autoencoder.save_all(model_path=model_path)
  ```
  <!-- pyscaffold-notes -->



  This project has been set up using PyScaffold 4.5. For details and usage
  information on PyScaffold see <https://pyscaffold.org/>.


pkgId: a9cbe6468dc6ccfe3e0cc079300cde47a23a446e4e9bed29646423282e90c09a
name: python-cellarr
arch: src
version: 0.3.1
epoch: 0
release: 1
summary: TileDB-based array storage for genomics data collections.
url: https://github.com/BiocPy/cellarr
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellarr-0.3.1-1.src.rpm
checksum_type: sha256
description:
  [![PyPI-Server](https://img.shields.io/pypi/v/cellarr.svg)](https://pypi.org/project/cellarr/)
  ![Unit tests](https://github.com/BiocPy/cellarr/actions/workflows/pypi-test.yml/badge.svg)



  Cell Arrays is a Python package that provides a TileDB-backed store for large collections of genomic experimental data, such as millions of cells across multiple single-cell experiment objects.

  The `CellArrDataset` is designed to store single-cell RNA-seq
  datasets but can be generalized to store any 2-dimensional experimental data.



  To get started, install the package from [PyPI](https://pypi.org/project/cellarr/)

  ```bash
  pip install cellarr


  pip install cellarr[optional]
  ```





  Building a `CellArrDataset` generates 4 TileDB files in the specified output directory:

  - `gene_annotation`: A TileDB file containing feature/gene annotations.
  - `sample_metadata`: A TileDB file containing sample metadata.
  - `cell_metadata`: A TileDB file containing cell metadata including mapping to the samples
  they are tagged with in ``sample_metadata``.
  - An `assay` TileDB group containing various matrices. This allows the package to store multiple different matrices, e.g. 'counts', 'normalized', 'scaled' for the same sample/cell and gene attributes.

  The organization is inspired by Bioconductor's `SummarizedExperiment` data structure.

  The TileDB matrix file is stored in a **cell X gene** orientation. This orientation
  is chosen because the fastest-changing dimension as new files are added to the
  collection is usually the cells rather than genes.

  ![`CellArrDataset` structure](./assets/cellarr.png "CellArrDataset")

  ***Note: Currently only supports either paths to H5AD or `AnnData` objects***

  To build a `CellArrDataset` from a collection of `H5AD` or `AnnData` objects:

  ```python
  import anndata
  import numpy as np
  import tempfile
  from cellarr import build_cellarrdataset, CellArrDataset, MatrixOptions



  tempdir = tempfile.mkdtemp()


  adata1 = anndata.read_h5ad("path/to/object1.h5ad", "r")

  adata2 = "path/to/object2.h5ad"


  dataset = build_cellarrdataset(
      output_path=tempdir,
      files=[adata1, adata2],
      matrix_options=MatrixOptions(matrix_name="counts", dtype=np.int16),
      num_threads=2,
  )


  dataset = build_cellarrdataset(
      output_path=tempdir,
      files=[adata1, adata2],
      matrix_options=[
          MatrixOptions(matrix_name="counts", dtype=np.int16),
          MatrixOptions(matrix_name="log-norm", dtype=np.float32)
      ],
      num_threads=2,
  )
  ```

  The build process usually involves 4 steps:

  1. **Scan the Collection**: Scan the entire collection of files to create
  a unique set of feature ids (e.g. gene symbols). Store this set as the
  `gene_annotation` TileDB file.

  2. **Sample Metadata**: Store sample metadata in `sample_metadata`
  TileDB file. Each file is typically considered a sample, and an automatic
  mapping is created between files and samples if metadata is not provided.

  3. **Store Cell Metadata**: Store cell metadata in the `cell_metadata`
  TileDB file.

  4. **Remap and Orient Data**: For each dataset in the collection,
  remap and orient the feature dimension using the feature set from Step 1.
  This step ensures consistency in gene measurement and order, even if
  some genes are unmeasured or ordered differently in the original experiments.

  ***Note: The objects to build the `CellArrDataset` are expected to be fairly consistent, especially along the feature dimension.
  if these are `AnnData` or `H5AD`objects, all objects must contain an index (in the `var` slot) specifying the gene symbols.***



  If the cell metadata is inconsistent across datasets, you may provide a list of
  columns to standardize during extraction. Any missing columns will be filled with
  the default value `'NA'`, and their data type should be specified as `'ascii'` in
  `CellMetadataOptions`. For example, this build process will create a TileDB store
  for cell metadata containing the columns `'cellids'` and `'tissue'`. If any dataset
  lacks one of these columns, the missing values will be automatically filled with `'NA'`.

  ```python
  dataset = build_cellarrdataset(
      output_path=tempdir,
      files=[adata1, adata2],
      matrix_options=MatrixOptions(dtype=np.float32),
      cell_metadata_options=CellMetadataOptions(
          column_types={"cellids": "ascii", "tissue": "ascii"}
      ),
  )

  print(dataset)
  ```

  Check out the [documentation](https://biocpy.github.io/cellarr/tutorial.html) for more details.



  Users have the option to reuse the `dataset` object returned when building the dataset or by creating a `CellArrDataset` object by initializing it to the path where the files were created.

  ```python

  dataset = CellArrDataset(dataset_path=tempdir)


  gene_list = ["gene_1", "gene_95", "gene_50"]
  expression_data = dataset[0:10, gene_list]

  print(expression_data.matrix)

  print(expression_data.gene_annotation)
  ```

       
       <11x3 sparse matrix of type '<class 'numpy.float32'>'
            with 9 stored elements in COOrdinate format>

       
       	cellarr_gene_index
       0	gene_1
       446	gene_50
       945	gene_95

  This returns a `CellArrDatasetSlice` object that contains the matrix and metadata `DataFrame`'s along the cell and gene axes.

  Users can easily convert these to analysis-ready representations

  ```python
  print("as anndata:")
  print(expression_data.to_anndata())

  print("\n\n as summarizedexperiment:")
  print(expression_data.to_summarizedexperiment())
  ```



  The package includes a dataloader in the `pytorch-lightning` framework for single cells expression profiles, training labels, and study labels. The dataloader uniformly samples across training labels and study labels to create a diverse batch of cells.

  This dataloader can be used as a **template** to create custom dataloaders specific to your needs.

  ```python
  from cellarr.dataloader import DataModule

  datamodule = DataModule(
      dataset_path="/path/to/cellar/dir",
      cell_metadata_uri="cell_metadata",
      gene_annotation_uri="gene_annotation",
      matrix_uri="assays/counts",
      label_column_name="label",
      study_column_name="study",
      batch_size=1000,
      lognorm=True,
      target_sum=1e4,
  )
  ```

  The package also includes a simple autoencoder in the `pytorch-lightning` which makes use of the dataloader. This can be used as a template to create custom architectures and models.

  ```python
  import pytorch_lightning as pl
  from cellarr.autoencoder import AutoEncoder

  autoencoder = AutoEncoder(
      n_genes=len(datamodule.gene_indices),
      latent_dim=128,
      hidden_dim=[1024, 1024, 1024],
      dropout=0.5,
      input_dropout=0.4,
      residual=False,
  )

  model_path = "/path/to/model/mymodel/"
  params = {
      "max_epochs": 500,
      "logger": True,
      "log_every_n_steps": 1,
      "limit_train_batches": 100, # to specify number of batches per epoch
  }
  trainer = pl.Trainer(**params)
  trainer.fit(autoencoder, datamodule=datamodule)
  autoencoder.save_all(model_path=model_path)
  ```

  Check out the [documentation](https://biocpy.github.io/cellarr/api/modules.html) for more details.

  <!-- pyscaffold-notes -->



  This project has been set up using PyScaffold 4.5. For details and usage
  information on PyScaffold see <https://pyscaffold.org/>.


pkgId: 1dd66e82b513bb4b1f4c13e5b987c4594f18405976cb340cf0d7304b49e96b19
name: python-cellbender
arch: src
version: 0.3.0
epoch: 0
release: 1
url: http://github.com/broadinstitute/CellBender
rpm_license: BSD (3-Clause)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellbender-0.3.0-1.src.rpm
checksum_type: sha256
summary:
  A software package for eliminating technical artifacts from high-throughput single-cell RNA sequencing (scRNA-seq) data

description:
  CellBender is a software package for eliminating technical artifacts from
  high-throughput single-cell RNA sequencing (scRNA-seq) data.
  The current release contains the following modules. More modules will be added in the future:
  * ``remove-background``:
    This module removes counts due to ambient RNA molecules and random barcode swapping from (raw)
    UMI-based scRNA-seq count matrices.  Also works for snRNA-seq and CITE-seq.
  Please refer to `the documentation <https://cellbender.readthedocs.io/en/latest/>`_ for a quick start tutorial.


pkgId: aca8970307c5cfb9b299d4cb3e320aeb446aaaf43485dac1bb70f223ecbf70eb
name: python-cellbrowser
arch: src
version: 1.2.8
epoch: 0
release: 1
url: https://github.com/maximilianh/cellBrowser
rpm_license: GPL 3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellbrowser-1.2.8-1.src.rpm
checksum_type: sha256
summary:
  UCSC Cellbrowser, an interactive browser for single cell data. Includes converters and basic pipelines for text files, Seurat, Scanpy and Cellranger.

description:
  The UCSC Cell Browser is an interactive browser for
      single cell data, like mRNA or ATAC-seq data. You can display
      dimensionality reductions, navigate them with the mouse or the cursor keys,
      select cells, color by genes or meta annotations and make many other
      changes. The main site runs at https://cells.ucsc.edu, but using this
      package you can also convert data yourself and build a Cell Browser HTML
      directory that can be served through any University or any other webserver
      for static webpages. You can try the Cell Browser at https://cells.ucsc.edu
      or read about how to convert data with this package on
      https://cellbrowser.rtfd.org.

      We strongly recommend that to use Python3, but we make an effort to remain compatible with Python2.


pkgId: 2482b3a7f39af57b59889f91612f8bec87f1f804b2ab26dc8ae0dc1b280b15fb
name: python-cellcharter
arch: src
version: 0.3.2
epoch: 0
release: 1
url: https://pypi.org/project/cellcharter/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellcharter-0.3.2-1.src.rpm
checksum_type: sha256
summary:
  A Python package for the identification, characterization and comparison of spatial clusters from spatial -omics data.

description:
  <p align="center">
    <a href="https://cellcharter.readthedocs.io/en/latest/" target="_blank">Documentation</a> •
    <a href="https://cellcharter.readthedocs.io/en/latest/notebooks/codex_mouse_spleen.html" target="_blank">Examples</a> •
    <a href="https://doi.org/10.1038/s41588-023-01588-4" target="_blank">Paper</a> •
    <a href="https://www.biorxiv.org/content/10.1101/2023.01.10.523386v2" target="_blank">Preprint</a>
  </p>
  [![Tests][badge-tests]][link-tests]
  [![Documentation][badge-docs]][link-docs]
  [badge-tests]: https://img.shields.io/github/actions/workflow/status/CSOgroup/cellcharter/test.yaml?branch=main
  [link-tests]: https://github.com/CSOgroup/cellcharter/actions/workflows/test.yml
  [badge-docs]: https://img.shields.io/readthedocs/cellcharter
  </div>

  <p>
    Spatial clustering (or spatial domain identification) determines cellular niches characterized by specific admixing of these populations. It assigns cells to clusters based on both their intrinsic features (e.g., protein or mRNA expression), and the features of neighboring cells in the tissue.
  </p>
  <p align="center">
    <img src="https://github.com/CSOgroup/cellcharter/raw/main/docs/_static/spatial_clusters.png" width="500px">
  </p>
  <p>
  CellCharter is able to automatically identify spatial domains, and offers a suite of approaches for cluster characterization and comparison.
  </p>
  <p align="center">
    <img src="https://github.com/CSOgroup/cellcharter/raw/main/docs/_static/cellcharter_workflow.png" width="800px">
  </p>

  -   **Identify niches for multiple samples**: By combining the power of scVI and scArches, CellCharter can identify domains for multiple samples simultaneously, even with in presence of batch effects.
  -   **Scalability**: CellCharter can handle large datasets with millions of cells and thousands of features. The possibility to run it on GPUs makes it even faster
  -   **Flexibility**: CellCharter can be used with different types of spatial -omics data, such as spatial transcriptomics, proteomics, epigenomics and multiomics data. The only difference is the method used for dimensionality reduction and batch effect removal.
      -   Spatial transcriptomics: CellCharter has been tested on [scVI](https://docs.scvi-tools.org/en/stable/api/reference/scvi.model.SCVI.html#scvi.model.SCVI) with Zero-inflated negative binomial distribution.
      -   Spatial proteomics: CellCharter has been tested on a version of [scArches](https://docs.scarches.org/en/latest/api/models.html#scarches.models.TRVAE), modified to be use Mean Squared Error loss instead of the default Negative Binomial loss.
      -   Spatial epigenomics: CellCharter has been tested on [scVI](https://docs.scvi-tools.org/en/stable/api/reference/scvi.model.SCVI.html#scvi.model.SCVI) with Poisson distribution.
      -   Spatial multiomics: it's possible to use multi-omics models such as [MultiVI](https://docs.scvi-tools.org/en/stable/api/reference/scvi.model.MULTIVI.html#scvi.model.MULTIVI), or use the concatenativo of the results from the different models.
  -   **Best candidates for number of domains**: CellCharter offers a [method to find multiple best candidates](https://cellcharter.readthedocs.io/en/latest/generated/cellcharter.tl.ClusterAutoK.html) for the number of domains, based on the stability of a certain number of domains across multiple runs.
  -   **Domain characterization**: CellCharter provides a set of tools to characterize and compare the spatial domains, such as domain proportion, cell type enrichment, (differential) neighborhood enrichment, domain shape characterization.
  Since CellCharter 0.3.0, we moved the implementation of Gaussian Mixture Model (GMM) from [PyCave](https://github.com/borchero/pycave), not mainted anymmore, to [TorchGMM](https://github.com/CSOgroup/torchgmm), a fork of PyCave mantained by the CSOgroup. This change allows us to have a more stable and mantained implementation of GMM that is compatible with the most recent versions of PyTorch.

  Please refer to the [documentation][link-docs]. In particular, the
  -   [API documentation][link-api].
  -   [Tutorials][link-tutorial]

  1. Create a conda or pyenv environment
  2. Install Python >= 3.8 and [PyTorch](https://pytorch.org) >= 1.12.0. If you are planning to use a GPU, make sure to download and install the correct version of PyTorch first from [here](https://pytorch.org/get-started/locally/).
  3. Install the library used for dimensionality reduction and batch effect removal according the data type you are planning to analyze:
      - [scVI](https://github.com/scverse/scvi-tools) for spatial transcriptomics and/or epigenomics data such as 10x Visium and Xenium, Nanostring CosMx, Vizgen MERSCOPE, Stereo-seq, DBiT-seq, MERFISH and seqFISH data.
      - A modified version of [scArches](https://github.com/theislab/scarches)'s TRVAE model for spatial proteomics data such as Akoya CODEX, Lunaphore COMET, CyCIF, IMC and MIBI-TOF data.
  4. Install CellCharter using pip:
  ```bash
  pip install cellcharter
  ```
  We suggest using `mamba` to install the dependencies.
  Installing the latest version of the dependencies (in particular `scvi-tools` and `spatialdata`) may lead to dependency conflicts.
  However, this should not be a problem because CellCharter doesn't use any of the mismatching features.
  We report here an example of an installation aimed at analyzing spatial transcriptomics data (and thus installing `scvi-tools`).
  This example is based on a Linux CentOS 7 system with an NVIDIA A100 GPU.
  ```bash
  conda create -n cellcharter-env -c conda-forge python mamba
  conda activate cellcharter-env
  mamba install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia
  pip install scvi-tools
  pip install cellcharter
  ```
  Note: a different system may require different commands to install PyTorch and JAX. Refer to their respective documentation for more details.

  If you found a bug or you want to propose a new feature, please use the [issue tracker][issue-tracker].
  [issue-tracker]: https://github.com/CSOgroup/cellcharter/issues
  [link-docs]: https://cellcharter.readthedocs.io
  [link-api]: https://cellcharter.readthedocs.io/en/latest/api.html
  [link-tutorial]: https://cellcharter.readthedocs.io/en/latest/notebooks/codex_mouse_spleen.html

rpm_license:
  BSD 3-Clause License  Copyright (c) 2022, Marco Varrone All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


pkgId: 8e9f30a4a43ef921ffdde40baa6f0f51cae9dc168a85d7afd15243b59b4b4f88
name: python-cellector
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: A pipeline and GUI for determining which ROIs match features in a fluorescence image.
url: https://github.com/landoskape/cellector
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellector-0.1.0-1.src.rpm
checksum_type: sha256
description:
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  A pipeline and GUI for determining which ROIs match features in a fluorescence image. It
  is a common challenge in biology to determine whether a particular ROI (i.e. a collection
  of weighted pixels representing an inferred structure in an image) overlaps with features
  of a fluorescence image co-registered to the ROI. For example, in neuroscience, we might
  use [suite2p](https://github.com/MouseLand/suite2p) to extract ROIs indicating active
  cells using a functional fluorophore like GCaMP, but want to know if the cells associated
  with those ROIs contain a secondary fluorophore like tdTomato. This package helps you do
  just that!

  The package itself is somewhat simple, but we spent lots of time thinking about how to do
  this in the most reliable way. The standard pipeline computes a set of standard features
  for each ROI in comparison to a reference image which are useful for determining whether
  an ROI maps onto fluorescence. We provide a GUI for viewing the ROIs, the reference
  images, a distribution of feature values for each ROI, and an interactive system for
  deciding where to draw cutoffs on each feature to choose the ROIs that contain
  fluorescence. There's also a system for manual annotation if the automated system doesn't
  quite get it all right.


  This package is installable with pip from PyPI. It is a lightweight package with minimal
  dependencies, so is probably compatible with other python environments you might use.
  If you're starting from scratch, first make a python environment, activate it, and
  install ``cellector`` with pip. If you are using an existing environment, skip the first
  two steps and just do pip install from within the environment.
  ```bash
  conda create -n cellector
  conda activate cellector
  pip install cellector
  ```


  The basic workflow of this package is as follows:
  1. Construct an ``RoiProcessor`` object.
  2. Use the ``SelectionGUI``.
  3. Save the data.
  4. Repeat (or use scripting to speed up).

  If you want to see the basic workflow in a notebook, look [here](./notebooks/tutorial.ipynb).
  Otherwise, read the instructions below or look at the [documentation](./docs/examples.md)
  which is very far from complete at the moment.


  We've provided a few functions to make ``RoiProcessor`` objects that work differently
  depending on what kind of data you are starting with. For an exhaustive list, go
  [here](./docs/examples.md). If you are working directly on the output of suite2p, use:
  ```python
  from cellector.io import create_from_suite2p
  suite2p_dir = # define your suite2p path - the one with plane0, plane1, ... in it
  roi_processor = create_from_suite2p(suite2p_dir)
  ```

  Then, open the ``SelectionGUI`` as follows:
  ```python
  from cellector.gui import SelectionGUI
  gui = SelectionGUI(roi_processor)
  ```

  Then, use the GUI and hit save! Instructions for the GUI are coming.



  There are a few "hyperparameters" to the package, including filtering parameters, the eps
  value for phase correlation, and size parameters for centered stacks. We need to enable
  hyperparameter optimization for these, which a user can supervise themselves. Idea:
  The user could open a GUI that compares masks with reference images for some sample
  "true" data and in addition for any data they've loaded in. One idea:
  For a particular set of hyperparameters (filtering, for example), the user could get a
  histogram of feature values for all the features for all the masks. They could use cutoff
  lines to pick a range of feature values for that particular set of hyperparameters, and
  then scroll through mask matches that come from within that range. This way, they could
  determine how the hyperparameters affect the feature values at each part of the
  distribution and select hyperparameters that give good separation.
  In addition, there could be some automated tuning, for example, to pick the eps a user
  could just input the maximum size ROI, and then measuring the average power for higher
  spatial frequencies.


  To help choose hyperparameters and see how it's working, I'm going to build some tools to
  visualize masks and the reference image under different conditions.


  Feel free to contribute to this project by opening issues or submitting pull
  requests. It's already a collaborative project, so more minds are great if you
  have ideas or anything to contribute!


  This project is licensed under the GNU License. If you use this repository as part of a
  publication, please cite us. There's no paper associated with the code at the moment, but
  you can cite our GitHub repository URL or email us for any updates about this issue.


pkgId: ea5b46b6cf7abe90e18ee0bd554c4eb2a64f8dd3e82dc44adac0e4156c16f806
name: python-cellestial
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cellestial/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellestial-0.1.1-1.src.rpm
checksum_type: sha256
description:
  An Interactive and Highly Customizable __Single-Cell__ & __Spatial__ Plotting Tool over a ggplot-like API.

  Name Encuplates: Space, Scatters of Stars, and of course Cells.



  ```bash
  pip install cellestial
  ```



  ```python
  import cellestial as cl
  ```


pkgId: fabaed5490507c147cc30dc0676b715bb24d0a5b2faf3938bf1d567fa2b5eb9a
name: python-cellestial
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/cellestial/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellestial-0.1.2-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
      <img src="https://github.com/datavil/cellestial/blob/master/.github/cellestial_logo.png?raw=true" alt="Cellestial Logo" width="250">
  </p>




  An Interactive and Highly Customizable __Single-Cell__ & __Spatial__ Plotting Tool over a ggplot-like API.

  Name Encuplates: Space, Scatters of Stars, and of course Cells.



  ```bash
  pip install cellestial
  ```



  ```python
  import cellestial as cl
  ```


pkgId: e1f1892fd831e495fab5705c6d3b1c3fe8fa67cdb92a431a77ad858091dea0ff
name: python-cellfinder
arch: src
version: 1.3.3
epoch: 0
release: 1
summary: Automated 3D cell detection in large microscopy images
url: https://brainglobe.info/documentation/cellfinder/index.html
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellfinder-1.3.3-1.src.rpm
checksum_type: sha256
description:
  [![Python Version](https://img.shields.io/pypi/pyversions/cellfinder.svg)](https://pypi.org/project/cellfinder)
  [![PyPI](https://img.shields.io/pypi/v/cellfinder.svg)](https://pypi.org/project/cellfinder)
  [![Downloads](https://pepy.tech/badge/cellfinder)](https://pepy.tech/project/cellfinder)
  [![Wheel](https://img.shields.io/pypi/wheel/cellfinder.svg)](https://pypi.org/project/cellfinder)
  [![Development Status](https://img.shields.io/pypi/status/cellfinder.svg)](https://github.com/brainglobe/cellfinder)
  [![Tests](https://img.shields.io/github/actions/workflow/status/brainglobe/cellfinder/test_and_deploy.yml?branch=main)](https://github.com/brainglobe/cellfinder/actions)
  [![codecov](https://codecov.io/gh/brainglobe/cellfinder/branch/main/graph/badge.svg?token=nx1lhNI7ox)](https://codecov.io/gh/brainglobe/cellfinder)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
  [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
  [![Contributions](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](https://brainglobe.info/community/developers/index.html)
  [![Twitter](https://img.shields.io/twitter/follow/brain_globe?style=social)](https://twitter.com/brain_globe)



  cellfinder is software for automated 3D cell detection in very large 3D images (e.g., serial two-photon or lightsheet volumes of whole mouse brains).
  There are three different ways to interact and use it, each with different user interfaces and objectives in mind.
  For more details, head over to [the documentation website](https://brainglobe.info/documentation/cellfinder/index.html).

  At a glance:

  - There is a command-line interface called [brainmapper](https://brainglobe.info/documentation/brainglobe-workflows/brainmapper/index.html) that integrates [with `brainreg`](https://github.com/brainglobe/brainreg) for automated cell detection and classification. You can install it through [`brainglobe-workflows`](https://brainglobe.info/documentation/brainglobe-workflows/index.html).
  - There is a [napari plugin](https://brainglobe.info/documentation/cellfinder/user-guide/napari-plugin/index.html) for interacting graphically with the cellfinder tool.
  - There is a [Python API](https://brainglobe.info/documentation/cellfinder/user-guide/cellfinder-core.html) to allow users to integrate BrainGlobe tools into their custom workflows.



  You can find [the installation instructions](https://brainglobe.info/documentation/cellfinder/installation.html#installation) on the BrainGlobe website, which will go into more detail about the installation process if you want to minimise your installation to suit your needs.
  However, we recommend that users install `cellfinder` either through installing BrainGlobe version 1, or (if you also want the command-line interface) installing `brainglobe-workflows`.

  ```bash

  pip install brainglobe>=1.0.0

  pip install brainglobe-workflows>=1.0.0
  ```

  If you only want the `cellfinder` package by itself, you can `pip install` it alone:

  ```bash
  pip install cellfinder>=1.0.0
  ```

  Be sure to specify a version greater than version `v1.0.0` - prior to this version the `cellfinder` package had a very different structure that is incompatible with BrainGlobe version 1 and the other tools in the BrainGlobe suite.
  See [our blog posts](https://brainglobe.info/blog/) for more information on the release of BrainGlobe version 1.


  We are always happy to help users of our tools, and welcome any contributions. If you would like to get in contact with us for any reason, please see the [contact page of our website](https://brainglobe.info/contact.html).


  If you find this package useful, and use it in your research, please cite the following paper:
  > Tyson, A. L., Rousseau, C. V., Niedworok, C. J., Keshavarzi, S., Tsitoura, C., Cossell, L., Strom, M. and Margrie, T. W. (2021) “A deep learning algorithm for 3D cell detection in whole mouse brain image datasets’ PLOS Computational Biology, 17(5), e1009074
  [https://doi.org/10.1371/journal.pcbi.1009074](https://doi.org/10.1371/journal.pcbi.1009074)

  **If you use this, or any other tools in the brainglobe suite, please
   [let us know](https://brainglobe.info/contact.html), and
   we'd be happy to promote your paper/talk etc.**


pkgId: 8d5cdb8142b3655d5c1679be5e934e18f275bd2d636948fddbe44f6407d61364
name: python-cellfinder-core
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Automated 3D cell detection in large microscopy images
url: https://brainglobe.info
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellfinder-core-1.0.0-1.src.rpm
checksum_type: sha256
description:
  [![Python Version](https://img.shields.io/pypi/pyversions/cellfinder-core.svg)](https://pypi.org/project/cellfinder-core)
  [![PyPI](https://img.shields.io/pypi/v/cellfinder-core.svg)](https://pypi.org/project/cellfinder-core)
  [![Downloads](https://pepy.tech/badge/cellfinder-core)](https://pepy.tech/project/cellfinder-core)
  [![Wheel](https://img.shields.io/pypi/wheel/cellfinder-core.svg)](https://pypi.org/project/cellfinder-core)
  [![Development Status](https://img.shields.io/pypi/status/cellfinder-core.svg)](https://github.com/brainglobe/cellfinder-core)
  [![Tests](https://img.shields.io/github/workflow/status/brainglobe/cellfinder-core/tests)](https://github.com/brainglobe/cellfinder-core/actions)
  [![codecov](https://codecov.io/gh/brainglobe/cellfinder-core/branch/main/graph/badge.svg?token=nx1lhNI7ox)](https://codecov.io/gh/brainglobe/cellfinder-core)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
  [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
  [![Contributions](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](https://brainglobe.info/developers/index.html)
  [![Twitter](https://img.shields.io/twitter/follow/brain_globe?style=social)](https://twitter.com/brain_globe)

  Standalone cellfinder cell detection algorithm
  This package implements the cell detection algorithm from
  [Tyson, Rousseau & Niedworok et al. (2021)](https://doi.org/10.1371/journal.pcbi.1009074)
  without any dependency on data type (i.e. it can be used outside of
  whole-brain microscopy).
  `cellfinder-core` supports the
  [cellfinder](https://github.com/brainglobe/cellfinder) software for
  whole-brain microscopy analysis, and the algorithm can also be implemented in
  [napari](https://napari.org/index.html) using the


pkgId: 0bb76b705458b4232af06faeb209eea9451c4d36b76a376fdb21b13ecc321309
name: python-cellfinder-napari
arch: src
version: 1.0.2
epoch: 0
release: 1
summary: Efficient cell detection in large images
url: https://brainglobe.info/cellfinder
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellfinder-napari-1.0.2-1.src.rpm
checksum_type: sha256
description:
  [![License](https://img.shields.io/pypi/l/cellfinder-napari.svg?color=green)](https://github.com/napari/cellfinder-napari/raw/master/LICENSE)
  [![PyPI](https://img.shields.io/pypi/v/cellfinder-napari.svg?color=green)](https://pypi.org/project/cellfinder-napari)
  [![Python Version](https://img.shields.io/pypi/pyversions/cellfinder-napari.svg?color=green)](https://python.org)
  [![tests](https://github.com/brainglobe/cellfinder-napari/workflows/tests/badge.svg)](https://github.com/brainglobe/cellfinder-napari/actions)
  [![codecov](https://codecov.io/gh/brainglobe/cellfinder-napari/branch/main/graph/badge.svg?token=C4uzd0cm2u)](https://codecov.io/gh/brainglobe/cellfinder-napari)
  [![Downloads](https://pepy.tech/badge/cellfinder-napari)](https://pepy.tech/project/cellfinder-napari)
  [![Wheel](https://img.shields.io/pypi/wheel/cellfinder.svg)](https://pypi.org/project/cellfinder)
  [![Development Status](https://img.shields.io/pypi/status/cellfinder-napari.svg)](https://github.com/brainglobe/cellfinder-napari)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
  [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
  [![Contributions](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](https://docs.brainglobe.info/cellfinder/contributing)
  [![Website](https://img.shields.io/website?up_message=online&url=https%3A%2F%2Fbrainglobe.info/cellfinder)](https://brainglobe.info/documentation/cellfinder/index.html)
  [![Twitter](https://img.shields.io/twitter/follow/brain_globe?style=social)](https://twitter.com/brain_globe)

  `cellfinder-napari` is a front-end to [cellfinder-core](https://github.com/brainglobe/cellfinder-core) to allow ease of use within the [napari](https://napari.org/index.html) multidimensional image viewer. For more details on this approach, please see [Tyson, Rousseau & Niedworok et al. (2021)](https://doi.org/10.1371/journal.pcbi.1009074). This algorithm can also be used within the original
  [cellfinder](https://github.com/brainglobe/cellfinder) software for
  whole-brain microscopy analysis.


pkgId: 2552a8f18bb959cc34412efd7f82231af090e573a9a81ad2cfa4475d802cae00
name: python-cellidentifierdx
arch: src
version: 0.1
epoch: 0
release: 1
summary: A package to identify cell types using Bayesian scoring
url: https://github.com/yourusername/cellidentifierdx
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellidentifierdx-0.1-1.src.rpm
checksum_type: sha256
description:
  1. **Project Name**: The name of your project.
  2. **Description**: A brief description of what your project does.
  3. **Installation**: Instructions for how to install your project.
  4. **Usage**: Instructions for how to use your project after it's installed.
  5. **License**: The license your project is distributed under.
  6. Note: This software package is yet to be published (unpublished)! If you have used it for publication purpose, please share authorship with MD. BABU MIA, PHD; ICAHN SCHOOL OF MEDICINE AT MOUNT SINAI. Contact for detials: md.babu.mia@mssm.edu


  CellIdentifierDX is a Python package for identifying cell types using Bayesian scoring.



  You can install CellIdentifierDX using pip:

  ```bash
  pip install cellidentifierdx
  ```



  Here's a basic example of how to use CellIdentifierDX:

  ```python
  from cellidentifierdx import annotate_cell_types

  reference_file = "/path/to/your/reference_file.xlsx"
  expr_file = "/path/to/your/expr_file.csv"
  tissue, cell_type_annotations = annotate_cell_types(reference_file, expr_file, 'sheetname')

  for cluster_idx, cell_type, avg_score in cell_type_annotations:
      print(f"Cluster {cluster_idx} is annotated as {cell_type} with average Bayesian score of {avg_score}.")

  ```



  MIT
  ```


pkgId: ad1c02195f18a210d810b62451a4066b039b915289567b5b6967904e9fce7731
name: python-cellink-luo
arch: src
version: 0.1.0
epoch: 0
release: 1
url: https://github.com/liu-bioinfo-lab/CelLink
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellink-luo-0.1.0-1.src.rpm
checksum_type: sha256
summary:
  CelLink is an effecient python package for single-cell multi-omics integration, especially for datasets with weak feature linkage and imbalanced cell populations.

description:
  <img src="docs/images/CelLink_logo.png" width="60">


  CelLink is a Python package designed for single-cell multi-omics integration. It excels uniquely in integrating datasets with weak feature linkage and imbalanced cell populations. CelLink normalizes and smooths feature profiles to align scales across datasets and integrates them through a multi-phase pipeline that iteratively employs the optimal transport algorithm. It dynamically refines cell-cell correspondences, identifying and excluding cells that cannot be reliably matched, thus avoiding performance degradation caused by erroneous imputations. A classic example of weak linkage is seen in the integration of scRNA-seq and CODEX (spatial proteomic data) from the Human Pancreas Analysis Program (HPAP).

  <img src="docs/images/pipeline.png" width="700">


  CelLink uniquely enables cell subtype annotation, correction of mislabelled cells, and spatial transcriptomic analyses by imputing transcriptomic profiles for spatial proteomics data. Its great ability to impute large-scale paired single-cell multi-omics profiles positions it as a pivotal tool for building single-cell multi-modal foundation models.



  Cellink can be installed from PyPI using pip. For best practices, create a new virtual environment before installation. Below, we demonstrate how to set up this environment using conda.

  ```bash
  conda create -n CelLink python=3.9
  conda activate CelLink
  pip install CelLink
  ```


  A tutorial on integrating scRNA-seq and CODEX datasets from donor HPAP023 is provided. The feature linkage information between coding genes and proteins is stored in [protein_gene_relationship.csv](docs/protein_gene_relationship.csv). Please check our [tutorial website](https://doi.org/10.1101/2024.11.08.622745).


  If you use Cellink in your research, please kindly cite our paper using the following reference:
  [Xin Luo et al. CelLink: Integrate single-cell multi-omics data with few linked features and imbalanced cell populations, Biorxiv 2024](https://doi.org/10.1101/2024.11.08.622745).


  This project is licensed under the GNU General Public License v3.0. For more information, see the [LICENSE](LICENSE) file in this repository.


pkgId: f503fdf04319985011ec4f4da866e4244b4529a642b744b59e4b592d7991e56c
name: python-cellmap-schemas
arch: src
version: 0.8.1
epoch: 0
release: 1
summary: Schemas for data used by the Cellmap project team at Janelia Research Campus.
url: https://pypi.org/project/cellmap-schemas/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellmap-schemas-0.8.1-1.src.rpm
checksum_type: sha256
description:
  Schemas for our data

  Read the documentation [here](https://janelia-cellmap.github.io/cellmap-schemas/)


pkgId: 5912d123b4daf42e88d224397ddf0860ac2ef10ed431d78fa82a1885f8e41479
name: python-cellmaps-imagedownloader
arch: src
version: 0.1.1
epoch: 0
release: 1
url: https://github.com/idekerlab/cellmaps_imagedownloader
rpm_license: MIT license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellmaps-imagedownloader-0.1.1-1.src.rpm
checksum_type: sha256
summary:
  A tool to download specified image data from the Human Protein Atlas website using CSV file or to copy data from CM4AI dataset


pkgId: 5b284ad911f954ed04dafb60e9022a690508118d24e2d2a1d939012e5077733d
name: python-cellmaps-vnn
arch: src
version: 0.1.0a11
epoch: 0
release: 1
url: https://github.com/idekerlab/cellmaps_vnn
rpm_license: MIT license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellmaps-vnn-0.1.0a11-1.src.rpm
checksum_type: sha256
summary:
  Python Boilerplate contains all the boilerplate you need to create a Python package with command line


pkgId: c69c5449ddd19a596b382d156b8b908977a39fd99395c9590d451ce7505f8fda
name: python-cellmerge
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Merge nuclei segmentations from multiple models
url: https://github.com/jagadhesh89/MergeSegmentations/tree/main/cellmerge
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellmerge-0.1.0-1.src.rpm
checksum_type: sha256
description:
  This repository contains the file and scripts that support the study titled ***"Efficient integration and validation of deep learning-based nuclei segmentations in H&E slides from multiple models"***

  1)  [Merging segmentations](#Merging-segmentations-using-Annoy)
  2)  [Recreating Figures in manuscript](#Script-to-recreate-plots-as-demonstrated-in-manuscript)
  3)  [Linear mixed models for assessing variance explained in bulk-RNA gene expression data](#Script-to-build-mixed-linear-models)
  4)  [Pathway analysis for genes explained by high variance](#Pathway-analysis-script)

  All the data and files required to run the scripts are located in the [data](https://github.com/jagadhesh89/MergeSegmentations/tree/main/data) directory.

  The study overview is illustrated here:

  ![Study overview](https://github.com/jagadhesh89/MergeSegmentations/blob/main/Overview_final.jpeg)


  Usage:
  ```cellmerger -m <method1_predictions> -p <method2_predictions> -o <outdir>```

  The input to the scripts are prediction files from the monusac and pannuke models. This can be tweaked to take inputs from any similar models as long as the outputs follow a datastructure that is similar to the format described as follows:

  The file is a pickle dump with underlying datastructure as a dictionary. Where each key corresponds to a unique nuclei id.

  For example:
  {
    'id1':{'box':[],'centroid':[],'contour':[], 'prob':[], 'type':[]},
    'id2':{'box':[],'centroid':[],'contour':[], 'prob':[], 'type':[]}
  }

  The box describes the bounding box of the nuclei
  The centroid describes the centroid x,y coordinates of the nuclei
  The countour describes the boundary of the nuclei in coordinates
  The prob details the probability of the prediction of nuclei
  The type details the type of the nuclei, i.e epithelial etc.

  The primary function of this code is the "merge_coordinates" function in the script that uses [Annoy](https://github.com/spotify/annoy) to merge the predictions.

  The output is a ".dat" file which is a pickle file, which has all the combined/integrated/merged predictions in a datastructure described in the example above.



  The Jupyter notebook titled **[paper_plots_final.ipynb](https://github.com/jagadhesh89/MergeSegmentations/blob/main/paper_plots_final.ipynb)** has the analyses scripts that created the plots. Associated files to run this jupyter notebook have also been uploaded to the repository.


  The script titled **[pca_script.R](https://github.com/jagadhesh89/MergeSegmentations/blob/main/pca_script.R)** that performs this analysis uses the variancePartition package in R to build the mixed models to assess the variance contributed by the individual models.


  The script titled **[pathway.R](https://github.com/jagadhesh89/MergeSegmentations/blob/main/pathway.R)** that performs this analysis uses the WebGestaltR package to perform the analysis.


pkgId: fb577e76313bd2e0a9aecdc824458044f6eaea58710cedbfc575e7ca71e12037
name: python-celloracle
arch: src
version: 0.20.0
epoch: 0
release: 1
summary: in silico gene perturbation analysis and GRN analysis with single cell data
url: https://github.com/morris-lab/CellOracle
rpm_license: Apache License Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-celloracle-0.20.0-1.src.rpm
checksum_type: sha256
description:
  |GitHub Workflow Status| |PyPI| |PyPI - Python Version| |PyPI - Wheel|
  |Downloads| |Docker Pulls|
  CellOracle is a python library for in silico gene perturbation analyses
  using single-cell omics data and Gene Regulatory Network models.
  For more information, please read our paper: `Dissecting cell identity
  via network inference and in silico gene
  perturbation <https://www.nature.com/articles/s41586-022-05688-9>`__.
  Documentation, Codes, and Tutorials
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CellOracle documentation is available through the link below.
  `Web
  documentation <https://morris-lab.github.io/CellOracle.documentation/>`__
  Questions and errors
  ~~~~~~~~~~~~~~~~~~~~
  If you have a question, error, bug, or problem, please use the `Github
  issue page <https://github.com/morris-lab/CellOracle/issues>`__.
  Supported Species and reference genomes
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  -  Human: [‘hg38’, ‘hg19’]
  -  Mouse: [‘mm39’, ‘mm10’, ‘mm9’]
  -  S.cerevisiae: [“sacCer2”, “sacCer3”]
  -  Zebrafish: [“danRer7”, “danRer10”, “danRer11”]
  -  Xenopus tropicalis: [“xenTro2”, “xenTro3”]
  -  Xenopus laevis: [“Xenopus_laevis_v10.1”]
  -  Rat: [“rn4”, “rn5”, “rn6”]
  -  Drosophila: [“dm3”, “dm6”]
  -  C.elegans: [“ce6”, “ce10”]
  -  Arabidopsis: [“TAIR10”]
  -  Chicken: [“galGal4”, “galGal5”, “galGal6”]
  -  Guinea Pig: [“Cavpor3.0”]
  -  Pig: [“Sscrofa11.1”]
  Changelog
  ~~~~~~~~~
  Please go to `this
  page <https://morris-lab.github.io/CellOracle.documentation/changelog/index.html>`__.


pkgId: 91d2612f3aa93d48b517701c0a46a9c9a316b39a8d3801b48607aeac3abe887f
name: python-cellphe
arch: src
version: 0.3.2
epoch: 0
release: 1
summary: CellPhe: Toolkit for cell phenotyping from time-lapse videos
url: https://pypi.org/project/cellphe/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellphe-0.3.2-1.src.rpm
checksum_type: sha256
description:
  <!-- badges: start -->
  <a href="https://zenodo.org/badge/latestdoi/449769672"><img src="https://zenodo.org/badge/449769672.svg" alt="DOI"></a>
  <!-- badges: end -->

  CellPhe provides functions to phenotype cells from time-lapse videos and accompanies the paper:\
  Wiggins, L., Lord, A., Murphy, K.L. et al.\
  The CellPhe toolkit for cell phenotyping using time-lapse imaging and pattern recognition.\
  Nat Commun 14, 1854 (2023).\
  https://doi.org/10.1038/s41467-023-37447-3

  The Python package is a port of the [original R implementation](https://github.com/uoy-research/CellPhe).



  You can install the latest version of CellPhe from
  [PyPi](https://pypi.org/project/cellphe/) with:

  ```
  pip install cellphe
  ```



  An example dataset to demonstrate CellPhe’s capabilities is hosted on [Dryad](https://doi.org/10.5061/dryad.4xgxd25f0) in the archive `example_data.zip` and comprises 3 parts:

  -   The time-lapse stills as TIFF images (`05062019_B3_3_imagedata`)
  -   Existing pre-extracted features from PhaseFocus Livecyte.
      (`05062019_B3_3_Phase-FullFeatureTable.csv`)
  -   Region-of-interest (ROI) boundaries already demarked in ImageJ
      format (`05062019_B3_3_Phase`)

  These should be extracted into a suitable location before proceeding
  with the rest of the tutorial.

  The first step in the CellPhe workflow is to prepare a dataframe containing
  metadata identifying the tracked cells across all the frames, along with any
  pre-existing attributes. The segmenting and tracking can be performed within
  CellPhe, or pre-segmented and tracked data from two widely used software
  (PhaseFocus Livecyte & Trackmate) can be directly imported.



  **NB: This feature is still experimental, please report any bugs at the [issue tracker](https://github.com/uoy-research/CellPhePy/issues)**

  CellPhe provides 2 functions to segment and track an image sequence:

    - `segment_images`: Segments images using Cellpose
    - `track_images`: Uses the ImageJ plugin TrackMate to track cells between frames without requiring ImageJ to be installed

  ```python
  from cellphe import segment_images, track_images
  ```

  `segment_images` takes 2 arguments: the path to the directory where the images are stored (where the folder `05062019_B3_3_imagedata` was extracted to), and a path to an output folder where the resultant Cellpose masks will be saved.

  This can take several minutes depending on the number of images and their resolution.

  ```python
  segment_images("05062019_B3_3_imagedata", "masks")
  ```

  Confirm that the `masks` directory has been created and populated with TIFs containing cell masks.
  If it has, then you are ready to track the cells.
  `track_images` takes at minimum 3 arguments: the location of the masks created by `segment_images`, the filename to save the output metadata to, and a folder name to save the ROIs in.
  Optionally you can also save the ROIs as a zip so they can be easily opened in ImageJ, and change the tracking options - by default the Simple LAP method is employed.

  ```python
  track_images("masks", "tracked.csv", "rois")
  ```

  Confirm that the `tracked.csv` file was created and the `rois` folder has been populated with ROI files.
  These outputs can now be loaded into CellPhe.



  Once a metadata file (CSV format) and a folder of ROIs are available, either directly output from external software (PhaseFocus Livecyte or TrackMate in ImageJ), or from within CellPhe as in the previous section, they can be read into CellPhe.
  The `import_data` function accepts metadata files from one of these sources and converts it into a standard format.
  It takes 3 arguments: the metadata file path, the source, and the minimum number of frames that a cell must be tracked for to be retained in the dataset (optional).

  ```python
  from cellphe import import_data
  ```

  For example, the dataset that was segmented and tracked in the previous section can be imported as:

  ```python
  feature_table = import_data("tracked.csv", "Trackmate_auto")
  ```

  Alternatively, the example below creates the metadata dataframe from the supplied PhaseFocus dataset, only including cells that were tracked for at least 50 frames.

  ``` python
  input_feature_table = "05062019_B3_3_Phase-FullFeatureTable.csv"
  feature_table = import_data(input_feature_table, "Phase", 50)
  ```

  If a segmented and tracked dataset is available from a different source then it can still be used in CellPhe provided that it can be loaded into a `pandas.DataFrame` containing:

    - Each row corresponding to a cell tracked in a specific frame
    - A column `FrameID` (integer) denoted the frame number in chronological order
    - A column `CellID` (integer) identifying the cell
    - A column `ROI_filename` (string) denoting the filename (without extension) of the corresponding ROI file, not including the full path

  Additional columns providing cell features can be included and will be retained and incorporated into the CellPhe analysis.
  The PhaseFocus dataset keeps the volume and sphericity features, for example.



  In addition to any pre-calculated features, the `cell_features()`
  function generates 74 descriptive features for each cell on every frame
  using the frame images and pre-generated cell boundaries, based on size,
  shape, texture, and the local cell density. The output is a dataframe
  comprising the `FrameID`, `CellID`, and `ROI_filename` columns
  from the feature table input, the 74 features as columns,
  and any additional features that may be present (such as from `import_data()`)
  in further columns.

  ```python
  from cellphe import cell_features
  ```

  `cell_features()` takes as arguments the feature table, the folder where ROIs are saved, the folder where the images are, and the framerate.
  It expects frames to be named according to the scheme
  `<experiment name>-<frameid>.tif`, where `<frameid>` is a 4 digit
  zero-padded integer corresponding to the `FrameID` column,
  while ROI files are named according to
  the `ROI_filename` column.

  ```python
  roi_folder = "05062019_B3_3_Phase"
  image_folder = "05062019_B3_3_imagedata"
  new_features = cell_features(feature_table, roi_folder, image_folder, framerate=0.0028)
  ```



  The next step is to calculate features that incorporate the time-dimension.
  This is done with the `time_series_features` function, which accepts a dataframe with the cell-level features as output earlier from `cell_features`.

  ```python
  from cellphe import time_series_features
  ```

  Variables are calculated from the time series providing both
  summary statistics and indicators of time-series behaviour at different
  levels of detail obtained via wavelet analysis. 15 summary scores are
  calculated for each feature, in addition to the cell trajectory, thereby
  resulting in a default output of 1081 features (15x72 + 1). These are
  output in the form of a dataframe with the first column being the
  `CellID` used previously.

  ``` python
  tsvariables = time_series_features(new_features)
  ```


pkgId: 6f7037eea733c4347be4599c4e56e8d21785f8bb44c1c871d81998b0e5659bff
name: python-cellpose
arch: src
version: 3.0.11
epoch: 0
release: 1
summary: anatomical segmentation algorithm
url: https://github.com/MouseLand/cellpose
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellpose-3.0.11-1.src.rpm
checksum_type: sha256
description:
  <img src="http://www.cellpose.org/static/images/logo.png?raw=True" width="250" title="cellpose" alt="cellpose" align="right" vspace = "50">

  [![Documentation Status](https://readthedocs.org/projects/cellpose/badge/?version=latest)](https://cellpose.readthedocs.io/en/latest/?badge=latest)
  ![tests](https://github.com/mouseland/cellpose/actions/workflows/test_and_deploy.yml/badge.svg)
  [![codecov](https://codecov.io/gh/MouseLand/cellpose/branch/main/graph/badge.svg?token=9FFo4zNtYP)](https://codecov.io/gh/MouseLand/cellpose)
  [![PyPI version](https://badge.fury.io/py/cellpose.svg)](https://badge.fury.io/py/cellpose)
  [![Downloads](https://pepy.tech/badge/cellpose)](https://pepy.tech/project/cellpose)
  [![Downloads](https://pepy.tech/badge/cellpose/month)](https://pepy.tech/project/cellpose)
  [![Python version](https://img.shields.io/pypi/pyversions/cellpose)](https://pypistats.org/packages/cellpose)
  [![Licence: GPL v3](https://img.shields.io/github/license/MouseLand/cellpose)](https://github.com/MouseLand/cellpose/blob/master/LICENSE)
  [![Contributors](https://img.shields.io/github/contributors-anon/MouseLand/cellpose)](https://github.com/MouseLand/cellpose/graphs/contributors)
  [![website](https://img.shields.io/website?url=https%3A%2F%2Fwww.cellpose.org)](https://www.cellpose.org)
  [![Image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&url=https%3A%2F%2Fforum.image.sc%2Ftags%2Fcellpose.json&query=%24.topic_list.tags.0.topic_count&colorB=brightgreen&suffix=%20topics&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/cellpose)
  [![repo size](https://img.shields.io/github/repo-size/MouseLand/cellpose)](https://github.com/MouseLand/cellpose/)
  [![GitHub stars](https://img.shields.io/github/stars/MouseLand/cellpose?style=social)](https://github.com/MouseLand/cellpose/)
  [![GitHub forks](https://img.shields.io/github/forks/MouseLand/cellpose?style=social)](https://github.com/MouseLand/cellpose/)

  A generalist algorithm for cell and nucleus segmentation (v1.0) that can be optimized for your own data (v2.0) and (**NEW**) perform image restoration (v3.0).

  Cellpose was written by Carsen Stringer and Marius Pachitariu. To learn about Cellpose3 (image restoration), read the [paper](https://www.biorxiv.org/content/10.1101/2024.02.10.579780v1). To learn about Cellpose 2.0 (human-in-the-loop), read the [paper](https://www.nature.com/articles/s41592-022-01663-4) or watch the [talk](https://www.youtube.com/watch?v=3ydtAhfq6H0). To learn about Cellpose 1.0, read the [paper](https://t.co/kBMXmPp3Yn?amp=1) or watch the [talk](https://t.co/JChCsTD0SK?amp=1). For support, please open an [issue](https://github.com/MouseLand/cellpose/issues).

  Please see install instructions [below](README.md/#Installation), and also check out the detailed documentation at [**cellpose.readthedocs.io**](https://cellpose.readthedocs.io/en/latest/) for more information.



  Cellpose3 enables image restoration in the GUI, API and CLI (saved to `_seg.npy`). To learn more...
  * Check out the [paper](https://www.biorxiv.org/content/10.1101/2024.02.10.579780v1).
  * API documentation [here](https://cellpose.readthedocs.io/en/latest/restore.html)
  * Example google colab notebook for image restoration: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/run_cellpose3.ipynb), using new `CellposeDenoiseModel`.
  * Example google colab notebook with new super-generalist "cyto3" model: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/run_cyto3.ipynb). Try out the new `cyto3` super-generalist Cellpose model with `model_type="cyto3"`.

  denoising             |  deblurring                  |  upsampling
  :-------------------------:|:-------------------------:|:-------------------------:
  <img src="http://www.cellpose.org/static/images/poisson_cp3.gif?raw=True" width="350" title="cellpose denoising" alt="cellpose denoising examples"> | <img src="http://www.cellpose.org/static/images/blur_cp3.gif?raw=True" width="350" title="cellpose deblurring" alt="cellpose deblurring examples"> | <img src="http://www.cellpose.org/static/images/downsample_cp3.gif?raw=True" width="350" title="cellpose upsampling" alt="cellpose upsampling examples">



  **If you use Cellpose 1, 2 or 3, please cite the Cellpose 1.0 [paper](https://t.co/kBMXmPp3Yn?amp=1):**
  Stringer, C., Wang, T., Michaelos, M., & Pachitariu, M. (2021). Cellpose: a generalist algorithm for cellular segmentation. <em>Nature methods, 18</em>(1), 100-106.

  **If you use the human-in-the-loop training, please also cite the Cellpose 2.0 [paper](https://www.nature.com/articles/s41592-022-01663-4):**
  Pachitariu, M. & Stringer, C. (2022). Cellpose 2.0: how to train your own model. <em>Nature methods</em>, 1-8.

  **If you use the new image restoration models or cyto3, please also cite the Cellpose3 [paper](https://www.biorxiv.org/content/10.1101/2024.02.10.579780v1):**
  Stringer, C. & Pachitariu, M. (2024). Cellpose3: one-click image restoration for improved segmentation. <em>bioRxiv</em>.

  :triangular_flag_on_post: All models in Cellpose, except `yeast_BF_cp3`, `yeast_PhC_cp3`, and `deepbacs_cp3`, are trained on some amount of data that is **CC-BY-NC**. The Cellpose annotated dataset is also CC-BY-NC.



  Cellpose 2.0 allows human-in-the-loop training of models! To learn more...
  * Check out the twitter [thread](https://twitter.com/marius10p/status/1511415409047650307?s=20&t=umTVIG1CFKIWHYMrQqFKyQ) for an overview.
  * Check out the [paper](https://www.nature.com/articles/s41592-022-01663-4) for more details on the algorithm and the performance. Also, there's a short review of the paper available [here](https://www.nature.com/articles/s41592-022-01664-3).
  * Watch the short overview [talk](https://youtu.be/wB7XYh4QRiI) and watch the longer [tutorial talk](https://youtu.be/5qANHWoubZU) which goes through running Cellpose 2.0 in the GUI and a jupyter notebook.
  * Check out the full human-in-the-loop [video](https://youtu.be/3Y1VKcxjNy4).
  * Check out the colab notebook to get cloud access to a GPU to train your models or run your custom models: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/run_cellpose_2.ipynb).
  * See how to use it yourself in the [docs](https://cellpose.readthedocs.io/en/latest/gui.html#training-your-own-cellpose-model) and also check out the help info in the `Models` menu in the GUI.

  Mxnet is no longer supported in cellpose. To use mxnet, please use v1.0.2 (not recommended).



  You can install cellpose using conda or with native python if you have python3.8+ on your machine.





  Linux, Windows and Mac OS are supported for running the code. For running the graphical interface you will need a Mac OS later than Yosemite. At least 8GB of RAM is required to run the software. 16GB-32GB may be required for larger images and 3D volumes. The software has been heavily tested on Windows 10 and Ubuntu 18.04 and less well-tested on Mac OS. Please open an issue if you have problems with installation.


  cellpose relies on the following excellent packages (which are automatically installed with conda/pip if missing):
  - [pytorch](https://pytorch.org/)
  - [pyqtgraph](http://pyqtgraph.org/)
  - [PyQt5](http://pyqt.sourceforge.net/Docs/PyQt5/)
  - [numpy](http://www.numpy.org/) (>=1.16.0)
  - [numba](http://numba.pydata.org/numba-doc/latest/user/5minguide.html)
  - [scipy](https://www.scipy.org/)
  - [natsort](https://natsort.readthedocs.io/en/master/)



  If you have an older `cellpose` environment you can remove it with `conda env remove -n cellpose` before creating a new one.

  If you are using a GPU, make sure its drivers and the cuda libraries are correctly installed.

  1. Install an [Anaconda](https://www.anaconda.com/products/distribution) distribution of Python. Note you might need to use an anaconda prompt if you did not add anaconda to the path.
  2. Open an anaconda prompt / command prompt which has `conda` for **python 3** in the path
  3. Create a new environment with `conda create --name cellpose python=3.8`. We recommend python 3.8, but python 3.9 and 3.10 will likely work as well.
  4. To activate this new environment, run `conda activate cellpose`
  5. (option 1) To install cellpose with the GUI, run `python -m pip install cellpose[gui]`.  If you're on a zsh server, you may need to use ' ': `python -m pip install 'cellpose[gui]'`.
  6. (option 2) To install cellpose without the GUI, run `python -m pip install cellpose`.

  To upgrade cellpose (package [here](https://pypi.org/project/cellpose/)), run the following in the environment:

  ~~~sh
  python -m pip install cellpose --upgrade
  ~~~

  Note you will always have to run `conda activate cellpose` before you run cellpose. If you want to run jupyter notebooks in this environment, then also `python -m pip install notebook` and `python -m pip install matplotlib`.

  You can also try to install cellpose and the GUI dependencies from your base environment using the command

  ~~~~sh
  python -m pip install cellpose[gui]
  ~~~~

  If you have **issues** with installation, see the [docs](https://cellpose.readthedocs.io/en/latest/installation.html) for more details. You can also use the cellpose environment file included in the repository and create a cellpose environment with `conda env create -f environment.yml` which may solve certain dependency issues.

  If these suggestions fail, open an issue.



  Venv ([tutorial](https://docs.python-guide.org/dev/virtualenvs/#lower-level-virtualenv), for those interested) is a built-in tool in python for creating virtual environments. It is a good alternative if you don't want to install conda and already have python3 on your machine. The main difference is that you will need to choose where to install the environment and the packages. Cellpose will then live in this environment and not be accessible from other environments. You will need to navigate to the environment directory and activate it each time before running cellpose. The steps are similar to the conda installation:

  If you are using a GPU, make sure its drivers and the cuda libraries are correctly installed.

  1. Install python3.8 or later from [python.org](https://www.python.org/downloads/). This will be the version of python that will be used in the environment. You can check your python version with `python --version`.
  2. Navigate to the directory where you want to create the environment and run `python3 -m venv cellpose` to create a new environment called `cellpose`.
  3. Activate the environment with `source cellpose/bin/activate` on Mac/Linux or `cellpose\Scripts\activate` on Windows. A prefix `(cellpose)` should appear in the terminal.
  4. Install cellpose into the `cellpose` venv using pip with `python -m pip install cellpose`.
  5. Install the cellpose GUI, with `python -m pip install cellpose[gui]`. Depending on your terminal software, you may need to use quotes like this: `python -m pip install 'cellpose[gui]'`.
  6. You can now run cellpose from this environment with `python -m cellpose` or `cellpose` if you are in the cellpose directory.
  7. To deactivate the environment, run `deactivate`.



  If you plan on running many images, you may want to install a GPU version of *torch* (if it isn't already installed).

  To use your NVIDIA GPU with python, you will first need to install the NVIDIA driver for your GPU, check out this [website](https://www.nvidia.com/Download/index.aspx?lang=en-us) to download it. You can also install the CUDA toolkit, or use the pytorch cudatoolkit (installed below with conda). If you have trouble with the below install, we recommend installing the CUDA toolkit yourself, choosing one of the 11.x releases [here](https://developer.nvidia.com/cuda-toolkit-archive).

  Next we need to remove the CPU version of torch:
  ~~~
  pip uninstall torch
  ~~~

  To install the GPU version of torch, follow the instructions [here](https://pytorch.org/get-started/locally/). The conda install is strongly recommended, and then choose the CUDA version that is supported by your GPU (newer GPUs may need newer CUDA versions > 10.2). For instance this command will install the 11.6 version on Linux and Windows (note the `torchvision` and `torchaudio` commands are removed because cellpose doesn't require them):
  ~~~
  conda install pytorch pytorch-cuda=11.6 -c pytorch -c nvidia
  ~~~

  If the latest CUDA versions don't work, try an older version like cuda 11.3:
  ~~~
  conda install pytorch==1.12.0 cudatoolkit=11.3 -c pytorch
  ~~~~
  Info on how to install several older versions is available [here](https://pytorch.org/get-started/previous-versions/). After install you can check `conda list` for `pytorch`, and its version info should have `cuXX.X`, not `cpu`.



  Follow steps from above to install the dependencies. Then run
  ~~~
  pip install git+https://www.github.com/mouseland/cellpose.git
  ~~~

  If you want edit ability to the code, in the github repository folder, run `pip install -e .`. If you want to go back to the pip version of cellpose, then say `pip install cellpose`.



  You can quickly try out Cellpose on the [website](https://www.cellpose.org) first (many features disabled).

  You can also run Cellpose in google colab with a GPU:
  * a code-based notebook: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/run_cellpose_GPU.ipynb)
  * a more user-friendly notebook for 2D segmentation written by [@pr4deepr](https://github.com/pr4deepr): [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/Cellpose_cell_segmentation_2D_prediction_only.ipynb)
  * a user-friendly [ZeroCostDL4Mic](https://github.com/HenriquesLab/ZeroCostDL4Mic) notebook that includes training cellpose models, written by [@guijacquemet](https://github.com/guijacquemet): [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/HenriquesLab/ZeroCostDL4Mic/blob/master/Colab_notebooks/Beta%20notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb)

  The colab notebooks are recommended if you have issues with MKL or run speed on your local computer (and are running 3D volumes). Colab does not allow you to run the GUI, but you can save `*_seg.npy` files in colab that you can download and open in the GUI.

  **Executable file**: You can download an executable file for [*Windows 10*](http://www.cellpose.org/windows) or for [*Mac OS*](http://www.cellpose.org/mac) (High Sierra or greater) that were made using PyInstaller on Intel processors (MKL acceleration works, but no GPU support). Note in both cases it will take a few seconds to open.

  * The [*Mac OS*](https://www.cellpose.org/mac) file will download as `cellpose_mac` OR `cellpose_mac.dms`. You will need to make it into an executable file and run it through the terminal:
  1. Open a terminal and run `cd ~/Downloads/`.
  2. Run `chmod 777 cellpose_mac` OR `chmod 777 cellpose_mac.dms` to make the file executable.
  3. Run `./cellpose_mac` OR `./cellpose_mac.dms` to open the cellpose GUI. Messages from cellpose will be printed in the terminal.
  4. You can also run using the command line interface, e.g. as `./cellpose_mac --dir ~/Pictures/ --chan 2 --save_png`.

  * The [*Windows 10*](https://www.cellpose.org/windows) file is an exe and you can click on it to run the GUI. You can also run using the command line interface, e.g. as `cellpose.exe --dir Pictures/ --chan 2 --save_png`



  The quickest way to start is to open the GUI from a command line terminal. You might need to open an anaconda prompt if you did not add anaconda to the path:
  ~~~~
  python -m cellpose
  ~~~~

  The first time cellpose runs it downloads the latest available trained model weights from the website.

  You can now **drag and drop** any images (*.tif, *.png, *.jpg, *.gif) into the GUI and run Cellpose, and/or manually segment them. When the GUI is processing, you will see the progress bar fill up and during this time you cannot click on anything in the GUI. For more information about what the GUI is doing you can look at the terminal/prompt you opened the GUI with. For example data, see [website](http://www.cellpose.org) or this [zip file](https://www.cellpose.org/static/images/demo_images.zip). For best accuracy and runtime performance, resize images so cells are less than 100 pixels across.

  For 3D data, with multi-Z, please use the 3D version of the GUI with:
  ~~~~
  python -m cellpose --Zstack
  ~~~~




  1. Download this [folder](http://cellpose.org/static/images/demo_images.zip) of images and unzip it. These are a subset of the test images from the paper.
  2. Start the GUI with `python -m cellpose`.
  3. Drag an image from the folder into the GUI.
  4. Set the model (in demo all are `cyto`) and the channel you want to segment (in demo all are `green`). Optionally set the second channel if you are segmenting `cyto` and have an available nucleus channel.
  5. Click the `calibrate` button to estimate the size of the objects in the image. Alternatively (RECOMMENDED) you can set the `cell diameter` by hand and press ENTER. You will see the size you set as a red disk at the bottom left of the image.
  6. Click the `run segmentation` button. If MASKS ON is checked, you should see masks drawn on the image.
  7. Now you can click the LEFT/RIGHT arrow keys to move through the folder and segment another image.

  To draw ROIs on the image you can right-click then hover to complete the ROI (do not right-click and drag). To remove ROIs left-click while holding down CTRL. See more details [here](https://cellpose.readthedocs.io/en/latest/gui.html).

  On the demo images each of these steps should run in less than a few seconds on a standard laptop or desktop (with mkl working).



  For multi-channel, multi-Z tiff's, the expected format is Z x channels x Ly x Lx.



  The models will be downloaded automatically from the [website](https://www.cellpose.org) when you first run a pretrained model in cellpose. If you are having issues with the downloads, you can download them from this [google drive zip file](https://drive.google.com/file/d/1zHGFYCqRCTwTPwgEUMNZu0EhQy2zaovg/view?usp=sharing), unzip the file and put the models in your home directory under the path .cellpose/models/, e.g. on Windows this would be C:/Users/YOUR_USERNAME/.cellpose/models/ or on Linux this would be /home/YOUR_USERNAME/.cellpose/models/, so /home/YOUR_USERNAME/.cellpose/models/cyto_0 is the full path to one model for example. If you cannot access google drive, the models are also available on baidu: Link：https://pan.baidu.com/s/1CARpRGCBHIYaz7KeyoX-fg ; Fetch code：pose ; thanks to @qixinbo!





  Cellpose has been relatively stable for a while now. Small bugs will continue to be fixed, but we are now releasing a reference 1.0 version. Larger updates to Cellpose will go towards a new 2.0 candidate version to be released soon.

  This update fixes bugs in GUI and plotting. It also stops model weight reloading to improve speed. `resample=True` is default again as in earlier releases, turn off with `--no_resample`. Now logging is turned off by default. Turn on in CLI with `--verbose` flag or in a script/notebook by
  ```
  from cellpose.io import logger_setup
  logger_setup();
  ```

  To install this version please use
  ```
  pip install cellpose==1.0.2
  ```



  Check out [Omnipose](https://github.com/kevinjohncutler/omnipose), an extension of Cellpose for long filamentous bacteria. Omnipose was written by Kevin Cutler ([@kevinjohncutler](https://github.com/kevinjohncutler)). To learn about Omnipose, read the [paper](http://biorxiv.org/content/early/2021/11/04/2021.11.03.467199).



  Pytorch is now the default deep neural network software for cellpose. Mxnet will still be supported. To install mxnet (CPU), run `pip install mxnet-mkl`. To use mxnet in a notebook, declare `torch=False` when creating a model, e.g. `model = models.Cellpose(torch=False)`. To use mxnet on the command line, add the flag `--mxnet`, e.g. `python -m cellpose --dir ~/images/ --mxnet`. The pytorch implementation is 20% faster than the mxnet implementation when running on the GPU and 20% slower when running on the CPU.

  Dynamics are computed using bilinear interpolation by default instead of nearest neighbor interpolation. Set `interp=False` in `model.eval` to turn off. The bilinear interpolation will be slightly slower on the CPU, but it is faster than nearest neighbor if using torch and the GPU is enabled.




  You can check if cellpose is running the MKL version (if you are using the CPU not the GPU) by adding the flag `--check_mkl`. If you are not using MKL cellpose will be much slower. Here are Cellpose run times divided into the time it takes to run the deep neural network (DNN) and the time for postprocessing (gradient tracking, segmentation, quality control etc.). The DNN runtime is shown using either a GPU (Nvidia GTX 1080Ti) or a CPU (Intel 10-core 7900X), with or without network ensembling (4net vs 1net). The postprocessing runtime is similar regardless of ensembling or CPU/GPU version. Runtime is shown for different image sizes, all with a cell diameter of 30 pixels (the average from our training set).

  |   | 256 pix | 512 pix | 1024 pix |
  |----|-------|------|----------|
  | DNN (1net, GPU) | 0.054 s | 0.12 s | 0.31 s  |
  | DNN (1net, CPU) | 0.30 s | 0.65 s | 2.4 s  |
  | DNN (4net, GPU) | 0.23 s | 0.41 s | 1.3 s |
  | DNN (4net, CPU) | 1.3 s | 2.5 s | 9.1 s  |
  |  | |  |  |
  | Postprocessing (CPU) | 0.32 s | 1.2 s | 6.1 s  |


pkgId: 5fae64805b1b6098892a2a5cda6cc3314b50519e62f01b6ba28409f12bf2a8a9
name: python-cellpose
arch: src
version: 3.1.0
epoch: 0
release: 1
summary: anatomical segmentation algorithm
url: https://github.com/MouseLand/cellpose
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cellpose-3.1.0-1.src.rpm
checksum_type: sha256
description:
  <img src="http://www.cellpose.org/static/images/logo.png?raw=True" width="250" title="cellpose" alt="cellpose" align="right" vspace = "50">

  [![Documentation Status](https://readthedocs.org/projects/cellpose/badge/?version=latest)](https://cellpose.readthedocs.io/en/latest/?badge=latest)
  ![tests](https://github.com/mouseland/cellpose/actions/workflows/test_and_deploy.yml/badge.svg)
  [![codecov](https://codecov.io/gh/MouseLand/cellpose/branch/main/graph/badge.svg?token=9FFo4zNtYP)](https://codecov.io/gh/MouseLand/cellpose)
  [![PyPI version](https://badge.fury.io/py/cellpose.svg)](https://badge.fury.io/py/cellpose)
  [![Downloads](https://pepy.tech/badge/cellpose)](https://pepy.tech/project/cellpose)
  [![Downloads](https://pepy.tech/badge/cellpose/month)](https://pepy.tech/project/cellpose)
  [![Python version](https://img.shields.io/pypi/pyversions/cellpose)](https://pypistats.org/packages/cellpose)
  [![Licence: GPL v3](https://img.shields.io/github/license/MouseLand/cellpose)](https://github.com/MouseLand/cellpose/blob/master/LICENSE)
  [![Contributors](https://img.shields.io/github/contributors-anon/MouseLand/cellpose)](https://github.com/MouseLand/cellpose/graphs/contributors)
  [![website](https://img.shields.io/website?url=https%3A%2F%2Fwww.cellpose.org)](https://www.cellpose.org)
  [![Image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&url=https%3A%2F%2Fforum.image.sc%2Ftags%2Fcellpose.json&query=%24.topic_list.tags.0.topic_count&colorB=brightgreen&suffix=%20topics&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/cellpose)
  [![repo size](https://img.shields.io/github/repo-size/MouseLand/cellpose)](https://github.com/MouseLand/cellpose/)
  [![GitHub stars](https://img.shields.io/github/stars/MouseLand/cellpose?style=social)](https://github.com/MouseLand/cellpose/)
  [![GitHub forks](https://img.shields.io/github/forks/MouseLand/cellpose?style=social)](https://github.com/MouseLand/cellpose/)

  A generalist algorithm for cell and nucleus segmentation (v1.0) that can be optimized for your own data (v2.0) and (**NEW**) perform image restoration (v3.0).

  Cellpose was written by Carsen Stringer and Marius Pachitariu. To learn about Cellpose3 (image restoration), read the [paper](https://www.biorxiv.org/content/10.1101/2024.02.10.579780v1). To learn about Cellpose 2.0 (human-in-the-loop), read the [paper](https://www.nature.com/articles/s41592-022-01663-4) or watch the [talk](https://www.youtube.com/watch?v=3ydtAhfq6H0). To learn about Cellpose 1.0, read the [paper](https://t.co/kBMXmPp3Yn?amp=1) or watch the [talk](https://t.co/JChCsTD0SK?amp=1). For support, please open an [issue](https://github.com/MouseLand/cellpose/issues).

  Please see install instructions [below](README.md/#Installation), and also check out the detailed documentation at [**cellpose.readthedocs.io**](https://cellpose.readthedocs.io/en/latest/) for more information.



  Cellpose3 enables image restoration in the GUI, API and CLI (saved to `_seg.npy`). To learn more...
  * Check out the [paper](https://www.biorxiv.org/content/10.1101/2024.02.10.579780v1).
  * API documentation [here](https://cellpose.readthedocs.io/en/latest/restore.html)
  * Example google colab notebook for image restoration: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/run_cellpose3.ipynb), using new `CellposeDenoiseModel`.
  * Example google colab notebook with new super-generalist "cyto3" model: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/run_cyto3.ipynb). Try out the new `cyto3` super-generalist Cellpose model with `model_type="cyto3"`.

  denoising             |  deblurring                  |  upsampling
  :-------------------------:|:-------------------------:|:-------------------------:
  <img src="http://www.cellpose.org/static/images/poisson_cp3.gif?raw=True" width="350" title="cellpose denoising" alt="cellpose denoising examples"> | <img src="http://www.cellpose.org/static/images/blur_cp3.gif?raw=True" width="350" title="cellpose deblurring" alt="cellpose deblurring examples"> | <img src="http://www.cellpose.org/static/images/downsample_cp3.gif?raw=True" width="350" title="cellpose upsampling" alt="cellpose upsampling examples">



  **If you use Cellpose 1, 2 or 3, please cite the Cellpose 1.0 [paper](https://t.co/kBMXmPp3Yn?amp=1):**
  Stringer, C., Wang, T., Michaelos, M., & Pachitariu, M. (2021). Cellpose: a generalist algorithm for cellular segmentation. <em>Nature methods, 18</em>(1), 100-106.

  **If you use the human-in-the-loop training, please also cite the Cellpose 2.0 [paper](https://www.nature.com/articles/s41592-022-01663-4):**
  Pachitariu, M. & Stringer, C. (2022). Cellpose 2.0: how to train your own model. <em>Nature methods</em>, 1-8.

  **If you use the new image restoration models or cyto3, please also cite the Cellpose3 [paper](https://www.biorxiv.org/content/10.1101/2024.02.10.579780v1):**
  Stringer, C. & Pachitariu, M. (2024). Cellpose3: one-click image restoration for improved segmentation. <em>bioRxiv</em>.

  :triangular_flag_on_post: All models in Cellpose, except `yeast_BF_cp3`, `yeast_PhC_cp3`, and `deepbacs_cp3`, are trained on some amount of data that is **CC-BY-NC**. The Cellpose annotated dataset is also CC-BY-NC.



  Cellpose 2.0 allows human-in-the-loop training of models! To learn more...
  * Check out the twitter [thread](https://twitter.com/marius10p/status/1511415409047650307?s=20&t=umTVIG1CFKIWHYMrQqFKyQ) for an overview.
  * Check out the [paper](https://www.nature.com/articles/s41592-022-01663-4) for more details on the algorithm and the performance. Also, there's a short review of the paper available [here](https://www.nature.com/articles/s41592-022-01664-3).
  * Watch the short overview [talk](https://youtu.be/wB7XYh4QRiI) and watch the longer [tutorial talk](https://youtu.be/5qANHWoubZU) which goes through running Cellpose 2.0 in the GUI and a jupyter notebook.
  * Check out the full human-in-the-loop [video](https://youtu.be/3Y1VKcxjNy4).
  * Check out the colab notebook to get cloud access to a GPU to train your models or run your custom models: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/run_cellpose_2.ipynb).
  * See how to use it yourself in the [docs](https://cellpose.readthedocs.io/en/latest/gui.html#training-your-own-cellpose-model) and also check out the help info in the `Models` menu in the GUI.

  Mxnet is no longer supported in cellpose. To use mxnet, please use v1.0.2 (not recommended).



  You can install cellpose using conda or with native python if you have python3.8+ on your machine.





  Linux, Windows and Mac OS are supported for running the code. For running the graphical interface you will need a Mac OS later than Yosemite. At least 8GB of RAM is required to run the software. 16GB-32GB may be required for larger images and 3D volumes. The software has been heavily tested on Windows 10 and Ubuntu 18.04 and less well-tested on Mac OS. Please open an issue if you have problems with installation.


  cellpose relies on the following excellent packages (which are automatically installed with conda/pip if missing):
  - [pytorch](https://pytorch.org/)
  - [pyqtgraph](http://pyqtgraph.org/)
  - [PyQt5](http://pyqt.sourceforge.net/Docs/PyQt5/)
  - [numpy](http://www.numpy.org/) (>=1.16.0)
  - [numba](http://numba.pydata.org/numba-doc/latest/user/5minguide.html)
  - [scipy](https://www.scipy.org/)
  - [natsort](https://natsort.readthedocs.io/en/master/)



  If you have an older `cellpose` environment you can remove it with `conda env remove -n cellpose` before creating a new one.

  If you are using a GPU, make sure its drivers and the cuda libraries are correctly installed.

  1. Install a [miniforge](https://github.com/conda-forge/miniforge) distribution of Python. Note you might need to use an anaconda prompt if you did not add anaconda to the path.
  2. Open an anaconda prompt / command prompt which has `conda` for **python 3** in the path
  3. Create a new environment with `conda create --name cellpose python=3.9`. We recommend python 3.10, but python 3.9 and 3.11 will also work.
  4. To activate this new environment, run `conda activate cellpose`
  5. (option 1) To install cellpose with the GUI, run `python -m pip install cellpose[gui]`.  If you're on a zsh server, you may need to use ' ': `python -m pip install 'cellpose[gui]'`.
  6. (option 2) To install cellpose without the GUI, run `python -m pip install cellpose`.

  To upgrade cellpose (package [here](https://pypi.org/project/cellpose/)), run the following in the environment:

  ~~~sh
  python -m pip install cellpose --upgrade
  ~~~

  Note you will always have to run `conda activate cellpose` before you run cellpose. If you want to run jupyter notebooks in this environment, then also `python -m pip install notebook` and `python -m pip install matplotlib`.

  You can also try to install cellpose and the GUI dependencies from your base environment using the command

  ~~~~sh
  python -m pip install cellpose[gui]
  ~~~~

  If you have **issues** with installation, see the [docs](https://cellpose.readthedocs.io/en/latest/installation.html) for more details. You can also use the cellpose environment file included in the repository and create a cellpose environment with `conda env create -f environment.yml` which may solve certain dependency issues.

  If these suggestions fail, open an issue.



  Venv ([tutorial](https://docs.python-guide.org/dev/virtualenvs/#lower-level-virtualenv), for those interested) is a built-in tool in python for creating virtual environments. It is a good alternative if you don't want to install conda and already have python3 on your machine. The main difference is that you will need to choose where to install the environment and the packages. Cellpose will then live in this environment and not be accessible from other environments. You will need to navigate to the environment directory and activate it each time before running cellpose. The steps are similar to the conda installation:

  If you are using a GPU, make sure its drivers and the cuda libraries are correctly installed.

  1. Install python3.8 or later from [python.org](https://www.python.org/downloads/). This will be the version of python that will be used in the environment. You can check your python version with `python --version`.
  2. Navigate to the directory where you want to create the environment and run `python3 -m venv cellpose` to create a new environment called `cellpose`.
  3. Activate the environment with `source cellpose/bin/activate` on Mac/Linux or `cellpose\Scripts\activate` on Windows. A prefix `(cellpose)` should appear in the terminal.
  4. Install cellpose into the `cellpose` venv using pip with `python -m pip install cellpose`.
  5. Install the cellpose GUI, with `python -m pip install cellpose[gui]`. Depending on your terminal software, you may need to use quotes like this: `python -m pip install 'cellpose[gui]'`.
  6. You can now run cellpose from this environment with `python -m cellpose` or `cellpose` if you are in the cellpose directory.
  7. To deactivate the environment, run `deactivate`.



  If you plan on running many images, you may want to install a GPU version of *torch*. To use your NVIDIA GPU with python, you will need to make sure the NVIDIA driver for your GPU is installed, check out this [website](https://www.nvidia.com/Download/index.aspx?lang=en-us) to download it. You can also install the CUDA toolkit, or use the pytorch cudatoolkit (installed below with conda). If you have trouble with the below install, we recommend installing the CUDA toolkit yourself, choosing one of the 11.x releases [here](https://developer.nvidia.com/cuda-toolkit-archive).

  With the latest versions of pytorch, as long as the NVIDIA drivers are installed, the GPU version is installed by default with pip. You can check if the GPU support is working by opening the GUI. If the GPU is working then the `GPU` box will be checked and the `CUDA` version will be displayed in the command line.

  If it's not working, we will need to remove the CPU version of torch:
  ~~~
  pip uninstall torch
  ~~~

  To install the GPU version of torch, follow the instructions [here](https://pytorch.org/get-started/locally/). The conda install is strongly recommended, and then choose the CUDA version that is supported by your GPU (newer GPUs may need newer CUDA versions > 10.2). For instance this command will install the 11.6 version on Linux and Windows (note the `torchvision` and `torchaudio` commands are removed because cellpose doesn't require them):
  ~~~
  conda install pytorch pytorch-cuda=11.6 -c pytorch -c nvidia
  ~~~

  If the latest CUDA versions don't work, try an older version like cuda 11.3:
  ~~~
  conda install pytorch==1.12.0 cudatoolkit=11.3 -c pytorch
  ~~~~
  Info on how to install several older versions is available [here](https://pytorch.org/get-started/previous-versions/). After install you can check `conda list` for `pytorch`, and its version info should have `cuXX.X`, not `cpu`.



  Follow steps from above to install the dependencies. Then run
  ~~~
  pip install git+https://www.github.com/mouseland/cellpose.git
  ~~~

  If you want edit ability to the code, in the github repository folder, run `pip install -e .`. If you want to go back to the pip version of cellpose, then say `pip install cellpose`.



  You can quickly try out Cellpose on the [website](https://www.cellpose.org) first (many features disabled).

  You can also run Cellpose in google colab with a GPU:
  * a code-based notebook: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/run_cellpose_GPU.ipynb)
  * a more user-friendly notebook for 2D segmentation written by [@pr4deepr](https://github.com/pr4deepr): [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MouseLand/cellpose/blob/main/notebooks/Cellpose_cell_segmentation_2D_prediction_only.ipynb)
  * a user-friendly [ZeroCostDL4Mic](https://github.com/HenriquesLab/ZeroCostDL4Mic) notebook that includes training cellpose models, written by [@guijacquemet](https://github.com/guijacquemet): [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/HenriquesLab/ZeroCostDL4Mic/blob/master/Colab_notebooks/Beta%20notebooks/Cellpose_2D_ZeroCostDL4Mic.ipynb)

  The colab notebooks are recommended if you have issues with MKL or run speed on your local computer (and are running 3D volumes). Colab does not allow you to run the GUI, but you can save `*_seg.npy` files in colab that you can download and open in the GUI.

  **Executable file**: You can download an executable file for [*Windows 10*](http://www.cellpose.org/windows) or for [*Mac OS*](http://www.cellpose.org/mac) (High Sierra or greater) that were made using PyInstaller on Intel processors (MKL acceleration works, but no GPU support). Note in both cases it will take a few seconds to open.

  * The [*Mac OS*](https://www.cellpose.org/mac) file will download as `cellpose_mac` OR `cellpose_mac.dms`. You will need to make it into an executable file and run it through the terminal:
  1. Open a terminal and run `cd ~/Downloads/`.
  2. Run `chmod 777 cellpose_mac` OR `chmod 777 cellpose_mac.dms` to make the file executable.
  3. Run `./cellpose_mac` OR `./cellpose_mac.dms` to open the cellpose GUI. Messages from cellpose will be printed in the terminal.
  4. You can also run using the command line interface, e.g. as `./cellpose_mac --dir ~/Pictures/ --chan 2 --save_png`.

  * The [*Windows 10*](https://www.cellpose.org/windows) file is an exe and you can click on it to run the GUI. You can also run using the command line interface, e.g. as `cellpose.exe --dir Pictures/ --chan 2 --save_png`



  The quickest way to start is to open the GUI from a command line terminal. You might need to open an anaconda prompt if you did not add anaconda to the path:
  ~~~~
  python -m cellpose
  ~~~~

  The first time cellpose runs it downloads the latest available trained model weights from the website.

  You can now **drag and drop** any images (*.tif, *.png, *.jpg, *.gif) into the GUI and run Cellpose, and/or manually segment them. When the GUI is processing, you will see the progress bar fill up and during this time you cannot click on anything in the GUI. For more information about what the GUI is doing you can look at the terminal/prompt you opened the GUI with. For example data, see [website](https://www.cellpose.org) or this [zip file](https://www.cellpose.org/static/images/demo_images.zip). For best accuracy and runtime performance, resize images so cells are less than 100 pixels across.

  For 3D data, with multi-Z, please use the 3D version of the GUI with:
  ~~~~
  python -m cellpose --Zstack
  ~~~~




  1. Download this [zip file](https://www.cellpose.org/static/images/demo_images.zip) of images and unzip it. These are a subset of the test images from the paper.
  2. Start the GUI with `python -m cellpose`.
  3. Drag an image from the folder into the GUI.
  4. Set the model (in demo all are `cyto`) and the channel you want to segment (in demo all are `green`). Optionally set the second channel if you are segmenting `cyto` and have an available nucleus channel.
  5. Click the `calibrate` button to estimate the size of the objects in the image. Alternatively (RECOMMENDED) you can set the `cell diameter` by hand and press ENTER. You will see the size you set as a red disk at the bottom left of the image.
  6. Click the `run segmentation` button. If MASKS ON is checked, you should see masks drawn on the image.
  7. Now you can click the LEFT/RIGHT arrow keys to move through the folder and segment another image.

  To draw ROIs on the image you can right-click then hover to complete the ROI (do not right-click and drag). To remove ROIs left-click while holding down CTRL. See more details [here](https://cellpose.readthedocs.io/en/latest/gui.html).

  On the demo images each of these steps should run in less than a few seconds on a standard laptop or desktop (with mkl working).



  For multi-channel, multi-Z tiff's, the expected format is Z x channels x Ly x Lx.



  The models will be downloaded automatically from the [website](https://www.cellpose.org) when you first run a pretrained model in cellpose. If you are having issues with the downloads, you can download them from this [google drive zip file](https://drive.google.com/file/d/1zHGFYCqRCTwTPwgEUMNZu0EhQy2zaovg/view?usp=sharing), unzip the file and put the models in your home directory under the path .cellpose/models/, e.g. on Windows this would be C:/Users/YOUR_USERNAME/.cellpose/models/ or on Linux this would be /home/YOUR_USERNAME/.cellpose/models/, so /home/YOUR_USERNAME/.cellpose/models/cyto_0 is the full path to one model for example. If you cannot access google drive, the models are also available on baidu: Link：https://pan.baidu.com/s/1CARpRGCBHIYaz7KeyoX-fg ; Fetch code：pose ; thanks to @qixinbo!





  Cellpose has been relatively stable for a while now. Small bugs will continue to be fixed, but we are now releasing a reference 1.0 version. Larger updates to Cellpose will go towards a new 2.0 candidate version to be released soon.

  This update fixes bugs in GUI and plotting. It also stops model weight reloading to improve speed. `resample=True` is default again as in earlier releases, turn off with `--no_resample`. Now logging is turned off by default. Turn on in CLI with `--verbose` flag or in a script/notebook by
  ```
  from cellpose.io import logger_setup
  logger_setup();
  ```

  To install this version please use
  ```
  pip install cellpose==1.0.2
  ```



  Check out [Omnipose](https://github.com/kevinjohncutler/omnipose), an extension of Cellpose for long filamentous bacteria. Omnipose was written by Kevin Cutler ([@kevinjohncutler](https://github.com/kevinjohncutler)). To learn about Omnipose, read the [paper](http://biorxiv.org/content/early/2021/11/04/2021.11.03.467199).



  Pytorch is now the default deep neural network software for cellpose. Mxnet will still be supported. To install mxnet (CPU), run `pip install mxnet-mkl`. To use mxnet in a notebook, declare `torch=False` when creating a model, e.g. `model = models.Cellpose(torch=False)`. To use mxnet on the command line, add the flag `--mxnet`, e.g. `python -m cellpose --dir ~/images/ --mxnet`. The pytorch implementation is 20% faster than the mxnet implementation when running on the GPU and 20% slower when running on the CPU.

  Dynamics are computed using bilinear interpolation by default instead of nearest neighbor interpolation. Set `interp=False` in `model.eval` to turn off. The bilinear interpolation will be slightly slower on the CPU, but it is faster than nearest neighbor if using torch and the GPU is enabled.


