# packages

pkgId: a362f6602e0d1651d4b39f548e0f22e6e256d8e76fad7be7e337e13b340439f8
name: python-async-pydantic-vault
arch: src
version: 0.1.15
epoch: 0
release: 1
url: https://github.com/AdolfoVillalobos/async-pydantic-vault
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-pydantic-vault-0.1.15-1.src.rpm
checksum_type: sha256
summary:
  A simple extension to Pydantic BaseSettings that can retrieve secrets from Hashicorp Vault using Async


pkgId: 1232bcf3d822ae9874fc958e5ad975f88abab38513e6e334eb2553e15935d7ca
name: python-async-pymongo
arch: src
version: 0.1.11
epoch: 0
release: 1
summary: Asynchronous wrapper for pymongo
url: https://github.com/Mayuri-Chan/async_pymongo
rpm_license: GPL-3.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-pymongo-0.1.11-1.src.rpm
checksum_type: sha256
description:
  Asynchronous wrapper for pymongo
  [Comparison](https://github.com/Mayuri-Chan/async_pymongo/blob/staging/comparison.png)



  ``` bash
  pip3 install async_pymongo
  ```



  ``` python
  from async_pymongo import AsyncClient

  async def main():
  	conn = AsyncClient("mongodb://...")
  	db = conn["database_name"]
  	col = db["collections_name"]
  	await col.insert_one({"name": "John Smith", "age": 25})
  	async for data in col.find({}):
  		print(data["name"])
  ```
   The rest function are same with pymongo but with await


pkgId: be62a838c7e249c4081ef67c20dd9599acc858986ce5d738267545a53dc81fb1
name: python-async-queue-manager
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Asynchronous Task Queue
url: https://github.com/Ichinga-Samuel/taskqueue
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-queue-manager-1.0.0-1.src.rpm
checksum_type: sha256
description:
  - **QueueItem**:
    - Represents individual tasks with arguments and prioritization support.
    - Supports both synchronous and asynchronous task execution.
  - **TaskQueue**:
    - Manages tasks with configurable workers and prioritization.
    - Modes:
      - `finite`: Process tasks and stop.
      - `infinite`: Continuously process tasks until stopped.


pkgId: a90328a2ca8b90f7c262a2e35df0853c70b0fe51368302c506eef704c219a52b
name: python-async-rediscache
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: An easy to use asynchronous Redis cache
url: https://github.com/python-discord/async-rediscache
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-rediscache-0.2.0-1.src.rpm
checksum_type: sha256
description:
  [![Coverage Status](https://coveralls.io/repos/github/python-discord/async-rediscache/badge.svg?branch=master)](https://coveralls.io/github/python-discord/async-rediscache?branch=master)
  ![Lint & Test](https://github.com/python-discord/async-rediscache/workflows/Lint%20&%20Test/badge.svg)
  ![Release to PyPI](https://github.com/python-discord/async-rediscache/workflows/Release%20to%20PyPI/badge.svg)


  This package offers several data types to ease working with a Redis cache in an asynchronous workflow. The package is currently in development and it's not recommended to start using it in production at this point.





  To use `async-rediscache`, make sure that [`redis`](https://redis.io/download) is installed and running on your system. Alternatively, you could use `fakeredis` as a back-end for testing purposes and local development.



  To install `async-rediscache` run the following command:

  ```bash
  pip install async-rediscache
  ```

  Alternatively, to install `async-rediscache` with `fakeredis` run:

  ```bash
  pip install async-rediscache[fakeredis]
  ```




  To use a `RedisCache`, you first have to create a `RedisSession` instance that manages the connection pool to Redis. You can create the `RedisSession` at any point but make sure to call the `connect` method from an asynchronous context (see [this explanation](https://docs.aiohttp.org/en/stable/faq.html#why-is-creating-a-clientsession-outside-of-an-event-loop-dangerous) for why).

  ```python
  import async_rediscache

  async def main():
      session = async_rediscache.RedisSession()
      await session.connect()

      

      await session.close()
  ```



  ```python
  async def main():
      connection = {"address": "redis://127.0.0.1:6379"}
      async_rediscache.RedisSession(**connection)
  ```


  A `RedisCache` is the most basic data type provided by `async-rediscache`. It works like a dictionary in that you can associate keys with values. To prevent key collisions, each `RedisCache` instance should use a unique `namespace` identifier that will be prepended to the key when storing the pair to Redis.



  When creating a `RedisCache` instance, it's important to make sure that it has a unique `namespace`. This can be done directly by passing a `namespace` keyword argument to the constructor:

  ```python
  import async_rediscache

  birthday_cache = async_rediscache.RedisCache(namespace="birthday")
  ```

  Alternatively, if you assign a class attribute to a `RedisCache` instance, a namespace will be automatically generated using the name of the owner class and the name of attribute assigned to the cache:

  ```python
  import async_rediscache

  class Channel:
      topics = async_rediscache.RedisCache()  # The namespace be set to `"Channel.topics"`
  ```

  Note: There is nothing preventing you from reusing the same namespace, although you should be aware this could lead to key collisions (i.e., one cache could interfere with the values another cache has stored).



  Using a `RedisCache` is straightforward: Just call and await the methods you want to use and it should just work. There's no need to pass a `RedisSession` around as the session is fetched internally by the `RedisCache`. Obviously, one restriction is that you have to make sure that the `RedisSession` is still open and connected when trying to use a `RedisCache`.

  Here are some usage examples:

  ```python
  import async_rediscache

  async def main():
      session = async_rediscache.RedisSession()
      await session.connect()

      cache = async_rediscache.RedisCache(namespace="python")

      
      await cache.set("Guido", "van Rossum")
      print(await cache.get("Guido"))  # Would print `van Rossum`

      
      print(await cache.contains("Guido"))  # True
      print(await cache.contains("Kyle"))  # False

      
      item_view = await cache.items()
      for key, value in item_view:
          print(key, value)

      
      number_of_pairs = await cache.length()
      pairs_in_dict = await cache.to_dict()
      popped_item = await cache.pop("Raymond", "Default value")
      await cache.update({"Brett": 10, "Barry": False})
      await cache.delete("Barry")
      await cache.increment("Brett", 1)  # Increment Brett's int by 1
      await cache.clear()

      await session.close()
  ```



  A `RedisQueue` implements the same interface as a `queue.SimpleQueue` object, except that all the methods are coroutines. Creating an instance works the same as with a `RedisCache`.


pkgId: 3ee5f6ae018fd9c1cf0550fb036dde2126160257a24cf260f5a1f86e0549f53d
name: python-async-reolink.api
arch: src
version: 0.6.6
epoch: 0
release: 1
summary: Async ReoLink camera API framework for python
url: https://pypi.org/project/async-reolink.api/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-reolink.api-0.6.6-1.src.rpm
checksum_type: sha256
description:
  Async Reolink API

  This is a base framework for an async client library for ReoLink Camera's. This package alone will not allow connecting to a camera as it is only the basic framework and not a complete implemented. Other packages will be built on top of this to handle specific implementation details.


pkgId: 04315777496dbfd58c180da1900e8e5a0ad7644e501906e561a6cea07641af03
name: python-async-retrying-ng
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: Next Gen. simple retrying for asyncio.
url: https://pypi.org/project/async-retrying-ng/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-retrying-ng-0.1.3-1.src.rpm
checksum_type: sha256
description:
  Next Gen. simple retrying for asyncio - fork/fix from https://GitHub.com/hellysmile/async_retrying but updated for Python 3.10+ only



  shell

  `pip install async_retrying_ng`



  python

  ```plaintext
      import asyncio

      from async_retrying_ng import retry

      counter = 0

      @retry
      async def fn():
          global counter

          counter += 1

          if counter == 1:
              raise RuntimeError

      async def main():
          await fn()

      loop = asyncio.get_event_loop()

      loop.run_until_complete(main())

      assert counter == 2

      loop.close()
  ```

  Python 3.10+ is required


pkgId: f69b168447e55cf183f890fe35ee7d05f9b4da377f5f7c943f8f96a0dfca08a2
name: python-async-riot-api
arch: src
version: 0.0.43
epoch: 0
release: 1
summary: Async wrapper for the Riot Games API for League of Legends
url: https://async-riot-api.readthedocs.io/en/latest/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-riot-api-0.0.43-1.src.rpm
checksum_type: sha256
description:
  Async wrapper for the Riot Games API for League of Legends. You can find the complete documentation [here](https://async-riot-api.readthedocs.io/en/latest/)


pkgId: 3e29d9b5b7fd2e57284db490eb1a9b605091d84e11247363339cac71da96917b
name: python-async-scrape
arch: src
version: 0.1.19
epoch: 0
release: 1
url: https://github.com/cia05rf/async-scrape/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-scrape-0.1.19-1.src.rpm
checksum_type: sha256
summary:
  A package designed to scrape webpages using aiohttp and asyncio. Has some error handling to overcome common issues such as sites blocking you after n requests over a short period.

description:
  [![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)

  Async-scrape is a package which uses asyncio and aiohttp to scrape websites and has useful features built in.



  - Breaks - pause scraping when a website blocks your requests consistently
  - Rate limit - slow down scraping to prevent being blocked




  Async-scrape requires [C++ Build tools](https://go.microsoft.com/fwlink/?LinkId=691126) v15+ to run.


  ```
  pip install async-scrape
  ```


  Key inpur parameters:
  - `post_process_func` - the callable used to process the returned response
  - `post_process_kwargs` - and kwargs to be passed to the callable
  - `use_proxy` - should a proxy be used (if this is true then either provide a `proxy` or `pac_url` variable)
  - `attempt_limit` - how manay attempts should each request be given before it is marked as failed
  - `rest_wait` - how long should the programme pause between loops
  - `call_rate_limit` - limits the rate of requests (useful to stop getting blocked from websites)
  - `randomise_headers` - if set to `True` a new set of headers will be generated between each request


  ```

  from async_scrape import AsyncScrape

  def post_process(html, resp, **kwargs):
      """Function to process the gathered response from the request"""
      if resp.status == 200:
          return "Request worked"
      else:
          return "Request failed"

  async_Scrape = AsyncScrape(
      post_process_func=post_process,
      post_process_kwargs={},
      fetch_error_handler=None,
      use_proxy=False,
      proxy=None,
      pac_url=None,
      acceptable_error_limit=100,
      attempt_limit=5,
      rest_between_attempts=True,
      rest_wait=60,
      call_rate_limit=None,
      randomise_headers=True
  )

  urls = [
      "https://www.google.com",
      "https://www.bing.com",
  ]

  resps = async_Scrape.scrape_all(urls)
  ```


  ```

  from async_scrape import AsyncScrape

  def post_process(html, resp, **kwargs):
      """Function to process the gathered response from the request"""
      if resp.status == 200:
          return "Request worked"
      else:
          return "Request failed"

  async_Scrape = AsyncScrape(
      post_process_func=post_process,
      post_process_kwargs={},
      fetch_error_handler=None,
      use_proxy=False,
      proxy=None,
      pac_url=None,
      acceptable_error_limit=100,
      attempt_limit=5,
      rest_between_attempts=True,
      rest_wait=60,
      call_rate_limit=None,
      randomise_headers=True
  )

  urls = [
      "https://eos1jv6curljagq.m.pipedream.net",
      "https://eos1jv6curljagq.m.pipedream.net",
  ]
  payloads = [
      {"value": 0},
      {"value": 1}
  ]

  resps = async_Scrape.scrape_all(urls, payloads=payloads)
  ```


  Response object is a list of dicts in the format:
  ```
  {
      "url":url, # url of request
      "req":req, # combination of url and params
      "func_resp":func_resp, # response from post processing function
      "status":resp.status, # http status
      "error":None # any error encountered
  }
  ```




  MIT

  **Free Software, Hell Yeah!**

  [//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)

     [dill]: <https://github.com/joemccann/dillinger>
     [git-repo-url]: <https://github.com/joemccann/dillinger.git>
     [john gruber]: <http://daringfireball.net>
     [df1]: <http://daringfireball.net/projects/markdown/>
     [markdown-it]: <https://github.com/markdown-it/markdown-it>
     [Ace Editor]: <http://ace.ajax.org>
     [node.js]: <http://nodejs.org>
     [Twitter Bootstrap]: <http://twitter.github.com/bootstrap/>
     [jQuery]: <http://jquery.com>
     [@tjholowaychuk]: <http://twitter.com/tjholowaychuk>
     [express]: <http://expressjs.com>
     [AngularJS]: <http://angularjs.org>
     [Gulp]: <http://gulpjs.com>

     [PlDb]: <https://github.com/joemccann/dillinger/tree/master/plugins/dropbox/README.md>
     [PlGh]: <https://github.com/joemccann/dillinger/tree/master/plugins/github/README.md>
     [PlGd]: <https://github.com/joemccann/dillinger/tree/master/plugins/googledrive/README.md>
     [PlOd]: <https://github.com/joemccann/dillinger/tree/master/plugins/onedrive/README.md>
     [PlMe]: <https://github.com/joemccann/dillinger/tree/master/plugins/medium/README.md>
     [PlGa]: <https://github.com/RahulHP/dillinger/blob/master/plugins/googleanalytics/README.md>


pkgId: 1d2c9c2346740b2716d846971d94acb8ab20642ca7d7ac7d105b8aa157161ba0
name: python-async-search-client
arch: src
version: 0.9.0
epoch: 0
release: 1
summary: async-search-client is now meilisearch-python-async
url: https://github.com/sanders41/meilisearch-python-async
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-search-client-0.9.0-1.src.rpm
checksum_type: sha256
description:
  ⚠️ This project has been renamed to meilisearch-python-async and moved to the
  [meilisearch-python-async](https://github.com/sanders41/meilisearch-python-async) repository. All of
  the functionality remains the same in meilisearch-python-async and development continues from where
  where this package left off. ⚠️


pkgId: 44fa8e27f289c91c2f47db22418477f026647189baf77d33eb680e042e685d06
name: python-async-sendgrid
arch: src
version: 0.0.4
epoch: 0
release: 1
summary: SendGrid simple async client based on httpx.
url: https://github.com/sensodevices/async-sendgrid
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-sendgrid-0.0.4-1.src.rpm
checksum_type: sha256
description:
  SendGrid simple async client based on httpx.



  ```bash
  pip install async-sendgrid
  ```



  ```python
  import async_sendgrid
  from sendgrid.helpers.mail import Content, Email, Mail, To
  import os

  API_KEY = os.environ.get('API_KEY')

  from_email = Email("test@example.com")
  to_email = To("test@example.com")
  subject = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
  content = Content("text/plain", "Sed varius ligula ac urna vehicula ultrices. Nunc ut dolor sem.")
  mail = Mail(from_email, to_email, subject, content)

  data = {
      "personalizations": [
          {
              "to": [{"email": "test@example.com"}],
              "subject": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
          }
      ],
      "from": {"email": "test@example.com"},
      "content": [
          {
              "type": "text/plain",
              "value": "Sed varius ligula ac urna vehicula ultrices. Nunc ut dolor sem."
          }
      ],
  }




  async with async_sendgrid.AsyncClient(api_key=API_KEY) as client:
      response1 = await client.send(data)
      response2 = await client.send(mail)



  client = async_sendgrid.AsyncClient(api_key=API_KEY)
  await client.open()
  response1 = await client.send(data)
  response2 = await client.send(mail)
  await client.close()

  ```


pkgId: ad3bc9a799af166555274c2dac6e25ef75ab55a1f4ba09c2e58cda8043b60987
name: python-async-service
arch: src
version: 0.1.0a11
epoch: 0
release: 1
summary: async-service: Lifecycle management for async applications
url: https://github.com/ethereum/async-service
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-service-0.1.0a11-1.src.rpm
checksum_type: sha256
description:
  [![Join the chat at https://gitter.im/ethereum/async-service](https://badges.gitter.im/ethereum/async-service.svg)](https://gitter.im/ethereum/async-service?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
  [![Build Status](https://circleci.com/gh/ethereum/async-service.svg?style=shield)](https://circleci.com/gh/ethereum/async-service)
  [![PyPI version](https://badge.fury.io/py/async-service.svg)](https://badge.fury.io/py/async-service)
  [![Python versions](https://img.shields.io/pypi/pyversions/async-service.svg)](https://pypi.python.org/pypi/async-service)
  [![Docs build](https://readthedocs.org/projects/async-service/badge/?version=latest)](http://async-service.readthedocs.io/en/latest/?badge=latest)


  Lifecycle management for async applications

  Read more in the [documentation on ReadTheDocs](https://async-service.readthedocs.io/). [View the change log](https://async-service.readthedocs.io/en/latest/release_notes.html).



  ```sh
  pip install async-service
  ```



  If you would like to hack on async-service, please check out the [Snake Charmers
  Tactical Manual](https://github.com/ethereum/snake-charmers-tactical-manual)
  for information on how we do:

  - Testing
  - Pull Requests
  - Code Style
  - Documentation



  You can set up your dev environment with:

  ```sh
  git clone git@github.com:ethereum/async-service.git
  cd async-service
  virtualenv -p python3 venv
  . venv/bin/activate
  pip install -e .[dev]
  ```



  During development, you might like to have tests run on every file save.

  Show flake8 errors on file change:

  ```sh

  when-changed -v -s -r -1 async_service/ tests/ -c "clear; flake8 async_service tests && echo 'flake8 success' || echo 'error'"
  ```

  Run multi-process tests in one command, but without color:

  ```sh

  pytest --numprocesses=4 --looponfail --maxfail=1

  pytest -n 4 -f --maxfail=1
  ```

  Run in one thread, with color and desktop notifications:

  ```sh
  cd venv
  ptw --onfail "notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on async-service failed'" ../tests ../async_service
  ```



  For Debian-like systems:
  ```
  apt install pandoc
  ```

  To release a new version:

  ```sh
  make release bump=$$VERSION_PART_TO_BUMP$$
  ```



  The version format for this repo is `{major}.{minor}.{patch}` for stable, and
  `{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta).

  To issue the next version in line, specify which part to bump,
  like `make release bump=minor` or `make release bump=devnum`. This is typically done from the
  master branch, except when releasing a beta (in which case the beta is released from master,
  and the previous stable branch is released from said branch).

  If you are in a beta version, `make release bump=stage` will switch to a stable.

  To issue an unstable version when the current version is stable, specify the
  new version explicitly, like `make release bump="--new-version 4.0.0-alpha.1 devnum"`


pkgId: 9afc2d9247e07122935affca5c0549a050a46a79d421f86e01e770965439a2ef
name: python-async-signals
arch: src
version: 0.1.8
epoch: 0
release: 1
summary: Async version of the Django signals class - for usage in for example FastAPI.
url: https://github.com/team23/async-signals
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-signals-0.1.8-1.src.rpm
checksum_type: sha256
description:
  Easy library to implement the observer pattern in async code.

  **Note:** This library is a copy of the signals library from
  [Django](https://docs.djangoproject.com/en/4.1/topics/signals/). I always felt
  like using the observer pattern in Django is pretty well crafted and liked
  the way Django did implement this. But when switching to
  [FastAPI](https://fastapi.tiangolo.com/) I missed this feature. So I decided
  to copy the signals library from Django and implement it for FastAPI and other
  async frameworks.
  A big thanks to the nice people why built Django! And for using a BSD license
  to make this possible.



  * `Signal.send(...)` and `Signal.send_robust(...)` are now async functions 🚀
  * I added type annotations to all functions and classes, mypy is happy now 🧐
  * I created tests for the signals library - without using any Django models 😎



  Just use `pip install async-signals` to install the library.



  ```python
  from async_signals import Signal


  my_signal = Signal()


  async def my_handler(sender, **kwargs):
      print("Signal received!")

  my_signal.connect(my_handler)


  await my_signal.send("sender")
  ```

  `signal.send(...)` will return a list of all called receivers and their return
  values.



  The `**kwargs` are mandatory for your receivers. This is because the signal
  will pass any arguments it receives to the receivers. This is useful if you
  want to pass additional information to the receivers. To allow adding
  additional arguments to the signal in the future, the receivers should is
  required to accept `**kwargs`.



  The signal class will automatically remove signals when the receiver is
  garbage collected. This is done by using weak references. This means that
  you can use signals in long running applications without having to worry
  about memory leaks.

  If you want to disable this behaviour you can set the `weak` parameter to
  `False` when connecting the receiver.

  ```python
  my_signal.connect(my_handler, weak=False)



  my_signal.connect(my_handler, weak=True)  # the default
  ```



  The signal class will automatically await async receivers. If your receiver
  is sync it will be executed normally.



  The sender is the object that sends the signal. It can be anything. It is
  passed to the receiver as the first argument. This is useful if you want to
  have multiple signals in your application and you want to know which signal
  was sent. Normally the sender is the object that triggers the signal.

  You may also pass the sender when connecting a receiver. This is useful if
  you want to connect a receiver to a specific sender. If you do this the
  receiver will only be called when the sender is the same as the one you
  passed when connecting the receiver.

  **Note:** I normally tend to use Pydantic models as the sender in FastAPI. But
  feel free to use whatever you want.

  ```python
  my_signal.connect(my_handler, sender="sender")


  await my_signal.send("other_sender")
  ```



  You can also use the `receiver` decorator to connect a receiver to a signal.

  ```python
  @receiver(my_signal)
  async def my_handler(sender, **kwargs):
      print("Signal received!")
  ```

  Or if you want to limit the receiver to a specific sender.

  ```python
  @receiver(my_signal, sender="sender")
  async def my_handler(sender, **kwargs):
      print("Signal received!")
  ```



  By default the signal class will raise exceptions raised by receivers. If
  you want the signal to catch the exceptions and continue to call the other
  receivers you can use `send_robust(..)` instead of `send()`. The return value
  will be a list of tuples containing the receiver and the return or the
  exception raised by the receiver. You will need to check the type of the
  return value to see if it is an exception or not.

  ```python
  await my_signal.send_robust("sender")
  ```



  If you want to contribute to this project, feel free to just fork the project,
  create a dev branch in your fork and then create a pull request (PR). If you
  are unsure about whether your changes really suit the project please create an
  issue first, to talk about this.


pkgId: a7f280e20508ecf137d54bccd27aab8c630a4d6b0c8378542aa6df1a919b8323
name: python-async-simple-salesforce
arch: src
version: 1.12.6a4
epoch: 0
release: 1
summary: Async fork of simple-salesforce
description: The upstream README is located [here](./README.rst)
url: https://pypi.org/project/async-simple-salesforce/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-simple-salesforce-1.12.6a4-1.src.rpm
checksum_type: sha256
rpm_license:
  Copyright 2012 New Organizing Institute Education Fund  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.    Some content based off Restforce 1.0  Copyright (C) 2012 Dave Wingate  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: 0a79a8030f204bfd550d8866827b781a624137dd73b340bd87e801ca04288f44
name: python-async-solipsism
arch: src
version: 0.7
epoch: 0
release: 1
summary: Asyncio event loop that doesn't interact with the outside world
url: https://github.com/bmerry/async-solipsism
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-solipsism-0.7-1.src.rpm
checksum_type: sha256
description:
  async-solipsism provides a Python asyncio event loop that does not interact with
  the outside world at all. This is ideal for writing unit tests that intend to
  mock out real-world interactions. It makes for tests that are reliable
  (unaffected by network outages), reproducible (not affected by random timing
  effects) and portable (run the same everywhere).





  A very handy feature is that time runs infinitely fast! What's more, time
  advances only when explicitly waiting. For example, this code will print out
  two times that are exactly 60s apart, and will take negligible real time to
  run:

  ```python
  print(loop.time())
  await asyncio.sleep(60)
  print(loop.time())
  ```

  This also provides a handy way to ensure that all pending callbacks have a
  chance to run: just sleep for a second.

  The simulated clock has microsecond resolution, independent of whatever
  resolution the system clock has. This helps ensure that tests behave the same
  across operating systems.

  Sometimes buggy code or a buggy test will await an event that will never
  happen. For example, it might wait for data to arrive on a socket, but forget
  to insert data into the other end. If async-solipsism detects that it will
  never wake up again, it will raise a `SleepForeverError` rather than leaving
  your test to hang.



  While real sockets cannot be used, async-solipsism provides mock sockets that
  implement just enough functionality to be used with the event loop. Sockets
  are obtained by calling `async_solipsism.socketpair()`, which returns two
  sockets that are connected to each other. They can then be used with event
  loop functions like `sock_sendall` or `create_connection`.

  Because the socket implementation is minimal, you may run into cases where
  the internals of asyncio try to call methods that aren't implemented. Pull
  requests are welcome.

  Each direction of flow implements a buffer that holds data written to the one
  socket but not yet received by the other. If this buffer fills up, write calls
  will raise `BlockingIOError`, just like a real non-blocking socket. This can
  be used to test that your protocol properly handles flow control. The size of
  these buffers can be changed with the optional `capacity` argument to
  `socketpair`.



  As a convenience, it is possible to open two pairs of streams that are
  connected to each other, with

  ```
  ((reader1, writer1), (reader2, writer2)) = await async_solipsism.stream_pairs()
  ```

  Anything written to `writer1` will be received by `reader2`, and anything
  written to `writer2` will be received by `reader1`.



  It is also possible to use the asyncio functions for starting servers and
  connecting to them. You can supply any host name and port, even if they're not
  actually associated with the machine! For example,

  ```python
  server = await asyncio.start_server(callback, 'test.invalid', 1234)
  reader, writer = await asyncio.open_connection('test.invalid', 1234)
  ```

  will start a server, then open a client connection to it. The `reader` and
  `writer` represent the client end of the connection, and the `callback` will
  be given the server end of the connection.

  The host and port are associated with the event loop, and are remembered until
  the server is closed. Attempting to connect after closing the server, or to an
  address that hasn't been registered, will raise a `ConnectionRefusedError`.

  If you don't want the bother of picking non-colliding ports, you can pass a
  port number of 0, and async-solipsism will bind the first port number above
  60000 that is unused.



  async-solipsism and pytest-asyncio complement each other well: just write a
  custom `event_loop_policy` fixture in your test file or `conftest.py` and it
  will override the default provided by pytest-asyncio:

  ```python
  @pytest.fixture
  def event_loop_policy():
      return async_solipsism.EventLoopPolicy()
  ```

  The above is for pytest-asyncio 0.23+. If you're using an older version, then
  instead you should do this:

  ```python
  @pytest.fixture
  def event_loop():
      loop = async_solipsism.EventLoop()
      yield loop
      loop.close()
  ```



  Unfortunately `aiohappyeyeballs.start_connection` doesn't work out of the box
  because it relies on creating a real socket. I've created a replacement
  `async_solipsism.aiohappyeyeballs_start_connection` that can be used to
  replace it. See the aiohttp section below for example code.



  A little extra work is required to work with aiohttp's test utilities, but it
  is possible. The example below requires at least aiohttp 3.8.0.

  ```python
  import async_solipsism
  import pytest
  from aiohttp import web, test_utils


  @pytest.fixture
  def event_loop_policy():
      return async_solipsism.EventLoopPolicy()


  @pytest.fixture(autouse=True)
  def mock_start_connection(monkeypatch):
      monkeypatch.setattr("aiohappyeyeballs.start_connection",
                          async_solipsism.aiohappyeyeballs_start_connection)


  def socket_factory(host, port, family):
      return async_solipsism.ListenSocket((host, port))


  async def test_integration():
      app = web.Application()
      async with test_utils.TestServer(app, socket_factory=socket_factory) as server:
          async with test_utils.TestClient(server) as client:
              resp = await client.post("/hey", json={})
              assert resp.status == 404
  ```

  Note that this relies on pytest-asyncio (in auto mode) and does not use
  pytest-aiohttp. The fixtures provided by the latter do not support overriding
  the socket factory, although it may be possible to do by monkeypatching. In
  practice you will probably want to define your own fixtures for the client
  and server.



  The requirement to have no interaction with the outside world naturally
  imposes some restrictions. Other restrictions exist purely because I haven't
  gotten around to figuring out what a fake version should look like and
  implementing it. The following are all unsupported:

  - `call_soon_threadsafe`, except when called from the thread running the
    event loop (it just forwards to `call_soon`). Multithreading is
    fundamentally incompatible with the fast-forward clock.
  - `getaddrinfo` and `getnameinfo`
  - `connect_read_pipe` and `connect_write_pipe`
  - signal handlers
  - subprocesses
  - TLS/SSL
  - datagrams (UDP)
  - UNIX domain sockets
  - any Windows-specific features

  `run_in_executor` is supported, but it blocks the event loop while the task
  runs in the executor. This works fine for short-running tasks like reading
  some data from a file, but is not suitable if the task is a long-running one
  such as a sidecar server.

  Calling functions that are not supported will generally raise
  `SolipsismError`.





  - Add a replacement function for `aiohappyeyeballs.start_connection`.



  - Drop support for Python 3.6 and 3.7, which have reached end of life.
  - Add `EventLoopPolicy` to simplify integration with pytest-asyncio 0.23+,
    and use it for the internal tests.
  - Make `Socket.write` and `Socket.recv_into` accept arbitrary buffer-protocol
    objects.
  - Various packaging and developer experience improvements:
    - Put the packaging metadata in pyproject.toml, removing setup.cfg.
    - Pin versions for CI in requirements.txt using pip-compile.
    - Use pre-commit to enforce flake8 and pip-compile.
    - Remove wheel from `build-system.requires` (on setuptools advice).
    - Test against Python 3.11 and 3.12.
    - Run CI workflow against pull requests.



  - Map port 0 to an unused port.



  - Allow `call_soon_threadsafe` from the same thread.
  - Don't warn when `SO_KEEPALIVE` is set on a socket.
  - Update instructions for use with aiohttp.
  - Add a pyproject.toml.



  - Fix `start_server` with an explicit socket.
  - Update README with an example of aiohttp integration.



  - Numerous fixes to make the fake sockets behave more like real ones.
  - Sockets now return IPv6 addresses from `getsockname`.
  - Implement `setsockopt`.
  - Introduce `SolipsismWarning` base class for warnings.



  First release.


pkgId: 04d8ce04e64cb1c9bfc36d96367e2f1bf5f05cd8d5fc7fa557cc5462edee4b0a
name: python-async-sqlserver-lib
arch: src
version: 1.0.3
epoch: 0
release: 1
summary: A Python library for managing asynchronous SQL Server connections.
url: https://github.com/brandaolu94s/async-sqlserver-lib
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-sqlserver-lib-1.0.3-1.src.rpm
checksum_type: sha256
description:
  To install the library, run:
  ```bash
  pip install async-sqlserver-lib
  ```

  If you're using pipenv for dependency management:
  ```bash
  pipenv install async-sqlserver-lib


pkgId: f04e739c9e136c92792248a2b6fa0854391c999da7ae8cb9523928d836e12dec
name: python-async-sqs-consumer
arch: src
version: 0.3.8
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/drestrepom/async_sqs_consumer
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-sqs-consumer-0.3.8-1.src.rpm
checksum_type: sha256
description:
  Python asynchronous (**async** / **await**) worker for consuming messages
  from AWS SQS.

  This is a hobby project, if you find the project interesting
  any contribution is welcome.



  You must create an instance of the worker with the url of the queue.

  Aws credentials are taken from environment variables, you must set the
  following environment variables. Or you can provide a Context object with the
  aws credentials `async_sqs_consumer.types.Context`

  - `AWS_ACCESS_KEY_ID`
  - `AWS_SECRET_ACCESS_KEY`

  Example:

  You can get the queue url with the follow aws cli command
  `aws sqs get-queue-url --queue-name xxxxxx`

  ```python


  from async_sqs_consumer.worker import (
      Worker,
  )

  worker = Worker(
      queue_url="https://sqs.us-east-1.amazonaws.com/xxxxxxx/queue_name"
  )


  @worker.task("report")
  async def report(text: str) -> None:
      print(text)

  if __name__: "__main__":
      worker.start()
  ```

  Now you can initialize the worker `python test_worker.py`

  Now you need to post a message for the worker to process

  ```python
  import json
  import boto3
  import uuid

  client = boto3.client("sqs")

  client.send_message(
      QueueUrl="https://sqs.us-east-1.amazonaws.com/xxxxxxx/queue_name",
      MessageBody=json.dumps(
          {
              "task": "report",
              "id": uuid.uuid4().hex,
              "args": ["hello world"],
          }
      ),
  )
  ```

  Or you can use aioboto3

  ```python
  import asyncio
  import json
  import aioboto3
  import uuid


  async def main() -> None:
      session = aioboto3.Session()
      async with session.client("sqs") as client:
          await client.send_message(
              QueueUrl="https://sqs.us-east-1.amazonaws.com/xxxxxxx/queue_name",
              MessageBody=json.dumps(
                  {
                      "task": "report",
                      "id": uuid.uuid4().hex,
                      "args": ["hello world"],
                  }
              ),
          )


  if __name__ == "__main__":
      asyncio.run(main())
  ```

  To publish the messages they must have the following structure

  ```json
  {
      "type": "object",
      "properties": {
          "task": {"type": "string"},
          "id": {"type": "string"},
          "args": {"type": "array"},
          "kwargs": {"type": "object"},
          "retries": {"type": "number"},
          "eta": {"type": "string"},
          "expires": {"type": "string"},
      },
      "required": ["task", "id"],
  }
  ```


pkgId: 8eb6c84eba0d68fbe1c352752a204bc4762ce283c022135914892a7ea4b1b680
name: python-async-stagger
arch: src
version: 0.4.0.post1
epoch: 0
release: 1
summary: Happy eyeballs and underlying scheduling algorithm in asyncio
url: https://github.com/twisteroidambassador/async_stagger
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-stagger-0.4.0.post1-1.src.rpm
checksum_type: sha256
description:
  To get all the benefits of Happy Eyeballs connection establishment algorithm,
  simply use ``async_stagger.open_connection`` like you would use
  ``asyncio.open_connection``::
      reader, writer = await async_stagger.open_connection('www.example.com', 80)
  Now your connections are more dual-stack friendly and will complete faster!
  A replacement for ``loop.create_connection`` is also provided.


pkgId: 8d6586eae44146a2793b0ccfb8756c1aaf16eea67cfe413bc158342165283394
name: python-async-stripe
arch: src
version: 6.1.0
epoch: 0
release: 1
summary: An asynchronous wrapper around Stripe's official python library.
url: https://github.com/bhch/async-stripe
rpm_license: BSD 3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-stripe-6.1.0-1.src.rpm
checksum_type: sha256
description:
  **/!\ Note:** Since this library monkey-patches the actual `stripe` library,
  you should avoid using the two in the same process.
  Once you import `async_stripe`, the official `stripe` library gets patched with


pkgId: 96ab800599ec42521e644090d0339e67e39581d133ca9b2a8905de30e9f841b0
name: python-async-tinydb
arch: src
version: 1.7.3
epoch: 0
release: 1
summary: Yet Another Async TinyDB
url: https://github.com/VermiIIi0n/async-tinydb
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-tinydb-1.7.3-1.src.rpm
checksum_type: sha256
description:
  <img src="./artwork/logo.png" alt="logo" style="zoom:50%;" />



  An asynchronous version of `TinyDB` with extended capabilities.

  Almost every method is asynchronous. And it's based on `TinyDB 4.7.0+`.

  Unlike `TinyDB` which has a minimal core, `Async-TinyDB` is designed to have max flexibility and performance.



  * **Asynchronous**: Say goodbye to blocking IO. **Don't forget to `await` async methods**!

  * **Drop support**: Only supports Python 3.10+.

  * **`ujson`:** Using `ujson` instead of `json`. Some arguments aren't compatible with `json`[^1]

  * **[Dev-Changes](#dev-changes)**: Changes that only matter to developers (Who customise `Storage`, `Query`, etc).

  * **[Miscellaneous](#misc)**: Differences that only matter in edge cases.



  * **Event Hooks**: You can now use event hooks to hook into an operation. See [Event Hooks](./docs/EventHooks.md) for more details.

  * **Redesigned ID & Doc Class**: You can [replace](#replacing-id-&-document-class) and [customise them](#customise-id-class) easily.

  * **DB-level Caching**: This significantly improves the performance of all operations. However, it may cause dirty reads with some types of storage [^disable-db-level].

  * **Built-in `Modifier`**: Use `Modifier` to easily [compress](./docs/Modifier.md#Compression),  [encrypt](#encryption) and [extend types](./docs/Modifier.md#Conversion) of your database. Sure you can do much more than these. _(See [Modifier](./docs/Modifier.md))_

  * **Isolation Level**: Performance or ACID? It's up to you[^isolevel].

  * **Atomic Write**: Shipped with `JSONStorage`

  * **Batch Search By IDs**: `search` method now takes an extra `doc_ids` argument (works like an additional condition)





  * Minimum: `pip install async-tinydb`
  * Encryption: `pip install async-tinydb[encryption]`
  * Compression: `pip install async-tinydb[compression]`
  * Full: `pip install async-tinydb[all]`



  ```Python
  import asynctinydb
  ```



  Read the [original `TinyDB` documents](https://tinydb.readthedocs.org). Insert an `await` in front of async methods.

  Notice that some codes are still blocking, for example, when calling `len()` on `TinyDB` or `Table` Objects.

  That's it.

  ******



  * [Modifier](./docs/Modifier.md)
  * [Event Hooks](./docs/EventHooks.md)



  **NOTICE: Mixing classes in one table may cause errors!**

  When a table exists in a file, `Async-TinyDB` won't determine its classes by itself, it is your duty to make sure classes are matching.



  * `IncreID`: Default ID class, mimics the behaviours of the original `int` ID but requires much fewer IO operations.
  * `UUID`: Uses `uuid.UUID`[^uuid-version].



  * `Document`: Default document class, uses `dict`under the bonet.

  ```Python
  from asynctinydb import TinyDB, UUID, IncreID, Document

  db = TinyDB("database.db")


  tab = db.table("table1", document_id_class=UUID, document_class=Document)
  ```

  _See [Customisation](#customise-id-class) for more details_



  Currently only supports AES-GCM encryption.

  There are two ways to use encryption:



  ```Python
  from asynctinydb import EncryptedJSONStorage, TinyDB

  async def main():
      db = TinyDB("db.json", key="your key goes here", storage=EncryptedJSONStorage)

  ```



  _See [Encryption](./docs/Modifier.md#Encryption)_



  When operating the TinyDB concurrently, there might be racing conditions.

  Set a higher isolation level to mitigate this problem.

  ```Python
  db.isolevel = 1
  ```

  `isolevel`:

  0. No isolation, best performance.
  1. Serialised(Atomic) CRUD operations. (Also ensures thread safety) (default)
  2. Deepcopy documents on insertion and retrieving. (**CR**UD) (Ensures `Index` & `Query Cache` consistency)





  DB-level caching improves performance dramatically.

  However, this may cause data inconsistency between `Storage` and `TinyDB` if the file that `Storage` referred to is been shared.

  To disable it:

  ```Python
  db = TinyDB("./path", no_dbcache=True)
  ```





  ```Python
  import asyncio
  from asynctinydb import TinyDB, Query

  async def main():
      db = TinyDB('test.json')
      await db.insert({"answer": 42})
      print(await db.search(Query().answer == 42))  # >>> [{'answer': 42}]

  asyncio.run(main())
  ```


  ```Python
  async def main():
      db = TinyDB('test.json')

      @db.storage.on.write.pre
      async def mul(ev: str, s: Storage, data: dict):
          data["_default"]["1"]['answer'] *= 2  # directly manipulate on data

      @db.storage.on.write.post
      async def _print(ev, s, anystr):
        	print(anystr)  # print json dumped string

      await db.insert({"answer": 21})  # insert() will trigger both write events
      await db.close()
      
      db = TinyDB('test.json')
      print(await db.search(Query().answer == 42))  # >>> [{'answer': 42}]
  ```



  Inherit from `BaseID` and implement the following methods, and then you are good to go.

  ```Python
  from asynctinydb import BaseID

  class MyID(BaseID):
    def __init__(self, value: Any):
          """
          You should be able to convert str into MyID instance if you want to use JSONStorage.
          """

      def __str__(self) -> str:
          """
          Optional.
          It should be implemented if you want to use JSONStorage.
          """

      def __hash__(self) -> int:
          ...

      def __eq__(self, other: object) -> bool:
          ...

      @classmethod
      def next_id(cls, table: Table, keys) -> MyID:
          """
          It should return a unique ID.
          """

      @classmethod
      def mark_existed(cls, table: Table, new_id):
          """
          Marks an ID as existing; the same ID shouldn't be generated by next_id.
          """

      @classmethod
      def clear_cache(cls, table: Table):
          """
          Clear cache of existing IDs, if such cache exists.
          """
  ```



  ```Python
  from asynctinydb import BaseDocument

  class MyDoc(BaseDocument):
    """
    I am too lazy to write those necessary methods.
    """
  ```

  Anyways, a BaseDocument class looks like this:

  ```Python
  class BaseDocument(Mapping[IDVar, Any]):
      @property
      @abstractmethod
      def doc_id(self) -> IDVar:
          raise NotImplementedError()

      @doc_id.setter
      def doc_id(self, value: IDVar):
          raise NotImplementedError()
  ```

  Make sure you have implemented all the methods required by  `BaseDocument` class.



  * Storage `closed` property: Original `TinyDB` won't raise exceptions when operating on a closed file. Now the property `closed` of `Storage` classes is required to be implemented[^why-closed][^operating-on-closed].
  * Storage data converting: The responsibility of converting the data to the correct type is transferred to the Storage[^2]
  * `is_cacheable` method in `QueryInstance` is changed to `cacheable` property and will be deprecated.



  * Lazy-load: File loading & dirs creating are delayed to the first IO operation.
  * `CachingMiddleWare`: `WRITE_CACHE_SIZE` is now instance-specific.
    Example: `TinyDB("test.db", storage=CachingMiddleWare(JSONStorage, 1024))`
  * `search` accepts optional `cond`, returns all docs if no arguments are provided
  * `get` and `contains` raises `ValueError` instead of `RuntimeError` when `cond` and `doc_id` are both `None`
  * `LRUCache` stores `tuple`s of ids instead of `list`s of docs
  * `search` and `get` treat `doc_id` and `doc_ids` as extra conditions instead of ignoring conditions when IDs are provided. That is to say, when `cond` and `doc_id(s)` are passed, they return docs satisfies `cond` and is in `doc_id(s)`.



  [^1]: Why not `orjson`? Because `ujson` is fast enough and has more features.
  [^2]: e.g. `JSONStorage` needs to convert the keys to `str` by itself.
  [^UUID-version]:Currently using UUID4
  [^disable-db-level]: See [DB-level caching](#db-level-caching) to learn how to disable this feature if it causes dirty reads.
  [^isolevel]: See [isolevel](#isolation-level)
  [^why-closed]: This is for `Middleware` classes to reliably determine whether the `Storage` is closed, so they can raise `IOError`
  [^operating-on-closed]: An `IOError` should be raised when operating on closed storage.


pkgId: c7212a98c5f727fc414f4a1e57599599471dda767a53cdf8825672a707bbe11c
name: python-async-tio
arch: src
version: 1.3.2
epoch: 0
release: 1
summary: An unoffical API wrapper for tio.run
url: https://github.com/Tom-the-Bomb/async-tio
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-tio-1.3.2-1.src.rpm
checksum_type: sha256
description:
  This is a simple unofficial async Api-wrapper for [tio.run](https://tio.run/#)

  **Installation**
  ```bash
  $ py -m pip install async_tio
  ```
  **Install Latest**
  ```bash
  $ py -m pip install git+https://github.com/Tom-the-Bomb/async-tio.git
  ```
  **Example**

  ```py





  tio = async_tio.Tio() # Optional 'loop' and 'session' kwargs etc. if needed


  output = await tio.execute("print('')", language="python3") # pass in other optional kwargs if needed

  print(str(output)) # the formatted output along with the stats
  print(output.stdout) # the output by itself
  print(int(output)) # returns the exit status




  ```


pkgId: c3b7d22d37dd9b5417dba1029cac1af5ceb04caade3d8d023769c0c3f6748cfc
name: python-async-translate
arch: src
version: 1.1.3
epoch: 0
release: 1
summary: Multi-provider async translate API
url: https://github.com/Memotic/async-translate
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-translate-1.1.3-1.src.rpm
checksum_type: sha256
description:
  Multi-provider async translate API


  Most translate APIs work on one backend (usually Google Translate), and few are fully asynchronous.

  I wanted a translate API that uses `async` and `await`, and I wanted to be able to use multiple providers without having
  to deal with their different APIs.

  I built this to use with my Discord bot, [Mr. Translate](https://docs.mrtranslate.xyz).



  **Currently this uses Python 3.8 specific features.**

  Install with `pip install -U async-translate`.


  A few providers are baked into this package. You can install them with:
  * [Azure Cognitive Services][azure] `pip install -U async-translate[azure]`
  * [Google Translate][google] `pip install -U async-translate[google]`


  See [CUSTOM_PROVIDERS.md](async_translate/providers/CUSTOM_PROVIDERS.md) on making your own providers.

  Feel free to contribute back to the project with a pull request containing code for other providers.

  [azure]: https://azure.microsoft.com/en-us/services/cognitive-services/translator/
  [google]: https://cloud.google.com/translate


pkgId: daf9f6dac57e2797d1d1c17c92de9522a0332d3d0f1ecb08d379aba51ffec79b
name: python-async-unzip
arch: src
version: 0.3.6
epoch: 0
release: 1
url: https://github.com/ueni-ltd/async-unzip
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-unzip-0.3.6-1.src.rpm
checksum_type: sha256
summary:
  Async unzipping to prevent asyncio timeout errors and decrease the memory usage for bigger zip files

description:
  Asynchronous unzipping of big files with low memory usage in Python
  Helps with big zip files unpacking (memory usage + buffer_size could be changed).
  Also, prevents having Asyncio Timeout errors especially in case of many workers using same CPU cores.

  From version 0.3.6 module doesn't require, but expect to have `aiofile` OR `aiofiles` to be installed for I/O operations.
  However, `aiofile` is recommended for linux, just don't forget to install `libaio` (`libaio1`) linux module (e.g., `apt install -y libaio1` for debian)

  ```python
  from async_unzip.unzipper import unzip
  import asyncio

  asyncio.run(unzip('tests/test_files/nvidia_me.zip', path='some_dir'))
  ```


pkgId: 326647ba61ddc7e5318ace9753ceaf90c4e0fa0dff1f171b133a9146ebd1bad7
name: python-async-upnp-client
arch: src
version: 0.41.0
epoch: 0
release: 1
summary: Async UPnP Client
url: https://github.com/StevenLooman/async_upnp_client
rpm_license: Apache 2
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-upnp-client-0.41.0-1.src.rpm
checksum_type: sha256
description:
  Asyncio UPnP Client library for Python/asyncio.
  Written initially for use in `Home Assistant <https://github.com/home-assistant/home-assistant>`_ to drive `DLNA DMR`-capable devices, but useful for other projects as well.


pkgId: b73ff4156633b4d73e4aa2fb746a65731aac524c4e76d9ea56bf95a9c3103268
name: python-async-web-search
arch: src
version: 0.1.3
epoch: 0
release: 1
summary: Async web search library supporting Google, Wikipedia, and arXiv
url: https://github.com/nwaughachukwuma/web-search
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-web-search-0.1.3-1.src.rpm
checksum_type: sha256
description:
  Async web search library supporting Google Custom Search, Wikipedia, and arXiv APIs.



  ```bash
  pip install async-web-search
  ```



  ```python
  from web_search import WebSearch, WebSearchConfig, GoogleSearchConfig

  config = WebSearchConfig(
      sources=["google", "wikipedia"],
      google_config=GoogleSearchConfig(
          api_key="your_api_key",
          cse_id="your_cse_id"
      )
  )

  search = WebSearch(config)
  results = await search.search("quantum computing")
  print(results)
  ```



  - Async/concurrent searching
  - Multiple source support (Google, Wikipedia, arXiv)
  - Content extraction and cleaning
  - Configurable search parameters



  MIT


pkgId: 13acc06fd555966d10485c3684c78744404b0695624d420d64337f890b4dad34
name: python-async-web-search
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: Async web search library supporting Google, Wikipedia, and arXiv
url: https://github.com/nwaughachukwuma/async-web-search
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-web-search-0.2.1-1.src.rpm
checksum_type: sha256
description:
  Async web search library supporting Google Custom Search, Wikipedia, and arXiv APIs.

  > You can search across multiple sources and retrieve relevant, clean, and formatted results efficiently.



  - ⚡ Asynchronous Searching: Perform searches concurrently across multiple sources
  - 🔗 Multi-Source Support: Query Google Custom Search, Wikipedia, and arXiv
  - 🧹 Content extraction and cleaning
  - 🔧 Configurable Search Parameters: Adjust maximum results, preview length, and sources.



  - 🐍 Python 3.8 or newer
  - 🔑 API keys and configuration:
    - Google Search: Requires a Google API key and a Custom Search Engine (CSE) ID.
    - arXiv: No API key required.
    - Wikipedia: No API key required.

  Set environment variables for Google API:

  ```bash
  export GOOGLE_API_KEY="your_google_api_key"
  export CSE_ID="your_cse_id"
  ```



  ```bash
  pip install async-web-search
  ```





  ```python
  from web_search import WebSearch, WebSearchConfig

  config = WebSearchConfig(sources=["google", "arxiv"])
  results = await WebSearch(config).search("quantum computing")

  print(results)
  ```



  ```python
  from web_search import GoogleSearchConfig
  from web_search.google import GoogleSearch

  config = GoogleSearchConfig(
      api_key="your_google_api_key",
      cse_id="your_cse_id",
      max_results=5
  )
  results = await GoogleSearch(config)._search("quantum computing")

  for result in results:
      print(result)
  ```



  ```python
  from web_search import BaseConfig
  from web_search.wikipedia import WikipediaSearch

  wiki_config = BaseConfig(max_results=5, max_preview_chars=500)
  results = await WikipediaSearch(wiki_config)._search("deep learning")

  for result in results:
      print(result)
  ```



  ```python
  from web_search import BaseConfig
  from web_search.arxiv import ArxivSearch

  arxiv_config = BaseConfig(max_results=3, max_preview_chars=800)
  results = await ArxivSearch(arxiv_config)._search("neural networks")

  for result in results:
      print(result)
  ```





  - BaseConfig: Shared configuration for all sources (e.g., max_results, max_preview_chars).
  - GoogleSearchConfig: Google-specific settings (e.g., api_key, cse_id).
  - WebSearchConfig: Configuration for the overall search process (e.g., sources to query).



  - WebSearch: Entry point for performing searches across multiple sources.
  - GoogleSearch: Handles searches via Google Custom Search Engine API.
  - WikipediaSearch: Searches Wikipedia and retrieves article previews.
  - ArxivSearch: Queries arXiv for academic papers.



  - search(query: str): Main search method for WebSearch.
  - \_search(query: str): Source-specific search logic for GoogleSearch, WikipediaSearch, and ArxivSearch.



  We welcome contributions! To contribute:

  - Fork the repository.
  - Create a new branch (git checkout -b feature-name).
  - Commit your changes (git commit -am "Add new feature").
  - Push to the branch (git push origin feature-name).
  - Open a pull request.



  ```bash
  pytest -v
  ```



  MIT


pkgId: 637b1600613584e5425d35a772d28ea561532a14b258fd0380a584a1a1290b75
name: python-async-workflow-runner
arch: src
version: 0.1.1
epoch: 0
release: 1
description: An async workflow toolkit
url: https://pypi.org/project/async-workflow-runner/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-workflow-runner-0.1.1-1.src.rpm
checksum_type: sha256
summary:
  Package for running and tracking workflows asynchronously, with various helper features to make it easier


pkgId: f0eb048c9251dd15335d3fb3ce6a42c496eece49500a81625680557b35adc340
name: python-async-wrapper
arch: src
version: 0.11.1
epoch: 0
release: 1
summary: async wrapper
url: https://pypi.org/project/async-wrapper/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async-wrapper-0.11.1-1.src.rpm
checksum_type: sha256
description:
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Documentation Status](https://readthedocs.org/projects/async-wrapper/badge/?version=latest)](https://async-wrapper.readthedocs.io/en/latest/?badge=latest)
  [![github action](https://github.com/phi-friday/async-wrapper/actions/workflows/check.yaml/badge.svg?event=push&branch=main)](#)
  [![codecov](https://codecov.io/gh/phi-friday/async-wrapper/graph/badge.svg?token=R1RAQ5F0YD)](https://codecov.io/gh/phi-friday/async-wrapper)
  [![PyPI version](https://badge.fury.io/py/async-wrapper.svg)](https://badge.fury.io/py/async-wrapper)
  [![python version](https://img.shields.io/pypi/pyversions/async_wrapper.svg)](#)


  ```shell
  $ pip install async_wrapper
  ```


  ```python
  from __future__ import annotations

  import time

  import anyio

  from async_wrapper import TaskGroupWrapper, toggle_func


  @toggle_func
  async def sample_func() -> int:
      await anyio.sleep(1)
      return 1


  async def sample_func_2(x: int) -> int:
      await anyio.sleep(1)
      return x


  def main():
      result = sample_func()
      assert isinstance(result, int)
      assert result == 1


  async def async_main():
      semaphore = anyio.Semaphore(2)

      start = time.perf_counter()
      async with anyio.create_task_group() as task_group:
          wrapper = TaskGroupWrapper(task_group)
          func = wrapper.wrap(sample_func_2, semaphore)
          value_1 = func(1)
          value_2 = func(2)
          value_3 = func(3)
      end = time.perf_counter()

      assert isinstance(value_1.value, int)
      assert isinstance(value_2.value, int)
      assert isinstance(value_3.value, int)
      assert value_1.value == 1
      assert value_2.value == 2
      assert value_3.value == 3
      assert 1.5 < end - start < 2.5


  if __name__ == "__main__":
      main()
      anyio.run(async_main)
  ```



  MIT, see [LICENSE](https://github.com/phi-friday/async-wrapper/blob/main/LICENSE).

rpm_license:
  MIT License  Copyright (c) 2023-2024 Choi Min-yeong  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: 3056d932c6cc7945e995d5cfb6894dc653ea3cb0fd9a484c9b78bfbdf59774b7
name: python-async8ball
arch: src
version: 2.0.9
epoch: 0
release: 1
summary: Asynchronous 8ball response generator.
url: https://github.com/Cryptex-github/async8ball
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async8ball-2.0.9-1.src.rpm
checksum_type: sha256
description:
  Asynchronous 8ball response generator.
  Example:
  ```py
  import async8ball
  async def your_function():
   response = await async_8ball.response()
  ```
  Deco Example:
  ```py
  from async8ball.decorators import ball_decorator
  @ball_decorator
  def my_function(**kwargs):
    return kwargs['response']
  ```
  Discord.py command implement:
  ```py
  from async8ball.decorators import ball_decorator
  @ball_decorator
  def my_func(question, **kwargs):
    return kwargs['response']
  @bot.command()
  async def my_command(ctx, *, question:str):
    await ctx.send(ball8(question))
  ```
  or
  ```py
  import async8ball
  @bot.command(self, ctx, *, question:str):
   await ctx.send(await async8ball.response(question))
   ```


pkgId: 85bea59936e905f7628eae576512e4a6752794907dcb6452d6e99edf6637c448
name: python-async_generator
arch: src
version: 1.10
epoch: 0
release: 1
summary: Async generators and context managers for Python 3.5+
url: https://github.com/python-trio/async_generator
rpm_license: MIT -or- Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async_generator-1.10-1.src.rpm
checksum_type: sha256
description:
  Python 3.6 added `async generators
  <https://www.python.org/dev/peps/pep-0525/>`__. (What's an async
  generator? `Check out my 5-minute lightning talk demo from PyCon 2016
  <https://youtu.be/PulzIT8KYLk?t=24m30s>`__.) Python 3.7 adds some more
  tools to make them usable, like ``contextlib.asynccontextmanager``.
  This library gives you all that back to Python 3.5.
  For example, this code only works in Python 3.6+:
     async def load_json_lines(stream_reader):
         async for line in stream_reader:
             yield json.loads(line)
  But this code does the same thing, and works on Python 3.5+:
     from async_generator import async_generator, yield_
     @async_generator
     async def load_json_lines(stream_reader):
         async for line in stream_reader:
             await yield_(json.loads(line))
  Or in Python 3.7, you can write:
     from contextlib import asynccontextmanager
     @asynccontextmanager
     async def background_server():
         async with trio.open_nursery() as nursery:
             value = await nursery.start(my_server)
             try:
                 yield value
             finally:
                 
                 nursery.cancel_scope.cancel()
  This is the same, but back to 3.5:
     from async_generator import async_generator, yield_, asynccontextmanager
     @asynccontextmanager
     @async_generator
     async def background_server():
         async with trio.open_nursery() as nursery:
             value = await nursery.start(my_server)
             try:
                 await yield_(value)
             finally:
                 
                 nursery.cancel_scope.cancel()
  (And if you're on 3.6, you can use ``@asynccontextmanager`` with
  native generators.)


pkgId: 7f08ec3f10dff3b6eb526cd454b732a32ba1eed468fbc5d11d809f0143301048
name: python-async_mvg_api
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/async_mvg_api/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async_mvg_api-0.2.4-1.src.rpm
checksum_type: sha256
description:
  An async and sync wrapper for the MVG endpoints, with data validation over pydantic



  between version 0.1.5 and 0.2.0 the api has changed a lot. The api is now split into versions.
  The old api is available under mvg_api.v1 and the new api is available under mvg_api.v2.



  - Sync and async support: You can use this wrapper to make API calls synchronously or asynchronously based on your needs.
    It provides flexibility and allows you to leverage the benefits of both approaches.

  - Pydantic schema validation: The wrapper integrates with Pydantic,
   a powerful data validation and parsing library, to validate API responses against
   predefined schemas. This ensures that the received data conforms to the expected structure
   and types. For every API endpoint, there is a corresponding Pydantic schema that defines the expected structure of the
   response. If the response does not match the schema, an exception is raised. **And you allways know what data you get**.


  Install it over pip or from source by cloning the repository and installing
  the dependencies with [poetry](https://python-poetry.org/).

  ```bash
  pip install async-mvg-api
  ```

  or

  ```bash
  git clone https://github.com/Plutokekz/MVG-Api.git
  cd MVG-Api
  poetry install
  ```


  With the endpoint changes from MVG the api is now split into versions. Currently, there are two versions available.
  The first version is the old api, which is still available and work, but I think in the future it may stop working
  and will be removed.

  The second version is the new api, which is still in beta, should work until MVG changes there endpoints one again.



  ```python
  from mvg_api.v2.mvg import SyncMVG
  mvg = SyncMVG()
  location = mvg.get_location("Hauptbahnhof")
  ```

  ```python
  from mvg_api.v2.mvg import AsyncMVG
  import asyncio
  mvg = AsyncMVG()
  location = asyncio.run(mvg.get_location("Hauptbahnhof"))
  ```

  the location from sync and async should look somthing like this:

  ```python
  LocationList(
      locations=[
          Location(
              globalId='de:09162:6',
              type=<LocationType.STATION: 'STATION'>,
              latitude=48.14003,
              longitude=11.56107,
              divaId=6,
              place='München',
              name='Hauptbahnhof',
              hasZoomData=True,
              tariffZones='m',
              aliases='Hbf München main station central station Muenchen Munchen HU HO HUHO',
              transportTypes=[
                  'UBAHN',
                  'TRAM',
                  'SBAHN'
                  ],
              surroundingPlanLink='HU'
              ),
              ...
          ]
      )
  ```




  ```python
  from mvg_api.v1.mvg import MVG
  mvg = MVG()
  location = mvg.get_location("Hauptbahnhof")
  ```

  ```python
  from mvg_api.v1.mvg import AsyncMVG
  import asyncio
  mvg = AsyncMVG()
  location = asyncio.run(mvg.get_location("Hauptbahnhof"))
  ```

  the location from sync and async should look somthing like this:

  ```python
  LocationList(
      locations=[
          Location(
              globalId='de:09162:6',
              type=<LocationType.STATION: 'STATION'>,
              latitude=48.14003,
              longitude=11.56107,
              divaId=6,
              place='München',
              name='Hauptbahnhof',
              hasZoomData=True,
              tariffZones='m',
              aliases='Hbf München main station central station Muenchen Munchen HU HO HUHO',
              transportTypes=[
                  'UBAHN',
                  'TRAM',
                  'SBAHN'
                  ],
              surroundingPlanLink='HU'
              ),
              ...
          ]
      )
  ```






  ```python
  def get_departures_by_name(self, name: str, **kwargs) -> departure.Departures
  ```

  Get the departures for a given station name, the keyword arguments are the same as in get_departures

  - Parameters:
      - `name`: Name of the Station.
      - `**kwargs`: Keyword arguments for the get_departures method.
  - Returns a `departure.Departures` object representing the Departures information.



  ````python
  def get_connection_by_name(self, start: str, stop: str, start_datetime: Optional[datetime.datetime] = None,
                             date_time_is_arrival: bool = False, **kwargs) -> Connections:
  ````

  Get a connection between two locations by the station or address name, the keyword arguments are the same as in
  get_connection

  - Parameters:
      - `start`: the start location/ address name
      - `stop`: the stop location/ address name
      - `start_datetime`: the start datetime of the connection
      - `date_time_is_arrival`: if the start_datetime is the arrival time
      - `**kwargs`: Keyword arguments for the get_connection method.
  - Returns a `connection.Connections` object representing the connection information.



  ```python
  def get_ticker(self) -> ems.Messages
  ```
  Get ticker messages, updates about the disruptions and planed works on the MVG train network
  There 2 types of messages DISRUPTION and PLANNED
  - Returns a list of ticker messages containing updates about disruptions and planned works on the MVG train network.



  ```python
  def get_station(self, station_id: str) -> station.Station
  ```

  Get a station by its id the Station id can be found in the get_all_stations list, or it can be obtained from a
  location method wenn the found Location is of the type STATION

  - Parameters:
    - `station_id`: The ID of the station.
  - Returns a `station.Station` object representing the station information.



  ```python
  def get_departures(
      self,
      station_id: str,
      *,
      limit: Optional[int] = None,
      offset_minutes: Optional[int] = None,
      transport_types: Optional[Any] = None,
      language: Optional[str] = None,
  ) -> departure.Departures
  ```
  Get the departures for a station
  - Parameters:
    - `station_id`: the same id as in get_station, for example de:09162:6 for Hauptbahnhof, and it can be
          obtained
          from a location method wenn the found Location is of the type STATION or from the get_all_stations method
    - `limit` (optional): The maximum number of departures to return.
    - `offset_minutes` (optional): The offset in minutes from the current time for the departures.
    - `transport_types` (optional): A list of specific transport types to filter the departures (e.g., UBAHN, TRAM, BUS).
    - `language` (optional): the language ? I have no idea why this is here maybe for the language in the response. But I
          didn't see any difference when I changed it
  - Returns a `departure.Departures` object representing the list of departures.



  ```python
  def get_escalators_and_elevators(self, efa_id: int) -> transportdevice.StationTransportDevices
  ```
  Get the escalators and elevators location and status for a station
  - Parameters:
    - `efa_id`: an integer number that is associated with a station. It is included in the Station object but
          under the name of divId for some reason.
  - Returns a `transportdevice.StationTransportDevices` object representing the escalators and elevators at the station.



  ```python
  def get_aushang(self, plan_id: str) -> aushang.Aushaenge
  ```
  Get the aushang for a station, get all Playn that a currently active in a stations blackboard.
  - Parameters:
    - `plan_id`: I am not sure bit it seems to be the first 2 letters of the station name in uppercase.
           For example KA for Karlsplatz
  - Returns a `aushang.Aushaenge` object representing the aushang (playn) currently active at the station.



  ```python
  def get_station_ids(self) -> List[str]
  ```
  Get all the station ids
  - Returns a list of all station IDs available.



  ```python
  def get_location(
      self,
      query: str,
      limit_address_poi: Optional[int] = None,
      limit_stations: Optional[int] = None,
      location_types: Optional[List[LocationType]] = None,
  ) -> location.Locations
  ```
  Get the location of a query, it can be a station name or a street name or a POI
  - Parameters:
    - `query`: The address, station name, or POI name to search for.
    - `limit_address_poi` (optional): Limit the number of addresses or POIs to return.
    - `limit_stations` (optional): Limit the number of stations to return.
    - `location_types` (optional): Limit the location types to return (e.g., STATION, POI, ADDRESS).
  - Returns a `location.Locations` object representing the list of locations.



  ```python
  def get_messages(self, message_type: Optional[str] = None) -> messages.Messages
  ```
  Get the messages from the message board. Somehow similar to the ems ticker but it has more and different
  information.

  - Parameters:
    - `message_type` (optional): The type of message to retrieve (e.g., INCIDENT, SCHEDULE_CHANGE).
  - Returns a `messages.Messages` object representing the list of messages from the message board.



  ```python
  def get_connection(
      self,
      origin_station_id: str,
      destination_station_id: str,
      routing_date_time: str,
      *,
      routing_date_time_is_arrival: bool,
      transport_types: Optional[str] = None,
      origin_latitude: Optional[float] = None,
      origin_longitude: Optional[float] = None,
      destination_latitude: Optional[float] = None,
      destination_longitude: Optional[float] = None,
  ) -> connection.Connections
  ```
  Get the connections between two stations or coordinates.
  You can use either station_id to station_id or coordinates to coordinates or station_id to coordinates.
  - Parameters:
    - `origin_station_id`: The ID of the origin station.
    - `destination_station_id`: The ID of the destination station.
    - `routing_date_time`: The date and time of the departure or arrival.
    - `routing_date_time_is_arrival`: Specifies if `routing_date_time` is the arrival time.
    - `transport_types` (optional): the transport types to use, available types are SCHIFF,RUFTAXI,BAHN,UBAHN,TRAM,SBAHN,BUS
          ,REGIONAL_BUS
    - `origin_latitude` (optional): The latitude of the origin station.
    - `origin_longitude` (optional): The longitude of the origin station.
    - `destination_latitude` (optional): The latitude of the destination station.
    - `destination_longitude` (optional): The longitude of the destination station.
  - Returns a `connection.Connections` object representing the list of connections between the origin and destination.



  ```python
  def get_lineinfo(self, language: Optional[str]) -> lineinfo.Infos
  ```
  Get the line info for some wired special lines like "lufthanse express bus"
  - Parameters:
    - `language` (optional):  here the language argument also makes no difference in the response output.
  - Returns a `lineinfo.Infos` object representing the line information for special lines.



  ```python
  def get_stations(
      self, hash_: Optional[str] = None, world: Optional[bool] = None
  ) -> stations.Locations
  ```
  Get all the stations, like get_station_ids but with the hole station information.
  - Parameters:
    - `hash_` (optional):I don't know for what this hash is. (In the response is a hash, but if you send it again you get
          no response, so keep it empty)
    - `world` (optional): you can set the world to true or false. Maybe some day the MVG is operating worldwide.
  - Returns a `stations.Locations` object representing the list of stations.



  ```python
  def get_lines(self) -> line.Lines
  ```
  Get all the lines
  - Returns a `line.Lines` object representing the list of lines.



  ```python
  def get_zoom_station(self, div_id: int) -> zoom_station.ZoomStation
  ```
  Get information about the availability TransportDevices at a station. Like elevators, escalators, etc.
  The information if similar to the information you get from the get_escalators_and_elevators
  - Parameters:
    - `div_id`: An internal number associated with a station.
  - Returns a `zoom_station.ZoomStation` object representing information about the availability of transport devices at a station.



  ```python
  def get_plan(self, div_id: int) -> bytes
  ```
  Get the plan of a station. The response is a pdf file in bytes.
  - Parameters:
    - `div_id`: An internal number associated with a station.
  - Returns the plan of a station as a byte array (PDF format).



  ```python
  def get_zoom_station_out_of_order(self, div_id: int) -> out_of_order.StationOutOfOrder
  ```
  Get the information about the availability of TransportDevices at a station. Like elevators, escalators, etc.
  - Parameters:
    - `div_id`: An internal number associated with a station.
  - Returns a `out_of_order.StationOutOfOrder

  object representing the information about the availability of transport devices at a station.



  ```python
  def get_vehicles_in_bounding_box(
      self, bbswlat: float, bbswlng: float, bbnelat: float, bbnelng: float
  ) -> vehicel.VehiclesAndSharingStations
  ```
  Get the vehicles and sharing stations in a bounding box. The bounding box is defined by two coordinates.
  - Parameters:
    - `bbswlat`: The latitude of the bounding box's southwest corner.
    - `bbswlng`: The longitude of the bounding box's southwest corner.
    - `bbnelat`: The latitude of the bounding box's northeast corner.
    - `bbnelng`: The longitude of the bounding box's northeast corner.
  - Returns a `vehicel.VehiclesAndSharingStations` object representing the vehicles and sharing stations within the specified bounding box.



  ```python
  def get_surrounding_plan(
      self, plan_id: str, world: bool = True, include_image_data: bool = True
  ) -> surounding_plans.Plan
  ```
  Get the surrounding plan of a station. If you include the image data you get a base64 encoded pdf of the plan.
          So you have to decode it first.
  - Parameters:
    - `plan_id`: the first 2 letters of the station name in uppercase. For example "KA" for Karlsplatz
    - `world` (optional): again a world argument, but it makes no difference in the response output.
    - `include_image_data` (optional): A boolean value specifying if the response should include the image data of the plan.
  - Returns a `surounding_plans.Plan` object representing the surrounding plan of a station.



  ```python
  def get_surrounding_plans(self, world: Optional[bool] = True) -> surounding_plans.Plans
  ```
  Get the surrounding plan of a station. If you include the image data you get a base64 encoded pdf of the plan.
  So you have to decode it first.
  - Parameters:
    - `world` (optional): again a world argument, but it makes no difference in the response output.
  - Returns a `surounding_plans.Plans` object representing the list of surrounding plans for all stations.




  ```bash
  poetry run pytest mvg_api/v1/tests/api_tests.py mvg_api/v2/tests/api_tests.py
  ```


  For Endpoint Information and Code snippets
  * https://github.com/leftshift/python_mvg_api
  * https://www.mvg.de/



  Unsere Systeme dienen der direkten Kundeninteraktion. Die Verarbeitung unserer Inhalte oder Daten durch Dritte erfordert unsere ausdrückliche Zustimmung. Für private, nicht-kommerzielle Zwecke, wird eine gemäßigte Nutzung ohne unsere ausdrückliche Zustimmung geduldet. Jegliche Form von Data-Mining stellt keine gemäßigte Nutzung dar. Wir behalten uns vor, die Duldung grundsätzlich oder in Einzelfällen zu widerrufen. Fragen richten Sie bitte gerne an: redaktion@mvg.de.

  In other words: Private, noncommercial, moderate use of the API is tolerated.
  They do not consider data mining as a moderate use.

  (Disclaimer: I am not a lawyer, this is not legal advice)


pkgId: 3e2f4d33638656aa84d204cba9c6d41ad977cdf262a59da3fa5698c0bcfb74d7
name: python-async_storages
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: Simple filesytem abstraction for async Python
url: https://github.com/alex-oleshkevich/async_storages
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-async_storages-0.7.0-1.src.rpm
checksum_type: sha256
description:
  Async file storages for Python

  ![PyPI](https://img.shields.io/pypi/v/async_storages)
  ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/alex-oleshkevich/async_storages/Lint)
  ![GitHub](https://img.shields.io/github/license/alex-oleshkevich/async_storages)
  ![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/pypi/async_storages)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/async_storages)
  ![GitHub Release Date](https://img.shields.io/github/release-date/alex-oleshkevich/async_storages)



  Install `async_storages` using PIP or poetry:

  ```bash
  pip install async_storages

  poetry add async_storages
  ```



  - simple abstraction over local filesystem, s3, or memory driver
  - S3 integration
  - Spooled In-memory driver for unit tests



  See example application in [examples/](examples/) directory of this repository.


pkgId: c45ba1fa83e48386290937a26b78d44733823f1b9cfecf054a1d31fec6b74142
name: python-asyncakinator
arch: src
version: 1.7
epoch: 0
release: 1
summary: An async API wrapper for Akinator, written in Python.
url: https://pypi.org/project/asyncakinator/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncakinator-1.7-1.src.rpm
checksum_type: sha256
description:
  An async API wrapper for the online game, Akinator, written in Python.
  `Akinator <https://en.akinator.com/>`_ is a web-based game which tries to determine what character you are thinking of by asking a series of questions.


pkgId: 2a9d7b6ad241609642fb65c1dc469ee2bff17ca4535411039c736b8c554268c3
name: python-asyncapi-python
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: Easily generate type-safe and async Python applications from AsyncAPI 3 specifications.
url: https://pypi.org/project/asyncapi-python/
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncapi-python-0.1.1-1.src.rpm
checksum_type: sha256
description:
  [Link to this github repository](https://github.com/G-USI/asyncapi-python)

  Easily generate type-safe and async Python applications from AsyncAPI 3 specifications.



  - [x] Creates `Application` class from [AsyncAPI 3](https://asyncapi.com) specifications, implementing every operation in the file
  - [x] Generates typed Python code (messages are generated using [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator))
  - [x] Performs dynamic validation of messages with [Pydantic 2](https://docs.pydantic.dev/latest/)
  - [x] Enforces the user code to implement all consumer methods as described by spec
  - [x] Provides async code
  - [x] Spec parser references other files through absolute or relative paths
  - [ ] Spec parser references other files through url
  - [x] Supports request-reply pattern
  - [x] Supports publish-subscribe pattern
  - [ ] AsyncAPI trait support
  - [ ] Customizable message encoder/decoder



  - `python>=3.10`
  - `pydantic>=2`
  - `pytz`
  - For `codegen` extra
    - `jinja2`
    - `typer`
    - `datamodel-code-generator`
    - `pyyaml`
  - For `amqp` extra
    - `aio-pika`



  For code generation (development env), run:

  ```bash
  pip install asyncapi-python[codegen]
  ```

  For runtime, run:

  ```bash
  pip install asyncapi-python[amqp]
  ```

  You can replace `amqp` with any other supported protocols. For more info, see [Supported Protocols](#supported-protocols--use-cases) section.



  Below, you may see the table of protocols and the supported use cases. The tick signs (✅) contain links to the examples for each implemented protocol-use case pair, while the hammer signs (🔨) contain links to the Issues tracking the progress for protocol-use case pairs. The list of protocols and use cases is expected to increase over the progress of development.

  | Use Case   | AMQP                                             |
  | ---------- | ------------------------------------------------ |
  | Pub-Sub    | [✅ amqp-pub-sub](./examples/amqp-pub-sub)            |
  | Work Queue | [✅ amqp-work-queue](./examples/amqp-work-queue) |
  | RPC        | [✅ amqp-rpc](./examples/amqp-rpc)               |



  Although there's no documentation available at the moment, a set of comprehensive examples with comments for each implemented use-case is under the [examples](./examples/) directory.



  Contributions are welcome! Please feel free to open an Issue or submit a Pull Request.



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


pkgId: d5d05795c9fc218b41a3a6a0a3b72cdf116697f6f56041c32eeeeb941fd53776
name: python-asyncari
arch: src
version: 0.10.16
epoch: 0
release: 1
summary: A AnyIO-ified adapter for the Asterisk ARI interface
url: https://github.com/M-o-a-T/asyncari
rpm_license: MIT -or- Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncari-0.10.16-1.src.rpm
checksum_type: sha256
description:
  Welcome to `asyncari <https://github.com/M-o-a-T/asyncari>`__!
  AsyncARI is an AnyIO-ified adapter for the Asterisk ARI interface.
  License: Your choice of MIT or Apache License 2.0


pkgId: 09aa91a7fc26b43c2dd60c09a589e64ac951c5133b9d4a76625357ce0be8ca62
name: python-asyncbg
arch: src
version: 0.12.0
epoch: 0
release: 1
summary: Asyncio background tasks.
url: https://github.com/eerimoq/asyncbg
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncbg-0.12.0-1.src.rpm
checksum_type: sha256
description:
  Asyncio background tasks in Python 3.7 and later.
  Run CPU intensive long running tasks without blocking the asyncio
  loop, implemented as a lightweight asyncio layer on top of the
  multiprocessing module.
  Alternatively run tasks in other threads.
  Project homepage: https://github.com/eerimoq/asyncbg
  Documentation: https://asyncbg.readthedocs.org/en/latest


pkgId: b047bd4fa67ef3f5cc8fe54aec99464052e6c6b80491cf756897935941d91dcb
name: python-asynccmd
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: Asyncio implementation of Cmd Python lib.
url: https://github.com/valentinmk/asynccmd
rpm_license: Apache 2
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asynccmd-0.2.4-1.src.rpm
checksum_type: sha256
description:
  Async implementation of Cmd Python lib.
  Asynccmd is a library to build command line interface for you asyncio
  project.
  It's very simple like original Cmd lib
  https://docs.python.org/3.6/library/cmd.html.
  The mechanic is very similar. You have Cmd superclass, you can override
  class method and add yours own.


pkgId: cbebcdac77955cece9e1734719dc297d441e79ec1fe3ca0c41074475cd8c9b0f
name: python-asyncdrive
arch: src
version: 1.2.4
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/Fliqqr/asyncdrive
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncdrive-1.2.4-1.src.rpm
checksum_type: sha256
description:
  A simple wrapper around the Google Drive REST API v3,
  supports service accounts only, use at your own discretion.

  :copyright: (c) 2020 Fliqqr
  :license: MIT


pkgId: d6d633c0e31276a54e8a9436bc4c9b6f895167a2ddb7311a6d75f8dfdb0fd3a3
name: python-asyncfakeyou
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: An asynchronous library for interacting with the FakeYou Text-to-Speech API.
url: https://github.com/NickV1v/AsyncFakeYou
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncfakeyou-0.1.0-1.src.rpm
checksum_type: sha256
description:
  AsyncFakeYou is an asynchronous Python library for interacting with the [FakeYou](https://fakeyou.com) Text-to-Speech API. It allows you to submit TTS requests, track their status, and download the resulting audio files, all in an asynchronous manner using asyncio, aiohttp and aiofiles.


  * Asynchronous requests to [FakeYou](https://fakeyou.com) TTS API.
  * Generation with parallel execution control
  * Handle user authentication with session cookies


  ```
  pip install asyncfakeyou
  ```

  You can obtain a direct URL to the generated audio file.

  ```python
  from src.asyncfakeyou import AsyncAudioGen
  import asyncio


  async def text_to_speech():
      gen = AsyncAudioGen(cookies="your_cookie_string")
      audio_url = await gen.fetch_audio("model_token_here", "sample_text")
      print(audio_url)


  asyncio.run(text_to_speech())
  ```
  Or you can download the generated audio file to a specified directory.

  ```python
  from src.asyncfakeyou import AsyncAudioGen
  import asyncio


  async def text_to_speech():
      gen = AsyncAudioGen(cookies="your_cookie_string")
      audio_url = await gen.fetch_and_save_audio("model_token_here", "sample_text",
                                                 output_path="./audio",
                                                 filename="generated_audio.wav")
      print(audio_url)


  asyncio.run(text_to_speech())
  ```

  The `cookies` parameter of the `AsyncAudioGen` class is optional. However, I recommend setting it as it will give you higher queue priority, even without a paid subscription. If you have a premium account, you will be able to take advantage of all its benefits through this API.

  ```python
  from src.asyncfakeyou import receive_cookies
  import asyncio


  async def get_my_cookies():
      cookies = await receive_cookies("your_username_or_email", "your_password")
      print(cookies)


  asyncio.run(get_my_cookies())
  ```

  If you need to generate multiple audio files, you can speed up the process by using `fetch_tasks` and `fetch_and_save_tasks`. These methods handle a fixed number of tasks in parallel (`concurrent_tasks` parameter) and automatically retry failed requests. The default value for `concurrent_tasks` is 3, but you can tweak this parameter.

  You can iterate through the direct URLs to the generated audio files.

  ```python
  from src.asyncfakeyou import AsyncAudioGen
  import asyncio


  async def multiple_text_to_speech():
      gen = AsyncAudioGen(cookies="your_cookie_string")
      audio_tasks = [
          ("model_token_1", "sample_text_1"),
          ("model_token_2", "sample_text_2"),
          ("model_token_3", "sample_text_3")
      ]
      async for audio_url in gen.fetch_tasks(audio_tasks):
          print(audio_url)


  asyncio.run(execute_tasks())
  ```
  Or you can download the generated audio files to a specified directory.

  ```python
  from src.asyncfakeyou import AsyncAudioGen
  import asyncio


  async def multiple_text_to_speech():
      gen = AsyncAudioGen(cookies="your_cookie_string")
      audio_tasks = [
          ("model_token_1", "sample_text_1", "filename1.wav"),
          ("model_token_2", "sample_text_2", "filename2.wav"),
          ("model_token_3", "sample_text_3", "filename3.wav")
      ]
      await gen.fetch_and_save_tasks(audio_tasks, output_path="./audio")


  asyncio.run(execute_tasks())
  ```

  Contributions are welcome! Please fork the repository and create a pull request with your improvements.


pkgId: 06e8c19f838b6f54a904d80ff4adf42ec203cae6a4d19d3775ba2600407023ff
name: python-asyncfakeyou
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: An asynchronous library for interacting with the FakeYou Text-to-Speech API.
url: https://github.com/NickV1v/AsyncFakeYou
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncfakeyou-0.1.2-1.src.rpm
checksum_type: sha256
description:
  AsyncFakeYou is an asynchronous Python library for interacting with the [FakeYou](https://fakeyou.com) Text-to-Speech API. It allows you to submit TTS requests, track their status, and download the resulting audio files, all in an asynchronous manner using asyncio, aiohttp and aiofiles.


  * Asynchronous requests to [FakeYou](https://fakeyou.com) TTS API.
  * Generation with parallel execution control
  * Handle user authentication with session cookies


  ```
  pip install asyncfakeyou
  ```

  You can obtain a direct URL to the generated audio file.

  ```python
  from asyncfakeyou import AsyncAudioGen
  import asyncio


  async def text_to_speech():
      gen = AsyncAudioGen(cookies="your_cookie_string")
      audio_url = await gen.fetch_audio("model_token_here", "sample_text")
      print(audio_url)


  asyncio.run(text_to_speech())
  ```
  Or you can download the generated audio file to a specified directory.

  ```python
  from asyncfakeyou import AsyncAudioGen
  import asyncio


  async def text_to_speech():
      gen = AsyncAudioGen(cookies="your_cookie_string")
      audio_url = await gen.fetch_and_save_audio("model_token_here", "sample_text",
                                                 output_path="./audio",
                                                 filename="generated_audio.wav")
      print(audio_url)


  asyncio.run(text_to_speech())
  ```



  The `cookies` parameter of the `AsyncAudioGen` class is optional. However, I recommend setting it as it will give you higher queue priority, even without a paid subscription. If you have a premium account, you will be able to take advantage of all its benefits through this API.

  ```python
  from asyncfakeyou import receive_cookies
  import asyncio


  async def get_my_cookies():
      cookies = await receive_cookies("your_username_or_email", "your_password")
      print(cookies)


  asyncio.run(get_my_cookies())
  ```


  If you need to generate multiple audio files, you can speed up the process by using `fetch_tasks` and `fetch_and_save_tasks`. These methods handle a fixed number of tasks in parallel (`concurrent_tasks` parameter) and automatically retry failed requests. The default value for `concurrent_tasks` is 3, but you can tweak this parameter.

  You can iterate through the direct URLs to the generated audio files.

  ```python
  from asyncfakeyou import AsyncAudioGen
  import asyncio


  async def multiple_text_to_speech():
      gen = AsyncAudioGen(cookies="your_cookie_string")
      audio_tasks = [
          ("model_token_1", "sample_text_1"),
          ("model_token_2", "sample_text_2"),
          ("model_token_3", "sample_text_3")
      ]
      async for audio_url in gen.fetch_tasks(audio_tasks):
          print(audio_url)


  asyncio.run(multiple_text_to_speech())
  ```
  Or you can download the generated audio files to a specified directory.

  ```python
  from asyncfakeyou import AsyncAudioGen
  import asyncio


  async def multiple_text_to_speech():
      gen = AsyncAudioGen(cookies="your_cookie_string")
      audio_tasks = [
          ("model_token_1", "sample_text_1", "filename1.wav"),
          ("model_token_2", "sample_text_2", "filename2.wav"),
          ("model_token_3", "sample_text_3", "filename3.wav")
      ]
      await gen.fetch_and_save_tasks(audio_tasks, output_path="./audio")


  asyncio.run(multiple_text_to_speech())
  ```

  Contributions are welcome! Please fork the repository and create a pull request with your improvements.


pkgId: f7104d965518a4c07bcdec168df6bda8560b3957756cb8cdd08c6c78f683d08a
name: python-asyncfix
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: AsyncIO FIX Protocol client for Python
url: https://github.com/alexveden/asyncfix
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncfix-1.0.1-1.src.rpm
checksum_type: sha256
description:
  ![tests](https://github.com/alexveden/asyncfix/actions/workflows/build.yml/badge.svg)
  ![coverage](https://github.com/alexveden/asyncfix/blob/main/.github/coverage.svg)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  AsyncIO FIX protocol library for Python



  - Pythonic way of dealing with FIX messages
  - Schema validation
  - Tools for unit testing client apps
  - NewOrderSingle container / state management support
  - Session management included (FIX journaling, session restoring, heartbeats, resets)
  - FIX Tester - tool for FIX unit testing (schema validation, order management, protocol
  message exchange)
  - FIX 4.4 protocol implemented
  - 100% unit test code coverage


  ```
  pip install asyncfix
  ```


  * [Simple snippets](https://alexveden.github.io/asyncfix/examples/)
  * [Client example](https://github.com/alexveden/asyncfix/tree/main/examples/client_example.py)
  * [Full Documentation](https://alexveden.github.io/asyncfix/)


  This project initially intended to be a fork of [AIOPyFIX](https://github.com/maxtwen/AIOPyFix),
  but things went too deep and too far. Hopefully, this project could help. Please, star this repo
  if you are going to use this project.


  MIT 2023 Aleksandr Vedeneev


pkgId: e5cb3ac8515a348cca97fa31650a1eeaef731bd359f0fa240cf0b15db9971050
name: python-asyncgui
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: A thin layer that helps to wrap a callback-style API in an async/await-style API
url: https://github.com/asyncgui/asyncgui
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncgui-0.7.0-1.src.rpm
checksum_type: sha256
description:
  A thin layer that helps to wrap a callback-style API in an async/await-style API.

  An async library that focuses on fast reaction.

  [Documentation](https://asyncgui.github.io/asyncgui/)



  Pin the minor version.

  ```text
  poetry add asyncgui@~0.7
  pip install "asyncgui>=0.7,<0.8"
  ```



  - CPython 3.9
  - CPython 3.10
  - CPython 3.11
  - CPython 3.12 (3.12.1 or later)



  - [asynckivy](https://github.com/asyncgui/asynckivy)
  - [asynctkinter](https://github.com/asyncgui/asynctkinter)
  - [asyncpygame](https://github.com/asyncgui/asyncpygame)


pkgId: 5f983ef60418d98de318c65dc44bf2f5c6b3c5654893605b8029b0409ae1848e
name: python-asyncgui
arch: src
version: 0.7.1
epoch: 0
release: 1
summary: A minimalistic async library that focuses on fast responsiveness
url: https://github.com/asyncgui/asyncgui
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncgui-0.7.1-1.src.rpm
checksum_type: sha256
description:
  ...is a minimalistic async library that:

  - does not provide features involving system calls, such as I/O, time retrieval, thread suspension, or thread spawning.
  - has no external dependencies when using Python 3.11 or later.
  - does not own a main loop, but is designed to integrate with an existing one.
  - avoids global state.
  - focuses on fast responsiveness, allowing immediate task start and resumption.
  - offers powerful structured concurrency APIs inspired by [Trio](https://trio.readthedocs.io/en/stable/) and [trio-util](https://trio-util.readthedocs.io/en/latest/).
  - has nothing to do with GUIs, even though it has 'gui' in its name. (Yes, I should rename it at some point.)

  [Documentation](https://asyncgui.github.io/asyncgui/)



  Pin the minor version.

  ```text
  poetry add asyncgui@~0.7
  pip install "asyncgui>=0.7,<0.8"
  ```



  - CPython 3.9
  - CPython 3.10
  - CPython 3.11
  - CPython 3.12 (3.12.1 or later)
  - CPython 3.13
  - PyPy 3.10



  - [asynckivy](https://github.com/asyncgui/asynckivy)
  - [asynctkinter](https://github.com/asyncgui/asynctkinter)
  - [asyncpygame](https://github.com/asyncgui/asyncpygame)


pkgId: f5979eb07a4f890961ed0e58c90fbd9d60b2622f92d88811358887dd03d1a4a6
name: python-asyncgui-ext-clock
arch: src
version: 0.5.1
epoch: 0
release: 1
summary: An event scheduler for asyncgui programs
url: https://github.com/asyncgui/asyncgui-ext-clock
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncgui-ext-clock-0.5.1-1.src.rpm
checksum_type: sha256
description:
  *Event scheduler designed for asyncgui programs.*

  ```python
  import asyncgui
  from asyncgui_ext.clock import Clock

  clock = Clock()

  async def async_fn():
      await clock.sleep(20)  # Waits for 20 time units
      print("Hello")

  asyncgui.start(async_fn())
  clock.tick(10)  # Advances the clock by 10 time units.
  clock.tick(10)  # Total of 20 time units. The task above will wake up, and prints 'Hello'.
  ```

  The example above effectively illustrate how this module works but it's not practical.
  In a real-world program, you probably want to call ``clock.tick()`` in a loop or schedule it to be called repeatedly using another scheduling API.
  For example, if you are using `PyGame`, you may want to do:

  ```python
  pygame_clock = pygame.time.Clock()
  clock = asyncgui_ext.clock.Clock()


  while running:
      ...

      dt = pygame_clock.tick(fps)
      clock.tick(dt)
  ```

  And if you are using `Kivy`, you may want to do:

  ```python
  from kivy.clock import Clock

  clock = asyncui_ext.clock.Clock()
  Clock.schedule_interval(clock.tick, 0)
  ```



  Pin the minor version.

  ```
  poetry add asyncgui-ext-clock@~0.5
  pip install "asyncgui-ext-clock>=0.5,<0.6"
  ```



  - CPython 3.10
  - CPython 3.11
  - CPython 3.12



  - [YouTube Demo](https://youtu.be/kPVzO8fF0yg) (with Kivy)


pkgId: 49afd48870364666373649b8047e941c31f26add839d5ec58e03d649a7458c64
name: python-asyncgui-ext-clock
arch: src
version: 0.5.2
epoch: 0
release: 1
summary: An event scheduler for asyncgui programs
url: https://github.com/asyncgui/asyncgui-ext-clock
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncgui-ext-clock-0.5.2-1.src.rpm
checksum_type: sha256
description:
  *Event scheduler designed for asyncgui programs.*

  ```python
  import asyncgui
  from asyncgui_ext.clock import Clock

  clock = Clock()

  async def async_fn():
      await clock.sleep(20)  # Waits for 20 time units
      print("Hello")

  asyncgui.start(async_fn())
  clock.tick(10)  # Advances the clock by 10 time units.
  clock.tick(10)  # Total of 20 time units. The task above will wake up, and prints 'Hello'.
  ```

  The example above effectively illustrate how this module works but it's not practical.
  In a real-world program, you probably want to call ``clock.tick()`` in a loop or schedule it to be called repeatedly using another scheduling API.
  For example, if you are using `PyGame`, you may want to do:

  ```python
  pygame_clock = pygame.time.Clock()
  clock = asyncgui_ext.clock.Clock()


  while running:
      ...

      dt = pygame_clock.tick(fps)
      clock.tick(dt)
  ```

  And if you are using `Kivy`, you may want to do:

  ```python
  from kivy.clock import Clock

  clock = asyncui_ext.clock.Clock()
  Clock.schedule_interval(clock.tick, 0)
  ```



  Pin the minor version.

  ```
  poetry add asyncgui-ext-clock@~0.5
  pip install "asyncgui-ext-clock>=0.5,<0.6"
  ```



  - CPython 3.10
  - CPython 3.11
  - CPython 3.12
  - CPython 3.13
  - PyPy 3.10



  - [YouTube Demo](https://youtu.be/kPVzO8fF0yg) (with Kivy)


pkgId: 94430da524485febef28e8d25562f2966e45fbd6203ab4efda730a316f55364d
name: python-asynch
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: A asyncio driver for ClickHouse with native tcp protocol
url: https://github.com/long2ice/asynch
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asynch-0.2.4-1.src.rpm
checksum_type: sha256
description:
  ![pypi](https://img.shields.io/pypi/v/asynch.svg?style=flat)
  ![license](https://img.shields.io/github/license/long2ice/asynch)
  ![workflows](https://github.com/long2ice/asynch/workflows/pypi/badge.svg)
  ![workflows](https://github.com/long2ice/asynch/workflows/ci/badge.svg)



  `asynch` is an asyncio ClickHouse Python Driver with native (TCP) interface support, which reuse most of [clickhouse-driver](https://github.com/mymarilyn/clickhouse-driver) and comply with [PEP249](https://www.python.org/dev/peps/pep-0249/).



  ```shell
  > pip install asynch
  ```

  or if you want to install [`clickhouse-cityhash`](https://pypi.org/project/clickhouse-cityhash/) to enable
  transport compression

  ```shell
  > pip install asynch[compression]
  ```



  Connect to ClickHouse

  ```python
  from asynch import connect

  async def connect_database():
      conn = await connect(
          host = "127.0.0.1",
          port = 9000,
          database = "default",
          user = "default",
          password = "",
      )
  ```

  Create table by sql

  ```python
  async def create_table():
      async with conn.cursor(cursor=DictCursor) as cursor:
          await cursor.execute('create database if not exists test')
          await cursor.execute("""
          CREATE TABLE if not exists test.asynch
              (
                  `id`       Int32,
                  `decimal`  Decimal(10, 2),
                  `date`     Date,
                  `datetime` DateTime,
                  `float`    Float32,
                  `uuid`     UUID,
                  `string`   String,
                  `ipv4`     IPv4,
                  `ipv6`     IPv6

              )
              ENGINE = MergeTree
                  ORDER BY id"""
          )
  ```

  Use `fetchone`

  ```python
  async def fetchone():
      async with conn.cursor() as cursor:
          await cursor.execute("SELECT 1")
          ret = await cursor.fetchone()
          assert ret == (1,)
  ```

  Use `fetchmany`

  ```python
  async def fetchall():
      async with conn.cursor() as cursor:
          await cursor.execute("SELECT 1")
          ret = await cursor.fetchall()
          assert ret == [(1,)]
  ```

  Use `DictCursor` to get result with dict

  ```python
  async def dict_cursor():
      async with conn.cursor(cursor=DictCursor) as cursor:
          await cursor.execute("SELECT 1")
          ret = await cursor.fetchall()
          assert ret == [{"1": 1}]
  ```

  Insert data with dict

  ```python
  from asynch.cursors import DictCursor

  async def insert_dict():
      async with conn.cursor(cursor=DictCursor) as cursor:
          ret = await cursor.execute(
              """INSERT INTO test.asynch(id,decimal,date,datetime,float,uuid,string,ipv4,ipv6) VALUES""",
              [
                  {
                      "id": 1,
                      "decimal": 1,
                      "date": "2020-08-08",
                      "datetime": "2020-08-08 00:00:00",
                      "float": 1,
                      "uuid": "59e182c4-545d-4f30-8b32-cefea2d0d5ba",
                      "string": "1",
                      "ipv4": "0.0.0.0",
                      "ipv6": "::",
                  }
              ],
          )
          assert ret == 1
  ```

  Insert data with tuple

  ```python
  async def insert_tuple():
      async with conn.cursor(cursor=DictCursor) as cursor:
          ret = await cursor.execute(
              """INSERT INTO test.asynch(id,decimal,date,datetime,float,uuid,string,ipv4,ipv6) VALUES""",
              [
                  (
                      1,
                      1,
                      "2020-08-08",
                      "2020-08-08 00:00:00",
                      1,
                      "59e182c4-545d-4f30-8b32-cefea2d0d5ba",
                      "1",
                      "0.0.0.0",
                      "::",
                  )
              ],
          )
          assert ret == 1
  ```

  Use connection pool

  ```python
  async def use_pool():
      pool = await asynch.create_pool()
      async with pool.acquire() as conn:
          async with conn.cursor() as cursor:
              await cursor.execute("SELECT 1")
              ret = await cursor.fetchone()
              assert ret == (1,)
      pool.close()
      await pool.wait_closed()
  ```



  - [clickhouse-driver](https://github.com/mymarilyn/clickhouse-driver), ClickHouse Python Driver with native interface support.



  This project is licensed under the [Apache-2.0](https://github.com/long2ice/asynch/blob/master/LICENSE) License.


pkgId: d10cefb455b23cc9f6fcf361f69e9900b87dd9b3fa4ee7e107faab60891568ac
name: python-asyncify
arch: src
version: 0.10.0
epoch: 0
release: 1
summary: sync 2 async
url: https://github.com/dynamic-graphics-inc/dgpy-libs/tree/main/libs/asyncify
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncify-0.10.0-1.src.rpm
checksum_type: sha256
description:
  <a href="https://github.com/dynamic-graphics-inc/dgpy-libs">
  <img align="right" src="https://github.com/dynamic-graphics-inc/dgpy-libs/blob/main/docs/images/dgpy_banner.svg?raw=true" alt="drawing" height="120" width="300"/>
  </a>



  [![Wheel](https://img.shields.io/pypi/wheel/asyncify.svg)](https://img.shields.io/pypi/wheel/asyncify.svg)
  [![Version](https://img.shields.io/pypi/v/asyncify.svg)](https://img.shields.io/pypi/v/asyncify.svg)
  [![py_versions](https://img.shields.io/pypi/pyversions/asyncify.svg)](https://img.shields.io/pypi/pyversions/asyncify.svg)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  **TLDR:** Sync 2 Async decorator

  **Install:** `pip install asyncify`

  **Usage:**

  ```python
  import asyncify


  from asyncify import asyncify
  from asyncify import run  # asyncio.run polyfill for python36


  def add(a, b):
      return a + b


  assert add(1, 2) == 3


  @asyncify
  def add_async(a, b):
      return a + b


  res = await add_async(1, 2)
  assert res == 3
  ```


pkgId: 7122bb1c9e41204b1b9cc135851dc165d46f28331b690cb526e0e891a55bf1f1
name: python-asyncinit
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: Class decorator to enable async __init__
url: https://github.com/kchmck/pyasyncinit
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncinit-0.2.4-1.src.rpm
checksum_type: sha256
description:
  [Documentation](http://kchmck.github.io/pdoc/asyncinit/)

  This package provides the `asyncinit` decorator, which enables an asynchronous constructor
  to be called like any other asynchronous function.



  ```python
  from asyncinit import asyncinit

  @asyncinit
  class MyClass:
      async def __init__(self, param):
          self.val = await self.deferredFn(param)

      async def deferredFn(self, x):
          
          return x + 2

  obj = await MyClass(42)
  assert obj.val == 44
  ```



  This package requires Python >= 3.5.0 and can be installed with `pip`:
  ```
  pip install asyncinit
  ```


pkgId: d3cb1599b861b5931c31ddd34d63c3150dd708c4b499dab336a3da301ffcb1bc
name: python-asyncinject
arch: src
version: 0.6
epoch: 0
release: 1
summary: Run async workflows using pytest-fixtures-style dependency injection
url: https://github.com/simonw/asyncinject
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncinject-0.6-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/asyncinject.svg)](https://pypi.org/project/asyncinject/)
  [![Changelog](https://img.shields.io/github/v/release/simonw/asyncinject?include_prereleases&label=changelog)](https://github.com/simonw/asyncinject/releases)
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/asyncinject/blob/main/LICENSE)

  Run async workflows using pytest-fixtures-style dependency injection



  Install this library using `pip`:

      $ pip install asyncinject



  This library is inspired by [pytest fixtures](https://docs.pytest.org/en/6.2.x/fixture.html).

  The idea is to simplify executing parallel `asyncio` operations by allowing them to be defined using a collection of functions, where the function arguments represent dependent functions that need to be executed first.

  The library can then create and execute a plan for executing the required functions in parallel in the most efficient sequence possible.

  Here's an example, using the [httpx](https://www.python-httpx.org/) HTTP library.

  ```python
  from asyncinject import Registry
  import httpx


  async def get(url):
      async with httpx.AsyncClient() as client:
          return (await client.get(url)).text

  async def example():
      return await get("http://www.example.com/")

  async def simonwillison():
      return await get("https://simonwillison.net/search/?tag=empty")

  async def both(example, simonwillison):
      return example + "\n\n" + simonwillison

  registry = Registry(example, simonwillison, both)
  combined = await registry.resolve(both)
  print(combined)
  ```
  If you run this in `ipython` or `python -m asyncio` (to enable top-level await in the console) you will see output that combines HTML from both of those pages.

  The HTTP requests to `www.example.com` and `simonwillison.net` will be performed in parallel.

  The library notices that `both()` takes two arguments which are the names of other registered `async def` functions, and will construct an execution plan that executes those two functions in parallel, then passes their results to the `both()` method.



  Passing a list of functions to the `Registry` constructor will register each function under their introspected function name, using `fn.__name__`.

  You can set explicit names instead using a dictionary:

  ```python
  registry = Registry.from_dict({
      "example": example,
      "simonwillison": simonwillison,
      "both": both
  })
  ```
  Those string names will be used to match parameters, so each function will need to accept parameters named after the keys used in that dictionary.



  Functions that are registered can be regular functions or `async def` functions.

  In addition to registering functions by passing them to the constructor, you can also add them to a registry using the `.register()` method:

  ```python
  async def another():
      return "another"

  registry.register(another)
  ```
  To register them with a name other than the name of the function, pass the `name=` argument:
  ```python
  async def another():
      return "another 2"

  registry.register(another, name="another_2")
  ```



  You don't need to register the final function that you pass to `.resolve()` - if you pass an unregistered function, the library will introspect the function's parameters and resolve them directly.

  This works with both regular and async functions:

  ```python
  async def one():
      return 1

  async def two():
      return 2

  registry = Registry(one, two)


  def three(one, two):
      return one + two

  print(await registry.resolve(three))

  ```



  Your dependent functions can require keyword arguments which have been passed to the `.resolve()` call:

  ```python
  async def get_param_1(param1):
      return await get(param1)

  async def get_param_2(param2):
      return await get(param2)

  async def both(get_param_1, get_param_2):
      return get_param_1 + "\n\n" + get_param_2


  combined = await Registry(get_param_1, get_param_2, both).resolve(
      both,
      param1 = "http://www.example.com/",
      param2 = "https://simonwillison.net/search/?tag=empty"
  )
  print(combined)
  ```


  You can opt a parameter out of the dependency injection mechanism by assigning it a default value:

  ```python
  async def go(calc1, x=5):
      return calc1 + x

  async def calc1():
      return 5

  print(await Registry(calc1, go).resolve(go))

  ```



  You can pass a `timer=` callable to the `Registry` constructor to gather timing information about executed tasks..  Your function should take three positional arguments:

  - `name` - the name of the function that is being timed
  - `start` - the time that it started executing, using `time.perf_counter()` ([perf_counter() docs](https://docs.python.org/3/library/time.html#time.perf_counter))
  - `end` - the time that it finished executing

  You can use `print` here too:

  ```python
  combined = await Registry(
      get_param_1, get_param_2, both, timer=print
  ).resolve(
      both,
      param1 = "http://www.example.com/",
      param2 = "https://simonwillison.net/search/?tag=empty"
  )
  ```
  This will output:
  ```
  get_param_1 436633.584580685 436633.797921747
  get_param_2 436633.641832699 436634.196364347
  both 436634.196570217 436634.196575639
  ```


  By default, functions that can run in parallel according to the execution plan will run in parallel using `asyncio.gather()`.

  You can disable this parallel exection by passing `parallel=False` to the `Registry` constructor, or by setting `registry.parallel = False` after the registry object has been created.

  This is mainly useful for benchmarking the difference between parallel and serial execution for your project.



  To contribute to this library, first checkout the code. Then create a new virtual environment:

      cd asyncinject
      python -m venv venv
      source venv/bin/activate

  Now install the dependencies and test dependencies:

      pip install -e '.[test]'

  To run the tests:

      pytest


pkgId: 1b6bbaee7b014ccb1f5d3c8470c58e3e3ee2aae389d2a9db5d95fe123c03a6cf
name: python-asyncinotify
arch: src
version: 4.2.0
epoch: 0
release: 1
url: https://pypi.org/project/asyncinotify/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncinotify-4.2.0-1.src.rpm
checksum_type: sha256
summary:
  A simple optionally-async python inotify library, focused on simplicity of use and operation, and leveraging modern Python features

description:
  An async python inotify package.  Kept as simple and easy-to-understand as
  possible, while still being flexible and powerful.  This is built on no external
  dependencies, and works through ctypes in a very obvious fashion.
  This depends on Python 3.6+ features, and will not work with prior versions.
  This works without any other external dependencies.
  The code is available on GitHub_ and the documentation is available on
  ReadTheDocs_. The package itself is available on PyPi_.


pkgId: 7d8f02d7914a46a31daa4d8028bda36ffd786fe235da0552cc4ee0b11036b0ec
name: python-asyncio-anywhere
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Python package that makes it easy to run fast asyncio code
url: https://github.com/novex-ai/asyncio-anywhere
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-anywhere-0.2.0-1.src.rpm
checksum_type: sha256
description:
  Python package that makes it easy to run fast asyncio code

  [![PyPI version](https://badge.fury.io/py/asyncio-anywhere.svg)](https://badge.fury.io/py/asyncio-anywhere)
  [![Release Notes](https://img.shields.io/github/release/novex-ai/asyncio-anywhere)](https://github.com/novex-ai/asyncio-anywhere/releases)
  [![pytest](https://github.com/novex-ai/asyncio-anywhere/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/novex-ai/asyncio-anywhere/actions/workflows/pytest.yml)
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)

  Are you trying to run async code in Python and getting the error
  `asyncio.run() cannot be called from a running event loop`?
  This package makes it easy to run asyncio-based async code in tricky execution environments:

  - [IPython](https://ipython.readthedocs.io/en/stable/)-based notebooks (JupyterLab, AWS Sagemaker, Databricks, etc)
  - [trio](https://trio.readthedocs.io/en/stable/) applications
  - [curio](https://curio.readthedocs.io/en/latest/) applications

  Other Features:
  - Use [uvloop](https://github.com/MagicStack/uvloop) for faster i/o - but without permanently changing the asyncio event loop policy
  - Run any code which uses [asyncio](https://docs.python.org/3/library/asyncio.html) I/O.
  - Type hints to support type-aware IDEs

  Non-Features:
  - asyncio-anywhere does not [monkey-patch](https://github.com/erdewit/nest_asyncio) the asyncio module.  This avoids unexpected
  side-effects and potential future bugs.



  ```sh
  pip install asyncio-anywhere
  ```

  ```python
  import asyncio
  from asyncio_anywhere import asyncio_run


  async def myfunc():
      await asyncio.sleep(0.01)
      return "OK"


  result = asyncio_run(myfunc())

  print(result)
  ```

  Use `asyncio_run()` anywhere where you would normally have run [asyncio.run()](https://docs.python.org/3/library/asyncio-runner.html#asyncio.run).  Note that it also accepts a boolean `debug` parameter as the second parameter.


pkgId: f7f868ca91c0212256ff6827f10c41f6d8e44dd279b170aa886fa57f65bc2d59
name: python-asyncio-atexit
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: Like atexit, but for asyncio
url: https://github.com/minrk/asyncio-atexit
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-atexit-1.0.1-1.src.rpm
checksum_type: sha256
description:
  Adds atexit functionality to asyncio:

  ```python
  import asyncio_atexit

  async def close_db():
      await db_connection.close()

  asyncio_atexit.register(close_db)
  ```

  [atexit][] is part of the standard library,
  and gives you a way to register functions to call when the interpreter exits.

  [atexit]: https://docs.python.org/3/library/atexit.html

  asyncio doesn't have equivalent functionality to register functions
  when the _event loop_ exits:

  This package adds functionality that can be considered equivalent to `atexit.register`,
  but tied to the event loop lifecycle. It:

  1. accepts both coroutines and synchronous functions
  1. should be called from a running event loop
  1. calls registered cleanup functions when the event loop closes
  1. only works if the application running the event loop calls `close()`


pkgId: 712c501171b93d6ed69d78c04e2063ee17042418ec7def50b9626f14a4c740aa
name: python-asyncio-connection-pool
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: A high-throughput, optionally-burstable pool free of explicit locking
url: https://pypi.org/project/asyncio-connection-pool/
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-connection-pool-1.0.0-1.src.rpm
checksum_type: sha256
description:
  [![GitHub Workflow Status (main)](https://img.shields.io/github/actions/workflow/status/fellowapp/asyncio-connection-pool/ci.yml?branch=main&style=flat)][main CI]
  [![PyPI](https://img.shields.io/pypi/v/asyncio-connection-pool?style=flat)][package]
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asyncio-connection-pool?style=flat)][package]
  [![codecov](https://codecov.io/gh/fellowapp/asyncio-connection-pool/graph/badge.svg?token=F3D4D9EG6M)](https://codecov.io/gh/fellowapp/asyncio-connection-pool)
  [![License](https://img.shields.io/pypi/l/prosemirror.svg?style=flat)](https://github.com/fellowapp/asyncio-connection-pool/blob/master/LICENSE.md)
  [![Fellow Careers](https://img.shields.io/badge/fellow.app-hiring-576cf7.svg?style=flat)](https://fellow.app/careers/)

  [main CI]: https://github.com/fellowapp/asyncio-connection-pool/actions?query=workflow%3ACI+branch%3Amain
  [package]: https://pypi.org/project/asyncio-connection-pool/

  This is a generic, high-throughput, optionally-burstable pool for asyncio.

  Some cool features:

  - No locking[^1]; no `asyncio.Lock` or `asyncio.Condition` needs to be taken in
    order to get a connection.
  - Available connections are retrieved without yielding to the event loop.
  - When `burst_limit` is specified, `max_size` acts as a "soft" limit; the pool
    can go beyond this limit to handle increased load, and shrinks back down
    after.
  - The contents of the pool can be anything; just implement a
    `ConnectionStrategy`.

  [^1]:
      Theoretically, there is an implicit "lock" that is held while an asyncio
      task is executing. No other task can execute until the current task
      yields (since it's cooperative multitasking), so any operations during
      that time are atomic.



  We were using a different pool for handling our Redis connections, and noticed
  that, under heavy load, we would spend a lot of time waiting for the lock, even
  when there were available connections in the pool.

  We also thought it would be nice if we didn't need to keep many connections
  open when they weren't needed, but still have the ability to make more when
  they are required.





  This is the implementation of the pool. It is generic over a type of
  connection, and all implementation-specific logic is contained within a
  [`ConnectionStrategy`](#asyncio_connection_poolconnectionstrategy).

  A pool is created as follows:

  ```python
  from asyncio_connection_pool import ConnectionPool

  pool = ConnectionPool(strategy=my_strategy, max_size=15)
  ```

  The constructor can optionally be passed an integer as `burst_limit`. This
  allows the pool to open more connections than `max_size` temporarily.



  This method is the only way to get a connection from the pool. It is expected
  to be used as follows:

  ```python
  pool = ConnectionPool(...)

  async with pool.get_connection() as conn:
      
      pass
  ```

  When the `async with` block is entered, a connection is retrieved. If a
  connection needs to be opened or if the pool is at capacity and no connections
  are available, the caller will yield to the event loop.

  When the block is exited, the connection will be returned to the pool.



  This is an abstract class that defines the interface of the object passed as
  `strategy`. A subclass _must_ implement the following methods:



  This method is called to create a new connection to the resource. This happens
  when a connection is requested and all connections are in use, as long as the
  pool is not at capacity.

  The result of a call to this method is what will be provided to a consumer of
  the pool, and in most cases will be stored in the pool to be re-used later.

  If this method raises an exception, it will bubble up to the frame where
  `ConnectionPool.get_connection()` was called.



  This method is called to check if a connection is no longer able to be used.
  When the pool is retrieving a connection to give to a client, this method is
  called to make sure it is valid.

  The return value should be `True` if the connection is _not_ valid.

  If this method raises an exception, it is assumed that the connection is
  invalid. The passed-in connection is dropped and a new one is retrieved. The
  exception is suppressed unless it is not a `BaseException`, like
  `asyncio.CancelledError`. It is the responsibility of the `ConnectionStrategy`
  implementation to avoid leaking a connection in this case.



  This method is called to close a connection. This occurs when the pool has
  exceeded `max_size` (i.e. it is bursting) and a connection is returned that is
  no longer needed (i.e. there are no more consumers waiting for a connection).

  If this method raises an exception, the connection is assumed to be closed and
  the exception bubbles to the caller of `ConnectionPool.get_connection().__aexit__`
  (usually an `async with` block).



  This package includes support for [`ddtrace`][ddtrace]/[`datadog`][datadog] and
  for [`aioredis`][aioredis] (<2.0.0).

  [ddtrace]: https://github.com/datadog/dd-trace-py
  [datadog]: https://github.com/datadog/datadogpy
  [aioredis]: https://github.com/aio-libs/aioredis



  This class subclasses the `ConnectionPool` in the root of the package, and adds
  a bunch of tracing, gauges, and events. The constructor, in addition to the
  arguments of the base class, supports:

  - Required `service_name` argument: A prefix to all of the metrics
  - Optional `extra_tags` argument: Additional tags to provide to all metrics
    (strings in a `"key:value"` format)



  This class implements the `ConnectionStrategy` abstract methods, using
  `aioredis.Redis` objects as connections. The constructor takes arbitrary
  arguments and forwards them to `aioredis.create_redis`.



  I encourage you to read the [source](https://github.com/fellowinsights/asyncio-connection-pool/blob/master/asyncio_connection_pool/__init__.py)
  to find out (it is quite well-commented). If you notice any faults in the
  logic, please feel free to file an issue.


pkgId: 1a8bea20400fbccb7e91464083ed1bffe16753148a9152ba4edc560680a44ccd
name: python-asyncio-contextmanager
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: Decorator that turns async generator functions into async context managers.
url: https://github.com/sashgorokhov/asyncio-contextmanager
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-contextmanager-1.0.1-1.src.rpm
checksum_type: sha256
description:
  |PyPI version| |GitHub release| |Build Status| |codecov| |GitHub
  license|
  Decorator that turns async generator functions into async context
  managers.


pkgId: 7fce99c3d166d1e6e042da1d6867b04a0ac9eacb74665b1de1fd00e3240bb7bd
name: python-asyncio-dgram
arch: src
version: 2.2.0
epoch: 0
release: 1
summary: Higher level Datagram support for Asyncio
url: https://github.com/jsbronder/asyncio-dgram
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-dgram-2.2.0-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/jsbronder/asyncio-dgram/workflows/ci/badge.svg)](https://github.com/jsbronder/asyncio-dgram/actions)


  Simple wrappers that allow you to `await read()` from datagrams as suggested
  by Guido van Rossum
  [here](https://github.com/python/asyncio/pull/321#issuecomment-187022351).  I
  frequently found myself having to inherit from `asyncio.DatagramProtocol` and
  implement this over and over.


  The goal of this package is to make implementing common patterns that use datagrams
  simple and straight-forward while still supporting more esoteric options.  This is done
  by taking an opinionated stance on the API that differs from parts of asyncio.  For instance,
  rather than exposing a function like
  [create\_datagram\_endpoint](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_datagram_endpoint)
  which supports many use-cases and has conflicting parameters, `asyncio_dgram`
  only provides three functions for creating a stream:

  - `connect((host, port))`: Creates a datagram endpoint which can only
    communicate with the endpoint it connected to.
  - `bind((host, port))`: Creates a datagram endpoint that can communicate
    with anyone, but must specified the destination address every time it
    sends.
  - `from_socket(sock)`: If the above two functions are not sufficient, then
    `asyncio_dgram` simply lets the caller setup the socket as they see fit.



  Following the example of asyncio documentation, here's what a UDP echo client
  and server would look like.
  ```python
  import asyncio

  import asyncio_dgram


  async def udp_echo_client():
      stream = await asyncio_dgram.connect(("127.0.0.1", 8888))

      await stream.send(b"Hello World!")
      data, remote_addr = await stream.recv()
      print(f"Client received: {data.decode()!r}")

      stream.close()


  async def udp_echo_server():
      stream = await asyncio_dgram.bind(("127.0.0.1", 8888))

      print(f"Serving on {stream.sockname}")

      data, remote_addr = await stream.recv()
      print(f"Echoing {data.decode()!r}")
      await stream.send(data, remote_addr)

      await asyncio.sleep(0.5)
      print(f"Shutting down server")


  def main():
      loop = asyncio.get_event_loop()
      loop.run_until_complete(asyncio.gather(udp_echo_server(), udp_echo_client()))


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


pkgId: 366bee02512292edb2b71634b35247286204d508dc36e08e133b2b41d3a11e91
name: python-asyncio-gevent
arch: src
version: 0.2.3
epoch: 0
release: 1
summary: asyncio & gevent in harmony
url: https://github.com/gfmio/asyncio-gevent
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-gevent-0.2.3-1.src.rpm
checksum_type: sha256
description:
  asyncio-gevent makes asyncio and gevent compatible. It provides utilities for

  - running asyncio on gevent (by using gevent as asyncio's event loop)
  - running gevent on asyncio (by using asyncio as gevent's event loop, still work in progress)
  - converting greenlets to asyncio futures
  - converting futures to asyncio greenlets
  - wrapping blocking or spawning functions in coroutines which spawn a greenlet and wait for its completion
  - wrapping coroutines in spawning functions which block until the future is resolved

  asyncio-gevent is a fork and rewrite of `aiogevent` and `tulipcore` for modern python 3.



  Install `asyncio-gevent` from pypi using your favourite package manager.

  ```sh

  poetry add asyncio-gevent


  pip install asyncio-gevent
  ```





  In order to run `asyncio` on `gevent`, we need to set the (default) `EventLoopPolicy` to use `asyncio_gevent.EventLoopPolicy`.

  ```py3
  import gevent.monkey
  gevent.monkey.patch_all()

  import asyncio

  import asyncio_gevent

  asyncio.set_event_loop_policy(asyncio_gevent.EventLoopPolicy())

  async def main():
      await asyncio.sleep(1)
      print("done")

  asyncio.run(main())
  ```

  After setting the event loop policy, asyncio will use an event loop that uses greenlets for scheduling.

  Under the hood, it uses the default selector-based event loop in asyncio with the the gevent selector implementation.

  Alternatively, you can also manually set and use the event loop.

  ```py3
  import gevent.monkey
  gevent.monkey.patch_all()

  import asyncio

  import asyncio_gevent

  loop = asyncio_gevent.EventLoop()
  asyncio.set_event_loop(loop)

  async def main():
      await asyncio.sleep(1)
      print("done")

  loop.run_until_complete(main())
  ```



  > This implementation is still work-in-progress. It may work for simple examples, but otherwise fail in unexpected ways.

  In order to run `gevent` on `asyncio`, `gevent` needs to be initialised to use the asyncio event loop. This is done by setting the environment variable `GEVENT_LOOP` to `asyncio_gevent.gevent_loop.GeventLoop` and then starting python.

  ```sh
  GEVENT_LOOP=asyncio_gevent.gevent_loop.GeventLoop python3 myscript.py
  ```

  gevent will now run on asyncio.

  Alternatively, you can also set the loop configuration setting, preferably right after importing `gevent` and before monkey patching.

  ```py3
  import gevent
  gevent.config.loop = "asyncio_gevent.gevent_loop.GeventLoop"
  ```



  Use `asyncio_gevent.greenlet_to_future` to convert a greenlet to an asyncio future. The future yields once the greenlet has finished execution.

  ```py3


  import gevent.monkey
  gevent.monkey.patch_all()

  import asyncio

  import asyncio_gevent

  asyncio.set_event_loop_policy(asyncio_gevent.EventLoopPolicy())



  import gevent

  def blocking_function() -> int:
      gevent.sleep(10)
      return 42


  async def main() -> None:
      greenlet = gevent.spawn(blocking_function)
      future = asyncio_gevent.greenlet_to_future(greenlet)
      result = await future

  asyncio.run(main())
  ```

  If the greenlet is already dead when the future is awaited/scheduled, then the future will resolve with the result or raise the exception thrown immediately.

  If the greenlet is not yet running, the greenlet will by default be started when the future is awaited/scheduled. This is to ensure a sensible default behaviour and prevent odd concurrency issues. To prevent this auto-starting, you can pass `autostart_greenlet=False` as an argument to `greenlet_to_future`.

  When a greenlet is killed without a custom exception type, it will return a `GreenletExit` exception. In this instance, the future get cancelled. If a custom exception type is used, the future will raise the exception.

  If the future gets cancelled, then by default the greenlet is killed. To prevent the greenlet from getting killed, you can pass `autokill_greenlet=False` as an argument to `greenlet_to_future`.



  Use `asyncio_gevent.future_to_greenlet` to convert a future to a greenlet.

  ```py3


  import gevent.monkey
  gevent.monkey.patch_all()

  import asyncio

  import asyncio_gevent

  asyncio.set_event_loop_policy(asyncio_gevent.EventLoopPolicy())



  import gevent

  async def async_function() -> int:
      await asyncio.sleep(1)
      return 42


  def main() -> None:
      future = async_function()
      greenlet = asyncio_gevent.future_to_greenlet(future)
      greenlet.start()
      greenlet.join()
      assert greenlet.get() == 42

  main()
  ```

  The greenlet returned by this function will not start automatically, so you need to call `Greenlet.start()` manually.

  If `future` is a coroutine object, it will be scheduled as a task on the `loop` when the greenlet starts. If no `loop` argument has been passed, the running event loop will be used. If there is no running event loop, a new event loop will be started using the current event loop policy.

  If the future is not already scheduled, then it won't be scheduled for execution until the greenlet starts running. To prevent the future from being scheduled automatically, you can pass `autostart_future=False` as an argument to `future_to_greenlet`.

  If the greenlet gets killed, the by default the future gets cancelled. To prevent this from happening and having the future return the `GreenletExit` objct instead, you can pass `autocancel_future=False` as an argument to `future_to_greenlet`.

  If the future gets cancelled, the greenlet gets killed and will return a `GreenletExit`. This default behaviour can be circumvented by passing `autokill_greenlet=False` and the greenlet will raise the `CancelledError` instead.



  Use `asyncio_gevent.sync_to_async` to wrap a blocking function or a function that may spawn greenlets and wait for their completion in a coroutine.

  ```py3


  import gevent.monkey
  gevent.monkey.patch_all()

  import asyncio

  import asyncio_gevent

  asyncio.set_event_loop_policy(asyncio_gevent.EventLoopPolicy())



  import gevent

  def blocking_function(duration: float):
      gevent.sleep(duration)
      return 42

  async_function = asyncio_gevent.sync_to_async(blocking_function)

  asyncio.run(async_function(1.0))
  ```

  The returned corountine function will execute the original function in a spawned greenlet and await it's completion.

  Under the hood, this is just a thin convenience wrapper around `asyncio_gevent.greenlet_to_future`.

  As a result, `asyncio_gevent.sync_to_async` accepts the same arguments as `asyncio_gevent.greenlet_to_future` to achieve the same behaviour.

  `asyncio_gevent.sync_to_async` can also be used as a decorator

  ```py3


  import gevent.monkey
  gevent.monkey.patch_all()

  import asyncio

  import asyncio_gevent

  asyncio.set_event_loop_policy(asyncio_gevent.EventLoopPolicy())



  import gevent

  @asyncio_gevent.sync_to_async()
  def fn(duration: float):
      gevent.sleep(duration)
      return 42

  asyncio.run(fn(1.0))
  ```




  Use `asyncio_gevent.async_to_sync` to wrap a coroutine function or in a blocking function that spawns a greenlet and waits until the coroutine has returned.

  ```py3


  import gevent.monkey
  gevent.monkey.patch_all()

  import asyncio

  import asyncio_gevent

  asyncio.set_event_loop_policy(asyncio_gevent.EventLoopPolicy())



  import gevent

  async def async_function(duration: float):
      await asyncio.sleep(duration)
      return 42

  blocking_function = asyncio_gevent.async_to_sync(async_function)

  blocking_function(1)
  ```

  The returned function will execute the coroutine on an existing running loop or a new event loop and await it's completion.

  Under the hood, this is just a thin convenience wrapper around `asyncio_gevent.future_to_greenlet`.

  As a result, `asyncio_gevent.async_to_sync` accepts the same arguments as `asyncio_gevent.future_to_greenlet` to achieve the same behaviour.

  `asyncio_gevent.async_to_sync` can also be used as a decorator.


  ```py3


  import gevent.monkey
  gevent.monkey.patch_all()

  import asyncio

  import asyncio_gevent

  asyncio.set_event_loop_policy(asyncio_gevent.EventLoopPolicy())



  import gevent

  @asyncio_gevent.async_to_sync
  async def fn(duration: float):
      await asyncio.sleep(duration)
      return 42

  fn(1)
  ```





  `gevent.sleep` will pause the current greenlet. As a result, this will, by default, result in the greenlet powering the asyncio loop to be put to sleep, so nothing will execute.

  This is typically not intended.

  The solution to this problem is to wrap any code that calls `gevent.sleep` in `asyncio.sync_to_async` or (equivalently) `asyncio_gevent.greenlet_to_future(gevent.spawn(f))`. This causes the function to be executed in another greenlet which prevents the main greenlet from getting blocked.

  Example:

  ```py
  import gevent.monkey

  gevent.monkey.patch_all()

  import asyncio
  import threading

  import gevent

  import asyncio_gevent

  asyncio.set_event_loop_policy(asyncio_gevent.EventLoopPolicy())


  async def f():
      print("f", 1)
      await asyncio.sleep(1)
      print("f", 2)


  def g():
      print("g", 1)
      gevent.sleep(2)
      print("g", 2)


  async def main():
      await asyncio.gather(f(), asyncio_gevent.sync_to_async(g)())
      
      


  if __name__ == "__main__":
      asyncio.run(main())
  ```

  The output will be (as expected):

  ```txt
  g 1
  f 1
  f 2
  g 2
  ```

  If `gevent.sleep` is called inside an async function, then the async function needs to first be wrapped in `asyncio.async_to_sync`.

  ```py
  import gevent.monkey

  gevent.monkey.patch_all()

  import asyncio

  import gevent

  import asyncio_gevent

  asyncio.set_event_loop_policy(asyncio_gevent.EventLoopPolicy())


  async def f():
      print("f", 1)
      await asyncio.sleep(1)
      print("f", 2)


  async def g():
      print("g", 1)
      await asyncio.sleep(1)
      gevent.sleep(1)
      print("g", 2)


  async def main():
      await asyncio.gather(
          f(), asyncio_gevent.sync_to_async(asyncio_gevent.async_to_sync(g))()
      )


  if __name__ == "__main__":
      asyncio.run(main())
  ```

  The output will again be (as expected):

  ```txt
  g 1
  f 1
  f 2
  g 2
  ```




  [MIT](LICENSE)


pkgId: 2188579587a8718d6378c1ca2e28cc7256d7702d50ab2f5fefe752dbdafa8337
name: python-asyncio-multisubscriber-queue
arch: src
version: 0.4.1
epoch: 0
release: 1
summary: Allow a single producer to provide the same payload to multiple consumers simultaneously
url: https://github.com/smithk86/asyncio-multisubscriber-queue
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-multisubscriber-queue-0.4.1-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/asyncio-multisubscriber-queue)](https://pypi.org/project/asyncio-multisubscriber-queue/)
  [![Python Versions](https://img.shields.io/pypi/pyversions/asyncio-multisubscriber-queue)](https://pypi.org/project/asyncio-multisubscriber-queue/)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![](https://github.com/smithk86/asyncio-multisubscriber-queue/workflows/pytest/badge.svg)](https://github.com/smithk86/asyncio-multisubscriber-queue/actions?query=workflow%3Apytest)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)



  MultisubscriberQueue allows a single producer to provide the same payload to multiple consumers simultaneously. An asyncio.Queue is created for each consumer and each call to MultisubscriberQueue.put() iterates over each asyncio.Queue and puts the payload on each queue.

  Please see [example.py](https://github.com/smithk86/asyncio-multisubscriber-queue/blob/master/example.py) for a simple example.


pkgId: 391b7587034043e549e49f0bef0a0e059a20373116053561b21cf442366f61fd
name: python-asyncio-orvibo
arch: src
version: 1.19
epoch: 0
release: 1
summary: Asyncio module for Orvibo devices control
url: https://github.com/p3g4asus/asyncio-orvibo
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-orvibo-1.19-1.src.rpm
checksum_type: sha256
description:
  Control Orvibo devices with Python 3 using asyncio (single threaded with event loop). Currently supports the S20 WiFi Smart Switch and AllOne IR.



  ```python
  from asyncio_orvibo import s20
  import asyncio
  import traceback
  async def test_switch_all_off_on():
      dict_devices = await s20.S20.discovery()
      for _,s in dict_devices.items():
          if await s.state_change(0):
              print("State off OK %s",s)
          else:
              print("State off FAIL %s",s)
      await asyncio.sleep(5)
      for _,s in dict_devices.items():
          if await s.state_change(1):
              print("State on OK %s",s)
          else:
              print("State on FAIL %s",s)
  loop = asyncio.get_event_loop()
  try:
      loop.run_until_complete(test_switch_all_off_on())
  except:
      traceback.print_exc()



  from asyncio_orvibo import allone
  import asyncio
  import traceback
  import binascii
  async def test_emit(k):
      dict_devices = await allone.AllOne.discovery()
      payload = binascii.unhexlify(k)
      for _,a in dict_devices.items():
          rv = await a.emit_ir(payload)
          if rv:
              print("Emit OK %s %s",a,binascii.hexlify(rv).decode('utf-8'))
          else:
              print("Emit failed")
  loop = asyncio.get_event_loop()
  try:
      loop.run_until_complete(test_emit('00000000a801000000000000000098018e11951127029b0625029906270299062702380227023a0225023802270238022d023202270299062702990627029806270238022702380227023802270238022802370227023802270238022702980627023802240245021c02380227023802270238022702980627029c0623023802270298062702990627029b062502990627029906270220b7a1119d11270299062702990628029b06250238022702380227023802270238022702380227029906270299062702990627023802270238022a0234022702380227023802260238022702380226029a06260238022602380226023802260241021e02380227029b0624029906270238022702980627029b0625029906270299062702990629021db79f11a2112502990627029b0625029906270238022702380227023802270238022a02350227029906270299062702990628023702260238022702380227023802270238022702380226023b02240299062702380226023802270238022602380227023c0223029906270299062702380226029b062402990627029906270299062802980627020000'))
  except:
      traceback.print_exc()
  ```



  Pull requests are welcome. Possible areas for improvement:

  * Additional Orvibo devices (CT10 for example, I have reverse engineered this device I only need time to write the code).
  * Expand S20 functions: Timers, configuration, etc



  Not affiliated with Shenzhen Orvibo Electronics Co., Ltd.


pkgId: 6290f3e907139f0e80a47efe20026edaa894f7b2f4e1c2db3dfabfe1a5e60896
name: python-asyncio-pool
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: Pool of asyncio coroutines with familiar interface
url: https://github.com/gistart/asyncio-pool
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-pool-0.6.0-1.src.rpm
checksum_type: sha256
description:
  Pool of asyncio coroutines with familiar interface. Supports python 3.5+ (including PyPy 6+, which is also 3.5 atm)

  AioPool makes sure _no more_ and _no less_ (if possible) than `size` spawned coroutines are active at the same time. _spawned_ means created and scheduled with one of the pool interface methods, _active_ means coroutine function started executing it's code, as opposed to _waiting_ -- which waits for pool space without entering coroutine function.

  Read more at [github page](https://github.com/gistart/asyncio-pool).


pkgId: a9e975d841e618a2113f1f43588e33c4249b8d40f2f0313b801c698526ac70f5
name: python-asyncio-redis
arch: src
version: 0.16.0
epoch: 0
release: 1
summary: PEP 3156 implementation of the redis protocol.
url: https://github.com/jonathanslenders/asyncio-redis
rpm_license: LICENSE.txt
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-redis-0.16.0-1.src.rpm
checksum_type: sha256
description:
  |Build Status|
      
      
      
  Redis client for the `PEP 3156`_ Python event loop.
  This Redis library is a completely asynchronous, non-blocking client for a Redis server.
  It depends on asyncio (PEP 3156) and requires Python 3.6 or greater. If you're new to
  asyncio, it can be helpful to check out `the asyncio documentation`_ first.


pkgId: 7eb2d7dd94107d3e2c126ff5a842542b152c63a7e728b59cce2548403fa581a5
name: python-asyncio-redis-rate-limit
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Rate limiter for async functions using Redis as a backend
url: https://github.com/wemake-services/asyncio-redis-rate-limit
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-redis-rate-limit-1.0.0-1.src.rpm
checksum_type: sha256
description:
  [![wemake.services](https://img.shields.io/badge/%20-wemake.services-green.svg?label=%20&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC%2FxhBQAAAAFzUkdCAK7OHOkAAAAbUExURQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP%2F%2F%2F5TvxDIAAAAIdFJOUwAjRA8xXANAL%2Bv0SAAAADNJREFUGNNjYCAIOJjRBdBFWMkVQeGzcHAwksJnAPPZGOGAASzPzAEHEGVsLExQwE7YswCb7AFZSF3bbAAAAABJRU5ErkJggg%3D%3D)](https://wemake-services.github.io)
  [![Build Status](https://github.com/wemake-services/asyncio-redis-rate-limit/workflows/test/badge.svg?branch=master&event=push)](https://github.com/wemake-services/asyncio-redis-rate-limit/actions?query=workflow%3Atest)
  [![codecov](https://codecov.io/gh/wemake-services/asyncio-redis-rate-limit/branch/master/graph/badge.svg)](https://codecov.io/gh/wemake-services/asyncio-redis-rate-limit)
  [![Python Version](https://img.shields.io/pypi/pyversions/asyncio-redis-rate-limit.svg)](https://pypi.org/project/asyncio-redis-rate-limit/)
  [![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide)

  Rate limiter for async functions using Redis as a backend.




  - Small and simple
  - Can be used as a decorator or as a context manager
  - Can be used for both clients and servers
  - Works with `asyncio`
  - Works with any amount of processes
  - Works with both [`redis.asyncio.client.Redis`](https://redis-py.readthedocs.io/en/stable/examples/asyncio_examples.html) and [`aioredis`](https://github.com/aio-libs/aioredis-py)
  - Free of race-conditions (hopefully!)
  - Supports `redis` since `7.0`
  - Fully typed with annotations and checked with mypy, [PEP561 compatible](https://www.python.org/dev/peps/pep-0561/)




  ```bash
  pip install asyncio-redis-rate-limit
  ```

  Extras available:
  - `pip install asyncio-redis-rate-limit[redis]`
  - `pip install asyncio-redis-rate-limit[aioredis]` (for python versions `<3.11`)




  As a decorator:

  ```python
  >>> from asyncio_redis_rate_limit import rate_limit, RateSpec
  >>> from redis.asyncio import Redis as AsyncRedis  # pip install redis

  >>> redis = AsyncRedis.from_url('redis://localhost:6379')

  >>> @rate_limit(
  ...    rate_spec=RateSpec(requests=1200, seconds=60),
  ...    backend=redis,
  ... )
  ... async def request() -> ...:
  ...     ...   # Do something useful! Call this function as usual.

  ```

  Or as a context manager:

  ```python
  >>> from asyncio_redis_rate_limit import RateLimiter, RateSpec
  >>> from redis.asyncio import Redis as AsyncRedis  # pip install redis

  >>> redis = AsyncRedis.from_url('redis://localhost:6379')

  >>> async def request() -> ...:
  ...     async with RateLimiter(
  ...         unique_key='api-name.com',
  ...         backend=redis,
  ...         rate_spec=RateSpec(requests=5, seconds=1),
  ...     ):
  ...         ...  # Do the request itself.

  ```




  [MIT](https://github.com/wemake-services/asyncio-redis-rate-limit/blob/master/LICENSE)




  This project was generated with [`wemake-python-package`](https://github.com/wemake-services/wemake-python-package). Current template version is: [1d63652fbb33ebe2f6d932f511b7f529a4ce2d2a](https://github.com/wemake-services/wemake-python-package/tree/1d63652fbb33ebe2f6d932f511b7f529a4ce2d2a). See what is [updated](https://github.com/wemake-services/wemake-python-package/compare/1d63652fbb33ebe2f6d932f511b7f529a4ce2d2a...master) since then.


pkgId: 5a10618abab3d9168bce808907822b230169f0b2c68d7b7d3f264705e59a158f
name: python-asyncio-signal-bus
arch: src
version: 1.5.2
epoch: 0
release: 1
summary: Internal application publisher/subscriber bus using asyncio queues.
url: https://pypi.org/project/asyncio-signal-bus/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-signal-bus-1.5.2-1.src.rpm
checksum_type: sha256
description:
  Asyncio Signal Bus is a simple utility for sending publisher subscriber
  signals from one python function to another, thus allowing you to simplify asynchronous
  applications using event based architecture.


  Install with pip.

  ```shell
  pip install asyncio-signal-bus
  ```


  Simply decorate your publishers and subscribers to pass any data type asynchronously
  whenever the publisher returns a value.

  ```python
  import asyncio

  from asyncio_signal_bus import SignalBus
  import json
  from typing import Dict

  BUS = SignalBus()

  @BUS.publisher(topic_name="foo")
  async def foo_publisher(arg: str):
      signal = {"message": arg}
      print(f"publishing {json.dumps(signal)}")
      await asyncio.sleep(1)
      return signal

  @BUS.subscriber(topic_name="foo")
  async def foo_subscriber_0(signal: Dict):
      print(f"foo subscriber 0 received {json.dumps(signal)}")

  @BUS.subscriber(topic_name="foo")
  async def foo_subscriber_1(signal: Dict):
      print(f"foo subscriber 1 received {json.dumps(signal)}")
  ```

  In order to start the subscribers listening, you use the bus context. When the bus
  leaves context, all subscribers stop listening.
  ```python
  async def main():
      inputs = [f"message:{i}" for i in range(10)]
      async with BUS:
          await asyncio.gather(*[foo_publisher(x) for x in inputs])
  ```
  That is it! You can string together publishers and subscribers in whatever way you want.
  You can also annotate functions and methods used for other purposes as publishers in
  order to facilitate post processing and reporting hooks without having to pass them
  to the function.


  Subscribers often need additional data beyond the signal, such as URL's, secrets,
  usernames and connection pools. The inject decorator can be used to inject additional
  data to other arguments as kwargs defaults. Injection only occors when the bus or it's
  injector is within context.
  ```python
  import asyncio

  from asyncio_signal_bus import SignalBus
  BUS = SignalBus()

  @BUS.publisher(topic_name="greeting")
  async def generate_greeting(arg: str):
      return arg

  async def name_factory():
       return "Frank"

  @BUS.subscriber(topic_name="greeting")
  @BUS.inject("name", name_factory)
  async def print_greeting(greeting: str, name: str):
      print(f"{greeting} from {name}")
  async def main():
      async with BUS:
          await generate_greeting("hello")
  asyncio.run(main())
  ```

  Sometimes we need to run tasks periodically such as polling an external database or an
  internal queue. We also want to make sure that when our application shuts down, it
  gracefully tells the periodic tasks to stop starting new tasks but it waits for the
  existing task to complete.
  ```python
  import asyncio
  from asyncio_signal_bus import SignalBus

  BUS = SignalBus()
  @BUS.periodic_task(period_seconds=0.5)
  async def print_foos():
       print("foo")

  async def main():
       async with BUS:
           await asyncio.sleep(2)
  asyncio.run(main())
  ```

  Given that the periodic task is the furthest upstream in a process, we may use it to
  drive downstream subscribers. We can combine the periodic task with the injectors and
  the publisher to periodically fetch data using configuration information and send it
  to subscribers for processing.

  ```python
  import asyncio
  from typing import List, Dict
  from asyncio_signal_bus import SignalBus
  import os

  BUS = SignalBus()

  async def get_url():
      return os.environ.get("URL")

  async def get_secret():
      return os.environ.get("SECRET")

  @BUS.periodic_task(period_seconds=1)
  @BUS.publisher(topic_name="new-data")
  @BUS.inject("url", get_url)
  @BUS.inject("secret", get_secret)
  async def get_data(url: str, secret: str):
      
      return [
          {"id": 0, "value": "cats"},
          {"id": 1, "value": "dogs"}
      ]

  @BUS.subscriber(topic_name="new-data")
  async def process_values(data: List[Dict]):
      for row in data:
          print(row["value"].upper())

  @BUS.subscriber(topic_name="new-data")
  async def process_ids(data: List[Dict]):
      for row in data:
          print(row["id"] + 1)

  async def main():
      async with BUS:
          await asyncio.sleep(5)
  asyncio.run(main())
  ```


pkgId: c82f887dbaa70b98df1d84c003850bef51435c8c7b2294b083a1e98695db7608
name: python-asyncio-socks5
arch: src
version: 0.2.11
epoch: 0
release: 1
summary: Socks5 Server/Client by asyncio.
url: https://github.com/abersheeran/socks5
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-socks5-0.2.11-1.src.rpm
checksum_type: sha256
description:
  Socks5 Server/Client by asyncio.



  * [RFC1928](https://www.ietf.org/rfc/rfc1928.txt)
  * [RFC1929](https://www.ietf.org/rfc/rfc1929.txt)
  * [Socks5协议](https://abersheeran.com/articles/Socks5/)


pkgId: 5c313acc8fe6c47f815e2b071595f43ba263c043e9294b3c85c56989b1ef15d0
name: python-asyncio-telnet
arch: src
version: 0.1.21
epoch: 0
release: 1
summary: Asyncio-based Telnet library
url: https://github.com/ForceFledgling/asyncio-telnet
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-telnet-0.1.21-1.src.rpm
checksum_type: sha256
description:
  The **asyncio-telnet** library designed for convenient interaction with Telnet devices in both synchronous and asynchronous modes, making the process straightforward and flexible in various usage scenarios.

  [![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg)](docs) [![License: Apache License 2.0](https://img.shields.io/badge/License-Apache2-brightgreen.svg)](https://choosealicense.com/licenses/apache-2.0/) [![PyPi Version](https://img.shields.io/pypi/v/asyncio-telnet.svg?style=flat-square&logo=asyncio-telnet&logoColor=white)](https://pypi.org/project/asyncio-telnet/) [![PyPi downloads](https://static.pepy.tech/personalized-badge/asyncio-telnet?period=total&units=international_system&left_color=grey&right_color=orange&left_text=pip%20downloads)](https://pypistats.org/packages/asyncio-telnet)

  - **Support for Asynchrony and Synchrony**: Harness the power of asyncio for efficient and non-blocking communication with Telnet servers. With this library, you have the option to choose between asynchronous and synchronous modes, depending on the requirements of your project.
  - **Ease of Use**: The library provides a user-friendly interface for both synchronous and asynchronous cases, making it adaptable to different project needs.
  - **Telnet Protocol Handling**: Transparently handles the intricacies of the Telnet protocol, allowing you to focus on the logic of your application.
  - **Flexible Integration**: Easily integrate Telnet functionality into your Python applications with a simple API.



  You can install the library using pip. Make sure you have Python 3.6 or later installed.

  `pip install asyncio-telnet`



  Example: Asynchronous Telnet Connection with Default Timeout

  ```python
  import asyncio
  from asyncio_telnet import Telnet

  async def main():
      tn = Telnet()
      await tn.open('example.com')
      await tn.write(b'Vladimir\r\n')
      response = await tn.read_until_eof()
      await tn.close()
      return response

  if __name__ == '__main__':
      result = asyncio.run(main())
      print(result)




  ```

  Example: Synchronous Telnet Connection

  ```python
  from asyncio_telnet import Telnet

  def main():
      tn = Telnet(sync_mode=True)
      tn.open('example.com')
      response = tn.read_until_eof()
      tn.close()
      return response

  if __name__ == '__main__':
      result = main()
      print(result)




  ```

  Example: Asynchronous Telnet Connection with Custom Timeout.

  By default, the timeout is set to 30 seconds.

  ```python
  import asyncio
  from asyncio_telnet import Telnet

  async def main():
      tn = Telnet(timeout=5)
      try:
          await tn.open('example.com')
          response = await tn.read_until_eof()
          await tn.close()
          return response
      except ValueError as e:
          print(f"Example of a timeout occurrence: {e}")

  if __name__ == '__main__':
      asyncio.run(main())




  ```

  Example: Asynchronous Telnet Connection with Write Operation

  ```python
  import asyncio
  from asyncio_telnet import Telnet

  async def main():
      tn = Telnet()
      await tn.open('example.com')
      await tn.write(b'Vladimir\r\n')
      response = await tn.read_until_eof()
      await tn.close()
      return response

  if __name__ == '__main__':
      result = asyncio.run(main())
      print(result)




  ```

  Feel free to check the [documentation](docs) and [examples](examples) for more detailed information.


pkgId: ab21534017b69bed2dc861e2b52119c0e62ace21fc64879ad2354224a371ca68
name: python-asyncio-throttle
arch: src
version: 1.0.2
epoch: 0
release: 1
summary: Simple, easy-to-use throttler for asyncio
url: https://github.com/hallazzang/asyncio-throttle
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio-throttle-1.0.2-1.src.rpm
checksum_type: sha256
description:
  [![travis-ci](https://travis-ci.org/hallazzang/asyncio-throttle.svg?branch=master)](https://travis-ci.org/hallazzang/asyncio-throttle)
  [![pypi-version](https://badge.fury.io/py/asyncio-throttle.svg)](https://badge.fury.io/py/asyncio-throttle)

  Simple, easy-to-use throttler for asyncio.



  ```python
  import time
  import random
  import asyncio

  from asyncio_throttle import Throttler

  async def worker(no, throttler, n):
      for _ in range(n):
          await asyncio.sleep(random.random() * 2)

          async with throttler:
              print(time.time(), 'Worker #%d: Bang!' % no)

  async def main():
      throttler = Throttler(rate_limit=5)

      tasks = [
          loop.create_task(worker(no, throttler, 10))
              for no in range(5)
      ]
      await asyncio.wait(tasks)

  loop = asyncio.get_event_loop()
  loop.run_until_complete(main())
  loop.close()
  ```

  Here I limited work rate to 5/sec while there are 5 workers.
  And the result:

  ```plain
  1508273760.3462772 Worker #2: Bang!
  1508273760.590009 Worker #3: Bang!
  1508273760.856431 Worker #0: Bang!
  1508273761.0110679 Worker #2: Bang!
  1508273761.086856 Worker #4: Bang!
  1508273761.350699 Worker #3: Bang!
  1508273761.5906 Worker #1: Bang!
  1508273761.8655958 Worker #4: Bang!
  1508273762.224158 Worker #0: Bang!
  1508273762.600234 Worker #2: Bang!
  1508273762.694332 Worker #2: Bang!
  1508273762.726774 Worker #0: Bang!
  1508273762.944273 Worker #4: Bang!
  ```



  ```bash
  $ pip install asyncio-throttle
  ```

  It requires Python 3.6 or later.



  `asyncio_throttle.Throttler` introduces simple APIs: `flush()` and
  `acquire()`. But you will not be interested in those because you can
  just use it within `with` statement and it looks nicer.

  First, create a throttler given desired rate limit. For example if you
  want to limit rate to 500/min, you can make it as:

  ```python
  from asyncio_throttle import Throttler

  throttler = Throttler(rate_limit=500, period=60)
  ```

  Then whenever you want to do some jobs which should have limited
  rate(e.g. sending request to server), Put it in `async with` statement:

  ```python
  async with throttler:
      send_a_request()
  ```

  It's that easy. `asyncio_throttler` can be easily integrated with
  `aiohttp` too:

  ```python
  async def worker(throttler, session):
      while True:
          async with throttler:
              async with session.get('http://example.com') as resp:
                  do_some_job_with(await resp.text())

          await asyncio.sleep(0.05)
  ```


pkgId: 15526509f27bba3ba40d283efa4d4b26c5be02c9d489f84addbb3a927cfe2099
name: python-asyncio_extras
arch: src
version: 1.3.2
epoch: 0
release: 1
summary: Asynchronous generators, context managers and more for asyncio
url: https://github.com/agronholm/asyncio_extras
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncio_extras-1.3.2-1.src.rpm
checksum_type: sha256
description:
  .. image:: https://travis-ci.org/agronholm/asyncio_extras.svg?branch=master
    :target: https://travis-ci.org/agronholm/asyncio_extras
    :alt: Build Status
  .. image:: https://coveralls.io/repos/agronholm/asyncio_extras/badge.svg?branch=master&service=github
    :target: https://coveralls.io/github/agronholm/asyncio_extras?branch=master
    :alt: Code Coverage
  .. image:: https://readthedocs.org/projects/asyncio-extras/badge/?version=latest
    :target: https://asyncio-extras.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

  This library provides several conveniences to users of asyncio_:

  * decorator for making asynchronous context managers (like ``contextlib.contextmanager``)
  * decorator and context manager for running a function or parts of a function in a thread pool
  * helpers for calling functions in the event loop from worker threads and vice versa
  * helpers for doing non-blocking file i/o

  .. _asyncio: https://docs.python.org/3/library/asyncio.html


pkgId: bbb9139d1b5b3893083e40c9f8000148a4f2cb8e1d110c6fc9e44b17496a7f71
name: python-asyncjson
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: Asynchronous json library with support of nested awaitable objects in data
url: https://github.com/bdragon300/asyncjson
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncjson-0.0.1-1.src.rpm
checksum_type: sha256
description:
  Asynchronous json library with support of nested awaitable objects in data.

  The most important features are supporting async functions and async generators on any level of
  data structure, even for dict keys.

  Now the library contains async version of `json.dumps` function. This library was made to help
  stream the heavy json structures without blocking the event loop.

  Be aware, this is alpha version of library.



  `pip install asyncjson`



  ```python
  import sys
  import asyncio
  import random
  import string
  import asyncjson

  async def random_number():
      await asyncio.sleep(random.random())
      return random.randrange(0, 100)

  async def random_strings():
      for i in range(random.randint(0, 10)):
          await asyncio.sleep(random.random())
          yield ''.join(random.choice(string.ascii_letters) for _ in range(random.randint(1, 10)))

  async def run():
      obj = {
          'dictkey': {
              'list': [1, '2', 3.0],
              'random strings': random_strings(),
              'random number': random_number(),
              random_strings(): "joined random strings in key",
              random_number(): "random number in key"
          },
          'another random number': random_number(),
          'awaitable objects in list': ["sample", random_number(), random_strings(), [], {}],
          'intkey': 123,
          'stringkey': "qwer",
      }
      async for i in await asyncjson.dumpgen(obj):
          sys.stdout.write(i)
          sys.stdout.flush()

  loop = asyncio.get_event_loop()
  loop.run_until_complete(run())
  ```

  Will give the result which will appear piece by piece because of sleeps added for
  demonstration purposes:

  ```json
  {
   "dictkey": {
    "list": [
     1,
     "2",
     3.0
    ],
    "random strings": [
     "IuaNSw"
    ],
    "random number": 65,
    "ZuuBZyEMYTtqyOzYoILOZXCgnTYYsu": "joined random strings in key",
    43: "random number in key"
   },
   "another random number": 85,
   "awaitable objects in list": [
    "sample",
    16,
    [
     "wQ",
     "Jp",
     "xDfTNZCUv"
    ],
    [],
    {}
   ],
   "intkey": 123,
   "stringkey": "qwer"
  }
  ```



  - [ ] Implement async versions of `dump`, `loads`, `load` functions
  - [ ] Implement async encoder/decoder on C in order to increase performance


pkgId: 7bc062df4e409072e121509bc7515b8faf98dfe41b7c71da477cb5fd13b7b2f0
name: python-asynckivy
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: Async library for Kivy
url: https://github.com/asyncgui/asynckivy
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asynckivy-0.7.0-1.src.rpm
checksum_type: sha256
description:
  [Youtube](https://www.youtube.com/playlist?list=PLNdhqAjzeEGjTpmvNck4Uykps8s9LmRTJ)
  [日本語doc](README_jp.md)

  `asynckivy` is an async library that saves you from ugly callback-style code,
  like most of async libraries do.
  Let's say you want to do:

  1. `print('A')`
  1. wait for 1sec
  1. `print('B')`
  1. wait for a button to be pressed
  1. `print('C')`

  in that order.
  Your code would look like this:

  ```python
  from kivy.clock import Clock

  def what_you_want_to_do(button):
      print('A')

      def one_sec_later(__):
          print('B')
          button.bind(on_press=on_button_press)
      Clock.schedule_once(one_sec_later, 1)

      def on_button_press(button):
          button.unbind(on_press=on_button_press)
          print('C')

  what_you_want_to_do(...)
  ```

  It's not easy to understand.
  If you use `asynckivy`, the code above will become:

  ```python
  import asynckivy as ak

  async def what_you_want_to_do(button):
      print('A')
      await ak.sleep(1)
      print('B')
      await ak.event(button, 'on_press')
      print('C')

  ak.start(what_you_want_to_do(...))
  ```



  Pin the minor version.

  ```text
  poetry add asynckivy@~0.7
  pip install "asynckivy>=0.7,<0.8"
  ```



  ```python
  import asynckivy as ak

  async def some_task(button):
      
      dt = await ak.sleep(2)
      print(f'{dt} seconds have elapsed')

      
      await ak.event(button, 'on_press')

      
      __, x = await ak.event(button, 'x')
      print(f'button.x is now {x}')

      
      if button.x <= 100:
          __, x = await ak.event(button, 'x', filter=lambda __, x: x>100)
          print(f'button.x is now {x}')

      
      
      tasks = await ak.wait_any(
          ak.sleep(5),
          ak.event(button, 'on_press'),
      )
      print("Timeout" if tasks[0].finished else "The button was pressed")

      
      async with ak.move_on_after(5) as bg_task:
          await ak.event(button, 'on_press')
      print("Timeout" if bg_task.finished else "The button was pressed")

      
      tasks = await ak.wait_all(
          ak.sleep(5),
          ak.event(button, 'on_press'),
      )

      
      
      tasks = await ak.wait_all(
          ak.event(button, 'on_press'),
          ak.wait_any(
              ak.sleep(5),
              other_async_func(),
          ),
      )
      child_tasks = tasks[1].result
      print("5 seconds elapsed" if child_tasks[0].finished else "other_async_func has completed")

  ak.start(some_task(some_button))
  ```

  For more details, read the [documentation](https://asyncgui.github.io/asynckivy/).



  - CPython 3.9 + Kivy 2.3.0
  - CPython 3.10 + Kivy 2.3.0
  - CPython 3.11 + Kivy 2.3.0
  - CPython 3.12 + Kivy 2.3.0 (3.12.0 is not supported due to [this issue](https://github.com/python/cpython/issues/111058))



  Kivy supports two legitimate async libraries, [asyncio][asyncio] and [Trio][trio], starting from version 2.0.0, so developing another one seems like [reinventing the wheel][reinventing].
  Actually, I started this one just to learn how the async/await syntax works, so it initially was "reinventing the wheel".

  But after playing with Trio and Kivy for a while, I noticed that Trio is not suitable for the situation where fast reactions are required e.g. touch events.
  The same is true of asyncio.
  You can confirm that by running `investigation/why_xxx_is_not_suitable_for_handling_touch_events.py`, and mashing a mouse button as quickly as possible.
  You'll see sometimes `up` is not paired with `down`.
  You'll see the coordinates aren't relative to the `RelativeLayout` even though the `target` belongs to it.

  The cause of those problems is that `trio.Event.set()` and `asyncio.Event.set()` don't *immediately* resume the tasks waiting for the `Event` to be set.
  They just schedule the tasks to resume.
  Same thing can be said to `nursery.start_soon()` and `asyncio.create_task()`.

  Trio and asyncio are async **I/O** libraries after all.
  They probably don't have to immediately resumes/starts tasks, which I think necessary for touch handling in Kivy.
  (If you fail to handle touches promptly, their state might undergo changes, leaving no time to wait for tasks to resume/start).
  Their core design might not be suitable for GUI in the first place.
  That's why I'm still developing this `asynckivy` library to this day.

  [asyncio]:https://docs.python.org/3/library/asyncio.html
  [trio]:https://trio.readthedocs.io/en/stable/
  [reinventing]:https://en.wikipedia.org/wiki/Reinventing_the_wheel


pkgId: 1f694732105ff78fbf9d21fe8682ca7a8c011cead5693efcdd10260608b72ee7
name: python-asyncodbc
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: Forked from aioodbc and make improvement
url: https://github.com/tortoise/asyncodbc
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncodbc-0.1.1-1.src.rpm
checksum_type: sha256
description:
  **asyncodbc** is a Python 3.5+ module that makes it possible to access ODBC_ databases
  with asyncio_. It relies on the awesome pyodbc_ library and preserves the same look and
  feel. *asyncodbc* was written using `async/await` syntax (PEP492_) and thus is not compatible
  with Python versions older than 3.5.  Internally *asyncodbc* employs threads to avoid
  blocking the event loop, threads_ are not that as bad as you think!. Other
  drivers like motor_ use the same approach.
  **asyncodbc** is fully compatible and tested with uvloop_. Take a look at the test
  suite, all tests are executed with both the default event loop and uvloop_.


pkgId: 71728f50c1d52c158096970aa8f2ff130de28355aae23c8b1f286a1d94c1757b
name: python-asyncore-wsgi
arch: src
version: 0.0.11
epoch: 0
release: 1
summary: Asynchronous WSGI and WebSocket server based on asyncore module
url: https://github.com/romanvm/asyncore-wsgi
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncore-wsgi-0.0.11-1.src.rpm
checksum_type: sha256
description:
  This is a single-threaded asynchronous WSGI server with WebSockets support
  based on `asyncore <https://docs.python.org/3.6/library/asyncore.html>`_ module.
  It should be compatible with Python 2.7 and 3.
  Example:
      from from wsgiref.simple_server import demo_app
      from asyncore_wsgi import AsyncWebSocketHandler, make_server
      class SimpleEchoHandler(AsyncWebSocketHandler):
          def handleMessage(self):
              print('Received WebSocket message: {}'.format(self.data))
              self.sendMessage(self.data)
          def handleConnected(self):
              print('WebSocket connected')
          def handleClose(self):
              print('WebSocket closed')
      httpd = make_server('', 8000, demo_app, ws_handler_class=SimpleEchoHandler)
      httpd.serve_forever()
  The server in the preceding example serves a demo WSGI app from
  the Standard Library and the echo WebSocket handler on ``'/ws'`` path.
  WebSocket part was borrowed from
  `this project <https://github.com/dpallot/simple-websocket-server>`_.


pkgId: 41e6d7194a54ee8d48e94acde6d9f58422129ac20105771bf52c68f3ffb7c6c2
name: python-asyncorm
arch: src
version: 0.5.3
epoch: 0
release: 1
summary: A fully asynchronous python ORM
url: https://github.com/monobot/asyncorm
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncorm-0.5.3-1.src.rpm
checksum_type: sha256
description:
  A fully asynchronous python ORM
  * Free software: Apache Software License 2.0
  * Documentation: https://asyncorm.readthedocs.io.


pkgId: fb2801e0263978fe01f074843476cd4b1981a0feb97286e7e8b8cb360fbd329d
name: python-asyncpal
arch: src
version: 0.0.5
epoch: 0
release: 1
summary: Preemptive concurrency and parallelism for sporadic workloads
url: https://github.com/pyrustic/asyncpal
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpal-0.0.5-1.src.rpm
checksum_type: sha256
description:
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![PyPI package version](https://img.shields.io/pypi/v/asyncpal)](https://pypi.org/project/asyncpal)
  [![Downloads](https://static.pepy.tech/badge/asyncpal)](https://pepy.tech/project/asyncpal)


  <!-- Cover -->
  <div align="center">
      <img src="https://raw.githubusercontent.com/pyrustic/misc/master/assets/asyncpal/cover.jpg" alt="Cover image" width="640">
      <p align="center">
          <a href="https://commons.wikimedia.org/wiki/File:Carrera_de_carros_romanos.jpg">Poniol</a>, <a href="https://creativecommons.org/licenses/by-sa/3.0">CC BY-SA 3.0</a>, via Wikimedia Commons
      </p>
  </div>

  <!-- Intro Text -->

  <b>Preemptive concurrency and parallelism for sporadic workloads</b>


  - [Overview](#overview)
      - [Designed for sporadic workloads](#designed-for-sporadic-workloads)
      - [Supplied with advanced capabilities](#supplied-with-advanced-capabilities)
      - [Featuring a familiar interface](#featuring-a-familiar-interface)
  - [Examples](#examples)
  - [Embarrassingly parallel workloads](#embarrassingly-parallel-workloads)
  - [Initializers, finalizers, and the BrokenPoolError exception](#initializers-finalizers-and-the-brokenpoolerror-exception)
  - [The peculiar cases of daemons and remote exceptions](#the-peculiar-cases-of-daemons-and-remote-exceptions)
  - [Application programming interface](#application-programming-interface)
      - [ThreadPool class](#threadpool-class)
      - [ProcessPool class](#processpool-class)
      - [Future class](#future-class)
      - [Miscellaneous functions and classes](#miscellaneous-functions-and-classes)
      - [Exception classes](#exception-classes)
  - [Testing and contributing](#testing-and-contributing)
  - [Installation](#installation)



  **Asyncpal** is a [Python](https://www.python.org/) library designed for preemptive [concurrency](https://en.wikipedia.org/wiki/Concurrent_computing) and [parallelism](https://en.wikipedia.org/wiki/Parallel_computing). It achieves concurrency using the [thread pool](https://en.wikipedia.org/wiki/Thread_pool) design pattern that it extends with processes to enable parallelism.


  Although a thread pool is the right tool for the problems it solves, its creation and usage involve the allocation of resources that must be properly released. For this reason, it is recommended to use a thread pool with a context manager to ensure that resources are properly released once the pool executor has finished the tasks.

  However, this strategy can introduce overhead in programs that sporadically submit tasks to a thread pool, as multiple pools may be created and destroyed throughout the execution of these programs.

  Maintaining one or a few thread pools for the duration of a program can be an effective solution, assuming these thread pools can automatically **shrink** after workers have been idle for a short period defined by the programmer.

  Asyncpal offers the ability to set an idle timeout for workers, allowing the pool to which they belong to shrink when they are not in use.

  > Learn how Asyncpal ensures a [graceful shutdown](#the-peculiar-case-of-daemons) of open pools when an uncaught exception occurs.


  Asyncpal pools provide methods to manage [embarrassingly parallel workloads](https://en.wikipedia.org/wiki/Embarrassingly_parallel), allowing for lazy or eager execution and optional workload splitting into large chunks, with or without preserving their original order.

  Some level of introspection is achievable directly from the pool interface, such as counting busy workers or pending tasks. Additionally, a `Future` class (never directly instantiated by the user) is provided, whose objects allow a task to be cancelled or its result to be collected. Furthermore, the pending time and running duration of a task can be obtained directly from a `Future` object.

  Overall, the characteristics of Asyncpal make it suitable for both implicit use in the background through higher-level abstractions provided by frameworks or libraries, and for explicit use with or without a context manager.


  Asyncpal is inspired by the great preemptive concurrency and parallelism packages provided in Python and Java.

  For instance, the `chunk_size` option for map operations is borrowed from Python's [multiprocessing](https://docs.python.org/3/library/multiprocessing.html) and [concurrent.futures](https://docs.python.org/3/library/concurrent.futures.html) packages, while the fixed-size pools, such as the `SingleThreadPool` class, are inspired by Java's [java.util.concurrent.Executors.newSingleThreadExecutor](https://docs.oracle.com/en%2Fjava%2Fjavase%2F22%2Fdocs%2Fapi%2F%2F/java.base/java/util/concurrent/Executors.html#newSingleThreadExecutor()) static method.



  The following code snippets are adapted from examples provided by Python's `concurrent.futures` documentation page.


  The following code snippet is adapted from [ThreadPoolExecutor example](https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor-example) provided by Python's concurrent.futures documentation [page](https://docs.python.org/3/library/concurrent.futures.html).

  ```python
  import urllib.request
  from asyncpal import ThreadPool, as_done

  URLS = ["https://ubuntu.com/",
          "https://github.com/pyrustic/asyncpal/",
          "https://youtu.be/xLi83prR5fg",
          "https://news.ycombinator.com/",
          "https://nonexistant-subdomain.python.org/"]


  def load_url(url, timeout):
      with urllib.request.urlopen(url, timeout=timeout) as conn:
          return conn.read()


  with ThreadPool(max_workers=5) as pool:
      
      future_to_url = {pool.submit(load_url, url, 60): url for url in URLS}
      for future in as_done(future_to_url):
          url = future_to_url[future]
          try:
              data = future.collect()  # collect the result or raise the exception
          except Exception as exc:
              print("%r generated an exception: %s" % (url, exc))
          else:
              print("%r page is %d bytes" % (url, len(data)))
  ```

  > The function `as_done` accepts a list of Future objects and also the `keep_order` and `timeout` keyword arguments.


  The following code snippet is adapted from [ProcessPoolExecutor example](https://docs.python.org/3/library/concurrent.futures.html#processpoolexecutor-example) provided by Python's concurrent.futures documentation [page](https://docs.python.org/3/library/concurrent.futures.html).

  ```python
  import math
  from asyncpal import ProcessPool

  PRIMES = [
      112272535095293,
      112582705942171,
      112272535095293,
      115280095190773,
      115797848077099,
      1099726899285419]

  def is_prime(n):
      if n < 2:
          return False
      if n == 2:
          return True
      if n % 2 == 0:
          return False
      sqrt_n = int(math.floor(math.sqrt(n)))
      for i in range(3, sqrt_n + 1, 2):
          if n % i == 0:
              return False
      return True

  def main():
      with ProcessPool() as pool:
          
          
          for number, prime in zip(PRIMES, pool.map(is_prime, PRIMES)):
              print("%d is prime: %s" % (number, prime))

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

  > The method `map` also accepts these keyword arguments: `chunk_size`, `buffer_size`, `keep_order`, and `timeout`.



  Asyncpal pool classes provide four methods to perform [Map](https://en.wikipedia.org/wiki/Map_(parallel_pattern)) operations and for cases where control is more important than convenience, there are public functions for manually splitting a task into subtasks to submit to the pool.


  Pool class methods to perform Map operations are `map`, `map_all`, `starmap`, and `starmap_all`.

  ```python
  from itertools import starmap
  from asyncpal import ThreadPool

  def add(x, y):
      return x + y

  with ThreadPool(4) as pool:
      
      numbers = range(100)

      
      
      iterator = pool.map(add, numbers, numbers, chunk_size=25)
      assert tuple(iterator) == tuple(map(add, numbers, numbers))

      
      
      iterator = pool.map_all(add, numbers, numbers, chunk_size=25)
      assert tuple(iterator) == tuple(map(add, numbers, numbers))

      
      
      iterator = pool.starmap(add, zip(numbers, numbers), chunk_size=25)
      assert tuple(iterator) == tuple(starmap(add, zip(numbers, numbers)))

      
      
      iterator = pool.starmap_all(add, zip(numbers, numbers), chunk_size=25)
      assert tuple(iterator) == tuple(starmap(add, zip(numbers, numbers)))
  ```

  > For convenience, there are also `map_unordered`, `map_all_unordered`, `starmap_unordered`, `starmap_all_unordered`.


  The `split_map_task` and `split_starmap_task` functions allow to manually split a task into subtasks. There are also the `wait`, `collect` and `as_done` functions which are intended to be applied to sequences of Future objects.

  ```python
  from asyncpal import (ThreadPool, split_map_task, split_starmap_task,
                        wait, collect, as_done)

  def add(x, y):
      return x + y

  with ThreadPool(4) as pool:
      
      numbers = range(100)

      
      futures = list()
      for subtask in split_map_task(add, numbers, numbers, chunk_size=25):
          future = pool.submit(subtask)
          futures.append(future)

      
      for subtask in split_starmap_task(add, zip(numbers, numbers)):
          pass

      
      wait(futures, timeout=42)  # 42 seconds !

      
      result = list()
      for sub_result in collect(futures, timeout=42):
          result.extend(sub_result)
      assert tuple(result) == tuple(map(add, numbers, numbers))

      
      
      for future in as_done(futures, timeout=42):
          pass
  ```


  At the creation of a pool, the programmer can provide an initializer and/or a finalizer. Consequently, each time the pool spawns a worker (whether it is a thread or a process), the initializer is executed at startup, and the finalizer is executed right before the worker shuts down.

  Any exception raised during initialization, finalization, or in between will be caught by the pool, which will then enter a "broken" state. Once the pool is broken, it will shut down other workers, cancel pending tasks, and make them available via the `cancelled_tasks` property. It will also raise a `BrokenPoolError` exception whenever the programmer attempts to submit new tasks.

  Asyncpal offers a way to reduce the risk of encountering a `BrokenPoolError` exception at an inconvenient time by testing the pool beforehand. All pool classes provide a `test` method that replicate the pool with its configuration, perform some computation on it, then close it, letting any exception propagate to the top.


  This section discusses the peculiar cases of daemons and remote exceptions.


  In Python, a thread can be flagged as a [daemon thread](https://docs.python.org/3/library/threading.html#thread-objects). The significance of this flag is that the entire Python program exits when only daemon threads are left.

  Prior to **Python 3.9**, `concurrent.futures` used daemon threads as workers for its thread pool and relied on [atexit](https://docs.python.org/3/library/atexit.html) hooks to gracefully shut down the pools that had not been explicitly closed. For compatibility with subinterpreters, which do not support daemon threads, it was decided to [remove the daemon flag](https://docs.python.org/3/whatsnew/3.9.html#concurrent-futures). However, simply removing the daemon flag would have been [problematic](https://bugs.python.org/issue37266#msg362890).

  The fix for this issue involved stopping the use of atexit hooks and instead relying on an [internal threading atexit hook](https://bugs.python.org/issue37266#msg362960). Asyncpal does not use the daemon flag either. Instead of relying on some internal Python function that might disappear without warning, it implements its own workaround. This workaround involves a single thread for the entire program, started by `asyncpal.pool.GlobalShutdown`, whose job is to join the main thread and, once joined, run the shutdown handlers registered by the pools.

  > Feel free to open an issue to criticize this workaround or to suggest a better idea.


  An exception raised in a worker of a `ProcessPool` must go through a multiprocessing queue to reach the pool instance. To be placed in a multiprocessor queue, a Python object must be **picklable**, that is, it must be possible to [serialize](https://en.wikipedia.org/wiki/Serialization) it with Python's [pickle](https://docs.python.org/3/library/pickle.html) mechanism.

  An exception instance typically contains a traceback object that is not picklable and thus nullified by the `pickle` mechanism. Python's `concurrent.futures` and `multiprocessing.pool.Pool` use a hack that stringifies traceback to move it from the worker process to the main pool process.

  Although this hack is interesting and useful for debugging a `ProcessPool`, it does not preserve the chain of exceptions because the `pickling` process not only nullifies the `__traceback__` attribute of the exception object, but also the `__cause__` and `__context__` attributes.

  Asyncpal also stringifies the traceback, as it is a simpler solution than recreating the traceback object in the main process. Additionally, Asyncpal replicates the exception chain, so the programmer can navigate through the `__cause__` and `__context__` attributes of a remote exception.

  > The `get_remote_traceback` function is exposed to quickly extract the traceback string of a remote exception.



  > This section describes the API and refers to the API reference for more details.

  Asyncpal consists of three key components: the **Pool**, the **Worker**, and the **Future**. From the programmer perspective, the pool represents the main interface of a system that spawns workers as needed and returns Future objects.

  Preemptive concurrency is achieved with the `ThreadPool` class while parallelism is handled by the `ProcessPool` class. Under the hood, the thread pool spawns Python's `threading.Thread` as workers and the process pool spawns Python's `multiprocessing.Process` as workers.



  Preemptive concurrency is achieved with the `ThreadPool` class. Under the hood, the thread pool spawns Python's `threading.Thread` as workers.

  For convenience, the following four derived classes are provided:

  - `SingleThreadPool`: spawns only 1 worker
  - `DualThreadPool`: spawns up to 2 workers
  - `TripleThreadPool`: spawns up to 3 workers
  - `QuadThreadPool`: spawns up to 4 workers

  ```python
  from asyncpal import ThreadPool
  from asyncpal.errors import BrokenPoolError, InitializerError, FinalizerError


  def add(x, y):
    return x + y


  def initializer(*args, **kwargs):
    pass


  def finalizer(*args, **kwargs):
    pass



  pool = ThreadPool(max_workers=4, name="my-pool", idle_timeout=60,
                    initializer=initializer, init_args=(1, 2),
                    init_kwargs={"arg": 1}, finalizer=finalizer,
                    final_args=(3, 4), max_tasks_per_worker=None)

  future = pool.submit(add, 10, 2)


  try:
    pool.test()

  except InitializerError as e:
    e.__cause__  # the cause

  except FinalizerError:
    pass


  except BrokenPoolError:
    pass



  pool.check()


  pool.count_workers()
  pool.count_busy_workers()
  pool.count_free_workers()
  pool.count_pending_tasks()


  pool.spawn_workers(2)  # 2 extra workers

  pool.join(timeout=42)


  pool.shutdown()
  assert pool.is_terminated

  pool.cancelled_tasks
  ```

  > Check out the API reference for [asyncpal.ThreadPool](https://github.com/pyrustic/asyncpal/blob/master/docs/api/modules/asyncpal/__init__/class-ThreadPool.md).


  Parallelism is achieved with the `ProcessPool` class. Under the hood, the process pool spawns Python's `multiprocessing.Process` as workers with the `spawn` context.

  The `ProcessPool` class is similar to the `ThreadPool` class.

  For convenience, the following four derived classes are provided:

  - `SingleProcessPool`: spawns only 1 worker
  - `DualProcessPool`: spawns up to 2 workers
  - `TripleProcessPool`: spawns up to 3 workers
  - `QuadProcessPool`: spawns up to 4 workers


  > Note that you must guard your process pool with `if __name__ == '__main__'` and also avoid writting multiprocessing code directly in the `__main__` module of your projects.

  > Check out the API reference for [asyncpal.ProcessPool](https://github.com/pyrustic/asyncpal/blob/master/docs/api/modules/asyncpal/__init__/class-ProcessPool.md).



  A [Future](https://en.wikipedia.org/wiki/Futures_and_promises) object is not meant to be instantiated by the programmer but rather returned by the `submit` method of pools.

  ```python
  from asyncpal import ThreadPool


  def divide(x, y):
    return x // y


  with ThreadPool(4) as pool:
    
    future = pool.submit(divide, 10, 2)

    
    
    future.add_callback(lambda f: None)

    
    try:
      
      result = future.collect(timeout=42)
    except ZeroDivisionError as e:
      pass
    else:
      assert result == 5

    
    pending_time, running_time = future.duration

    
    future.cancel()

    
    future.wait(timeout=42)  # 42s !

    
    result = future.result
    
    exc = future.exception

    
    future.cancel_flag  # boolean set to True after cancel() is called
    future.is_cancelled # boolean that confirms cancellation
    future.is_done      # True when Completed, Cancelled, or Failed
    future.is_pending   # True while task is pending
    future.is_running   # True while task is running
    
  ```


  > Check out the API reference for [asyncpal.Future](https://github.com/pyrustic/asyncpal/blob/master/docs/api/modules/asyncpal/__init__/class-Future.md).



  > Check out the API reference for [asyncpal](https://github.com/pyrustic/asyncpal/blob/master/docs/api/modules/asyncpal/__init__/funcs.md).



  Feel free to **open an issue** to report a bug, suggest some changes, show some useful code snippets, or discuss anything related to this project. You can also directly email [me](https://pyrustic.github.io/#contact).


  Following are instructions to setup your development environment

  ```bash

  python -m venv venv
  source venv/bin/activate


  git clone https://github.com/pyrustic/asyncpal.git
  cd asyncpal


  pip install -e .


  python -m tests


  deactivate
  ```

  <p align="right"><a href="#readme">Back to top</a></p>


  **Asyncpal** is **cross-platform**. It is built on [Ubuntu](https://ubuntu.com/download/desktop) and should work on **Python 3.8** or **newer**.


  ```bash
  python -m venv venv
  source venv/bin/activate
  ```



  ```bash
  pip install asyncpal
  ```


  ```bash
  pip install asyncpal --upgrade --upgrade-strategy eager
  ```


  ```bash
  deactivate
  ```

  <p align="right"><a href="#readme">Back to top</a></p>


  Hello world, I'm Alex, a tech enthusiast ! Feel free to get in touch with [me](https://pyrustic.github.io/#contact) !

  <br>
  <br>
  <br>

  [Back to top](#readme)


pkgId: c797554115e30a9b3a2d3b4e3e2a8465b0d3770dd0bbff39c07cde205e313c2e
name: python-asyncpal
arch: src
version: 0.0.6
epoch: 0
release: 1
summary: Preemptive concurrency and parallelism for sporadic workloads
url: https://github.com/pyrustic/asyncpal
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpal-0.0.6-1.src.rpm
checksum_type: sha256
description:
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![PyPI package version](https://img.shields.io/pypi/v/asyncpal)](https://pypi.org/project/asyncpal)
  [![Downloads](https://static.pepy.tech/badge/asyncpal)](https://pepy.tech/project/asyncpal)


  <!-- Cover -->
  <div align="center">
      <img src="https://raw.githubusercontent.com/pyrustic/misc/master/assets/asyncpal/cover.jpg" alt="Cover image" width="640">
      <p align="center">
          <a href="https://commons.wikimedia.org/wiki/File:Carrera_de_carros_romanos.jpg">Poniol</a>, <a href="https://creativecommons.org/licenses/by-sa/3.0">CC BY-SA 3.0</a>, via Wikimedia Commons
      </p>
  </div>

  <!-- Intro Text -->

  <b>Preemptive concurrency and parallelism for sporadic workloads</b>


  - [Overview](#overview)
      - [Designed for sporadic workloads](#designed-for-sporadic-workloads)
      - [Supplied with advanced capabilities](#supplied-with-advanced-capabilities)
      - [Featuring a familiar interface](#featuring-a-familiar-interface)
  - [Examples](#examples)
  - [Embarrassingly parallel workloads](#embarrassingly-parallel-workloads)
  - [Initializers, finalizers, and the BrokenPoolError exception](#initializers-finalizers-and-the-brokenpoolerror-exception)
  - [The peculiar cases of daemons and remote exceptions](#the-peculiar-cases-of-daemons-and-remote-exceptions)
  - [Application programming interface](#application-programming-interface)
      - [ThreadPool class](#threadpool-class)
      - [ProcessPool class](#processpool-class)
      - [Future class](#future-class)
      - [Miscellaneous functions and classes](#miscellaneous-functions-and-classes)
      - [Exception classes](#exception-classes)
  - [Testing and contributing](#testing-and-contributing)
  - [Installation](#installation)



  **Asyncpal** is a [Python](https://www.python.org/) library designed for preemptive [concurrency](https://en.wikipedia.org/wiki/Concurrent_computing) and [parallelism](https://en.wikipedia.org/wiki/Parallel_computing). It achieves concurrency using the [thread pool](https://en.wikipedia.org/wiki/Thread_pool) design pattern that it extends with processes to enable parallelism.


  Although a thread pool is the right tool for the problems it solves, its creation and usage involve the allocation of resources that must be properly released. For this reason, it is recommended to use a thread pool with a context manager to ensure that resources are properly released once the pool executor has finished the tasks.

  However, this strategy can introduce overhead in programs that sporadically submit tasks to a thread pool, as multiple pools may be created and destroyed throughout the execution of these programs.

  Maintaining one or a few thread pools for the duration of a program can be an effective solution, assuming these thread pools can automatically **shrink** after workers have been idle for a short period defined by the programmer.

  Asyncpal offers the ability to set an idle timeout for workers, allowing the pool to which they belong to shrink when they are not in use.

  > Learn how Asyncpal ensures a [graceful shutdown](#the-peculiar-case-of-daemons) of open pools when an uncaught exception occurs.


  Asyncpal pools provide methods to manage [embarrassingly parallel workloads](https://en.wikipedia.org/wiki/Embarrassingly_parallel), allowing for lazy or eager execution and optional workload splitting into large chunks, with or without preserving their original order.

  Some level of introspection is achievable directly from the pool interface, such as counting busy workers or pending tasks. Additionally, a `Future` class (never directly instantiated by the user) is provided, whose objects allow a task to be cancelled or its result to be collected. Furthermore, the pending time and running duration of a task can be obtained directly from a `Future` object.

  Overall, the characteristics of Asyncpal make it suitable for both implicit use in the background through higher-level abstractions provided by frameworks or libraries, and for explicit use with or without a context manager.


  Asyncpal is inspired by the great preemptive concurrency and parallelism packages provided in Python and Java.

  For instance, the `chunk_size` option for map operations is borrowed from Python's [multiprocessing](https://docs.python.org/3/library/multiprocessing.html) and [concurrent.futures](https://docs.python.org/3/library/concurrent.futures.html) packages, while the fixed-size pools, such as the `SingleThreadPool` class, are inspired by Java's [java.util.concurrent.Executors.newSingleThreadExecutor](https://docs.oracle.com/en%2Fjava%2Fjavase%2F22%2Fdocs%2Fapi%2F%2F/java.base/java/util/concurrent/Executors.html#newSingleThreadExecutor()) static method.



  The following code snippets are adapted from examples provided by Python's `concurrent.futures` documentation page.


  The following code snippet is adapted from [ThreadPoolExecutor example](https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor-example) provided by Python's concurrent.futures documentation [page](https://docs.python.org/3/library/concurrent.futures.html).

  ```python
  import urllib.request
  from asyncpal import ThreadPool, as_done

  URLS = ["https://ubuntu.com/",
          "https://github.com/pyrustic/asyncpal/",
          "https://youtu.be/xLi83prR5fg",
          "https://news.ycombinator.com/",
          "https://nonexistant-subdomain.python.org/"]


  def load_url(url, timeout):
      with urllib.request.urlopen(url, timeout=timeout) as conn:
          return conn.read()


  with ThreadPool(max_workers=5) as pool:
      
      future_to_url = {pool.submit(load_url, url, 60): url for url in URLS}
      for future in as_done(future_to_url):
          url = future_to_url[future]
          try:
              data = future.collect()  # collect the result or raise the exception
          except Exception as exc:
              print("%r generated an exception: %s" % (url, exc))
          else:
              print("%r page is %d bytes" % (url, len(data)))
  ```

  > The function `as_done` accepts a list of Future objects and also the `keep_order` and `timeout` keyword arguments.


  The following code snippet is adapted from [ProcessPoolExecutor example](https://docs.python.org/3/library/concurrent.futures.html#processpoolexecutor-example) provided by Python's concurrent.futures documentation [page](https://docs.python.org/3/library/concurrent.futures.html).

  ```python
  import math
  from asyncpal import ProcessPool

  PRIMES = [
      112272535095293,
      112582705942171,
      112272535095293,
      115280095190773,
      115797848077099,
      1099726899285419]

  def is_prime(n):
      if n < 2:
          return False
      if n == 2:
          return True
      if n % 2 == 0:
          return False
      sqrt_n = int(math.floor(math.sqrt(n)))
      for i in range(3, sqrt_n + 1, 2):
          if n % i == 0:
              return False
      return True

  def main():
      with ProcessPool() as pool:
          
          
          for number, prime in zip(PRIMES, pool.map(is_prime, PRIMES)):
              print("%d is prime: %s" % (number, prime))

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

  > The method `map` also accepts these keyword arguments: `chunk_size`, `buffer_size`, `keep_order`, and `timeout`.



  Asyncpal pool classes provide four methods to perform [Map](https://en.wikipedia.org/wiki/Map_(parallel_pattern)) operations and for cases where control is more important than convenience, there are public functions for manually splitting a task into subtasks to submit to the pool.


  Pool class methods to perform Map operations are `map`, `map_all`, `starmap`, and `starmap_all`.

  ```python
  from itertools import starmap
  from asyncpal import ThreadPool

  def add(x, y):
      return x + y

  with ThreadPool(4) as pool:
      
      numbers = range(100)

      
      
      iterator = pool.map(add, numbers, numbers, chunk_size=25)
      assert tuple(iterator) == tuple(map(add, numbers, numbers))

      
      
      iterator = pool.map_all(add, numbers, numbers, chunk_size=25)
      assert tuple(iterator) == tuple(map(add, numbers, numbers))

      
      
      iterator = pool.starmap(add, zip(numbers, numbers), chunk_size=25)
      assert tuple(iterator) == tuple(starmap(add, zip(numbers, numbers)))

      
      
      iterator = pool.starmap_all(add, zip(numbers, numbers), chunk_size=25)
      assert tuple(iterator) == tuple(starmap(add, zip(numbers, numbers)))
  ```

  > For convenience, there are also `map_unordered`, `map_all_unordered`, `starmap_unordered`, `starmap_all_unordered`.


  The `split_map_task` and `split_starmap_task` functions allow to manually split a task into subtasks. There are also the `wait`, `collect` and `as_done` functions which are intended to be applied to sequences of Future objects.

  ```python
  from asyncpal import (ThreadPool, split_map_task, split_starmap_task,
                        wait, collect, as_done)

  def add(x, y):
      return x + y

  with ThreadPool(4) as pool:
      
      numbers = range(100)

      
      futures = list()
      for subtask in split_map_task(add, numbers, numbers, chunk_size=25):
          future = pool.submit(subtask)
          futures.append(future)

      
      for subtask in split_starmap_task(add, zip(numbers, numbers)):
          pass

      
      wait(futures, timeout=42)  # 42 seconds !

      
      result = list()
      for sub_result in collect(futures, timeout=42):
          result.extend(sub_result)
      assert tuple(result) == tuple(map(add, numbers, numbers))

      
      
      for future in as_done(futures, timeout=42):
          pass
  ```


  At the creation of a pool, the programmer can provide an initializer and/or a finalizer. Consequently, each time the pool spawns a worker (whether it is a thread or a process), the initializer is executed at startup, and the finalizer is executed right before the worker shuts down.

  Any exception raised during initialization, finalization, or in between will be caught by the pool, which will then enter a "broken" state. Once the pool is broken, it will shut down other workers, cancel pending tasks, and make them available via the `cancelled_tasks` property. It will also raise a `BrokenPoolError` exception whenever the programmer attempts to submit new tasks.

  Asyncpal offers a way to reduce the risk of encountering a `BrokenPoolError` exception at an inconvenient time by testing the pool beforehand. All pool classes provide a `test` method that replicate the pool with its configuration, perform some computation on it, then close it, letting any exception propagate to the top.


  This section discusses the peculiar cases of daemons and remote exceptions.


  In Python, a thread can be flagged as a [daemon thread](https://docs.python.org/3/library/threading.html#thread-objects). The significance of this flag is that the entire Python program exits when only daemon threads are left.

  Prior to **Python 3.9**, `concurrent.futures` used daemon threads as workers for its thread pool and relied on [atexit](https://docs.python.org/3/library/atexit.html) hooks to gracefully shut down the pools that had not been explicitly closed. For compatibility with subinterpreters, which do not support daemon threads, it was decided to [remove the daemon flag](https://docs.python.org/3/whatsnew/3.9.html#concurrent-futures). However, simply removing the daemon flag would have been [problematic](https://bugs.python.org/issue37266#msg362890).

  The fix for this issue involved stopping the use of atexit hooks and instead relying on an [internal threading atexit hook](https://bugs.python.org/issue37266#msg362960). Asyncpal does not use the daemon flag either. Instead of relying on some internal Python function that might disappear without warning, it implements its own workaround. This workaround involves a single thread for the entire program, started by `asyncpal.pool.GlobalShutdown`, whose job is to join the main thread and, once joined, run the shutdown handlers registered by the pools.

  > Feel free to open an issue to criticize this workaround or to suggest a better idea.


  An exception raised in a worker of a `ProcessPool` must go through a multiprocessing queue to reach the pool instance. To be placed in a multiprocessor queue, a Python object must be **picklable**, that is, it must be possible to [serialize](https://en.wikipedia.org/wiki/Serialization) it with Python's [pickle](https://docs.python.org/3/library/pickle.html) mechanism.

  An exception instance typically contains a traceback object that is not picklable and thus nullified by the `pickle` mechanism. Python's `concurrent.futures` and `multiprocessing.pool.Pool` use a hack that stringifies traceback to move it from the worker process to the main pool process.

  Although this hack is interesting and useful for debugging a `ProcessPool`, it does not preserve the chain of exceptions because the `pickling` process not only nullifies the `__traceback__` attribute of the exception object, but also the `__cause__` and `__context__` attributes.

  Asyncpal also stringifies the traceback, as it is a simpler solution than recreating the traceback object in the main process. Additionally, Asyncpal replicates the exception chain, so the programmer can navigate through the `__cause__` and `__context__` attributes of a remote exception.

  > The `get_remote_traceback` function is exposed to quickly extract the traceback string of a remote exception.



  > This section describes the API and refers to the API reference for more details.

  Asyncpal consists of three key components: the **Pool**, the **Worker**, and the **Future**. From the programmer perspective, the pool represents the main interface of a system that spawns workers as needed and returns Future objects.

  Preemptive concurrency is achieved with the `ThreadPool` class while parallelism is handled by the `ProcessPool` class. Under the hood, the thread pool spawns Python's `threading.Thread` as workers and the process pool spawns Python's `multiprocessing.Process` as workers.



  Preemptive concurrency is achieved with the `ThreadPool` class. Under the hood, the thread pool spawns Python's `threading.Thread` as workers.

  For convenience, the following four derived classes are provided:

  - `SingleThreadPool`: spawns only 1 worker
  - `DualThreadPool`: spawns up to 2 workers
  - `TripleThreadPool`: spawns up to 3 workers
  - `QuadThreadPool`: spawns up to 4 workers

  ```python
  from asyncpal import ThreadPool
  from asyncpal.errors import BrokenPoolError, InitializerError, FinalizerError


  def add(x, y):
    return x + y


  def initializer(*args, **kwargs):
    pass


  def finalizer(*args, **kwargs):
    pass



  pool = ThreadPool(max_workers=4, name="my-pool", idle_timeout=60,
                    initializer=initializer, init_args=(1, 2),
                    init_kwargs={"arg": 1}, finalizer=finalizer,
                    final_args=(3, 4), max_tasks_per_worker=None)

  future = pool.submit(add, 10, 2)


  try:
    pool.test()

  except InitializerError as e:
    e.__cause__  # the cause

  except FinalizerError:
    pass


  except BrokenPoolError:
    pass



  pool.check()


  pool.count_workers()
  pool.count_busy_workers()
  pool.count_free_workers()
  pool.count_pending_tasks()


  pool.spawn_workers(2)  # 2 extra workers

  pool.join(timeout=42)


  pool.shutdown()
  assert pool.is_terminated

  pool.cancelled_tasks
  ```

  > Check out the API reference for [asyncpal.ThreadPool](https://github.com/pyrustic/asyncpal/blob/master/docs/api/modules/asyncpal/__init__/class-ThreadPool.md).


  Parallelism is achieved with the `ProcessPool` class. Under the hood, the process pool spawns Python's `multiprocessing.Process` as workers with the `spawn` context.

  The `ProcessPool` class is similar to the `ThreadPool` class.

  For convenience, the following four derived classes are provided:

  - `SingleProcessPool`: spawns only 1 worker
  - `DualProcessPool`: spawns up to 2 workers
  - `TripleProcessPool`: spawns up to 3 workers
  - `QuadProcessPool`: spawns up to 4 workers


  > Note that you must guard your process pool with `if __name__ == '__main__'` and also avoid writting multiprocessing code directly in the `__main__` module of your projects.

  > Check out the API reference for [asyncpal.ProcessPool](https://github.com/pyrustic/asyncpal/blob/master/docs/api/modules/asyncpal/__init__/class-ProcessPool.md).



  A [Future](https://en.wikipedia.org/wiki/Futures_and_promises) object is not meant to be instantiated by the programmer but rather returned by the `submit` method of pools.

  ```python
  from asyncpal import ThreadPool


  def divide(x, y):
    return x // y


  with ThreadPool(4) as pool:
    
    future = pool.submit(divide, 10, 2)

    
    
    future.add_callback(lambda f: None)

    
    try:
      
      result = future.collect(timeout=42)
    except ZeroDivisionError as e:
      pass
    else:
      assert result == 5

    
    pending_time, running_time = future.duration

    
    future.cancel()

    
    future.wait(timeout=42)  # 42s !

    
    result = future.result
    
    exc = future.exception

    
    future.cancel_flag  # boolean set to True after cancel() is called
    future.is_cancelled # boolean that confirms cancellation
    future.is_done      # True when Completed, Cancelled, or Failed
    future.is_pending   # True while task is pending
    future.is_running   # True while task is running
    
  ```


  > Check out the API reference for [asyncpal.Future](https://github.com/pyrustic/asyncpal/blob/master/docs/api/modules/asyncpal/__init__/class-Future.md).



  > Check out the API reference for [asyncpal](https://github.com/pyrustic/asyncpal/blob/master/docs/api/modules/asyncpal/__init__/funcs.md).



  Feel free to **open an issue** to report a bug, suggest some changes, show some useful code snippets, or discuss anything related to this project. You can also directly email [me](https://pyrustic.github.io/#contact).


  Following are instructions to setup your development environment

  ```bash

  python -m venv venv
  source venv/bin/activate


  git clone https://github.com/pyrustic/asyncpal.git
  cd asyncpal


  pip install -e .


  python -m tests


  deactivate
  ```

  <p align="right"><a href="#readme">Back to top</a></p>


  **Asyncpal** is **cross-platform**. It is built on [Ubuntu](https://ubuntu.com/download/desktop) and should work on **Python 3.8** or **newer**.


  ```bash
  python -m venv venv
  source venv/bin/activate
  ```



  ```bash
  pip install asyncpal
  ```


  ```bash
  pip install asyncpal --upgrade --upgrade-strategy eager
  ```


  ```bash
  deactivate
  ```

  <p align="right"><a href="#readme">Back to top</a></p>


  Hello world, I'm Alex, a tech enthusiast ! Feel free to get in touch with [me](https://pyrustic.github.io/#contact) !

  <br>
  <br>
  <br>

  [Back to top](#readme)

rpm_license:
  MIT License  Copyright (c) 2024 Pyrustic Architect  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: 5796dd41ea705b4b702431e36197af616288b1324b2b40fa95ef5857eca269ef
name: python-asyncpg
arch: src
version: 0.29.0
epoch: 0
release: 1
summary: An asyncio PostgreSQL driver
url: https://pypi.org/project/asyncpg/
rpm_license: Apache License, Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpg-0.29.0-1.src.rpm
checksum_type: sha256
description:
  **asyncpg** is a database interface library designed specifically for
  PostgreSQL and Python/asyncio.  asyncpg is an efficient, clean implementation
  of PostgreSQL server binary protocol for use with Python's ``asyncio``
  framework.  You can read more about asyncpg in an introductory
  `blog post <http://magic.io/blog/asyncpg-1m-rows-from-postgres-to-python/>`_.
  asyncpg requires Python 3.8 or later and is supported for PostgreSQL
  versions 9.5 to 16.  Older PostgreSQL versions or other databases implementing
  the PostgreSQL protocol *may* work, but are not being actively tested.


pkgId: 91f51f4b602cf30995aaea6bcc8d6e6684c9cfadc64dd48a78662c52e07ce9c1
name: python-asyncpg-listen
arch: src
version: 0.0.7
epoch: 0
release: 1
summary: Helps to use PostgreSQL listen/notify with asyncpg
url: https://github.com/Pliner/asyncpg-listen
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpg-listen-0.0.7-1.src.rpm
checksum_type: sha256
description:
  This library simplifies usage of listen/notify with [asyncpg](https://github.com/MagicStack/asyncpg):
  1. Handles loss of a connection
  2. Simplifies notifications processing from multiple channels
  3. Setups a timeout for receiving a notification
  4. Allows to receive all notifications/only last notification depending on ListenPolicy.

  ```python
  import asyncio
  import asyncpg
  import asyncpg_listen


  async def handle_notifications(notification: asyncpg_listen.NotificationOrTimeout) -> None:
      print(f"{notification} has been received")


  async def main():
      listener = asyncpg_listen.NotificationListener(asyncpg_listen.connect_func(user="postgres"))
      listener_task = asyncio.create_task(
          listener.run(
              {"simple": handle_notifications},
              policy=asyncpg_listen.ListenPolicy.LAST,
              notification_timeout=5
          )
      )

      await asyncio.sleep(1)

      connection = await asyncpg.connect(user="postgres")
      try:
          for i in range(42):
              await connection.execute(f"NOTIFY simple, '{i}'")
      finally:
          await connection.close()

      await asyncio.sleep(1)

      listener_task.cancel()


  asyncio.run(main())

  ```



  * [Support python 3.12 and end support of 3.8](https://github.com/anna-money/asyncpg-listen/pull/211)
  * [End support of python 3.9 and 3.10](https://github.com/anna-money/asyncpg-listen/pull/215)
  * [Eagerly start notification processing with Python 3.12+](https://github.com/anna-money/asyncpg-listen/pull/212)
  * [Switch to asyncio.TaskGroup](https://github.com/anna-money/asyncpg-listen/pull/214)




  * [Add support of python 3.11](https://github.com/anna-money/asyncpg-listen/pull/135)




  * [Wait for tasks cancellation](https://github.com/anna-money/asyncpg-listen/pull/96)




  * [Reset failed attempts counter on successful connection](https://github.com/anna-money/asyncpg-listen/pull/58)




  * [Support python 3.8](https://github.com/anna-money/asyncpg-listen/pull/55)




  * [Support async-timeout 4.0+](https://github.com/Pliner/asyncpg-listen/pull/10)




  * A first version


pkgId: 120eedd21297721915524951b16d1d636046cc352decc55a71abf1cef5a3e23a
name: python-asyncpg-lite
arch: src
version: 0.3.1.3
epoch: 0
release: 1
summary: A simple asynchronous library based on SQLAlchemy, powered by asyncpg
url: https://github.com/Yakvenalex/asyncpg_lite
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpg-lite-0.3.1.3-1.src.rpm
checksum_type: sha256
description:
  ```markdown
  `asyncpg_lite` is a Python library designed to facilitate asynchronous interactions with a PostgreSQL database using
  SQLAlchemy and asyncpg. This library provides methods for connecting to the database, creating tables, inserting,
  updating, selecting, and deleting data. It also includes functionality for managing table schemas and handling conflict
  resolutions during data insertion.

  ```



  - **Asynchronous Database Operations**: Utilizes asyncio and SQLAlchemy for non-blocking database interactions.
  - **Dynamic Table Management**: Create, update, delete, and drop tables dynamically.
  - **Conflict Resolution**: Handle unique key conflicts during data insertion with update or ignore strategies.
  - **Logging**: Integrated logging to monitor database operations and issues.



  Install the library using pip:

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



  ```python
  import asyncio
  from asyncpg_lite import DatabaseManager
  import logging

  async def main_work():
      from sqlalchemy import Integer, String
      async with DatabaseManager(db_url= "postgresql://admin:sdaDSfa231@194.2.170.207:5432/my_db",
                                 log_level=logging.DEBUG,
                                 deletion_password="djdahEWE33a@@das") as db:
          await db.create_table(table_name='my_table_name', columns=[
              {"name": "user_id", "type": Integer, "options": {"primary_key": True, "autoincrement": False}},
              {"name": "first_name", "type": String},
              {"name": "last_name", "type": String},
              {"name": "age", "type": Integer},
          ])
          user_info = {'user_id': 1, 'first_name': 'Alexey', 'last_name': 'Yakovenko', 'age': 31}
          await db.insert_data_with_update(table_name='my_table_name',
                                           records_data=user_info,
                                           conflict_column='user_id',
                                           update_on_conflict=False)

          users_info = [{'user_id': 1, 'first_name': 'Alex', 'last_name': 'Yakovenko', 'age': 31},
                        {'user_id': 2, 'first_name': 'Oleg', 'last_name': 'Antonov', 'age': 20},
                        {'user_id': 3, 'first_name': 'Dmitro', 'last_name': 'Pavlych', 'age': 14},
                        {'user_id': 4, 'first_name': 'Ivan', 'last_name': 'Sidorov', 'age': 66},
                        {'user_id': 5, 'first_name': 'John', 'last_name': 'Doe', 'age': 81}]

          await db.insert_data_with_update(table_name='my_table_name',
                                           records_data=users_info,
                                           conflict_column='user_id',
                                           update_on_conflict=True)

          all_data = await db.select_data('my_table_name')
          for i in all_data:
              print(i)

          one_data = await db.select_data('my_table_name', one_dict=True, where_dict={'user_id': 1})
          print(one_data)

          data_with_filters = await db.select_data('my_table_name',
                                                   where_dict=[{'user_id': 1}, {'user_id': 3}, {'last_name': 'Doe'}])

          for i in data_with_filters:
              print(i)

          
          await db.delete_data(table_name='my_table_name', where_dict={'user_id': 3})

          
          await db.delete_data(table_name='my_table_name', where_dict=[{'user_id': 2}, {'user_id': 5}])

          all_data = await db.select_data('my_table_name')
          for i in all_data:
              print(i)


  if __name__ == "__main__":
      asyncio.run(main_work())
  ```



  Этот проект лицензируется по лицензии [MIT](https://choosealicense.com/licenses/mit/).


pkgId: 7e8eae2f6740641779dce8fd41e1221f24bde5299a763ae57372492dad9a5585
name: python-asyncpg-stubs
arch: src
version: 0.30.0
epoch: 0
release: 1
summary: asyncpg stubs
url: https://github.com/bryanforbes/asyncpg-stubs
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpg-stubs-0.30.0-1.src.rpm
checksum_type: sha256
description:
  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/bryanforbes/asyncpg-stubs/blob/master/LICENSE)
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
  [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
  [![Checked with pyright](https://img.shields.io/badge/pyright-checked-informational.svg)](https://github.com/microsoft/pyright/)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

  This package contains type stubs to provide more precise static types and type inference for [asyncpg](https://github.com/MagicStack/asyncpg).



  ```shell
  pip install asyncpg-stubs
  ```



  Make sure you have [poetry](https://python-poetry.org/) installed.

  ```shell
  poetry install
  poetry run pre-commit install --hook-type pre-commit
  ```



  The **major** and **minor** version numbers of `asyncpg-stubs` will match the **major**
  and **minor** version numbers of the `asyncpg` release the stubs represent. For
  instance, if you are using `asyncpg` version `0.25.0`, you would use `asyncpg-stubs`
  version `0.25.X` where `X` is the latest **patch** version of the stubs. Using semver
  dependencty specifications, `asyncpg-stubs` version `~0.25` is designed to work with
  `asyncpg` version `~0.25`.

  In addition, `asyncpg-stubs` will indicate which versions of the runtime library are compatible through its dependency information (as suggested in PEP-561).


pkgId: 2abcb7064db2ee04d08404a2f7c52af49592f58db69606a4ffdd368b655eb2f5
name: python-asyncpg-trek
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: A simple migrations system for asyncpg
url: https://github.com/adriangb/asyncpg-trek
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpg-trek-0.4.0-1.src.rpm
checksum_type: sha256
description:
  A simple library for managing migrations.



  Me.
  But maybe if you use [asyncpg] and prefer to write migrations as raw SQL (i.e. you're not using SQLAlchemy/Alembic) then you as well.



  - **async**: migrations usually don't benefit from being async, but you benefit from using the same database driver in as your application uses (only [asyncpg] is supported).
  - **simple**: you just create `.sql` or Python files in a folder of your choosing and point this tool at that folder. No need to fight a new API to write migrations in.
  - **API centric**: there is no CLI to figure out, _you_ decide how migrations get called, _you_ control how the database connection gets created. This makes it trivial to run migrations in tests, wrap them in a CLI or run them via an exposed HTTP endpoint.
  - **declarative**: just specify the version you want and the library figures out if it needs an upgrade, downgrade or no action.



  ```python
  from pathlib import Path

  import asyncpg
  from asyncpg_trek import plan, execute, Direction
  from asyncpg_trek.asyncpg import AsyncpgBackend

  MIGRATIONS_DIR = Path(__file__).parent / "migrations"

  async def migrate(
      conn: asyncpg.Connection,
      target_revision: str,
  ) -> None:
      backend = AsyncpgBackend(conn)
      async with backend.connect() as conn:
          planned = await plan(conn, backend, MIGRATIONS_DIR, target_revision=target_revision, direction=Direction.up)
          await execute(conn, backend, planned)
  ```

  You could make this an entrypoint in a docker image, an admin endpoint in your API or a helper function in your tests (or all of the above).
  How you run your migrations depends on the complexity of your system.
  For example, for simple systems it may be easy to run migrations on app startup based on a hardcoded revision.
  For more complex systems you may want to run migrations manually or via an admin API.

  See this release on GitHub: [v0.4.0](https://github.com/adriangb/asyncpg-trek/releases/tag/0.4.0)


pkgId: 5fee5ba59c023d45c4a8d8abbe0e18a4abdcb4c34e782692b4a57ba774306404
name: python-asyncpgdb
arch: src
version: 0.0.23
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/asyncpgdb/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpgdb-0.0.23-1.src.rpm
checksum_type: sha256
description:
  ```markdown


  `asyncpgdb` is a Python library that provides an asynchronous database interface built on top of `asyncpg`. One of its unique features is a custom query formatting style that allows you to write parameterized queries using a more readable syntax.



  You can install `asyncpgdb` using pip:

  ```bash
  pip install asyncpgdb
  ```



  - Asynchronous database operations.
  - Connection pooling for efficient resource management.
  - Simplified query execution and result handling.
  - Custom query formatting style for better readability.





  To establish a connection to your PostgreSQL database, create an instance of the `Database` class:

  ```python
  from asyncpgdb import Database

  db = Database(dsn="your_database_dsn_here")
  await db.connect()
  ```



  You can execute queries using the `execute` method. The library supports a custom query formatting style that allows you to parameterize your queries using named variables, enclosed in `$( )`:

  ```python
  query = "SELECT name, age FROM users WHERE name = $(name) AND age > $(age)"
  result = await db.execute(query, vars={"name": "John", "age": 30})


  rows = await result.fetch_all()
  ```



  `asyncpgdb` provides automatic connection management, so you don't need to worry about acquiring and releasing connections manually:

  ```python
  async with db.acquire_connection() as conn:
      
      pass  # Connection is automatically released after this block
  ```



  `asyncpgdb` manages a connection pool by default, so you can specify the minimum and maximum number of connections in the pool when creating a `Database` instance:

  ```python
  db = Database(dsn="your_database_dsn_here", min_size=2, max_size=10)
  ```





  ```python
  query = "SELECT name, age FROM users WHERE age > $(age)"
  results = await db.execute(query, vars={"age": 30})
  users = await results.fetch_all()
  ```



  ```python
  query = "INSERT INTO products (name, price) VALUES ($(name), $(price))"
  await db.execute(query, vars={"name": "Widget", "price": 19.99})
  ```



  ```python
  query = "UPDATE orders SET status = $(status) WHERE id = $(id)"
  await db.execute(query, vars={"status": "shipped", "id": 123})
  ```



  For more details and advanced usage, refer to the [documentation](link_to_docs).



  This library is licensed under the MIT License.

  ```

  Please replace `"your_database_dsn_here"` with your actual database DSN, and ensure that you have the required dependencies installed to use `asyncpgdb`. You can find detailed documentation and usage examples in the official documentation.
  ```


pkgId: 674d5613a4296fde657106d7b79fdc98200b01390b4a91d0dcd9d18f66597d8d
name: python-asyncpgw
arch: src
version: 0.3.6
epoch: 0
release: 1
summary: これはdiscordpyとasyncpgを使用し、POSTTGRESQLにデータを保存する処理があるBOTを作ってる日本人向けに作成したものです
url: https://github.com/furimu1234/asyncpgw/tree/main/asyncpgw
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpgw-0.3.6-1.src.rpm
checksum_type: sha256
description:
  これはdiscord.pyとasyncpgを使用し、POSTTGRESQLにデータを保存する処理があるBOTを作ってる日本人向けに作成したものです。





  ```
  python3 -m pip install asyncpg
  ```



  ソースコードがかなり長くなってしまうので、
  [testsフォルダー](https://github.com/furimu1234/asyncpgw/tree/main/tests)
  にまとめてあります。

  尚、このコードは`COG`を使用しています。

  テキストチャットで発言するとユーザーのレベルがあがるコードを例にしてます。




  0.0.1

  ・テスト

  0.0.2

  ・descriptionの変更

  0.0.3

  ・カラムが空だった場合に対応

  0.0.4

  ・bug fix

  0.0.5

  ・bug fix

  0.0.6

  ・bug fix

  0.0.7

  ・bug fix

  0.0.8

  ・　ListpgクラスのTypeErrorが出るバグを直した。

  0.0.9

  ・　Listpgクラスの)の位置を直した

  0.1.0

  ・　Listpgクラスのbugを直した

  0.1.1

  ・limit_fetchsのbugを直した

  0.1.2

  ・同じ

  0.1.3

  ・ListPgをPgにまとめた
  ・sortfetchとlimitfetchを追加

  0.1.4

  ・sort_fetchのバグを直した

  0.1.5

  ・sort_fetchのバグを直した

  0.1.6

  ・sort_fetchのバグを直した

  0.1.7 ~ 0.2.5

  ・カラムが指定されない時に対応した。

  0.2.6

  ・カラムの追加削除関数を追加

  0.2.7

  ・カラム削除関数のバグを直した


pkgId: 090df743ab8a482ca2f08df634900542a696768640e34f93018961d6fc7ccd56
name: python-asyncpgx
arch: src
version: 1.5.0
epoch: 0
release: 1
summary: User-friendly extensions for asyncpg
url: https://github.com/laukhin/asyncpgx
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpgx-1.5.0-1.src.rpm
checksum_type: sha256
description:
  [![Build passed](https://img.shields.io/github/workflow/status/laukhin/asyncpgx/CI)](https://github.com/laukhin/asyncpgx/actions?query=workflow%3ACI)
  [![Test coverage](https://img.shields.io/codecov/c/github/laukhin/asyncpgx)](https://codecov.io/gh/laukhin/asyncpgx)
  [![Version](https://img.shields.io/pypi/v/asyncpgx)](https://pypi.org/project/asyncpgx/)

  Extensions for asyncpg.

  Based on the [asyncpg](https://github.com/MagicStack/asyncpg) and highly inspired by the [sqlx](https://github.com/jmoiron/sqlx) package

  This package supports 3.6+ python versions


  Use `pip install asyncpgx`


  This is a thin wrapper on the `asyncpg` package.
  Our purpose is to provide convenient extensions to the original package.
  We're trying to delegate as much work as we can to the asyncpg (basically our extension methods are high-level proxies to the underlying ones)
  and make only converting job.
  Original asyncpg API stays the same, you can see it in the [asyncpg documentation](https://magicstack.github.io/asyncpg/current/).


  * queries with named parameters, i.e.
  ```python
  import asyncpgx

  connection = await asyncpgx.connect('postgresql://127.0.0.1:5432')
  await connection.named_fetch('''SELECT field FROM some_table WHERE id <= :id;''', {'id': 1})
  ```
  * prepared statements with named parameters, i.e.
  ```python
  import asyncpgx

  connection = await asyncpgx.connect('postgresql://127.0.0.1:5432')
  prepared_statement = await connection.named_prepare('''SELECT field FROM some_table WHERE id <= :id;''')
  await prepared_statement.named_fetch({'id': 1})
  ```


  You can find project documentation [here](https://laukhin.github.io/asyncpgx/index.html)


  You can find all releases description [here](https://github.com/laukhin/asyncpgx/releases)


pkgId: c7d94006b0d393e58404bfb1693b3ba6752b1d3e6533113ee79d78bd923b0a64
name: python-asyncpool
arch: src
version: 1.0
epoch: 0
release: 1
summary: Async coroutine worker pool
url: http://github.com/calidog/asyncpool/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpool-1.0-1.src.rpm
checksum_type: sha256
description:
  AsyncPool is a asyncio-based coroutine worker pool, intended to process through large amounts of jobs
  efficiently and with explicit timeouts.


pkgId: ab915be45fd79fc42e68c24ed22c2e6c370233598c874e6fe8eeff877ffe3db5
name: python-asyncpraw
arch: src
version: 7.7.1
epoch: 0
release: 1
url: https://pypi.org/project/asyncpraw/
rpm_license: Simplified BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpraw-7.7.1-1.src.rpm
checksum_type: sha256
summary:
  Async PRAW, an abbreviation for "Asynchronous Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

description:
  Async PRAW, an abbreviation for "Asynchronous Python Reddit API Wrapper", is a Python
  package that allows for simple access to Reddit's API. Async PRAW aims to be easy to use
  and internally follows all of `Reddit's API rules
  <https://github.com/reddit/reddit/wiki/API>`_. With Async PRAW there's no need to
  introduce ``sleep`` calls in your code. Give your client an appropriate user agent and
  you're set.


pkgId: 6a23b79637f190a73aa61af7436ebbc28c374c365a1022d9052e6c2cc07ec596
name: python-asyncpushbullet
arch: src
version: 0.19.8
epoch: 0
release: 1
summary: A synchronous and asyncio-based client for pushbullet.com
url: https://github.com/rharder/asyncpushbullet
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpushbullet-0.19.8-1.src.rpm
checksum_type: sha256
description:
  This is a python library for synchronous and asyncio-based
  communication with the wonderful
  `Pushbullet <https://www.pushbullet.com>`__ service. It allows you to
  send push notifications to your computer,
  `Android <https://play.google.com/store/apps/details?id=com.pushbullet.android>`__,
  and `iOS <https://itunes.apple.com/us/app/pushbullet/id810352052>`__
  devices.
  In order to use the API you need an API key that can be obtained
  `here <https://www.pushbullet.com/account>`__. This is user specific and
  is used instead of passwords.
  This is a fork of the synchronous-only
  `pushbullet.py <https://github.com/randomchars/pushbullet.py>`__
  project from randomchars, which uses the ``pushbullet`` namespace.
  This project uses ``asyncpushbullet``.  I have made some changes to the
  ``pushbullet`` package, and you ought to be able to use the regular
  synchronous functions alongside the ``asyncio``-enabled versions.
  Over time these have drifter further apart, so if you drop in the
  ``asyncpushbullet`` package in place of an older ``pushbullet`` package,
  you will probably need to make some changes to your code in terms of
  function names and error handling.


pkgId: 0246a81d633ed3622f66d0d238f151f83141a37cb9248dcc956f2df742fb5a8e
name: python-asyncpy
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: Use asyncio and aiohttp's concatenated web crawler framework
url: https://github.com/lixi5338619/asyncpy.git
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpy-1.2.0-1.src.rpm
checksum_type: sha256
description:
  安装: pip install asyncpy




  Asynpy 是一个异步请求框架，基于asyncio和aiohttp，实现便捷高效的从网络上抓取数据

  "With reference to the design pattern of scrapy, an asynchronous co-processing method is adopted to simplify some operations and complete the tasks of web crawler more easily and efficiently"




  asyncio是Python 3.4版本引入用来编写并发代码的标准库，直接内置了对异步IO的支持。
  asyncio的编程模型就是一个单线程的消息循环。
  从asyncio模块中直接获取一个EventLoop的引用，然后把需要执行的协程扔到EventLoop中执行，就实现了异步IO。




  aiohttp - 基于asyncio实现的HTTP框架。
  aiohttp强调的是异步并发。提供了对asyncio/await的支持，可以实现单线程并发IO操作。








  - 多线程是基于系统的，协程是基于线程的，多线程上下文切换有陷入内核态的消耗，协程就没有，协程更轻量
  - Python的GIL阻止两个线程在同一个程序中同时执行，有时候多线程并没有单线程速度快。
  - 而Scrapy是基于twited的单线程框架，消息队列和事件循环在一个线程来回切换，downloader是多线程的





  https://blog.csdn.net/weixin_43582101/article/details/106258518

  https://github.com/lixi5338619/asyncpy


  Thanks : Scrapy、Ruia、Looter、asyncio、aiohttp


  公众号《Pythonlx》


pkgId: 49b0d62eff52437892bc19f191f2cfe0ff2133f9bd24b5457ea0c635bc7b6650
name: python-asyncpysupla
arch: src
version: 0.0.5
epoch: 0
release: 1
summary: Simple Supla's OpenAPI async wrapper
url: https://github.com/mwegrzynek/asyncpysupla
rpm_license: Apache License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncpysupla-0.0.5-1.src.rpm
checksum_type: sha256
description:
  A simplistic (and incomplete!) async wrapper for [Supla's OpenAPI](https://cloud.supla.org/api/docs.html), used mainly for [HomeAssistant](https://www.home-assistant.io/) integration.
  This is [PySupla's](https://github.com/mwegrzynek/pysupla) sister library.
  I'm in no way affiliated with Supla and Zamel: I love their devices, but prefer to use all my Smart Home devices from one app.
  See tests directory for usage examples.
  Currently, there are only integration tests: to run them, you have to export the following environmental variables:
  * SUPLA_SERVER - an address of Supla's cloud server you want to test against (ex. srv1.supla.org, or (better) your own test instance).
  * SUPLA_PERSONAL_ACCESS_TOKEN - a personal access token you can get [here](https://cloud.supla.org/integrations/tokens) (if you use Supla's server of course). PySupla currently does not support OAuth2.
  * SUPLA_SHUTTER_ID - an ID of a shutter type device to test against (this is what I'm mainly using Supla for).
  Contributors welcome!


pkgId: 4ee6f7d4c31317b8c0b608dd3b51195ac403b0e0c72daf629d301846dade8c82
name: python-asyncqt
arch: src
version: 0.8.0
epoch: 0
release: 1
summary: Implementation of the PEP 3156 Event-Loop with Qt.
url: https://github.com/gmarull/asyncqt
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncqt-0.8.0-1.src.rpm
checksum_type: sha256
description:
  ``asyncqt`` is an implementation of the ``PEP 3156`` event-loop with Qt. This
  package is a fork of ``quamash`` focusing on modern Python versions, with
  some extra utilities, examples and simplified CI.


pkgId: 1946f05608593e422a4fab6efe40d0d125dd41407eab6e4fc7a967fd45bfdcad
name: python-asyncserf
arch: src
version: 0.21.1
epoch: 0
release: 1
summary: Python client for the Serf orchestration tool
url: https://github.com/smurfix/asyncserf
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncserf-0.21.1-1.src.rpm
checksum_type: sha256
description:
  asyncserf is an async Python interface to Serf, the decentralised solution
  for service discovery and orchestration.
  It uses `anyio <https://github.com/agronholm/anyio>` as its underlying
  async framework.


pkgId: fd88422930f124075f9165ec57104932e3b4fd9244a4932ee21d04f14c3916d1
name: python-asyncsnmplib
arch: src
version: 0.2.2
epoch: 0
release: 1
summary: Library for async SNMP queries
url: https://github.com/cesbit/asyncsnmplib
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncsnmplib-0.2.2-1.src.rpm
checksum_type: sha256
description:
  [![CI](https://github.com/cesbit/asyncsnmplib/workflows/CI/badge.svg)](https://github.com/cesbit/asyncsnmplib/actions)
  [![Release Version](https://img.shields.io/github/release/cesbit/asyncsnmplib)](https://github.com/cesbit/asyncsnmplib/releases)





  ```
  pip install asyncsnmplib
  ```


pkgId: 9e14fc4fee2d42c6a25e79138b3002f1a58b2b5924dd6335af6795d367a18216
name: python-asyncssh
arch: src
version: 2.17.0
epoch: 0
release: 1
summary: AsyncSSH: Asynchronous SSHv2 client and server library
url: http://asyncssh.timeheart.net
rpm_license: Eclipse Public License v2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncssh-2.17.0-1.src.rpm
checksum_type: sha256
description:
  AsyncSSH is a Python package which provides an asynchronous client and
  server implementation of the SSHv2 protocol on top of the Python 3.6+
  asyncio framework.
    import asyncio, asyncssh, sys
    async def run_client():
        async with asyncssh.connect('localhost') as conn:
            result = await conn.run('echo "Hello!"', check=True)
            print(result.stdout, end='')
    try:
        asyncio.get_event_loop().run_until_complete(run_client())
    except (OSError, asyncssh.Error) as exc:
        sys.exit('SSH connection failed: ' + str(exc))
  Check out the `examples`__ to get started!
  __ http://asyncssh.readthedocs.io/en/stable/#client-examples


pkgId: 878bdd78185d74557d12d47b1a2294aa6955c74d1f676b2d725251bc4fadba98
name: python-asynctempfile
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: Async version of tempfile
url: https://github.com/alemigo/asynctempfile
rpm_license: GNU General Public License v3 (GPLv3)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asynctempfile-0.5.0-1.src.rpm
checksum_type: sha256
description:
  Async interface for the standard tempfile module.  Implements the following
  4 classes:

  - TemporaryFile
  - NamedTemporaryFile
  - SpooledTemporaryFile
  - TemporaryDirectory

  Blocking methods are delegated to threadpools using loop.run_in_executor().
  Non-blocking methods and properties retain a sync interface.  SpooledTemporaryFile only delegates if the in-memory stream is rolled to
  disk.  New instances of the above classes return wrapped with a context
  manager allowing use with async with and async for.



  pip install asynctempfile



  An extension of github.com/Tinche/aiofiles


  ```
  import asynctempfile

  async with asynctempfile.TemporaryFile('wb+') as f:
      await f.write(b'Hello, World!')
  ```
  ```
  import asynctempfile

  async with asynctempfile.NamedTemporaryFile('wb+') as f:
      await f.write(b'Line1\n Line2')
      await f.seek(0)
      async for line in f:
          print(line)
  ```


  aiofiles



  **0.5.0**
  * Adjusted TemporaryDirectory to return its path as opposed to the object when used with a context manager, aligning behaviour with the sync library (thank you to hellocoldworld).
  * Fixed name attribute for TemporaryFile as this property is now included in the aiofiles wrapper.


pkgId: 6fa1863d1fe41f2d53d681b58d35ebdec58dbc81e4119ed57aa286056729e135
name: python-asynctor
arch: src
version: 0.6.8
epoch: 0
release: 1
summary: Async functions to compare with anyio and asyncio, and toolkit to read excel with async/await.
url: https://github.com/waketzheng/asynctor
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asynctor-0.6.8-1.src.rpm
checksum_type: sha256
description:
  Successfully installed asynctor
  ```
  Or use poetry:
  ```console
  poetry add asynctor
  ```

  - Async function that compare asyncio but use anyio: `bulk_gather/gather/run`
  ```py
  >>> import asynctor
  >>> async def foo():
  >>> await asynctor.bulk_gather([foo(), foo()], limit=200)
  (1, 1)
  >>> await asynctor.gather(foo(), foo())
  (1, 1)
  >>> asynctor.run(gather(foo(), foo()))
  (1, 1)
  ```
  - timeit
  ```py
  >>> import time
  >>> import anyio
  >>> from asynctor import timeit
  >>> @timeit
  >>> await sleep()
  sleep_test Cost: 3.0 seconds
  >>> @timeit
  >>> sleep_test2()
  sleep_test2 Cost: 3.1 seconds
  ```
  - AsyncRedis
  ```py
  from contextlib import asynccontextmanager
  from asynctor import AsyncRedis
  from fastapi import FastAPI, Request
  @asynccontextmanager
  async def lifespan(app):
      async with AsyncRedis(app):
          yield
  app = FastAPI(lifespan=lifespan)
  @app.get('/')
  async def root(request: Request) -> list[str]:
      return await AsyncRedis(request).keys()
  @app.get('/redis')
  async def get_value_from_redis_by_key(request: Request, key: str) -> str:
      value = await AsyncRedis(request).get(key)
      if not value:
          return ''
      return value.decode()
  ```
  - Read Excel File(need to install with xls extra: `pip install "asynctor[xls]"`)
  ```py
  >>> from asynctor.xls import load_xls
  >>> await load_xls('tests/demo.xlsx')
  [{'Column1': 'row1-\\t%c', 'Column2\nMultiLines': 0, 'Column 3': 1, 4: ''}, {'Column1': 'r2c1\n00', 'Column2\nMultiLines': 'r2 c2', 'Column 3': 2, 4: ''}]
  ```


pkgId: 7ef1edab293eeb11d8f7bb87ab8e74469765ab72dbf7cb805d86668e4d439cbe
name: python-asynctradier
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Async api wrapper for [Tradier](https://documentation.tradier.com/).
url: https://pypi.org/project/asynctradier/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asynctradier-1.0.0-1.src.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/jiak94/asynctradier/graph/badge.svg?token=T66WaJLNDd)](https://codecov.io/gh/jiak94/asynctradier)
  [![PyPI version](https://badge.fury.io/py/asynctradier.svg)](https://badge.fury.io/py/asynctradier)
  ![Test](https://github.com/jiak94/asynctradier/actions/workflows/run_test.yaml/badge.svg)
  [![Documentation Status](https://readthedocs.org/projects/asynctradier/badge/?version=latest)](https://asynctradier.readthedocs.io/en/latest/?badge=latest)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/asynctradier)
  [![CodeFactor](https://www.codefactor.io/repository/github/jiak94/asynctradier/badge)](https://www.codefactor.io/repository/github/jiak94/asynctradier)
  Async api wrapper for [Tradier](https://documentation.tradier.com/).

  This is _NOT_ an official package of Tradier.



  `pip install asynctradier`

  if your are using poetry

  `poetry add asynctradier`



  [Read The Doc](https://asynctradier.readthedocs.io/en/latest/)





  :white_check_mark: Get User Profile

  :white_check_mark: Get Balances

  :white_check_mark: Get Positions

  :white_check_mark: Get History

  :white_check_mark: Get Gain/Loss

  :white_check_mark: Get Orders

  :white_check_mark: Get an Order



  :white_check_mark: Modify Order

  :white_check_mark: Cancel Order

  :white_check_mark: Place Equity Order

  :white_check_mark: Place Option Order

  :white_check_mark: Place Multileg Order

  :white_check_mark: Place Combo Order

  :white_square_button: Place OTO Order

  :white_square_button: Place OCO Order

  :white_square_button: Place OTOCO Order



  :white_check_mark: Get Quotes

  :white_check_mark: Get Option Chains

  :white_check_mark: Get Option Strikes

  :white_check_mark: Get Option Expirations

  :white_check_mark: Lookup Option Symbols

  :white_check_mark: Get Historical Quotes

  :white_check_mark: Get Time and Sales

  :white_check_mark: Get ETB Securities

  :white_check_mark: Get Clock

  :white_check_mark: Get Calendar

  :white_check_mark: Search Companies

  :white_check_mark: Lookup Symbol



  :white_check_mark: Market WebSocket

  :white_check_mark: Account WebSocket



  :white_check_mark: Get Watchlists

  :white_check_mark: Get Watchlist

  :white_check_mark: Create Watchlist

  :white_check_mark: Update Watchlist

  :white_check_mark: Delete Watchlist

  :white_check_mark: Add Symbols

  :white_check_mark: Remove a Symbol


pkgId: 7770b35d660ea3b639b6aa48d579c64f476aec1eafaf3acce7fe5bbc0128774f
name: python-asyncua
arch: src
version: 1.1.5
epoch: 0
release: 1
summary: Pure Python OPC-UA client and server library
url: http://freeopcua.github.io/
rpm_license: GNU Lesser General Public License v3 or later
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncua-1.1.5-1.src.rpm
checksum_type: sha256
description:
  The OPC UA binary protocol implementation has undergone extensive testing with various OPC UA stacks. The API offers both a low level interface to send and receive all UA defined structures and high level classes allowing to write a server or a client in a few lines. It is easy to mix high level objects and low level UA calls in one application. Most low level code is autogenerated from xml specification.
  The test coverage reported by coverage.py is over 95%, with the majority of the non-tested code being autogenerated code that is not currently in use.

  opcua-asyncio is open-source and comes with absolutely no warranty. We try to keep it as bug-free as possible, and try to keep the API stable, but bugs and API changes will happen! In particular, API changes are expected to take place prior to any 1.0 release.
  Some renaming of methods from get_xx to read_xx and set_xx to write_xxx have been made to better follow OPC UA naming conventions
  Version 0.9.9 introduces some argument renaming due to more automatic code generation. Especially the arguments to NodeId, BrowseName, LocalizedText and DataValue, which are now CamelCase instead of lower case, following the OPC UA conventions used in all other structures in this library

  With pip
      pip install asyncua

  We assume that you already have some experience with Python, the asyncio module, the async / await syntax and the concept of asyncio Tasks.

  The `Client` class provides a high level API for connecting to OPC UA servers, session management and access to basic
  address space services.
  The client can be used as a context manager. The client will then automatically connect and disconnect withing the `with`syntax.
  ```python
  from asyncua import Client
  async with Client(url='opc.tcp://localhost:4840/freeopcua/server/') as client:
      while True:
          
          node = client.get_node('i=85')
          value = await node.read_value()
  ```
  Of course, you can also call the `connect`, `disconnect` methods yourself if you do not want to use the context manager.
  See the example folder and the code for more information on the client API.

  The `Node` class provides a high level API for management of nodes as well as data access services.

  The `Subscription` class provides a high level API for management of monitored items.

  The `Server` class provides a high level API for creation of OPC UA server instances.

  The documentation is available here [ReadTheDocs](http://opcua-asyncio.readthedocs.org/en/latest/).
  The API remains mostly unchanged with regards to [python-opcua](http://opcua-asyncio.rtfd.io/).
  The main difference is that most methods are now asynchronous.
  Please have a look at [the examples](https://github.com/FreeOpcUa/opcua-asyncio/blob/master/examples) and/or the code.
  A simple GUI client is available at: https://github.com/FreeOpcUa/opcua-client-gui
  Browse the examples: https://github.com/FreeOpcUa/opcua-asyncio/tree/master/examples
  The minimal examples are a good starting point.
  Minimal client example: https://github.com/FreeOpcUa/opcua-asyncio/blob/master/examples/client-minimal.py
  Minimal server example: https://github.com/FreeOpcUa/opcua-asyncio/blob/master/examples/server-minimal.py
  A set of command line tools also available: https://github.com/FreeOpcUa/opcua-asyncio/tree/master/tools
  -   `uadiscover `(find_servers, get_endpoints and find_servers_on_network calls)
  -   `uals `(list children of a node)
  -   `uahistoryread`
  -   `uaread `(read attribute of a node)
  -   `uawrite `(write attribute of a node)
  -   `uacall `(call method of a node)
  -   `uasubscribe `(subscribe to a node and print datachange events)
  -   `uaclient `(connect to server and start python shell)
  -   `uaserver `(starts a demo OPC UA server)
      `tools/uaserver --populate --certificate cert.pem --private_key pk.pem`
  How to generate certificate: https://github.com/FreeOpcUa/opcua-asyncio/tree/master/examples/generate_certificate.sh

  What works:
  -   connection to server, opening channel, session
  -   browsing and reading attributes value
  -   getting nodes by path and nodeids
  -   creating subscriptions
  -   subscribing to items for data change
  -   subscribing to events
  -   adding nodes
  -   method call
  -   user and password
  -   history read
  -   login with certificate
  -   communication encryption
  -   removing nodes
  Tested servers: freeopcua C++, freeopcua Python, prosys, kepware, beckhoff, winCC, B&R, …
  Not implemented yet:
  -   localized text feature
  -   XML protocol
  -   UDP (PubSub stuff)
  -   WebSocket
  -   maybe automatic reconnection...

  What works:
  -   creating channel and sessions
  -   read/set attributes and browse
  -   getting nodes by path and nodeids
  -   autogenerate address space from spec
  -   adding nodes to address space
  -   datachange events
  -   events
  -   methods
  -   basic user implementation (one existing user called admin, which can be disabled, all others are read only)
  -   encryption
  -   certificate handling
  -   removing nodes
  -   history support for data change and events
  -   more high level solution to create custom structures
  Tested clients: freeopcua C++, freeopcua Python, uaexpert, prosys, quickopc
  Not yet implemented:
  -   UDP (PubSub stuff)
  -   WebSocket
  -   session restore
  -   alarms
  -   XML protocol
  -   views
  -   localized text features
  -   better security model with users and password

  Setting up the standard address-space from XML is the most time-consuming step of the startup process which may lead to
  long startup times on less powerful devices like a Raspberry Pi. By passing a path to a cache-file to the server constructor,
  a shelve holding the address space will be created during the first startup. All following startups will make use of the
  cache-file which leads to significantly better startup performance (~3.5 vs 125 seconds on a Raspberry Pi Model B).

  Code follows PEP8 apart for line lengths which should be max 160 characters and OPC UA structures that keep camel case
  from XML definition.
  All protocol code is under opcua directory
  -   `asyncua/ua` contains all UA structures from specification, most are autogenerated
  -   `asyncua/common` contains high level objects and methods used both in server and client
  -   `asyncua/client` contains client specific code
  -   `asyncua/server` contains server specific code
  -   `asyncua/utils` contains some utilities function and classes
  -   `asyncua/tools` contains code for command lines tools
  -   `schemas` contains the XML and text files from specification and the python scripts used to autogenerate code
  -   `tests` contains tests
  -   `docs` contains files to auto generate documentation from doc strings
  -   `examples` contains many example files
  -   `examples/sync` contains many example files using sync API
  -   `tools` contains python scripts that can be used to run command line tools from repository without installing

  ```
  python -m pip install -r requirements.txt
  python -m pip install -r dev_requirements.txt
  pytest -v -s
  ```
  Or
  ```
  ./run-test.sh -v -s
  ```

  ```
  pytest -v -s --cov asyncua --cov-report=html
  ```
  Or
  ```
  ./run-test.sh -v -s --cov asyncua --cov-report=html
  ```


pkgId: 2f88493c60268c922760582a8b0f0f5e14abfffd0c6b579b09040590ee1a98f4
name: python-asyncudp
arch: src
version: 0.11.0
epoch: 0
release: 1
summary: Asyncio high level UDP sockets.
url: https://github.com/eerimoq/asyncudp
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncudp-0.11.0-1.src.rpm
checksum_type: sha256
description:
  Asyncio high level UDP sockets.
  Project homepage: https://github.com/eerimoq/asyncudp
  Documentation: https://asyncudp.readthedocs.org/en/latest


pkgId: 7390f2ef09e28df41f785eb608148aab76ef30ddd578d63ab76bb352057de2a4
name: python-asyncur
arch: src
version: 0.5.4
epoch: 0
release: 1
summary: Async functions to compare with anyio and asyncio, and toolkit to read excel with async/await.
url: https://pypi.org/project/asyncur/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncur-0.5.4-1.src.rpm
checksum_type: sha256
description:
  Successfully installed asyncur
  ```
  Or use poetry:
  ```console
  poetry add asyncur
  ```

  - bulk_gather/gather/run_async
  ```py
  >>> from asyncur import gather, run_async
  >>> async def foo():
  >>> await bulk_gather([foo(), foo()], limit=200)
  (1, 1)
  >>> await gather(foo(), foo())
  (1, 1)
  >>> run_async(gather(foo(), foo()))
  (1, 1)
  ```
  - timeit
  ```py
  >>> import time
  >>> import anyio
  >>> from asyncur import timeit
  >>> @timeit
  >>> await sleep()
  sleep_test Cost: 3.0 seconds
  >>> @timeit
  >>> sleep_test2()
  sleep_test2 Cost: 3.1 seconds
  ```
  - AsyncRedis
  ```py
  from contextlib import asynccontextmanager
  from asyncur import AsyncRedis
  from fastapi import FastAPI, Request
  @asynccontextmanager
  async def lifespan(app):
      async with AsyncRedis(app):
          yield
  app = FastAPI(lifespan=lifespan)
  @app.get('/')
  async def root(request: Request) -> list[str]:
      return await AsyncRedis(request).keys()
  @app.get('/redis')
  async def get_value_from_redis_by_key(request: Request, key: str) -> str:
      value = await AsyncRedis(request).get(key)
      if not value:
          return ''
      return value.decode()
  ```
  - Read Excel File(need to install with xls extra: `pip install "asyncur[xls]"`)
  ```py
  >>> from asycur.xls import load_xls
  >>> await load_xls('tests/demo.xlsx')
  [{'Column1': 'row1-\\t%c', 'Column2\nMultiLines': 0, 'Column 3': 1, 4: ''}, {'Column1': 'r2c1\n00', 'Column2\nMultiLines': 'r2 c2', 'Column 3': 2, 4: ''}]
  ```


pkgId: 99778f58bd67b17858c60a1266e9d332e5e58c748b132b0188f66968be87341a
name: python-asyncurban
arch: src
version: 0.3.3
epoch: 0
release: 1
summary: An asynchronous wrapper around the UrbanDictionary API.
url: https://github.com/naught0/asyncurban
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncurban-0.3.3-1.src.rpm
checksum_type: sha256
description:
  |docs| |pypi|
  Yet another UrbanDictionary API wrapper.
  AsyncUrban is a non-blocking library, using asyncio and aiohttp, which
  can be used to access UrbanDictionary data.


pkgId: 699d82b2b420500821fcab04324687132013ee6b2791b3be414d6c9887bd7895
name: python-asyncwhois
arch: src
version: 1.1.5
epoch: 0
release: 1
url: https://github.com/pogzyb/asyncwhois
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncwhois-1.1.5-1.src.rpm
checksum_type: sha256
summary:
  Python WHOIS and RDAP utility for querying and parsing information about Domains, IPv4s, IPv6s, and AS numbers.

description:
  [![PyPI version](https://badge.fury.io/py/asyncwhois.svg)](https://badge.fury.io/py/asyncwhois)
  ![build-workflow](https://github.com/pogzyb/asyncwhois/actions/workflows/build-and-test.yml/badge.svg)
  [![codecov](https://codecov.io/gh/pogzyb/asyncwhois/branch/main/graph/badge.svg?token=Q4xtgezXGX)](https://codecov.io/gh/pogzyb/asyncwhois)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  `asyncwhois` | Python utility for WHOIS and RDAP queries.



  ```python
  import asyncio
  from pprint import pprint

  import asyncwhois


  domain = 'bitcoin.org'




  query_string, parsed_dict = asyncwhois.whois(domain)




  loop = asyncio.get_event_loop()
  query_string, parsed_dict = loop.run_until_complete(asyncwhois.aio_whois(domain))

  pprint(parsed_dict)
  """
  {created: datetime.datetime(2008, 8, 18, 13, 19, 55),
   dnssec: 'unsigned',
   domain_name: 'bitcoin.org',
   expires: datetime.datetime(2029, 8, 18, 13, 19, 55),
   name_servers: ['dns1.registrar-servers.com', 'dns2.registrar-servers.com'],
   registrant_address: 'P.O. Box 0823-03411',
   registrant_city: 'Panama',
   registrant_country: 'PA',
   registrant_name: 'WhoisGuard Protected',
   registrant_organization: 'WhoisGuard, Inc.',
   registrant_state: 'Panama',
   registrant_zipcode: '',
   registrar: 'NAMECHEAP INC',
   status: ['clientTransferProhibited '
            'https://icann.org/epp#clientTransferProhibited'],
   updated: datetime.datetime(2019, 11, 24, 13, 58, 35, 940000)}
   ...
   """


  ipv4 = "8.8.8.8"
  query_string, parsed_dict = asyncwhois.whois(ipv4)
  pprint(parsed_dict)
  """
  {abuse_address: None,
   abuse_email: 'network-abuse@google.com',
   abuse_handle: 'ABUSE5250-ARIN',
   abuse_name: 'Abuse',
   abuse_phone: '+1-650-253-0000',
   abuse_rdap_ref: 'https://rdap.arin.net/registry/entity/ABUSE5250-ARIN',
   cidr: '8.8.8.0/24',
   net_handle: 'NET-8-8-8-0-2',
   net_name: 'GOGL',
   net_range: '8.8.8.0 - 8.8.8.255',
   net_type: 'Direct Allocation',
   org_address: '1600 Amphitheatre Parkway',
   org_city: 'Mountain View',
   org_country: 'US',
   org_id: 'GOGL',
   ...
  """
  ```



  The [whodap](https://github.com/pogzyb/whodap) project is used behind the scenes to perform RDAP queries.

  ```python
  domain = "https://google.com"
  query_string, parsed_dict = asyncwhois.rdap(domain)

  query_string, parsed_dict = loop.run_until_complete(asyncwhois.aio_rdap(domain))


  client = asyncwhois.DomainClient()
  for domain in ["google.com", "tesla.coffee", "bitcoin.org"]:
      query_string, parsed_dict = client.rdap(domain)
      


  whodap_client = whodap.DNSClient.new_client(
      httpx_client=httpx.Client(proxies="https://proxy:8080")
  )

  client = asyncwhois.DomainClient(whodap_client=whodap_client)

  ```



  SOCKS proxies are supported for WHOIS and RDAP queries.

  ```python
  import whodap

  tor_host = "localhost"
  tor_port = 9050


  query_string, parsed_dict = asyncwhois.whois(
      "8.8.8.8", proxy_url=f"socks5://{tor_host}:{tor_port}"
  )


  import httpx
  from httpx_socks import SyncProxyTransport, AsyncProxyTransport  # EXTERNAL DEPENDENCY for SOCKS Proxies

  transport = SyncProxyTransport.from_url(f"socks5://{tor_host}:{tor_port}")
  httpx_client = httpx.Client(transport=transport)
  whodap_client = whodap.IPv6Client.new_client(httpx_client=httpx_client)
  query_string, parsed_dict = asyncwhois.rdap('2001:4860:4860::8888', whodap_client=whodap_client)

  transport = AsyncProxyTransport.from_url(f"socks5://{tor_user}:{tor_pw}@{tor_host}:{tor_port}")
  async with httpx.AsyncClient(transport=transport) as httpx_client:
      whodap_client = await whodap.DNSClient.new_aio_client(httpx_client=httpx_client)
      query_string, parsed_dict = await asyncwhois.aio_rdap('bitcoin.org', whodap_client=whodap_client)

  ```



  | Function/Object    | Description                                             |
  |--------------------|---------------------------------------------------------|
  | `DomainClient`     | Reusable client for  WHOIS or RDAP domain queries       |
  | `NumberClient`     | Reusable client for WHOIS or RDAP ipv4/ipv6 queries     |
  | `ASNClient`        | Reusable client for RDAP asn queries                    |
  | `whois`            | WHOIS entrypoint for domain, ipv4, or ipv6 queries      |
  | `rdap`             | RDAP entrypoint for domain, ipv4, ipv6, or asn queries  |
  | `aio_whois`        | async counterpart to `whois`                            |
  | `aio_rdap`         | async counterpart to `rdap`                             |
  | `whois_ipv4`       | [DEPRECATED] WHOIS lookup for ipv4 addresses            |
  | `whois_ipv6`       | [DEPRECATED] WHOIS lookup for ipv6 addresses            |
  | `rdap_domain`      | [DEPRECATED] RDAP lookup for domain names               |
  | `rdap_ipv4`        | [DEPRECATED] RDAP lookup for ipv4 addresses             |
  | `rdap_ipv6`        | [DEPRECATED] RDAP lookup for ipv6 addresses             |
  | `rdap_asn`         | [DEPRECATED] RDAP lookup for Autonomous System Numbers  |
  | `aio_whois_domain` | [DEPRECATED] async counterpart to `whois_domain`        |
  | `aio_whois_ipv4`   | [DEPRECATED] async counterpart to `whois_ipv4`          |
  | `aio_whois_ipv6`   | [DEPRECATED] async counterpart to `whois_ipv6`          |
  | `aio_rdap_domain`  | [DEPRECATED] async counterpart to `rdap_domain`         |
  | `aio_rdap_ipv4`    | [DEPRECATED] async counterpart to `rdap_ipv4`           |
  | `aio_rdap_ipv6`    | [DEPRECATED] async counterpart to `rdap_ipv6`           |
  | `aio_rdap_asn`     | [DEPRECATED] async counterpart to `rdap_asn`            |



  Parsed output not what you expected? Unfortunately, "the format of responses [from a WHOIS server] follow a semi-free text format". Therefore,
  situations will arise where this module does not support parsing the output from a specific server, and you may find
  yourself needing more control over how parsing happens. Fortunately, you can create customized parsers to suit your needs.

  Example: This is a snippet of the output from running the "whois google.be" command.
  ```python
  Domain:	google.be
  Status:	NOT AVAILABLE
  Registered:	Tue Dec 12 2000

  Registrant:
      Not shown, please visit www.dnsbelgium.be for webbased whois.

  Registrar Technical Contacts:
      Organisation:	MarkMonitor Inc.
      Language:	en
      Phone:	+1.2083895740
      Fax:	+1.2083895771

  Registrar:
      Name:	 MarkMonitor Inc.
      Website: http://www.markmonitor.com

  Nameservers:
      ns2.google.com
      ns1.google.com
      ns4.google.com
      ns3.google.com

  Keys:

  Flags:
      clientTransferProhibited
  ...
  ```
  In this case, the "name servers" are listed on separate lines. The default BaseParser regexes
  won't find all of these server names. In order to accommodate this extra step, the "parse" method was
  overwritten within the parser subclass as seen below:
  ```python
  class RegexBE(BaseParser):
      _be_expressions = {  # the base class (BaseParser) will handle these regexes
          BaseKeys.CREATED: r'Registered: *(.+)',
          BaseKeys.REGISTRAR: r'Registrar:\n.+Name: *(.+)',
          BaseKeys.REGISTRANT_NAME: r'Registrant:\n *(.+)'
      }

      def __init__(self):
          super().__init__()
          self.update_reg_expressions(self._be_expressions)

      def parse(self, blob: str) -> Dict[str, Any]:
          
          parsed_output = super().parse(blob)
          
          ns_match = re.search(r"Name servers: *(.+)Keys: ", blob, re.DOTALL)
          if ns_match:
              parsed_output[BaseKeys.NAME_SERVERS] = [m.strip() for m in ns_match.group(1).split('\n') if m.strip()]
          return parsed_output
  ```


pkgId: 12aa5f0191a0af469015963e54ebd3ffc0431f4588a3d3f9d08cee832446ff20
name: python-asyncwhois
arch: src
version: 1.1.9
epoch: 0
release: 1
url: https://github.com/pogzyb/asyncwhois
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncwhois-1.1.9-1.src.rpm
checksum_type: sha256
summary:
  Python WHOIS and RDAP utility for querying and parsing information about Domains, IPv4s, IPv6s, and AS numbers.

description:
  [![PyPI version](https://badge.fury.io/py/asyncwhois.svg)](https://badge.fury.io/py/asyncwhois)
  ![build-workflow](https://github.com/pogzyb/asyncwhois/actions/workflows/build-and-test.yml/badge.svg)
  [![codecov](https://codecov.io/gh/pogzyb/asyncwhois/branch/main/graph/badge.svg?token=Q4xtgezXGX)](https://codecov.io/gh/pogzyb/asyncwhois)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  `asyncwhois` | Python utility for WHOIS and RDAP queries.



  ```python
  import asyncio
  from pprint import pprint

  import asyncwhois


  domain = 'bitcoin.org'




  query_string, parsed_dict = asyncwhois.whois(domain)




  loop = asyncio.get_event_loop()
  query_string, parsed_dict = loop.run_until_complete(asyncwhois.aio_whois(domain))

  pprint(parsed_dict)
  """
  {created: datetime.datetime(2008, 8, 18, 13, 19, 55),
   dnssec: 'unsigned',
   domain_name: 'bitcoin.org',
   expires: datetime.datetime(2029, 8, 18, 13, 19, 55),
   name_servers: ['dns1.registrar-servers.com', 'dns2.registrar-servers.com'],
   registrant_address: 'P.O. Box 0823-03411',
   registrant_city: 'Panama',
   registrant_country: 'PA',
   registrant_name: 'WhoisGuard Protected',
   registrant_organization: 'WhoisGuard, Inc.',
   registrant_state: 'Panama',
   registrant_zipcode: '',
   registrar: 'NAMECHEAP INC',
   status: ['clientTransferProhibited '
            'https://icann.org/epp#clientTransferProhibited'],
   updated: datetime.datetime(2019, 11, 24, 13, 58, 35, 940000)}
   ...
   """



  query_string, parsed_dict = asyncwhois.whois("google.com", find_authoritative_server=False)


  ipv4 = "8.8.8.8"
  query_string, parsed_dict = asyncwhois.whois(ipv4)
  pprint(parsed_dict)
  """
  {abuse_address: None,
   abuse_email: 'network-abuse@google.com',
   abuse_handle: 'ABUSE5250-ARIN',
   abuse_name: 'Abuse',
   abuse_phone: '+1-650-253-0000',
   abuse_rdap_ref: 'https://rdap.arin.net/registry/entity/ABUSE5250-ARIN',
   cidr: '8.8.8.0/24',
   net_handle: 'NET-8-8-8-0-2',
   net_name: 'GOGL',
   net_range: '8.8.8.0 - 8.8.8.255',
   net_type: 'Direct Allocation',
   org_address: '1600 Amphitheatre Parkway',
   org_city: 'Mountain View',
   org_country: 'US',
   org_id: 'GOGL',
   ...
  """
  ```



  The [whodap](https://github.com/pogzyb/whodap) project is used behind the scenes to perform RDAP queries.

  ```python
  domain = "https://google.com"
  query_string, parsed_dict = asyncwhois.rdap(domain)

  query_string, parsed_dict = loop.run_until_complete(asyncwhois.aio_rdap(domain))


  client = asyncwhois.DomainClient()
  for domain in ["google.com", "tesla.coffee", "bitcoin.org"]:
      query_string, parsed_dict = client.rdap(domain)
      


  whodap_client = whodap.DNSClient.new_client(
      httpx_client=httpx.Client(proxies="https://proxy:8080")
  )

  client = asyncwhois.DomainClient(whodap_client=whodap_client)

  ```



  SOCKS proxies are supported for WHOIS and RDAP queries.

  ```python
  import whodap

  tor_host = "localhost"
  tor_port = 9050


  query_string, parsed_dict = asyncwhois.whois(
      "8.8.8.8", proxy_url=f"socks5://{tor_host}:{tor_port}"
  )


  import httpx
  from httpx_socks import SyncProxyTransport, AsyncProxyTransport  # EXTERNAL DEPENDENCY for SOCKS Proxies

  transport = SyncProxyTransport.from_url(f"socks5://{tor_host}:{tor_port}")
  httpx_client = httpx.Client(transport=transport)
  whodap_client = whodap.IPv6Client.new_client(httpx_client=httpx_client)
  query_string, parsed_dict = asyncwhois.rdap('2001:4860:4860::8888', whodap_client=whodap_client)

  transport = AsyncProxyTransport.from_url(f"socks5://{tor_user}:{tor_pw}@{tor_host}:{tor_port}")
  async with httpx.AsyncClient(transport=transport) as httpx_client:
      whodap_client = await whodap.DNSClient.new_aio_client(httpx_client=httpx_client)
      query_string, parsed_dict = await asyncwhois.aio_rdap('bitcoin.org', whodap_client=whodap_client)

  ```



  | Function/Object    | Description                                             |
  |--------------------|---------------------------------------------------------|
  | `DomainClient`     | Reusable client for  WHOIS or RDAP domain queries       |
  | `NumberClient`     | Reusable client for WHOIS or RDAP ipv4/ipv6 queries     |
  | `ASNClient`        | Reusable client for RDAP asn queries                    |
  | `whois`            | WHOIS entrypoint for domain, ipv4, or ipv6 queries      |
  | `rdap`             | RDAP entrypoint for domain, ipv4, ipv6, or asn queries  |
  | `aio_whois`        | async counterpart to `whois`                            |
  | `aio_rdap`         | async counterpart to `rdap`                             |
  | `whois_ipv4`       | [DEPRECATED] WHOIS lookup for ipv4 addresses            |
  | `whois_ipv6`       | [DEPRECATED] WHOIS lookup for ipv6 addresses            |
  | `rdap_domain`      | [DEPRECATED] RDAP lookup for domain names               |
  | `rdap_ipv4`        | [DEPRECATED] RDAP lookup for ipv4 addresses             |
  | `rdap_ipv6`        | [DEPRECATED] RDAP lookup for ipv6 addresses             |
  | `rdap_asn`         | [DEPRECATED] RDAP lookup for Autonomous System Numbers  |
  | `aio_whois_domain` | [DEPRECATED] async counterpart to `whois_domain`        |
  | `aio_whois_ipv4`   | [DEPRECATED] async counterpart to `whois_ipv4`          |
  | `aio_whois_ipv6`   | [DEPRECATED] async counterpart to `whois_ipv6`          |
  | `aio_rdap_domain`  | [DEPRECATED] async counterpart to `rdap_domain`         |
  | `aio_rdap_ipv4`    | [DEPRECATED] async counterpart to `rdap_ipv4`           |
  | `aio_rdap_ipv6`    | [DEPRECATED] async counterpart to `rdap_ipv6`           |
  | `aio_rdap_asn`     | [DEPRECATED] async counterpart to `rdap_asn`            |



  Parsed output not what you expected? Unfortunately, "the format of responses [from a WHOIS server] follow a semi-free text format". Therefore,
  situations will arise where this module does not support parsing the output from a specific server, and you may find
  yourself needing more control over how parsing happens. Fortunately, you can create customized parsers to suit your needs.

  Example: This is a snippet of the output from running the "whois google.be" command.
  ```python
  Domain:	google.be
  Status:	NOT AVAILABLE
  Registered:	Tue Dec 12 2000

  Registrant:
      Not shown, please visit www.dnsbelgium.be for webbased whois.

  Registrar Technical Contacts:
      Organisation:	MarkMonitor Inc.
      Language:	en
      Phone:	+1.2083895740
      Fax:	+1.2083895771

  Registrar:
      Name:	 MarkMonitor Inc.
      Website: http://www.markmonitor.com

  Nameservers:
      ns2.google.com
      ns1.google.com
      ns4.google.com
      ns3.google.com

  Keys:

  Flags:
      clientTransferProhibited
  ...
  ```
  In this case, the "name servers" are listed on separate lines. The default BaseParser regexes
  won't find all of these server names. In order to accommodate this extra step, the "parse" method was
  overwritten within the parser subclass as seen below:
  ```python
  class RegexBE(BaseParser):
      _be_expressions = {  # the base class (BaseParser) will handle these regexes
          BaseKeys.CREATED: r'Registered: *(.+)',
          BaseKeys.REGISTRAR: r'Registrar:\n.+Name: *(.+)',
          BaseKeys.REGISTRANT_NAME: r'Registrant:\n *(.+)'
      }

      def __init__(self):
          super().__init__()
          self.update_reg_expressions(self._be_expressions)

      def parse(self, blob: str) -> Dict[str, Any]:
          
          parsed_output = super().parse(blob)
          
          ns_match = re.search(r"Name servers: *(.+)Keys: ", blob, re.DOTALL)
          if ns_match:
              parsed_output[BaseKeys.NAME_SERVERS] = [m.strip() for m in ns_match.group(1).split('\n') if m.strip()]
          return parsed_output
  ```


pkgId: 157d4bc11d7947a47719f03a197f0b941e58c6d1d8b0c929db71a62096dbaf15
name: python-asyncwica
arch: src
version: 1.3.0
epoch: 0
release: 1
summary: A simple async python API to access wica-http SSE.
url: https://git.psi.ch/proscan_data/py-wica/-/tree/async
rpm_license: GPL v3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-asyncwica-1.3.0-1.src.rpm
checksum_type: sha256
description:
  [![pipeline status](https://git.psi.ch/proscan_data/py-wica/badges/async/pipeline.svg)](https://git.psi.ch/proscan_data/py-wica/-/commits/async)
  [![coverage report](https://git.psi.ch/proscan_data/py-wica/badges/async/coverage.svg)](https://git.psi.ch/proscan_data/py-wica/-/commits/async)


  - [Introduction](#introduction)
  - [Installation](#installation)
  - [Quick-start Guid](#quick-start-guide)
  - [Documentation](#documentation)
  - [Dependencies](#dependencies)
  - [Contribute](#contribute)
  - [Project Changes and Tagged Releases](#project-changes-and-tagged-releases)
  - [Developer Notes](#developer-notes)
  - [Contact](#contact)


  This project/package aims to provide a simple python interface to the wica-http server.
  Check out the main branch to get the blocking version of the package


  Install with pip
  ```bash
  pip install asyncwica
  ```

  Here are some simple examples to get you started:
  ```python
  import asyncio
  import time


  async def simple_example():
      """A simple example of how to use AsyncWicaStream. Run it in main by uncommenting it! """

      wica_stream = WicaStream(base_url="http://student08/ca/streams", channels=["MMAC3:STR:2"])

      async def run_stream():
          await wica_stream.create()
          async for message in wica_stream.subscribe():
              print(message)

      async def stop_stream():
          await asyncio.sleep(10)
          print(await wica_stream.destroy())

      await asyncio.gather(run_stream(), stop_stream())

  async def example_using_with():
      """ An example using the compound statement async with and another method to exit the event loop. Run it in main by uncommenting it!"""
      async with WicaStream(base_url="http://student08/ca/streams", channels=["MMAC3:STR:2"]) as stream:
          i:int = 0
          async for message in stream.subscribe():
              i+=1
              print(message)
              if i == 25:
                  break

  async def multistream_example():
      """ An example of how to run multiple streams at once using aiostream. Run it in main by uncommenting it! """
      from aiostream import stream
      streams = []
      async def run_streams():
          for _ in range(10):
              wica_stream = WicaStream(base_url="http://student08/ca/streams", channels=["MMAC3:STR:2"])
              streams.append(wica_stream)
              await wica_stream.create()

          print("Doing someting else before starting the stream...")
          await asyncio.sleep(5)

          subscribed_streams = []

          for wica_stream in streams:
              print(f"Subscribing to stream {wica_stream.id}")
              subscribed_streams.append(wica_stream.subscribe())


          combine = stream.merge(*subscribed_streams)
          async with combine.stream() as streamer:
              async for item in streamer:
                  print(item)
                  continue


      async def stop_streams():
          await asyncio.sleep(25)
          for wica_stream in streams:
              print(await wica_stream.destroy())


      await asyncio.gather(run_streams(), stop_streams())


  async def main():
      
      
      
      pass

  if __name__ == "__main__":
      asyncio.run(main())

  ```


  Current Features:
  * Custom Client to handle be able to extract last line of SSE with timestamp and message type.
  * Simple functions to create, delete and subscribe to streams
  * Fully Async (blocking versions available in main branch)

  Check out the wiki for more info!


  * [httpx](https://github.com/encode/httpx/)


  To contribute, simply clone the project.
  You can uses ``` pip -r requirements.txt ``` or the make file to set up the project.



  * See the Changelog file for further information
  * Project releases are available in pypi


  Currently None


  If you have any questions pleas contract 'niklas.laufkoetter@psi.ch'


pkgId: c27a77efc718643ee086e2c3cf4a341d57efef499c148635237f7d5008774055
name: python-at-common-workflow
arch: src
version: 0.1.0
epoch: 0
release: 1
url: https://github.com/apex-trader/at-common-workflow
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-at-common-workflow-0.1.0-1.src.rpm
checksum_type: sha256
summary:
  A robust, asynchronous workflow management system for Python that enables the creation and execution of complex task dependencies using a Directed Acyclic Graph (DAG) approach

description:
  A robust, asynchronous workflow management system for Python that enables the creation and execution of complex task dependencies using a Directed Acyclic Graph (DAG) approach.



  - Asynchronous task execution with asyncio
  - Thread-safe context management for data sharing between tasks
  - Automatic dependency resolution and validation
  - Circular dependency detection
  - Parallel execution of independent tasks
  - Comprehensive error handling and logging
  - Type-safe data management
  - Task status tracking
  - Resource cleanup management



  Clone the repository and install the package:

  ```bash
  git clone <repository-url>
  cd async-workflow
  pip install -r requirements.txt
  ```



  Here's a simple example of how to use the workflow system:

  ```python
  from src import Workflow


  workflow = Workflow("example_workflow")


  @workflow.task(provides=["data1"])
  async def task1(context):
      context.set("data1", "Hello")

  @workflow.task(requires=["data1"], provides=["data2"])
  async def task2(context):
      data = context.get("data1")
      context.set("data2", f"{data} World!")


  import asyncio
  context = asyncio.run(workflow.execute())
  result = context.get("data2")  # "Hello World!"
  ```



  Tasks can specify their dependencies using `requires` and `provides` parameters:

  ```python
  @workflow.task(
      requires=["input_data"],  # Data required by this task
      provides=["output_data"]  # Data provided by this task
  )
  async def process_data(context):
      data = context.get("input_data")
      result = do_something(data)
      context.set("output_data", result)
  ```



  The Context class provides thread-safe data management:

  ```python
  context.set("key", value)      # Store data
  value = context.get("key")     # Retrieve data
  context.delete("key")          # Remove data
  context.clear()                # Clear all data
  ```



  The system includes built-in error handling for common scenarios:

  - `CircularDependencyError`: Raised when circular dependencies are detected
  - `DependencyNotFoundError`: Raised when required data isn't provided by any task
  - `TaskExecutionError`: Raised when a task fails to execute
  - `WorkflowException`: Base exception class for workflow-related errors



  Run the test suite using pytest:

  ```bash
  pytest tests/
  ```





  Tasks without interdependencies are automatically executed in parallel:

  ```python
  @workflow.task()
  async def slow_task(context):
      await asyncio.sleep(2)
      context.set("slow", "done")

  @workflow.task()
  async def fast_task(context):
      await asyncio.sleep(1)
      context.set("fast", "done")
  ```



  Use context managers for automatic resource cleanup:

  ```python
  async with Workflow("managed_workflow") as workflow:
      
      
      
  ```



  1. Fork the repository
  2. Create a feature branch (`git checkout -b feature/amazing-feature`)
  3. Commit your changes (`git commit -m 'Add amazing feature'`)
  4. Push to the branch (`git push origin feature/amazing-feature`)
  5. Open a Pull Request


pkgId: f1472128c5b68668e4df23f5fdbb8e9a42c6b439b693e7cf48cbf79917736131
name: python-at-common-workflow
arch: src
version: 0.1.1
epoch: 0
release: 1
url: https://github.com/apex-trader/at-common-workflow
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-at-common-workflow-0.1.1-1.src.rpm
checksum_type: sha256
summary:
  A robust, asynchronous workflow management system for Python that enables the creation and execution of complex task dependencies using a Directed Acyclic Graph (DAG) approach

description:
  A robust, asynchronous workflow management system for Python that enables the creation and execution of complex task dependencies using a Directed Acyclic Graph (DAG) approach.



  - Asynchronous task execution with asyncio
  - Thread-safe context management for data sharing between tasks
  - Automatic dependency resolution and validation
  - Circular dependency detection
  - Parallel execution of independent tasks
  - Comprehensive error handling and logging
  - Type-safe data management
  - Task status tracking
  - Resource cleanup management



  Clone the repository and install the package:

  ```bash
  git clone <repository-url>
  cd async-workflow
  pip install -r requirements.txt
  ```



  Here's a simple example of how to use the workflow system:

  ```python
  from src import Workflow, Context


  context = Context()
  workflow = Workflow("example_workflow", context)


  @workflow.task(provides=["data1"])
  async def task1(context):
      context.set("data1", "Hello")

  @workflow.task(requires=["data1"], provides=["data2"])
  async def task2(context):
      data = context.get("data1")
      context.set("data2", f"{data} World!")


  import asyncio
  await workflow.execute()
  result = context.get("data2")  # "Hello World!"
  ```



  Tasks can specify their dependencies using `requires` and `provides` parameters:

  ```python
  @workflow.task(
      requires=["input_data"],  # Data required by this task
      provides=["output_data"]  # Data provided by this task
  )
  async def process_data(context):
      data = context.get("input_data")
      result = do_something(data)
      context.set("output_data", result)
  ```



  The Context class provides thread-safe data management:

  ```python
  context.set("key", value)      # Store data
  value = context.get("key")     # Retrieve data
  context.delete("key")          # Remove data
  context.clear()                # Clear all data
  ```



  The system includes built-in error handling for common scenarios:

  - `CircularDependencyError`: Raised when circular dependencies are detected
  - `DependencyNotFoundError`: Raised when required data isn't provided by any task
  - `TaskExecutionError`: Raised when a task fails to execute
  - `WorkflowException`: Base exception class for workflow-related errors



  Run the test suite using pytest:

  ```bash
  pytest tests/
  ```





  Tasks without interdependencies are automatically executed in parallel:

  ```python
  @workflow.task()
  async def slow_task(context):
      await asyncio.sleep(2)
      context.set("slow", "done")

  @workflow.task()
  async def fast_task(context):
      await asyncio.sleep(1)
      context.set("fast", "done")
  ```



  Use context managers for automatic resource cleanup:

  ```python
  async with Workflow("managed_workflow") as workflow:
      
      
      
  ```



  1. Fork the repository
  2. Create a feature branch (`git checkout -b feature/amazing-feature`)
  3. Commit your changes (`git commit -m 'Add amazing feature'`)
  4. Push to the branch (`git push origin feature/amazing-feature`)
  5. Open a Pull Request


pkgId: 1b367a64b731d02c96a90c545ffd33530205ba15f4c0355156608852716293cc
name: python-at-common-workflow
arch: src
version: 1.0.1
epoch: 0
release: 1
url: https://github.com/apex-trader/at-common-workflow
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-at-common-workflow-1.0.1-1.src.rpm
checksum_type: sha256
summary:
[cell repeats an earlier one in this file: 175 characters]

description:
  A robust, asynchronous workflow management system for Python that enables the creation and execution of complex task dependencies using a Directed Acyclic Graph (DAG) approach.



  - Asynchronous task execution with asyncio
  - Thread-safe context management for data sharing between tasks
  - Automatic dependency resolution and validation
  - Circular dependency detection
  - Parallel execution of independent tasks
  - Comprehensive error handling and logging
  - Type-safe data management
  - Task status tracking
  - Resource cleanup management
  - Workflow serialization and deserialization
  - Progress tracking with task status updates



  Clone the repository and install the package:

  ```bash
  git clone <repository-url>
  cd async-workflow
  pip install -r requirements.txt
  ```



  Here's a simple example of how to use the workflow system:

  ```python
  from src import Workflow, Context


  context = Context()
  workflow = Workflow("example_workflow", context)


  @workflow.task(provides=["data1"])
  async def task1(context):
      context.set("data1", "Hello")

  @workflow.task(requires=["data1"], provides=["data2"])
  async def task2(context):
      data = context.get("data1")
      context.set("data2", f"{data} World!")


  import asyncio
  await workflow.execute()
  result = context.get("data2")  # "Hello World!"
  ```



  Tasks can specify their dependencies using `requires` and `provides` parameters:

  ```python
  @workflow.task(
      requires=["input_data"],  # Data required by this task
      provides=["output_data"]  # Data provided by this task
  )
  async def process_data(context):
      data = context.get("input_data")
      result = do_something(data)
      context.set("output_data", result)
  ```



  The Context class provides thread-safe data management:

  ```python
  context.set("key", value)      # Store data
  value = context.get("key")     # Retrieve data
  context.delete("key")          # Remove data
  context.clear()                # Clear all data
  ```



  The system includes built-in error handling for common scenarios:

  - `CircularDependencyError`: Raised when circular dependencies are detected
  - `DependencyNotFoundError`: Raised when required data isn't provided by any task
  - `TaskExecutionError`: Raised when a task fails to execute
  - `WorkflowException`: Base exception class for workflow-related errors



  Run the test suite using pytest:

  ```bash
  pytest tests/
  ```





  Tasks without interdependencies are automatically executed in parallel:

  ```python
  @workflow.task()
  async def slow_task(context):
      await asyncio.sleep(2)
      context.set("slow", "done")

  @workflow.task()
  async def fast_task(context):
      await asyncio.sleep(1)
      context.set("fast", "done")
  ```



  Use context managers for automatic resource cleanup:

  ```python
  async with Workflow("managed_workflow") as workflow:
      
      
      
  ```



  1. Fork the repository
  2. Create a feature branch (`git checkout -b feature/amazing-feature`)
  3. Commit your changes (`git commit -m 'Add amazing feature'`)
  4. Push to the branch (`git push origin feature/amazing-feature`)
  5. Open a Pull Request


pkgId: 916f7e6b0f476dc8847223fa672ef1feaacfa234a002a73058d10d24c23702a7
name: python-at-common-workflow
arch: src
version: 1.1.12
epoch: 0
release: 1
url: https://github.com/apex-trader/at-common-workflow
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-at-common-workflow-1.1.12-1.src.rpm
checksum_type: sha256
summary:
  A robust Python package for building and executing asynchronous workflow tasks in a directed acyclic graph (DAG) pattern. This package provides a type-safe, thread-safe framework for defining, organizing, and running dependent tasks with comprehensive validation and error handling.

description:
  A Python package for building and executing workflow tasks in a directed acyclic graph (DAG) pattern. This package provides a flexible framework for defining, organizing, and running dependent tasks with strong type checking and thread safety.



  - Task-based workflow system with dependency management
  - Async/await support for concurrent task execution
  - Thread-safe context for sharing data between tasks
  - Input/output schema validation
  - Progress tracking and status reporting
  - Workflow serialization and deserialization
  - Built-in logging
  - Type checking and validation



  ```bash
  pip install at-common-workflow
  ```



  - Python >= 3.11
  - pydantic >= 2.10.0
  - pytest >= 8.3.3 (for testing)



  Here's a simple example of creating and executing a workflow:

  ```python
  from at_common_workflow.core.workflow import Workflow
  from at_common_workflow.core.task import task
  from at_common_workflow.core.io import InputSchema, OutputSchema
  from at_common_workflow.core.context import Context


  @task(
      name="task_a",
      requires=InputSchema({"input": str}),
      provides=OutputSchema({"a_output": str})
  )
  async def task_a(context: Context):
      context["a_output"] = context["input"] + "processed"


  workflow = Workflow(name="my_workflow", input_schema=InputSchema({"input": str}), output_schema=OutputSchema({"a_output": str}))
  workflow.add_task(task_a)


  result = await workflow.execute({"input": "test"})
  print(result) # {"a_output": "test_processed"}
  ```





  The `@task` decorator allows you to define workflow tasks with:
  - Input/output schemas
  - Task parameters
  - Description
  - Name



  The `Workflow` class manages:
  - Task dependencies
  - Execution order
  - Data flow between tasks
  - Progress tracking
  - Schema validation



  Thread-safe dictionary for sharing data between tasks with:
  - Deep copy of values
  - Lock-based synchronization
  - Type validation





  ```python
  def track_progress(progress: TaskProgress):
      print(f"Task {progress.name}: {progress.status}")

  result = await workflow.execute({"input": "test"}, track_progress=track_progress)
  ```



  ```python
  from at_common_workflow.serialization.workflow_serializer import WorkflowSerializer

  serialized_workflow = WorkflowSerializer.serialize(workflow)
  ```



  ```python
  from at_common_workflow.serialization.workflow_serializer import WorkflowSerializer

  deserialized_workflow = WorkflowSerializer.deserialize(serialized_workflow)
  ```



  The `WorkflowScanner` class scans a directory for tasks and returns a list of task information.

  ```python
  from at_common_workflow.core.scanner import WorkflowScanner

  tasks = WorkflowScanner.scan_directory("path/to/tasks")
  ```



  We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a new branch (`git checkout -b feature/improvement`)
  3. Make your changes
  4. Run tests (`pytest`)
  5. Commit your changes (`git commit -am 'Add new feature'`)
  6. Push to the branch (`git push origin feature/improvement`)
  7. Create a Pull Request



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



  For questions and support, please open an issue on the GitHub repository.


pkgId: a1a55bdc33c21ad2b0f3db5668e8862bf5b79ef41629d6ab9f6ff0cebb5e8ad6
name: python-atalaya
arch: src
version: 0.1.5.4
epoch: 0
release: 1
summary: Atalaya is a logger for pytorch.
url: https://github.com/jacr13/Atalaya
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atalaya-0.1.5.4-1.src.rpm
checksum_type: sha256
description:
  This [framework](https://pypi.org/project/atalaya/) provides a logger for pytorch models, it allows you to save the parameters, the state of the network, the state of the optimizer and allows also to save and visualize your data using tensorboardX or visdom.

  - [Install](#install)
  - [Examples](#Examples)
  - [Usage](#usage)
    - [Init](#init)
    - [Log Information](#Log-Information)
    - [Store your Parameters](#Store-your-Parameters)
    - [Store and Restore (models and optimizers)](<#Store-and-Restore-(models-and-optimizers)>)
    - [Grapher](#Grapher)



  ```bash
  $ pip install atalaya
  ```



  An example is provided [here](https://github.com/jacr13/Atalaya/tree/master/example).

  Launch the example doing :

  ```bash
  $ ./run.sh
  ```

  An example of logs produced by the logger are given in the [logs](https://github.com/jacr13/Atalaya/tree/master/example/logs) folder of the example.





  ```python
  from atalaya import Logger

  logger = Logger(
      name="exp",         # name of the logger
      path="logs",        # path to logs
      verbose=True,       # logger in verbose mode
  )



  logger = Logger(
      name="exp",         # name of the logger
      path="logs",        # path to logs
      verbose=True,       # logger in verbose mode
      grapher="visdom",
      server="http://localhost",
      port=8097,
      username="user",    # if needed for visdom
      password="pwd",     # if needed for visdom
  )


  ...


  logger.close()
  ```



  ```python

  logger.info("your", "information", "here", "like", "a", "print")


  logger.warning("your warning")
  ```



  ```python

  logger.add_parameters(args)


  logger.restore_parameters(path_to_folder)
  ```



  1. Add the model (or optimizer or whatever that has a state_dict in pytorch)

     Before starting storing or restoring objects you need to add them to the logger:

     ```python
         logger.add("model", model)
         logger.add("optimizer", optimizer)
     ```

  2. Store the model

     In training loop we can add this method, it allows us to save checkpoints,
     and the best model.

     - The parameter valid_loss is simply the parameter to know when to save the best. It looks if
       the new valid_loss is less than the value keep by the logger as lower if it's the case save as best and
       update the value keep in memory.
     - The parameter save_every specify how often to save a checkpoint during training.
     - overwrite specify if we want to overwrite the last checkpoint to keep only the last one
       or if we want to keep them all (saves a model per epoch --> DANGEROUS)

     ```python
         logger.store(valid_loss, save_every=1, overwrite=True)

     ```

  3. Restore the model
     To restore the best after taining simply do

     ```python
         logger.restore(best=True)
     ```

     To restore a checkpoint from another exp :

     ```python
         logger.restore(folder=path_to_folder)
     ```

     To restore the best from another exp :

     ```python
         logger.restore(folder=path_to_folder, best=True)
     ```



  Some examples of grapher methods.

  ```python
  logger.add_scalar("train_mse", scalar_value, global_step=None, save_csv=True)

  logger.add_text("tag", "your text here")


  values = {
      "mse": [10, 9, 8, 7],
      "acc": [0.3, 0.5, 0.55, 0.6]
  }
  logger.register_plots(values, epoch, "train", apply_mean=True, save_csv=True, info=True)
  ```


pkgId: 4adc234886beaaee06e7071695655fc61a5ab03ac002f0fd22e7339bcdec9f80
name: python-atap-context-extractor
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: A tool for extracting the context around searched text in a corpus
url: https://github.com/Australian-Text-Analytics-Platform/atap-context-extractor
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atap-context-extractor-0.2.4-1.src.rpm
checksum_type: sha256
description:
  A tool for extracting the context around searched text in a corpus



  Click the button below to access a demo deployed on Binderhub

  [![Binder](https://binderhub.atap-binder.cloud.edu.au/badge_logo.svg)](https://binderhub.atap-binder.cloud.edu.au/v2/gh/Australian-Text-Analytics-Platform/atap-context-extractor/main?labpath=context-extractor.ipynb)



  Documentation can be found [here](https://australian-text-analytics-platform.github.io/atap-context-extractor/DOCS.html)



    - **Hamish Croser** - [h-croser](https://github.com/h-croser)



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


pkgId: ac94b9976a5074868f770e72b32abcb00e91174f207804088c9fb013cac0dbcf
name: python-atap-corpus-loader
arch: src
version: 1.7.6
epoch: 0
release: 1
summary: A GUI loader for atap_corpus using the Panel library.
url: https://github.com/Australian-Text-Analytics-Platform/atap-corpus-loader
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atap-corpus-loader-1.7.6-1.src.rpm
checksum_type: sha256
description:
  A GUI loader for atap_corpus using the Panel library. Provides a single Panel-compatible widget in which a user can construct a corpus object for use by the client code.



  The loader currently supports loading a corpus from the following file types:
  - txt
  - odt
  - docx
  - csv
  - tsv
  - xlsx
  - ods
  - xml



  ```shell
  python3 -m pip install atap-corpus-loader
  ```



  Documentation can be found [here](https://australian-text-analytics-platform.github.io/atap-corpus-loader/DOCS.html)



  ```shell
  python3 tests/tests.py
  ```



  The package for this project is hosted on PyPi: https://pypi.org/project/atap-corpus-loader/

  Dependencies, publishing, and version numbering is handled by [Poetry](https://python-poetry.org)

  To publish a new version:

  ```shell
  poetry config pypi-token.pypi <TOKEN>
  poetry version minor
  poetry build
  poetry publish
  ```



    - **Hamish Croser** - [h-croser](https://github.com/h-croser)



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


pkgId: 354d812d0fdccda3bb48694d86c5777efb31ca54465a272673f4c9cabcd62452
name: python-atap-corpus-timeline
arch: src
version: 0.2.3
epoch: 0
release: 1
summary: A tool for visualising features of a corpus over time
url: https://github.com/Australian-Text-Analytics-Platform/atap-corpus-timeline
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atap-corpus-timeline-0.2.3-1.src.rpm
checksum_type: sha256
description:
  A tool for visualising features of a corpus over time



  Click the button below to access a demo deployed on Binderhub

  [![Binder](https://binderhub.atap-binder.cloud.edu.au/badge_logo.svg)](https://binderhub.atap-binder.cloud.edu.au/v2/gh/Australian-Text-Analytics-Platform/atap-corpus-timeline/main?labpath=corpus-timeline.ipynb)



  Documentation can be found [here](https://australian-text-analytics-platform.github.io/atap-context-extractor/DOCS.html)



    - **Hamish Croser** - [h-croser](https://github.com/h-croser)



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


pkgId: 6a8755ee34f7eae4a17638a872d22b980efce5d88ad19f5f55ed9760e1425c98
name: python-ataraxis-automation
arch: src
version: 3.0.4
epoch: 0
release: 1
url: https://github.com/Sun-Lab-NBB/ataraxis-automation
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ataraxis-automation-3.0.4-1.src.rpm
checksum_type: sha256
summary:
  Provides scripts that support tox-based development automation pipelines used by other Sun Lab projects.

description:
  - Ivan Kondratyev ([Inkaros](https://github.com/Inkaros))
  ___

  This project is licensed under the GPL3 License: see the [LICENSE](LICENSE) file for details.
  ___

  - All Sun Lab [members](https://neuroai.github.io/sunlab/people) for providing the inspiration and comments during the
    development of this library.
  - [click](https://github.com/pallets/click/) project for providing the low-level command-line-interface functionality
    for this project.
  - [pyyaml](https://github.com/yaml/pyyaml.org), [appdirs](https://github.com/ActiveState/appdirs),
    and [tomli](https://github.com/hukkin/tomli) for providing low-level functionality for some of the automation
    functions.
  - The teams behind [pip](https://github.com/pypa/pip), [uv](https://github.com/astral-sh/uv),
    [conda](https://conda.org/), [mamba](https://github.com/mamba-org/mamba) and [tox](https://github.com/tox-dev/tox),
    which form the backbone of our code distribution and management pipeline.
  - The creators of all other projects listed in out [pyproject.toml](pyproject.toml) file and used in automation
    pipelines across all Sun Lab projects.

rpm_license:
[cell repeats an earlier one in this file: 34486 characters]


pkgId: 040ab7779c80e38101e577c1e0703cfb0cad5ceeb7ef18ab6fd681cc4e0a6af2
name: python-ataraxis-base-utilities
arch: src
version: 3.0.0
epoch: 0
release: 1
url: https://github.com/Sun-Lab-NBB/ataraxis-base-utilities
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ataraxis-base-utilities-3.0.0-1.src.rpm
checksum_type: sha256
summary:
  Provides a minimalistic set of shared utility functions used to support most other Sun Lab projects.

description:
  - Ivan Kondratyev ([Inkaros](https://github.com/Inkaros))
  ___

  This project is licensed under the GPL3 License: see the [LICENSE](LICENSE) file for details.
  ___

  - All Sun Lab [members](https://neuroai.github.io/sunlab/people) for providing the inspiration and comments during the
    development of this library.
  - [loguru](https://github.com/Delgan/loguru) and [click](https://github.com/pallets/click/) projects for providing
    all low-level functionality for the Console class.
  - [numpy](https://github.com/numpy/numpy) project for providing low-level functionality for some of the
    standalone methods.

rpm_license:
[cell repeats an earlier one in this file: 34486 characters]


pkgId: dcb364fadc8786f77259a4144e6e4955b102d6191785f68517aa11f4e0f90df7
name: python-ataraxis-data-structures
arch: src
version: 1.1.3
epoch: 0
release: 1
url: https://github.com/Sun-Lab-NBB/ataraxis-data-structures
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ataraxis-data-structures-1.1.3-1.src.rpm
checksum_type: sha256
summary:
  Provides classes and structures for storing, manipulating, and sharing data between Python processes.

description:
  - Ivan Kondratyev ([Inkaros](https://github.com/Inkaros))
  - Edwin Chen
  ___

  This project is licensed under the GPL3 License: see the [LICENSE](LICENSE) file for details.
  ___

  - All Sun lab [members](https://neuroai.github.io/sunlab/people) for providing the inspiration and comments during the
    development of this library.
  - [numpy](https://github.com/numpy/numpy) project for providing low-level functionality for many of the
    classes exposed through this library.
  - [dacite](https://github.com/konradhalas/dacite) and [pyyaml](https://github.com/yaml/pyyaml/) for jointly providing
    the low-level functionality to read and write dataclasses to / from .yaml files.

rpm_license:
[cell repeats an earlier one in this file: 34486 characters]


pkgId: f0c911b85c10fb322a93069995a47ee4b18d6018a32f0ae27babfae56b05f248
name: python-atari-8-bit-utils
arch: src
version: 0.2.8
epoch: 0
release: 1
summary: A collection of Python utilities for projects related to Atari 8-bit computers
url: https://pypi.org/project/atari-8-bit-utils/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atari-8-bit-utils-0.2.8-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/atari-8-bit-utils)](https://pypi.org/project/atari-8-bit-utils/)![Auto Tag badge](https://github.com/JSJvR/atari-8-bit-utils/actions/workflows/auto_tag.yml/badge.svg) ![Python Package badge](https://github.com/JSJvR/atari-8-bit-utils/actions/workflows/python-package.yml/badge.svg) ![Python Publish badge](https://github.com/JSJvR/atari-8-bit-utils/actions/workflows/python-publish.yml/badge.svg)



  - Python 3.8 or later
  - Optional: A version of [`mkatr`](https://github.com/dmsc/mkatr) compiled for you platform, in your `PATH`. Needed for `atr2git` command to work.



  The package can be installed using `pip`

  ```
  pip install atari-8-bit-utils
  ```

  Verify the installation by running `a8utils --help`

  The output should look something like this

  ```
   Usage: a8utils [OPTIONS] COMMAND [ARGS]...

  ╭─ Options ────────────────────────────────────────────────────────────╮
  │ --install-completion          Install completion for the current     │
  │                               shell.                                 │
  │ --show-completion             Show completion for the current shell, │
  │                               to copy it or customize the            │
  │                               installation.                          │
  │ --help                        Show this message and exit.            │
  ╰──────────────────────────────────────────────────────────────────────╯
  ╭─ Commands ───────────────────────────────────────────────────────────╮
  │ ata2utf    Converts a single file or all files in a directory from   │
  │            ATASCII to UTF-8                                          │
  │ utf2ata    Converts a single file or all files in a directory from   │
  │            UTF-8 to ATASCII                                          │
  │ atr2git    Keeps an ATR image and git repo in sync                   │
  ╰──────────────────────────────────────────────────────────────────────╯
  ```



  TODO



  The best way to make full use of this project is to start with the [Atari 8-bit Git template](https://github.com/JSJvR/atari-8-bit-git-template)

  https://github.com/user-attachments/assets/e0558c34-0741-4e70-920e-98a72fade00e

  The video shows [this commit](https://github.com/JSJvR/atari-8-bit-git-template/commit/14f69b4393901dea558b4a9ecce9b8b7189de932) being made from my Atari. Note that the [BASIC listing](https://github.com/JSJvR/atari-8-bit-git-template/blob/367d22375184d9a73c7c38c9ff049913a7ef558b/utf8/LOVE.LST) and the commit message both contain a "♥" which is `0x00` in ATASCII and therefore not valid in a standard text file. ATASCII characters get translated automatically to their [closest Unicode equivalent](https://www.kreativekorp.com/charset/map/atascii/).


pkgId: 0b407c80d0ca85cd78e7dfdaf24344a3e8a04f3c561d5f032bbdfd42077a8759
name: python-atasker
arch: src
version: 0.7.9
epoch: 0
release: 1
summary: Thread and multiprocessing pooling, task processing via asyncio
url: https://github.com/alttch/atasker
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atasker-0.7.9-1.src.rpm
checksum_type: sha256
description:
  Python library for modern thread / multiprocessing pooling and task processing
  via asyncio.

  <img src="https://img.shields.io/pypi/v/atasker.svg" />
  <img src="https://img.shields.io/badge/license-Apache%202-blue.svg" />
  <img src="https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7-blue.svg" />
  <img src="https://img.shields.io/badge/-alpha-red.svg" />

  Warning: **atasker** is not suitable for the lightweight tasks in high-load
  environments. For such projects it's highly recommended to use lightweight
  version: [neotasker](https://github.com/alttch/neotasker)

  No matter how your code is written, atasker automatically detects blocking
  functions and coroutines and launches them in a proper way, in a thread,
  asynchronous loop or in multiprocessing pool.

  Tasks are grouped into pools. If there's no space in pool, task is being placed
  into waiting queue according to their priority. Pool also has "reserve" for the
  tasks with priorities "normal" and higher. Tasks with "critical" priority are
  always executed instantly.

  This library is useful if you have a project with many similar tasks which
  produce approximately equal CPU/memory load, e.g. API responses, scheduled
  resource state updates etc.



  ```bash
  pip3 install atasker
  ```

  Sources: https://github.com/alttch/atasker

  Documentation: https://atasker.readthedocs.io/



  * asynchronous programming is a perfect way to make your code fast and reliable

  * multithreading programming is a perfect way to run blocking code in the
    background

  **atasker** combines advantages of both ways: atasker tasks run in separate
  threads however task supervisor and workers are completely asynchronous. But
  all their public methods are thread-safe.



  * threads in a standard pool don't have priorities
  * workers



  * compatibility with blocking functions
  * async workers



  **concurrent.futures** is a great standard Python library which allows you to
  execute specified tasks in a pool of workers.

  For thread-based tasks, **atasker** extends
  *concurrent.futures.ThreadPoolExecutor* functionality.

  **atasker** method *background_task* solves the same problem but in slightly
  different way, adding priorities to the tasks, while *atasker* workers do
  absolutely different job:

  * in *concurrent.futures* worker is a pool member which executes the single
    specified task.

  * in *atasker* worker is an object, which continuously *generates* new tasks
    with the specified interval or on external event, and executes them in thread
    or multiprocessing pool.






  ```python

  from atasker import task_supervisor


  task_supervisor.set_thread_pool(pool_size=20, reserve_normal=5, reserve_high=5)
  task_supervisor.start()




  task_supervisor.block()


  task_supervisor.stop()
  ```



  ```python
  from atasker import background_task, TASK_LOW, TASK_HIGH, wait_completed


  @background_task
  def mytask():
      print('I am working in the background!')
      return 777

  task = mytask()


  result = wait_completed(task)

  print(task.result) # 777
  print(result) # 777


  def mytask2():
      print('I am working in the background too!')

  task = background_task(mytask2, priority=TASK_HIGH)()
  ```


  ```python

  a1 = task_supervisor.create_aloop('myaloop', default=True)

  async def calc(a):
      print(a)
      await asyncio.sleep(1)
      print(a * 2)
      return a * 3




  task = background_task(calc)(1)

  wait_completed(task)


  result = a1.run(calc(1))
  ```



  ```python
  from atasker import background_worker, TASK_HIGH

  @background_worker
  def worker1(**kwargs):
      print('I am a simple background worker')

  @background_worker
  async def worker_async(**kwargs):
      print('I am async background worker')

  @background_worker(interval=1)
  def worker2(**kwargs):
      print('I run every second!')

  @background_worker(queue=True)
  def worker3(task, **kwargs):
      print('I run when there is a task in my queue')

  @background_worker(event=True, priority=TASK_HIGH)
  def worker4(**kwargs):
      print('I run when triggered with high priority')

  worker1.start()
  worker_async.start()
  worker2.start()
  worker3.start()
  worker4.start()

  worker3.put_threadsafe('todo1')
  worker4.trigger_threadsafe()

  from atasker import BackgroundIntervalWorker

  class MyWorker(BackgroundIntervalWorker):

      def run(self, **kwargs):
          print('I am custom worker class')

  worker5 = MyWorker(interval=0.1, name='worker5')
  worker5.start()
  ```


pkgId: 3fc9cbc44c564fd2a330b372d43e235fd897a752d310605b83559be502d47402
name: python-ataskq
arch: src
version: 0.6.5
epoch: 0
release: 1
url: https://github.com/innoviz-swt/a-task-queue
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-ataskq-0.6.5-1.src.rpm
checksum_type: sha256
summary:
  Easily create and run tasks (=function calls) with almost seamless transition between Local development and Distributed deployment.

description:
  Easily create and run tasks (=function calls) with almost seamless transition between Local development and Distributed deployment."


  ```python
  from ataskq import TaskQ, Task, targs
  from ataskq.tasks_utils import hello_world, dummy_args_task


  def hello_world():
      print("hello world")


  def task_with_args(*args, **kwargs):
      print(f"task_with_args args: {args}, kwargs: {kwargs}")



  tr = TaskQ().create_job()



  tr.add_tasks(
      [
          Task(entrypoint=hello_world),
          Task(entrypoint=task_with_args, targs=targs("arg0", "arg1", kwarg1=10, kwarg2="this is kwarg2")),
      ]
  )


  tr.run()  # to run in parallel add concurrency=N
  ```

  more example can be found [here](./examples)


  to setup project run
  ```
  ./contrib/setup.sh
  ```


  to get nominal vscode settings run
  ```
  ./contrib/.vscode/init.sh
  ```


pkgId: a7f70bd9342aef695efba407fafb799c2cdbd234756480342dec433a580e7484
name: python-atatus
arch: src
version: 1.6.1
epoch: 0
release: 1
summary: Atatus Python Agent
url: https://www.atatus.com
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atatus-1.6.1-1.src.rpm
checksum_type: sha256
description:
  This is the official `Atatus Python APM agent`_.
  This package allows you to monitor your python application for any performance issues and crashes.
  Drill down slow database queries, slow third party requests, and more. Support is available for popular frameworks like Django and Flask.


pkgId: fe3a1e790ba9d4a50ece4aac56e6a0d7dc8e4d836c1dfd2694d273bc22fca3fe
name: python-atbu-common-pkg
arch: src
version: 0.0.12
epoch: 0
release: 1
summary: ATBU common package, common modules used by atbu.backup and atbu.mp_pipeline.
url: https://github.com/AshleyT3/atbu-common
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atbu-common-pkg-0.0.12-1.src.rpm
checksum_type: sha256
description:
  The atbu.common package is used by the following projects:
  - [ATBU Backup & Persistent File Information](https://github.com/AshleyT3/atbu) utility package (atbu-pkg).
  - [ATBU Multiprocessing Pipeline](https://github.com/AshleyT3/atbu-mp-pipeline) package (atbu-mp-pipeline-pkg).

  Included is support for the following:
  - **AesCbcPaddingEncryptor** and **AesCbcPaddingDecryptor** for AES CBC encryption/decryption with padding, related buffering/retention taken care automatically.
  - **MultiEncoderDecoder** to allow defining/processing of .json encoding/decoding for multiple classes.
  - **Hasher** which wraps multiple Python hashers for creating multiple hashes at once.
  - **SimpleReport** which creates a simple report where  columns are wrappers. This is used by ATBU to report errors, sometimes containing lengthy messages. Note, there is an excellent Python reporting package, [tabulate](https://github.com/astanin/python-tabulate) which offers extensive reporting... please see that first. This SimpleReport class was created because, at the time, certain wrapping capabilities were not yet released for the tabulate project.
  - **Singleton** providing singleton support.
  - **util_helpers** providing miscellaneous helper functions used by ATBU, such clearing files, detecting what could be a valid base64 string, and other miscellaneous tools.

  The main purpose of this repo is to carve out of ATBU what is more general for use in other projects going forward.


  To install atbu-common-pkg:

  ```
  pip install atbu-common-pkg
  ```

  See source code for this and the other packages mentioned above for details and usage information.


pkgId: b4489863fc40cdf06591a4e8ebc22f4384746a222c2ddc81f9263cba77bfb52f
name: python-atbu-mp-pipeline-pkg
arch: src
version: 0.0.10
epoch: 0
release: 1
summary: ATBU atbu.mp_pipeline package, a multiprocessing work item pipeline.
url: https://github.com/AshleyT3/atbu-mp-pipeline
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atbu-mp-pipeline-pkg-0.0.10-1.src.rpm
checksum_type: sha256
description:
  The atbu.mp_pipeline package uses Python multiprocessing capabilities to support multi-stage pipeline capabilities, including support for dual-stage parallel execution of a producer and consumer stages, automatically providing each of those stages with pipe connection, allowing them share what is being produced/consumed.

  The atbu.mp_pipeline package is currently used by the following project for supporting a backup compression pipeline stage:
  - [ATBU Backup & Persistent File Information](https://github.com/AshleyT3/atbu) utility package (atbu-pkg).

  Documentation: https://atbu-mp-pipeline.readthedocs.io/en/latest/


  To install atbu-common-pkg:

  ```
  pip install atbu-mp-pipeline-pkg
  ```

  See below for a few examples. See source code for other packages mentioned above and for additional details and usage information.





  ```
  import os
  from multiprocessing import freeze_support
  from atbu.mp_pipeline.mp_pipeline import (
      MultiprocessingPipeline,
      SubprocessPipelineStage,
      PipelineWorkItem,
  )

  def queue_worker_func(parm_top_secret, parent_pid):
      assert parent_pid != os.getpid()
      return (
          parent_pid,
          os.getpid(),
          parm_top_secret,
      )

  def int_stage0(wi: PipelineWorkItem):
      wi.user_obj[0] = 100
      return wi


  def int_stage1(wi: PipelineWorkItem):
      wi.user_obj[0] = wi.user_obj[0] * 2
      wi.user_obj[1] = "stage1"
      return wi


  def int_stage2(wi: PipelineWorkItem):
      wi.user_obj[0] = wi.user_obj[0] * 2
      wi.user_obj[2] = f"stage2: got this from parent: {wi.user_obj['parent']}"
      return wi


  def always_yes(wi: PipelineWorkItem):
      return True

  def main():
      sp = MultiprocessingPipeline(
          name="test_mp_pipeline_basic",
          stages=[
              SubprocessPipelineStage(
                  fn_determiner=always_yes,
                  fn_worker=int_stage0,
              ),
              SubprocessPipelineStage(
                  fn_determiner=always_yes,
                  fn_worker=int_stage1,
              ),
              SubprocessPipelineStage(
                  fn_determiner=always_yes,
                  fn_worker=int_stage2,
              ),
          ],
      )

      d = {}
      d["parent"] = "This is from parent"
      wi = PipelineWorkItem(d.copy())
      f = sp.submit(wi)
      r_wi: PipelineWorkItem = f.result()
      if not wi.is_failed:
          assert wi == r_wi # On success, should be equal.
          assert wi.user_obj["parent"] == d["parent"] # Should not change.
          
          assert wi.user_obj[0] == 400
          assert wi.user_obj[1] == "stage1"
          assert wi.user_obj[2] == "stage2: got this from parent: This is from parent"
          print(f"Work item completed successfully:")
          print(f"  wi.user_obj[0]={wi.user_obj[0]}")
          print(f"  wi.user_obj[1]={wi.user_obj[1]}")
          print(f"  wi.user_obj[2]={wi.user_obj[2]}")
      else:
          print(f"Something did not go as planned:")
          for ex in r_wi.exceptions:
              print(f" ex={ex}")
      sp.shutdown()
      assert sp.was_graceful_shutdown

  if __name__ == '__main__':
      freeze_support()
      main()
  ```

  **Output:**
  ```
  Work item completed successfully:
    wi.user_obj[0]=400
    wi.user_obj[1]=stage1
    wi.user_obj[2]=stage2: got this from parent: This is from parent
  ```



  ```
  import os
  from multiprocessing import freeze_support
  from atbu.mp_pipeline.mp_pipeline import (
      MultiprocessingPipeline,
      SubprocessPipelineStage,
      PipelineWorkItem,
  )

  class LargePipelineWorkItem(PipelineWorkItem):
      def __init__(self) -> None:
          super().__init__(user_obj=self)
          self.is_ok = True
          self.num = 0
          self.pid = os.getpid()


  class LargePipelineStage(SubprocessPipelineStage):
      def __init__(self) -> None:
          super().__init__()

      def is_for_stage(self, pwi: LargePipelineWorkItem) -> bool:
          
          
          pwi.is_ok = not pwi.is_ok
          return not pwi.is_ok

      def perform_stage_work(
          self,
          pwi: LargePipelineWorkItem,
          **kwargs,
      ):
          pwi.num += 1
          return pwi

  def main():
      stages = 100
      mpp = MultiprocessingPipeline(
          max_simultaneous_work_items=min(os.cpu_count(), 15),
          name="test_mp_pipeline_large",
      )
      for _ in range(stages):
          mpp.add_stage(stage=LargePipelineStage())
      print(f"Pipeline has {mpp.num_stages} stages.")
      wi = LargePipelineWorkItem()
      f = mpp.submit(wi)
      r_wi: PipelineWorkItem = f.result()
      if not r_wi.is_failed:
          assert wi == r_wi
          assert r_wi.is_ok
          assert r_wi.num == 50
          print(f"Work item completed successfully:")
          print(f"  r_wi.is_ok={r_wi.is_ok}")
          print(f"  r_wi.pid={r_wi.pid}")
      else:
          if r_wi.exceptions is not None:
              print(f"Something did not go as planned:")
              for ex in r_wi.exceptions:
                  print(f" ex={ex}")
      mpp.shutdown()
      assert mpp.was_graceful_shutdown

  if __name__ == '__main__':
      freeze_support()
      main()
  ```

  **Output:**

  ```
  Pipeline has 100 stages.
  Work item completed successfully:
    r_wi.is_ok=True
    r_wi.pid=8204
    r_wi.num=50
  ```



  ```
  import os
  from multiprocessing import freeze_support
  from atbu.mp_pipeline.mp_pipeline import (
      MultiprocessingPipeline,
      PipelineStage,
      SubprocessPipelineStage,
      ThreadPipelineStage,
      PipelineWorkItem,
  )

  class LargePipelineWorkItem(PipelineWorkItem):
      def __init__(self) -> None:
          super().__init__(user_obj=self)
          self.is_ok = True
          self.num = 0
          self.pid = os.getpid()


  class MixedPipelineSubprocessStage(PipelineStage):
      def __init__(self) -> None:
          super().__init__()

      @property
      def is_subprocess(self):
          return True

      def is_for_stage(self, pwi: LargePipelineWorkItem) -> bool:
          return True # Yes, this stage wants all work items.

      def perform_stage_work(
          self,
          pwi: LargePipelineWorkItem,
          **kwargs,
      ):
          
          assert pwi.pid != os.getpid() # Subprocess should have different pid.
          pwi.num += 1
          return pwi


  def perform_thread_stage_work(
      pwi: LargePipelineWorkItem,
      **kwargs,
  ):
      assert pwi.pid == os.getpid() # Thread should have same process.
      pwi.num += 1
      return pwi

  def main():
      mpp = MultiprocessingPipeline(
          name="mp_pipeline_large_mixed",
          max_simultaneous_work_items=min(os.cpu_count(), 15),
      )
      for _ in range(10):
          
          mpp.add_stage(stage=MixedPipelineSubprocessStage())
          
          
          
          
          mpp.add_stage(
              stage=ThreadPipelineStage(
                  fn_determiner=lambda pwi: True, # Run all work items.
                  fn_worker=perform_thread_stage_work, # Call this to run them.
              )
          )
      print(f"Pipeline has {mpp.num_stages} stages.")
      wi = LargePipelineWorkItem()
      f = mpp.submit(wi)
      r_wi: PipelineWorkItem = f.result()
      if not r_wi.is_failed:
          assert wi == r_wi
          assert not r_wi.is_failed
          assert r_wi.is_ok
          assert r_wi.num == 20
          assert r_wi.pid == os.getpid()
          print(f"Work item completed successfully:")
          print(f"  r_wi.num={r_wi.num}")
          print(f"  r_wi.pid={r_wi.pid}")
      else:
          if r_wi.exceptions is not None:
              print(f"Something did not go as planned:")
              for ex in r_wi.exceptions:
                  print(f" ex={ex}")
      mpp.shutdown()
      assert mpp.was_graceful_shutdown

  if __name__ == '__main__':
      freeze_support()
      main()
  ```

  **Output:**

  ```
  Pipeline has 20 stages.
  Work item completed successfully:
    r_wi.num=20
    r_wi.pid=18068
  ```



  ```
  import os
  from multiprocessing import freeze_support
  import concurrent.futures
  from atbu.mp_pipeline.mp_pipeline import (
      MultiprocessingPipeline,
      SubprocessPipelineStage,
      PipelineWorkItem,
      PipeConnectionIO,
  )

  class ProducerConsumerWorkItem(PipelineWorkItem):
      def __init__(self, demo_pipe_io_wrapper) -> None:
          super().__init__(auto_copy_attr=False)
          self.demo_pipe_io_wrapper = demo_pipe_io_wrapper
          self.producer_data = None # What producer sent.
          self.producer_bytes_written = None
          self.consumer_data = None # What consumer received

      def stage_complete(
          self,
          stage_num: int,  # pylint: disable=unused-argument
          wi: "PipelineWorkItem",  # pylint: disable=unused-argument
          ex: Exception,
      ):
          super().stage_complete(
              stage_num=stage_num,
              wi=wi,
              ex=ex,
          )
          if not wi.is_failed:
              if stage_num == 0:
                  self.producer_data = wi.producer_data
                  self.producer_bytes_written = wi.producer_bytes_written
              elif stage_num == 1:
                  self.consumer_data = wi.consumer_data


  class ProducerPipelineSubprocessStage(SubprocessPipelineStage):
      def __init__(self) -> None:
          super().__init__()

      def is_for_stage(self, pwi: ProducerConsumerWorkItem) -> bool:
          return True # Yes, we want to see all work items in this stage.

      @property
      def is_pipe_with_next_stage(self):
          """Return True to indicate we want this stage and the next one
          to run in parallel, where this stage is the producer feeding a
          pipeline-supplied pipe, and the next stage is consuming from that
          same pipe (on the reader side).
          """
          return True

      def perform_stage_work(
          self,
          pwi: ProducerConsumerWorkItem,
          **kwargs,
      ):
          try:
              if not isinstance(pwi, ProducerConsumerWorkItem):
                  raise ValueError(
                      f"Producer: Pipeline gave us unexpected work item."
                  )
              pwi.producer_data = os.urandom(10)
              if pwi.demo_pipe_io_wrapper:
                  
                  
                  
                  with PipeConnectionIO(pwi.pipe_conn, is_write=True) as pipe_io:
                      pwi.producer_bytes_written = pipe_io.write(pwi.producer_data)
              else:
                  
                  pwi.pipe_conn.send_bytes(pwi.producer_data)
                  pwi.producer_bytes_written = len(pwi.producer_data)
              return pwi
          except Exception:
              if not pwi.pipe_conn.closed:
                  pwi.pipe_conn.close()
              raise


  class ConsumerPipelineSubprocessStage(SubprocessPipelineStage):
      def __init__(self) -> None:
          super().__init__()

      def is_for_stage(self, pwi: ProducerConsumerWorkItem) -> bool:
          return True # Yes, we want to see all work items in this stage.

      def perform_stage_work(
          self,
          pwi: ProducerConsumerWorkItem,
          **kwargs,
      ):
          try:
              if not isinstance(pwi, ProducerConsumerWorkItem):
                  raise ValueError(
                      f"Consumer: Pipeline gave us unexpected work item."
                  )
              if pwi.demo_pipe_io_wrapper:
                  
                  
                  
                  with PipeConnectionIO(pwi.pipe_conn, is_write=False) as pipe_io:
                      pwi.consumer_data = pipe_io.read()
              else:
                  
                  pwi.consumer_data = pwi.pipe_conn.recv_bytes()
              return pwi
          except Exception:
              if not pwi.pipe_conn.closed:
                  pwi.pipe_conn.close()
              raise

  def main():
      mpp = MultiprocessingPipeline(
          name="test_mp_producer_oncsoler",
          stages=[
              ProducerPipelineSubprocessStage(),
              ConsumerPipelineSubprocessStage()
          ]
      )
      wil = [
          ProducerConsumerWorkItem(demo_pipe_io_wrapper=True),
          ProducerConsumerWorkItem(demo_pipe_io_wrapper=False)
      ]
      fut = [mpp.submit(wi) for wi in wil]
      done, _ = concurrent.futures.wait(
          fs=fut,
          return_when=concurrent.futures.ALL_COMPLETED
      )
      assert len(done) == 2
      for i, f in enumerate(done):
          r_wi: ProducerConsumerWorkItem = f.result()
          if not r_wi.is_failed:
              assert r_wi.producer_bytes_written == 10
              assert r_wi.producer_data == r_wi.consumer_data
              print(f"Success for #{i}:")
              print(f"  {i}: num_bytes={r_wi.producer_bytes_written}")
              print(f"  {i}: p_bytes={r_wi.producer_data.hex(' ')}")
              print(f"  {i}: c_bytes={r_wi.consumer_data.hex(' ')}")
          else:
              if r_wi.exceptions is not None:
                  print(f"Something did not go as planned for #{i}:")
                  for ex in r_wi.exceptions:
                      print(f"  {i}: Bad thing happened: {ex}")
      mpp.shutdown()
      assert mpp.was_graceful_shutdown

  if __name__ == '__main__':
      freeze_support()
      main()
  ```

  **Output:**

  ```
  Success for #0:
    0: num_bytes=10
    0: p_bytes=76 d4 32 f0 4f 3f 31 30 19 00
    0: c_bytes=76 d4 32 f0 4f 3f 31 30 19 00
  Success for #1:
    1: num_bytes=10
    1: p_bytes=34 d6 5c d0 be 82 62 c3 5d 61
    1: c_bytes=34 d6 5c d0 be 82 62 c3 5d 61
    ```


pkgId: 600c70de2a6fe8d3fd1ecd37c7338e485461ddc9ffa1ffa0e0403dc7c39bf418
name: python-atckit
arch: src
version: 1.7.7
epoch: 0
release: 1
summary: AccidentallyTheCables Utility Kit
url: https://gitlab.com/accidentallythecable-public/python-modules/python-atckit/
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atckit-1.7.7-1.src.rpm
checksum_type: sha256
description:
  AccidentallyTheCable's Utility Kit

  - [ATCKit](#atckit)
    - [About](#about)
      - [How does it work?](#how-does-it-work)
    - [Usage](#usage)
      - [FunctionSubscriber](#functionsubscriber)
    - [UtilFuncs](#utilfuncs)
      - [`create_object_logger`](#create_object_logger)
      - [`create_static_logger`](#create_static_logger)
      - [`deltatime_str`](#deltatime_str)
      - [`dump_sstr`](#dump_sstr)
      - [`load_sstr`](#load_sstr)
      - [`load_sfile`](#load_sfile)
      - [`scan_dir`](#scan_dir)
      - [`deep_sort`](#deep_sort)
      - [`check_pid`](#check_pid)
      - [`register_pid`](#register_pid)
      - [`register_signals`](#register_signals)
      - [`find_config_file`](#find_config_file)
      - [`add_config_search_path`](#add_config_search_path)
      - [`remove_config_search_path`](#remove_config_search_path)
      - [`add_config_search_file_ext`](#add_config_search_file_ext)
      - [`remove_config_search_file_ext`](#remove_config_search_file_ext)
    - [Service](#service)
    - [Version](#version)
      - [Version Search Strings](#version-search-strings)
        - [`version_locator`](#version_locator)
        - [`version_search_merge`](#version_search_merge)



  This is a small kit of classes, util functions, etc that I found myself rewriting or reusing frequently, and instead of copying everywhere, they are now here.




  Do the needfuls.... *do the needful dance*

  Literally, import whatever you need to use..





  A Class container for Function callback subscription via `+=` or `-=`. Functions can be retrieved in order of addition.

  ```
  subscriber = FunctionSubscriber()

  def a():
      print("I am a teapot")

  def b():
      print("I am definitely totally not also a teapot, I swear")

  subscriber += a
  subscriber += b

  for cb in subscriber.functions:
      cb()

  >> I am a teapot
  >> I am definitely totally not also a teapot, I swear
  ```

  This class uses the `typing.Callable` type for function storage. You can extend the `FunctionSubscriber` class to define the
  callback function parameters, etc.

  ```
  class MySubscriber(FunctionSubscriber):
      """My Function Subscriber
      Callback: (bool) -> None
      """

      _functions:list[Callable[[bool],None]]

      def __iadd__(self,fn:Callable[[bool],None]) -> Self:
          """Inline Add. Subscribe Function
          @param method \c fn Method to Subscribe
          """
          return super().__iadd__(fn)

      def __isub__(self,fn:Callable[[bool],None]) -> Self:
          """Inline Subtract. Unsubscribe Function
          @param method \c fn Method to Unsubscribe
          """
          return super().__isub__(fn)
  ```



  A Class containing various static methods:



   Create `logging.Logger` instance for object specifically



   Create `logging.Logger` instance of a specified name



   Create `datetime.timedelta` from short formatted time string. Format: `0Y0M0w0d0h0m0s0ms`



   Dump Structured Data (dict) to str of specified format. Accepts JSON, YAML, TOML



   Load Structured Data from String. Accepts JSON, YAML, TOML



   Load Structured Data from File, automatically determining data by file extension. Accepts JSON, YAML, TOML


   Search a specified Path, and execute a callback function on discovered files.
     - Allows exclusion of Files/Dirs via regex pattern matching


   Sort a Dictionary recursively, including through lists of dicts


   Check if a process ID exists (via kill 0)


   Register (Write) process ID in specified directory as `<service>.pid`


   Register Shutdown / Restart Handlers
     - Check for Shutdown via UtilFuncs.shutdown (bool)
     - Check for Restart via UtilFuncs.restart (bool)



   Look for config file in 'well defined' paths. Searches for `<service>/<config>.[toml,json,yaml]` in `~/.local/` and `/etc/` (in that order)



   Add Search Path for [`find_config_file`](#find_config_file)



   Remove Search Path for [`find_config_file`](#find_config_file)



   Add file extension for [`find_config_file`](#find_config_file)



   Remove file extension for [`find_config_file`](#find_config_file)



  A Service / Daemon Class. Responds to signals properly, including HUP to restart threads

  HUP does not restart main thread. So if the main configuration file needs to be re-read, the service needs to be stopped and started completely.

  Entrypoint functions for services are defined under the `.services` [`FunctionSubscriber`](#FunctionSubscriber). These functions should be loopable, or be capable of starting again each time the function completes.

  Create a class, which extends `Service`, such as `MyService`.

   - Set Service Name: `MyService._SERVICE_NAME = "myservice"`
   - Set Shutdown Time Limit: `MyService._SERVICE_SHUTDOWN_LIMIT = 300` (default shown)
   - Set Thread Check Interval: `MyService._SERVICE_CHECK_TIME = 0.5` (default shown)
   - Configuration Loading: Utilizes [`UtilFuncs.find_config_file()`](#find_config_file) and [`UtilFuncs.load_sfile()`](#load_sfile), will attempt to load `<service_name>/<service_name>.[toml,yaml,json]` from 'well known' paths, configuaration available in `MyService._config`. Additional locations can be added with [`UtilFuncs.add_config_search_path()`](#add_config_search_path)
   - Subscribe / Create Thread: `MyService.services += <function>`
   - Unsubscribe / Remove Thread: `MyService.services -= <function>`
   - Shutdown: Set `MyService.shutdown` (bool), Utilizes `Utilfuncs.shutdown`
   - Restart: Set `MyService.restart` (bool), Utilizes `Utilfuncs.restart`
   - Run Check: Check `MyService.should_run` to see if thread needs to stop
   - Run: Call `MyService.run()`
   - Stop: Call `MyService.stop()`
   - Signal Handlers: Utilizes [`Utilfuncs.register_signals()`](#register_signals)
   - Process ID storage: Set `pid_dir` in Configuration File

  Example Service Functions:

  ```
  import logging
  from time import sleep

  from atckit.service import Service

  class MyService(Service):
      def __init__(self) -> None:
          super().__init__()
          self.services += self._testloopA # Add Thread to Service
          self.services += self._testloopB # Add another Thread

      def _testloopA(self) -> None:
          """Test Function, Continuous loop
          @retval None Nothing
          """
          while self.should_run:
              self.logger.info("Loop test")
              sleep(1)

      def _testloopB(self) -> None:
          """Test Function, One Shot, restarting at minimum every `MyService._SERVICE_CHECK_TIME` seconds
          @retval None Nothing
          """
          self.logger.info("Test Looop")
          sleep(1)

  if __name__ == "__main__":
      logging.basicConfig(level=logging.DEBUG) # Logging Configuration
      service:MyService = MyService() # Initialize Service
      service.run() # Stop with ABRT/INT/TERM CTRL+C
      service.stop() # Cleanup / Wait for Shutdown
  ```



  A Class for version manipulation.

  A Version can be created from:
   - Semantic String (`"1.0.0"`)
   - List of Strings or Ints of a version (`["1","0","0"]` or `[1,0,0]`)
   - Tuple of Strings or Ints of a version (`("1","0","0")` or `(1,0,0)`)

  Versions are comparable (`>`,`<`,`>=`,`<=`,`==`,`!=`)
  Versions are addable and subtractable (`a -= b`, `a += b`)
   - During subtraction, if a part goes negative, it will be set to 0



  To make Version things even easier, 2 functions are also included in the Version module, which enables a list of matching versions to be created, from the search.

  Version Search Strings are 1 or more entries in a specially formatted string: `<comparator>:<version>,...`

  Supported comparators: `>`,`<`,`>=`,`<=`,`==`,`!=`

  Example Searches:

   - ">=:1.0.0,!=:2.0.2,<=:4.0.0"
   - "<=:3.0.0,>:0.9.0"



  Given a list of versions, locate a version which matches a given search string.

   - Example 1 matching:
     - Any Version Newer than 1.0.0, including 1.0.0
     - Not Version 2.0.2
     - Any Version Older than 4.0.0, including 4.0.0
   - Example 2 matching:
     - Any Version Older than 3.0.0, including 3.0.0
     - Any Version Newer than 0.9.0, not including 0.9.0



  Combine 2 Version Search Strings, creating a single string, which satisfies all searches in each string.

  Given the examples above, merging these two searches, would result in the following compatible search: `>=:1.0.0,<=:3.0.0,!=:2.0.2`


pkgId: 2ff7d7b7e5cfc8b66aee49fc7db7fdffc7bdb021f7195f1b8320039a5c4894a1
name: python-atcoder-helper
arch: src
version: 0.1.11
epoch: 0
release: 1
summary: automation cli tools for AtCoder
url: https://github.com/yuchiki/atcoder_helper
rpm_license: MIT LICENSE
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atcoder-helper-0.1.11-1.src.rpm
checksum_type: sha256
description:
  atcoder出場を手助けするCLIツールです。



  `pip install atcoder-helper`

  PyPI: <https://pypi.org/project/atcoder-helper/>





  `atcoder_helper config init`コマンドにより、 `$HOME/.atcoder_helper` 以下に設定ファイルが作成されます。



  問題を解くディレクトリの中で以下の準備をします。



  `atcoder_helper task create <コンテスト名> <問題名>` コマンドを実行し、ディレクトリを作成して初期化します。
  たとえば、ABC160のA問題であれば `atcoder_helper abc160 a`のようにコマンドを打ちます。

  このコマンドにより、問題を解くための雛型が生成されます。また、ビルドコマンド・実行コマンド、問題などの情報を記したタスク設定ファイル`.atcoder_helper_task_config.yaml`が生成されます。



  `atcoder_helper auth login` でatcoderにログインしてください。



  作成されたディレクトリに移動し、`atcoder_helper fetch`コマンドを実行します。
  取得したテストケースはtestcases.yamlに保存されます。



  `atcoder_helper exec` で以下のような実行結果を得ることができます。

  ![出力画像](docs/exec_result.png)



  デフォルトでは、~/.atcoder_helper/config.yaml に設定ファイルが作成されます。ここに追記することにより、自分独自の言語設定を追加することができます。
  各言語設定は template_dir フィールドを持つことができます。template_dirフィールドが設定されている場合、初期化時に、template_dirに指定されたディレクトリ内のファイルが初期化中のディレクトリに展開されます。

  - 使用可能な言語の一覧は`atcoder_helper config languages` で取得できます
  - 現在デフォルトの言語は`atcoder_helper config default` で取得できます
  - デフォルトの言語の変更は`atcoder_helper config use <language>` で可能です



  - testcases.yamlのtestcaseにexpectedを指定しないテストケースを作成すると、そのケースはJUSTSHOW扱いになり、正答との比較はスキップされ、出力結果の表示だけが行われます。
  - 新規にディレクトリを作成せず、その場のディレクトリを初期化する atcoder_helper task init コマンドも存在します。
    - その場合、 task configファイルを自分で設定するか、あるいは `atcoder_helper fetch --contest <contest> --task <task>`のようにすることで、特定の問題のテストケースを取得できます。
  - 現在、古い時代のコンテストに対応していないことを把握しています。



  - [リポジトリ構造](./docs/about_repository_structure.md)
  - [プログラム構造](./docs/about_program_structure.md)
  - [設計上の決定](./docs/decisions_on_architecturing.md)


pkgId: 87504fcabfc94a1616a4378a8b566c5ee3339afa7caad88611dd542766e28093
name: python-atcom
arch: src
version: 0.4.3
epoch: 0
release: 1
summary: A tool which makes AT communication easier.
url: https://github.com/sixfab/atcom
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atcom-0.4.3-1.src.rpm
checksum_type: sha256
description:
  ​
  AT commands are the instructions used to control and communicate with the cellular modems. In order to, send AT commands to a cellular device, one needs to check several parameters and might need a serial monitor tool.
  ATCom is a command-line interface tool that makes AT command operations easier.
  ​

  ​
  [pip3](https://pip.pypa.io/en/stable/) is required to install the **atcom**. pip3 can be intalled by
  ​
  ```bash
  sudo apt install python3-pip
  ```
  ​
  Use the package manager [pip3](https://pip.pypa.io/en/stable/) to install **atcom**.
  ​
  ```bash
  pip3 install atcom
  ```
  ​

  ​
  ```bash
  $ atcom [OPTIONS] AT_COMMAND
  ```

  > ### Warning:
  > If you need to send `"` or `'` character, you should use escape character `\` before it.
  > ### Example:
  > ```atcom AT+CGDCONT=1,\"IP\",\"internet\"```
  ​

  ​
  Running **atcom** without *--port* parameter, scans for available ports, and selects a valid modem port if available.
  ​
  ```bash
  $ atcom AT
  ```
  ​
  or
  ​
  ```bash
  $ atcom --port /dev/ttyUSB2 AT
  ```
  ​

  ​
  Configuration file(configs.yaml) can be created for persist args.
  ATCom first checks the current working directory for the configs.yml to read the arguments from. The path of the configuration file can also be specified using the **--config** parameter.
  ​
  The configuration file must be in *yaml* format, for example:
  ​
  ```yaml
  port: /dev/ttyUSB2
  baudrate: 115200
  timeout: 10
  ```
  ​
  The keys, config file can contain:
  * port (str)
  * baudrate (int)
  * timeout (int)
  * rts_cts (boolean)
  * dsr_dtr (boolean)
  * verbose (boolean)
  ​

  ​
  |                 |     default    |            description           |
  |-----------------|:--------------:|:--------------------------------:|
  | -p / --port     |        -       | PORT of modem                    |
  | -b / --baudrate |     115200     | Baudrate for serial communication|
  | -t / --timeout  |        10      | Communication timeout            |
  | -c / --config   | ./configs.yaml | Configurations file Path         |
  | -v / --verbose  |        -       | Enable full log output           |
  | --rts-cts       |        -       | Enable RTS-CTS mode              |
  | --dsr-dtr       |        -       | Enable DSR-DTR mode              |


pkgId: 7e52e280b04be161cba692355749d9029dba8deaf945507ab8c5afe3733154f1
name: python-atef
arch: src
version: 1.5.1
epoch: 0
release: 1
summary: Python Automated Test Execution Framework
url: https://pypi.org/project/atef/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atef-1.5.1-1.src.rpm
checksum_type: sha256
rpm_license:
  Copyright (c) 2023, The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). 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 Leland Stanford Junior University, SLAC National Accelerator Laboratory, U.S. Dept. of Energy 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 OWNER, THE UNITED STATES GOVERNMENT, 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.  You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to SLAC National Accelerator Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such Enhancements or derivative works thereof, in binary and source code form.


pkgId: 1999322394954b832cf33ebc3fdea1ae6224282891b8e73b9b7ea92671a2ab4a
name: python-atelier
arch: src
version: 1.1.55
epoch: 0
release: 1
summary: A collection of tools for software artists
url: https://gitlab.com/lino-framework/atelier
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atelier-1.1.55-1.src.rpm
checksum_type: sha256
description:
  `atelier` is a collection of tools for maintaining your Python software
  repositories using a library of `invoke <https://www.pyinvoke.org/>`_ commands.

  - Source code: https://gitlab.com/lino-framework/atelier
  - Documentation: https://lino-framework.gitlab.io/atelier


pkgId: a03e65f251b6a77778feb0ff6a93adab606987b5018935873e93c06870e06790
name: python-atelier-ai
arch: src
version: 0.1.18
epoch: 0
release: 1
summary: Atelier AI: Studio for AI Designers
url: https://john-james-ai.github.io/atelier-ai
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atelier-ai-0.1.18-1.src.rpm
checksum_type: sha256
description:
  Atelier AI: Studio for AI Designers

  ```sh
  pip install atelier-ai
  ```

  * Clone this repository
  * Requirements:
    * [Poetry](https://python-poetry.org/)
    * Python 3.7+
  * Create a virtual environment and install the dependencies
  ```sh
  poetry install
  ```
  * Activate the virtual environment
  ```sh
  poetry shell
  ```

  ```sh
  pytest
  ```

  The documentation is automatically generated from the content of the [docs directory](./docs) and from the docstrings
   of the public signatures of the source code. The documentation is updated and published as a [Github project page
   ](https://pages.github.com/) automatically as part each release.

  Trigger the [Draft release workflow](https://github.com/john-james-ai/atelier-ai/actions/workflows/draft_release.yml)
  (press _Run workflow_). This will update the changelog & version and create a GitHub release which is in _Draft_ state.
  Find the draft release from the
  [GitHub releases](https://github.com/john-james-ai/atelier-ai/releases) and publish it. When
   a release is published, it'll trigger [release](https://github.com/john-james-ai/atelier-ai/blob/master/.github/workflows/release.yml) workflow which creates PyPI
   release and deploys updated documentation.

  Pre-commit hooks run all the auto-formatters (e.g. `black`, `isort`), linters (e.g. `mypy`, `flake8`), and other quality
   checks to make sure the changeset is in good shape before a commit/push happens.
  You can install the hooks with (runs for each commit):
  ```sh
  pre-commit install
  ```
  Or if you want them to run only for each push:
  ```sh
  pre-commit install -t pre-push
  ```
  Or if you want e.g. want to run all checks manually for all files:
  ```sh
  pre-commit run --all-files
  ```


pkgId: d85cf9007164402621b35b3ae098b58c61f8eede69ac464cdeb5f26908be5ca3
name: python-atelier-toolbox
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: Tools for various automations 🧰
url: https://github.com/mihaichris/atelier-toolbox
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atelier-toolbox-1.1.1-1.src.rpm
checksum_type: sha256
description:
  ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mihaichris/atelier-toolbox/build.yml)
  ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mihaichris/atelier-toolbox/test.yml?label=test)
  [![Issues](https://img.shields.io/github/issues/mihaichris/atelier-toolbox)](https://github.com/mihaichris/atelier-toolbox/issues)
  [![License](https://img.shields.io/github/license/mihaichris/atelier-toolbox)](https://github.com/mihaichris/atelier-toolbox/blob/main/LICENSE)
  [![Version](https://img.shields.io/github/v/tag/mihaichris/atelier-toolbox)](https://github.com/mihaichris/atelier-toolbox/blob/main/LICENSE)
  [![Python Version](https://img.shields.io/pypi/pyversions/atelier-toolbox)](https://pypi.org/project/atelier-toolbox/)



  Tools for various automations 🧰.



  You can install the Toolbox from [PyPI](https://pypi.org/):

  ```python
  python -m pip install atelier-toolbox
  ```
  The package is supported on Python 3.10 and above.




  ```python
  Usage: toolbox [OPTIONS] COMMAND [ARGS]...

  ╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
  │ --install-completion          Install completion for the current shell.                                                                                                                                   │
  │ --show-completion             Show completion for the current shell, to copy it or customize the installation.                                                                                            │
  │ --help                        Show this message and exit.                                                                                                                                                 │
  ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  ╭─ Commands ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
  │ business                                                  Business CLI Tool                                                                                                                               │
  │ dw                                                        Download CLI Tool                                                                                                                               │
  │ hash                                                      Hashing Files CLI Tool                                                                                                                          │
  │ pdf                                                       PDF CLI Tool                                                                                                                                    │
  ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  ```


   Please refer to [CHANGELOG.md](https://github.com/mihaichris/toolbox/blob/main/CHANGELOG.md)


  [MIT](https://opensource.org/licenses/MIT)


pkgId: 0ccd6c30970ccb77d323e7a5c82968ba0ec9d4df0497f340c39cede517230596
name: python-atem
arch: src
version: 1.2.7
epoch: 0
release: 1
summary: Adaptive task execution and machine learning package.
url: https://github.com/CapitalRobotics/ATEM
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atem-1.2.7-1.src.rpm
checksum_type: sha256
description:
  Welcome to ATEM, the adaptive task execution and machine learning package designed for FTC robotics and beyond. Follow this quick-start guide to get up and running with ATEM in your project.

  ```bash
  pip install atem
  ```

  ATEM provides a Python API to train a TensorFlow Lite model based on your tasks.
  - Create a tasks.json file to define the tasks your robot will perform. Here’s an example:
  ```json
  {
    "tasks": [
      { "name": "Observation Zone", "time": 5, "points": 3 },
      { "name": "Net Zone", "time": 4, "points": 2 },
      { "name": "Low Basket", "time": 5, "points": 4 },
      { "name": "High Basket", "time": 7, "points": 9 }
    ]
  }
  ```
  - Train a Model
  Use the following Python script to train and save a TensorFlow Lite model:
  ```python
  from atem.model_train import ModelTrainer

  tasks_file = "tasks.json"
  output_model_path = "adaptive_model.tflite"

  trainer = ModelTrainer(tasks_file=tasks_file, output_model_path=output_model_path)

  trainer.train_and_save_model(epochs=20, batch_size=16)
  print("Task-to-index mappings:")
  print(trainer.get_task_mappings())
  ```

  ATEM models can be integrated into Java-based FTC projects using TensorFlow Lite for inference.
  - **Step 1: Add TensorFlow Lite Dependencies**
  ```gradle
  dependencies {
      implementation 'org.tensorflow:tensorflow-lite:2.11.0'
  }
  ```
  - **Step 2: Include the Trained Model in Your Project**
  Place the adaptive_model.tflite file in the assets directory of your FTC project:
  `TeamCode/src/main/assets/adaptive_model.tflite`
  - **Step 3: Implement Model Inference**
  Use the following Java code to interpret the trained model:
  ```java
  import org.tensorflow.lite.Interpreter;
  import java.nio.ByteBuffer;
  import java.nio.file.Files;
  import java.nio.file.Paths;
  import java.util.Map;
  public class ATEMModelInterpreter {
      private final Interpreter interpreter;
      public ATEMModelInterpreter(String modelPath) throws Exception {
          ByteBuffer modelBuffer = ByteBuffer.wrap(Files.readAllBytes(Paths.get(modelPath)));
          this.interpreter = new Interpreter(modelBuffer);
      }
      public String predictNextTask(String currentTask, Map<String, Double> sensorData,
                                    Map<String, Integer> taskToIndex, Map<Integer, String> indexToTask, int maxLength) {
          // Implement inference logic here using ATEM-trained model
          return "Low Basket"; // Replace with actual implementation
      }
  }
  ```

  Use the trained model to predict and execute tasks dynamically.
  - **Step 1: Initialize the Model Interpreter**
  ```java
  ATEMModelInterpreter modelInterpreter = new ATEMModelInterpreter("adaptive_model.tflite");
  ```
  - **Step 2: Use Predictions to Execute Tasks**
  ```java
  String nextTask = modelInterpreter.predictNextTask(currentTask, sensorData, taskToIndex, indexToTask, 5);
  System.out.println("Predicted Next Task: " + nextTask);
  ```


pkgId: 2130fa186ca32a5db30c283cd51121b696b1d0a88d9507b51c35d546f799192e
name: python-atenpdu
arch: src
version: 0.6.3
epoch: 0
release: 1
summary: Interface for ATEN-PE PDUs
url: https://github.com/mtdcr/pductl
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atenpdu-0.6.3-1.src.rpm
checksum_type: sha256
description:
  ```sh
  pip install atenpdu
  ```


  ```json
  {
    "format": 1,
    "pdus": {
      "pdu1": {
        "node": "pdu1",
        "service": "snmp",
        "username": "administrator",
        "authkey": "AAAAAAAAAAAAAA",
        "privkey": "BBBBBBBBBBBBBB"
      },
      "pdu2": {
        "authkey": "CCCCCCCCCCCCCC",
        "privkey": "DDDDDDDDDDDDDD"
      },
      "pdu3": {
        "node": "192.168.21.19",
        "service": "16161",
        "username": "joe",
        "authkey": "EEEEEEEEEEEEEE",
        "privkey": "FFFFFFFFFFFFFF"
      },
      "pdu4": {
        "community": "private"
      },
      "pdu5": {
      }
    }
  }
  ```

  * `authkey` and `privkey` are required for SNMPv3. On absence, SNMPv2c gets used.
  * `community` defaults to `private` for SNMPv2c.
  * `node` defaults to PDU entry's name.
  * `service` defaults to `snmp`, i.e. port 161.
  * `username` defaults to `administrator` for SNMPv3.



  ```sh
  pductl [-p <PDU>] list
  pductl [-p <PDU>] <on|off|reboot|status> <OUTLET> [<OUTLET> ...]
  ```

  Use `ALL` to select all outlets.


pkgId: 29858a749784a913ce857ebddc3792d7aa23b7ab0bbf675a1e9c3b654bbd12aa
name: python-atflagger
arch: src
version: 0.4.6
epoch: 0
release: 1
summary: Simple method for flagging UWL data.
url: https://pypi.org/project/atflagger/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atflagger-0.4.6-1.src.rpm
checksum_type: sha256
description:
  A simple flagger for continuum UWL data. Flag persistent RFI first, then run this auto-flagger.



  Installing requires `pip` and `python3` (3.8 and up).

  Stable version:
  ```
  pip install atflagger
  ```

  Latest version:
  ```
  pip install git+https://github.com/AlecThomson/atflagger
  ```


  ```
  ❯ atflagger -h
  usage: atflagger [-h] [-i] [-b BEAM] [-s SIGMA] [-n N_WINDOWS] [-w] [-r REPORT] [-c CORES] [-t THREADS_PER_WORKER] filenames [filenames ...]

  atflagger - Automatic flagging of UWL data. This flagger divides each subband into a number of windows, and then uses sigma clipping to remove outliers. The number of windows is set by the 'n-windows' argument, and the number of sigma is set by the 'sigma' argument. Parallelism is handled by dask.distributed. The 'cores' argument sets the number of
  Dask workers, and 'threads-per-worker' sets the number of threads. See https://docs.dask.org/en/stable/deploying-python.html#reference for more information.

  positional arguments:
    filenames             Input SDHDF file(s)

  optional arguments:
    -h, --help            show this help message and exit
    -i, --inplace         Update flags in-place (default: create new file)
    -b BEAM, --beam BEAM  Beam label
    -s SIGMA, --sigma SIGMA
                          Sigma clipping threshold
    -n N_WINDOWS, --n-windows N_WINDOWS
                          Number of windows to use in box filter
    -w, --use-weights     Use weights table instead of flag table
    -r REPORT, --report REPORT
                          Optionally save the Dask (html) report to a file
    -c CORES, --cores CORES
                          Number of workers to use (default: Dask automatic configuration)
    -t THREADS_PER_WORKER, --threads-per-worker THREADS_PER_WORKER
                          Number of threads per worker (default: Dask automatic configuration)
  ```


pkgId: fd9c236cd320d1a158c29762b939a0d496ea1632e340d1ed600e1db87ce52581
name: python-athena-cli
arch: src
version: 0.1.13
epoch: 0
release: 1
summary: Presto-like CLI for AWS Athena
url: https://github.com/satterly/athena-cli
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-athena-cli-0.1.13-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://travis-ci.org/guardian/athena-cli.svg?branch=master)](https://travis-ci.org/guardian/athena-cli)
  Presto-like CLI tool for [AWS Athena](https://aws.amazon.com/athena/). The alternative is using the
  AWS CLI [Athena sub-commands](http://docs.aws.amazon.com/cli/latest/reference/athena/).
  [![asciicast](https://asciinema.org/a/132545.png)](https://asciinema.org/a/132545)


pkgId: 8fc87dd64375abbef3eca2098eeabaf2fd2d84cfb07db94c00d42e0ced88b0f9
name: python-athena-intelligence
arch: src
version: 0.1.103
epoch: 0
release: 1
summary: Athena Intelligence Python Library
url: https://pypi.org/project/athena-intelligence/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-athena-intelligence-0.1.103-1.src.rpm
checksum_type: sha256
description:
  [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)
  [![pypi](https://img.shields.io/pypi/v/athena-intelligence.svg)](https://pypi.python.org/pypi/athena-intelligence)

  The Athena Intelligence Python Library provides convenient access to the Athena Intelligence API from
  applications written in Python.

  The library includes type definitions for all
  request and response fields, and offers both synchronous and asynchronous clients powered by httpx.



  Add this dependency to your project's build file:

  ```bash
  pip install athena-intelligence

  poetry add athena-intelligence
  ```


  Simply import `Athena` and start making calls to our API.

  ```python
  from athena.client import Athena
  from athena import Model, Tools

  client = Athena(
    api_key="YOUR_API_KEY" # Defaults to ATHENA_API_KEY
  )
  message = client.message.submit(
      content="visit www.athenaintelligence.ai and summarize the website in one paragraph",
      model=Model.GPT_3_5_TURBO,
      tools=[Tools.SEARCH, Tools.BROWSE, Tools.SEARCH],
  )
  ```


  The SDK also exports an async client so that you can make non-blocking
  calls to our API.

  ```python
  from athena.client import AsyncAthena
  from athena import Model, Tools

  client = AsyncAthena(
    api_key="YOUR_API_KEY" # Defaults to ATHENA_API_KEY
  )

  async def main() -> None:
      message = client.message.submit(
        content="visit www.athenaintelligence.ai and summarize the website in one paragraph",
        model=Model.GPT_3_5_TURBO,
        tools=[Tools.SEARCH, Tools.BROWSE, Tools.SEARCH],
      )
      print("Received message", message)

  asyncio.run(main())
  ```


  The SDK provides helper functions that will automatically poll when
  retrieving a message. Use the `submit_and_poll` method as shown below:

  ```python
  from athena.client import Athena
  from athena import Model, Tools

  client = Athena(api_key="...")
  message =  client.message.submit_and_poll(
    content="visit www.athenaintelligence.ai and summarize the website in one paragraph",
    model=Model.GPT_3_5_TURBO,
    tools=[Tools.SEARCH, Tools.BROWSE, Tools.SEARCH],
  )
  ```

  By default, the method will poll every 2 seconds but you can override
  this with the `poll_interval` argument.


  All of the models are nested within the Athena module. Let IntelliSense
  guide you!


  All errors thrown by the SDK will be subclasses of [`ApiError`](./src/athena/core/api_error.py).

  ```python
  import athena

  try:
    client.messages.get(...)
  except athena.core.ApiError as e: # Handle all errors
    print(e.status_code)
    print(e.body)
  ```




  By default, requests time out after 60 seconds. You can configure this with a
  timeout option at the client or request level.

  ```python
  from athena.client import Athena

  client = Athena(
      
      timeout=20.0,
  )


  client.messages.get(..., {
      timeout_in_seconds=20
  })
  ```


  You can override the httpx client to customize it for your use-case. Some common use-cases
  include support for proxies and transports.

  ```python
  import httpx

  from athena.client import Athena

  client = Athena(
      http_client=httpx.Client(
          proxies="http://my.test.proxy.example.com",
          transport=httpx.HTTPTransport(local_address="0.0.0.0"),
      ),
  )
  ```



  This SDK is in **Preview**, and there may be breaking changes between versions without a major
  version update.

  To ensure a reproducible environment (and minimize risk of breaking changes), we recommend pinning a specific package version.



  While we value open-source contributions to this SDK, this library is generated programmatically.
  Additions made directly to this library would have to be moved over to our generation code,
  otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
   a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
  an issue first to discuss with us!

  On the other hand, contributions to the README are always very welcome!


pkgId: 93d2dc0b8fa335ff82c738537f551b14f86d8b2f1b2bc3390c6a8657a43fa5c7
name: python-athenaSql
arch: src
version: 0.1.0a13
epoch: 0
release: 1
summary: SQL builder for AWS Athena, inspired by sparkSQL
url: https://github.com/nabilseid/athenaSQL
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-athenaSql-0.1.0a13-1.src.rpm
checksum_type: sha256
description:
  <!-- start intro -->

  athenaSQL is Athena SQL query builder, inspired by sparkSQL. It borrow some sparkSQL's concept [sparkSQL](https://spark.apache.org/docs/preview/api/python/_modules/index.html).

  It was initially designed to eliminate the need for hard-coding SQL queries as strings within Python scripts and as an alternative to any bespoke SQL query templating. However, it offers the flexibility to be used in various ways as needed.

  <!-- end intro -->



  <!-- start quickstart -->



  ```bash
  $ pip install athenaSQL
  ```



  <!-- start usage -->

  Using athenaSQL is stright forward. First we create a table abstraction class then building a query is just calling chain methods on top of it.

  ```python
  from athenaSQL import Athena


  table = Athena('database_name').table('table_name')


  query = table.select()

  query.show_query()
  ```

  ```
  SELECT
      *
  FROM "database_name"."table_name"
  ```

  <!-- end usage -->

  <!-- end quickstart -->


pkgId: 997dc999e75a697045a150aa69cc7a25f896cd64be4b70917ba382c00a2cdaab
name: python-athina
arch: src
version: 1.6.10
epoch: 0
release: 1
summary: Python SDK to configure and run evaluations for your LLM-based application
url: https://pypi.org/project/athina/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-athina-1.6.10-1.src.rpm
checksum_type: sha256
description:
  Follow [this notebook](https://github.com/athina-ai/athina-evals/blob/main/examples/run_eval_suite.ipynb) for a quick start guide.


pkgId: 0568013207e70b3b70e8352189b1423df0e7f74af761af7059d6b734239d3244
name: python-athina-logger
arch: src
version: 1.2.7
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/athina-logger/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-athina-logger-1.2.7-1.src.rpm
checksum_type: sha256
description:
  Athina Logger is a python SDK to log LLM inferences to Athina API Server.




  ```bash
  pip install athina-logger
  ```


  ```python
  import openai
  from athina_logger.inference_logger import InferenceLogger
  from athina_logger.log_stream_inference.openai_chat_completion_stream import LogOpenAiChatCompletionStreamInference
  from athina_logger.log_stream_inference.openai_completion_stream import LogOpenAiCompletionStreamInference
  from athina_logger.api_key import AthinaApiKey
  from langchain import LLMChain
  from langchain.chat_models import ChatOpenAI

  from langchain.prompts.chat import (
      ChatPromptTemplate,
      SystemMessagePromptTemplate,
      HumanMessagePromptTemplate,
  )
  from athina_logger.langchain_handler import CallbackHandler
  from athina_logger.feedback import user_feedback
  import sseclient
  import requests
  import json
  from athina_logger.exception.custom_exception import CustomException

  openai.api_key = 'OPENAI_API_KEY'

  AthinaApiKey.set_api_key('ATHINA_API_KEY')


  def performRequestWithStreaming():
      reqUrl = 'https://api.openai.com/v1/completions'
      reqHeaders = {
          'Accept': 'text/event-stream',
          'Authorization': 'Bearer ' + 'OPENAI_API_KEY'
      }
      reqBody = {
          "model": "text-davinci-003",
          "prompt": "What is Python?",
          "stream": True,
      }
      request = requests.post(reqUrl, stream=True,
                              headers=reqHeaders, json=reqBody)
      logger = LogOpenAiCompletionStreamInference(
          prompt_slug="test",
          prompt="What is Python?",
          model="text-davinci-003",
      )
      client = sseclient.SSEClient(request)
      for event in client.events():
          if event.data != '[DONE]':
              logger.collect_stream_inference_by_chunk(json.loads(event.data))

      logger.log_stream_inference()


  def user_feedback_test():
      try:
          user_feedback.UserFeedback.log_user_feedback(
              external_reference_id="abc",
              user_feedback=1,
              user_feedback_comment="test"
          )
      except Exception as e:
          if isinstance(e, CustomException):
              print(e.status_code)
              print(e.message)
          else:
              print(e)


  def openai_chat_completion(prompt):
      response = openai.ChatCompletion.create(
          model='gpt-3.5-turbo',
          messages=[{"role": "user", "content": prompt}],
      )
      try:
          InferenceLogger.log_open_ai_chat_response(
              prompt_slug=None,
              messages=[{"role": "user", "content": prompt}],
              model="gpt-3.5-turbo",
              completion=response,
              prompt_response="Hello, How may I assist you?",
              external_reference_id="abc"
          )
      except Exception as e:
          if isinstance(e, CustomException):
              print(e.status_code)
              print(e.message)
          else:
              print(e)


  def openai_completion(prompt):
      response = openai.Completion.create(
          model="text-davinci-003", prompt=prompt)

      InferenceLogger.log_open_ai_completion_response(
          prompt_slug="test",
          prompt=prompt,
          model="text-davinci-003",
          completion=response,
          prompt_response="Hello, How may I assist you?",
          external_reference_id="abc"
      )


  def generic_logging():
      InferenceLogger.log_generic_response(
          prompt_slug="test",
          prompt="Hello, I'm a human.",
          model="text-davinci-003",
          prompt_response="Hello, How may I assist you?",
          prompt_tokens=10,
          completion_tokens=10,
          external_reference_id="abc"
      )


  def stream_openai_chat_response(prompt):
      response = openai.ChatCompletion.create(
          model='gpt-3.5-turbo',
          messages=[{"role": "user", "content": prompt}],
          stream=True,
      )
      logger = LogOpenAiChatCompletionStreamInference(
          prompt_slug="test",
          messages=[{"role": "user", "content": prompt}],
          model="gpt-3.5-turbo",
      )
      for chunk in response:
          logger.collect_stream_inference_by_chunk(chunk)
      logger.log_stream_inference()


  def stream_openai_response(prompt):
      response = openai.Completion.create(
          model='text-davinci-003',
          prompt=prompt,
          max_tokens=1000,
          stream=True,
      )
      logger = LogOpenAiCompletionStreamInference(
          prompt_slug="test",
          prompt=prompt,
          model="text-davinci-003",
      )
      logger.collect_stream_inference(response)
      logger.log_stream_inference()


  def test_langchain_streaming():
      template = '''You are a helpful assistant who generates comma separated lists.
      A user will pass in a category, and you should generate 5 objects in that category in a comma separated list.
      ONLY return a comma separated list, and nothing more.'''
      system_message_prompt = SystemMessagePromptTemplate.from_template(template)
      human_template = '{text}'
      human_message_prompt = HumanMessagePromptTemplate.from_template(
          human_template)

      chat_prompt = ChatPromptTemplate.from_messages(
          [system_message_prompt, human_message_prompt])
      system_template = '''You are a helpful assistant who generates lines about a particular topic'''
      system_message_prompt = SystemMessagePromptTemplate.from_template(
          system_template)
      template = '''Write few lines on the following topic: {text}
                  Your response:'''
      chat_prompt = ChatPromptTemplate.from_messages(
          [system_message_prompt, HumanMessagePromptTemplate.from_template(template)])
      handler = CallbackHandler(prompt_slug='test')

      
      chain1 = LLMChain(
          llm=ChatOpenAI(
              openai_api_key='OPENAI_API_KEY', callbacks=[handler]),
          prompt=chat_prompt,
      )
      
      chain2 = LLMChain(
          llm=ChatOpenAI(
              openai_api_key='OPENAI_API_KEY', streaming=True, callbacks=[handler]),
          prompt=chat_prompt,
      )
      print(chain1.run('India'))
      print(chain2.run('India'))

  ```



  Please feel free to reach out to akshat@athina.ai or shiv@athina.ai for more information.


pkgId: 2f6a39dc270b0ae4918302627d666c01f66a974bdaf255863c40fa58649214f1
name: python-athlinks-races
arch: src
version: 0.0.4
epoch: 0
release: 1
summary: Web scraper for race results hosted on Athlinks.
url: https://kodegeek.com/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-athlinks-races-0.0.4-1.src.rpm
checksum_type: sha256
description:
  This is a fork of the original [scrapy-athlinks](https://github.com/josevnz/scrapy-athlinks). I decided to take over as I want to add features that
  were not originally available on the project.





  `athlinks_races` provides the [`RaceSpider`](athlinks_races/spiders/race.py) class.

  This spider crawls through all results pages from a race hosted on athlinks.com,
  building and following links to each athlete's individual results page, where it
  collects their split data. It also collects some metadata about the race itself.

  By default, the spider returns one race metadata object (`RaceItem`), and one

  `AthleteItem` per participant.
  Each `AthleteItem` consists of some basic athlete info and a list of `RaceSplitItem`
  containing data from each split they recorded.





  Scrapy can be operated entirely from python scripts.
  [See the scrapy documentation for more info.](https://docs.scrapy.org/en/latest/topics/practices.html#run-scrapy-from-a-script)



  The package is available on [PyPi](https://pypi.org/project/athlinks-races) and can be installed with `pip`:

  ```sh
  python -m venv `$HOME/virtualenv/athlinks_races/`
  . $HOME/virtualenv/athlinks_races/bin/activate
  pip install athlinks_races
  ```



  [A demo script is included in this repo](athlinks_races/demo.py).

  ```python
  """
  Demonstrate the available classes.
  You can run as python athlinks_races/demo.py
  """
  from scrapy.crawler import CrawlerProcess
  from athlinks_races import RaceSpider, AthleteItem, RaceItem


  def main():
      
      
      settings = {
          'FEEDS': {
              
              
              'athletes.json': {
                  'format': 'json',
                  'overwrite': True,
                  'item_classes': [AthleteItem],
              },
              
              
              'metadata.json': {
                  'format': 'json',
                  'overwrite': True,
                  'item_classes': [RaceItem],
              },
          }
      }
      process = CrawlerProcess(settings=settings)

      
      process.crawl(RaceSpider, 'https://www.athlinks.com/event/33913/results/Event/1018673/')
      process.start()


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

  If you do a ```pip install --editable .[lint,dev]``` then you can run as

  ```shell
  athlinks_cli
  ```

  Then you can build the wheelhouse to install locally if needed:

  ```shell
  python -m build .
  ```



  Alternatively, you may clone this repo for use like a typical Scrapy project
  that you might create on your own.



  ```sh
  python -m venv `$HOME/virtualenv/athlink_races`
  . $HOME/virtualenv/athlink_races/bin/activate
  git clone https://github.com/josevnz/athlinks-races
  cd athlink-races
  python install --editable .[lint,dev]
  ```



  Run a `RaceSpider`, few races with different years:

  ```shell
  cd athlinks_races
  scrapy crawl race -a url=https://www.athlinks.com/event/33913/results/Event/1018673 -O $HOME/1018673.json
  scrapy crawl race -a url=https://www.athlinks.com/event/382111/results/Event/1093108 -O $HOME/1093108.json
  scrapy crawl race -a url=https://www.athlinks.com/event/382111/results/Event/1062909 -O $HOME/1093108.json
  ```



  All that is required is [Scrapy](https://scrapy.org/) (and its dependencies).



  ```shell
  . $HOME/virtualenv/athlink_races/bin/activate
  pytest tests/*.py
  ```



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



  You can get in touch here:

  - GitHub: [https://github.com/josevnz](https://github.com/josevnz)
  -


  If you want to take a look at the original project. He is not in charge of this forked version.

  - GitHub: [github.com/aaron-schroeder](https://github.com/aaron-schroeder)

rpm_license:
  MIT License  Copyright (c) 2022 Aaron Schroeder  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: 9a95db5fcf1c7455919934c6caee64c01490b64429b26670bf3c13669afc8d34
name: python-atj-algotrading
arch: src
version: 0.0.16
epoch: 0
release: 1
summary: ATJ Trader's Package for Algo Trading & Backtesting
url: https://github.com/atj-khactu/atj-algotrading-package
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atj-algotrading-0.0.16-1.src.rpm
checksum_type: sha256
description:
  This is ATJ Trader's Algo Trading Package in Python. It connects to the MetaTrader5 platform and comes with classes
  and functions to make Backtesting and Coding of Trading Bots easier.


  > pip install atj-algotrading


  Please follow this link to access tutorials on Backtesting


  Please follow this link to access tutorials on Trading Bot Development


pkgId: 0eadb395ad0dc71cc19bb62564bf9af87f8bac4bf2fd3a24bd8ab8e1b8dccd9e
name: python-atksh-utils
arch: src
version: 0.9.12
epoch: 0
release: 1
summary: atksh's utils
url: https://github.com/atksh/atksh_utils
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atksh-utils-0.9.12-1.src.rpm
checksum_type: sha256
description:
  This is my collection of utilities.




  ```bash
  $ pip install atksh-utils
  ```



  You can use the `askgpt` command to ask questions to GPT-4.




  ```bash
  $ export OPENAI_API_KEY="YOUR_API_KEY"

  $ askgpt
  Continue the conversation. To send your reply, please press Enter more than three times.
  >>> 以下の式を解け:
  >>> - 1 + 1/2 + 1/4 + ...
  >>> - x + y = 4, pi * x - e^y = 0.24
  >>>
  >>> pythonを使っても良い
  >>>
  >>>
  >>>

  AI: Thinking...

  了解しました。あなたの質問に最善を尽くして答えます。まず、与えられた2つの問題を解決するためのプランを説明します。

  1. 数列の和の問題:
     - 与えられた数列は無限等比数列です: 1 + 1/2 + 1/4 + ...
     - 無限等比数列の和の公式を使用して、この数列の和を求めます。
     - 公式は S = a / (1 - r) です。ここで、a は最初の項であり、r は公比です。

  2. 連立方程式の問題:
     - 与えられた連立方程式は次の通りです: x + y = 4, pi * x - e^y = 0.24
     - この連立方程式を解くために、数値解析の手法を使用するか、代数的に解を求めます。
     - Pythonの数値計算ライブラリを利用して、この連立方程式の数値解を見つけることができます。

  これらの問題を解決するために、Pythonのコードを実行することにします。それでは、まずは数列の和の問題から取り組みます。その後、連立方程式の問題に移ります。無限等比数列 1 + 1/2 + 1/4 + ... の和は 2 です。

  次に、連立方程式 x + y = 4, pi * x - e^y = 0.24 を解くために Python を使用します。これは数値解析の問題であり、Python の数値計算ライブラリを用いて解を求めることができます。それでは、Python コードを実行して解を見つけましょう。連立方程式 x + y = 4, pi * x - e^y = 0.24 の解は、x ≈ 2.1338 と y ≈ 1.8662 です。

  以上で、与えられた2つの問題の解答を完了しました。最初の無限等比数列の和は 2 であり、二つ目の連立方程式の解は x ≈ 2.1338、y ≈ 1.8662 です。

  Continue the conversation. To send your reply, please press Enter more than three times.
  >>> ^D

  Bye!
  $ askgpt --disable-gpt4
  >>> 明日の東京の天気は？
  >>>
  >>>
  >>>

  AI: Thinking...

  明日の東京の天気は曇時々晴で、最高気温は21℃から23℃、最低気温は14℃から6℃となる見込みです。降水確率は10％で、一部では雨や雷雨がありそうです。体調に注意が必要です。また、明け方までは雨や雷雨がありそうです。最高気温は22度前後で、寒暖差で体調を崩さないようにしてください。

  Continue the conversation. To send your reply, please press Enter more than three times.
  >>> どうやってその情報を得ましたか？
  >>>
  >>>
  >>>

  AI: Thinking...

  私は、あなたの質問に対する最適な回答を提供するために、functions.quick_searchツールを使用して明日の東京の天気に関する情報を検索しました。その結果、複数の天気予報サイトから明日の天気に関する情報を取得し、それを元に回答を提供しました。

  Continue the conversation. To send your reply, please press Enter more than three times.
  >>>
  >>>
  >>>
  >>>
  Do you want to quit? (y/n): y

  Bye!
  $ askgpt -h
  usage: askgpt [-h] [--disable-gpt4] [--verbose]

  options:
    -h, --help      show this help message and exit
    --disable-gpt4  Disable GPT-4.
    --verbose       Verbose mode.
  ```




  To install this for development, run the following commands in your terminal:

  ```bash
  python -m pip install -e '.[dev]'
  pre-commit install
  ```



  ```python
  ai = OpenAI(key, "gpt-4o")

  print(ai("Just answer the value of (5243 + 642) x (5314 - 4231) // 100"))



  def mul(a: int, b: int) -> int:
      """This is a multiplication function.

      :param a: An integer.
      :type a: int
      :param b: An integer.
      :type b: int
      :return: The sum of a and b.
      :rtype: int
      """
      return a * b


  def add(a: int, b: int) -> int:
      """This is an addition function.

      :param a: An integer.
      :type a: int
      :param b: An integer.
      :type b: int
      :return: The sum of a and b.
      :rtype: int
      """
      return a + b


  def sub(a: int, b: int) -> int:
      """This is a subtraction function.

      :param a: An integer.
      :type a: int
      :param b: An integer.
      :type b: int
      :return: The sum of a and b.
      :rtype: int
      """
      return a - b


  def div(a: int, b: int) -> int:
      """This is a division function.

      :param a: An integer.
      :type a: int
      :param b: An integer.
      :type b: int
      :return: The sum of a and b.
      :rtype: int
      """
      return a // b

  ai.set_function(mul)
  ai.set_function(add)
  ai.set_function(sub)
  ai.set_function(div)

  print(ai("Just answer the value of (5243 + 642) x (5314 - 4231) // 100")[1])



  ai = OpenAI(key, "gpt-4o")
  ai.set_browser_functions()
  print(ai("How the weather in Tokyo?")[1])

  ```

rpm_license:
  MIT License  Copyright (c) 2023 atksh  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: 183fb236cfafdbdd4d9881352d3c84e7992ab81be261846d407e3ae1b425ba95
name: python-atlas-consortia-commons
arch: src
version: 1.0.10
epoch: 0
release: 1
summary: The common code supporting the web services in the consortia.
url: https://github.com/x-atlas-consortia/commons
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atlas-consortia-commons-1.0.10-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/atlas-consortia-commons.svg)](https://badge.fury.io/py/atlas-consortia-commons)

  This repository contains the code supporting several restful microservices used by the consortia.



  The Atlas Consortia Commons library is available through PyPi via the command:

  ```bash
  pip install atlas-consortia-commons
  ```

  The atlas-consortia-commons requirements can be found [here](requirements.txt)




  The code includes:
  - [UBKG](atlas_consortia_commons/ubkg/README.md): For querying Unified Biomedical Knowledge Graph (UBKG) application interface
  - [REST](atlas_consortia_commons/rest/README.md): For making standardised rest responses



  - Please use:
    - `snake_case` to name methods and variables.
    - `PascalCase` for class names.
  - Do follow any additional code formatting and styles as seen in the project



  - Install `pytest` using the command
  ```bash
  pip install -r requirements.dev.txt
  ```
  - Run the tests using the command
  ```bash
  pytest
  ```


pkgId: 50a2eecedf4488b9ba1ae4c9bf526d4e9dbb6f5df13f850c11cb49cb462b8d9e
name: python-atlas-ftag-tools
arch: src
version: 0.2.6
epoch: 0
release: 1
summary: ATLAS Flavour Tagging Tools
url: https://github.com/umami-hep/atlas-ftag-tools/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-atlas-ftag-tools-0.2.6-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)
  [![PyPI version](https://badge.fury.io/py/atlas-ftag-tools.svg)](https://badge.fury.io/py/atlas-ftag-tools)
  [![codecov](https://codecov.io/gh/umami-hep/atlas-ftag-tools/branch/main/graph/badge.svg?token=MBHLIYYQ7I)](https://codecov.io/gh/umami-hep/atlas-ftag-tools)



  This is a collection of Python tools for working with files produced with the FTAG [ntuple dumper](https://gitlab.cern.ch/atlas-flavor-tagging-tools/training-dataset-dumper/).
  The code is intended to be used a [library](https://iscinumpy.dev/post/app-vs-library/) for other projects.
  Please see the [example notebook](ftag/example.ipynb) for usage.





  If you want to use this package without modification, you can install from [pypi](https://pypi.org/project/atlas-ftag-tools/) using `pip`.

  ```bash
  pip install atlas-ftag-tools
  ```

  To additionally install the development dependencies (for formatting and linting) use
  ```bash
  pip install atlas-ftag-tools[dev]
  ```



  If you plan on making changes to teh code, instead clone the repository and install the package from source in editable mode with

  ```bash
  python -m pip install -e .
  ```

  Include development dependencies with

  ```bash
  python -m pip install -e ".[dev]"
  ```

  You can set up and run pre-commit hooks with

  ```bash
  pre-commit install
  pre-commmit run --all-files
  ```

  To run the tests you can use the `pytest` or `coverage` command, for example

  ```bash
  coverage run --source ftag -m pytest --show-capture=stdout
  ```

  Running `coverage report` will display the test coverage.




  Please see the [example notebook](ftag/example.ipynb) for full usage.
  Additional functionality is also documented below.



  This package contains a script to calculate tagger working points (WPs).
  The script is `working_points.py` and can be run after installing this package with

  ```
  wps \
      --ttbar "path/to/ttbar/*.h5" \
      --tagger GN2v01 \
      --fc 0.1
  ```

  Both the `--tagger` and `--fc` options accept a list if you want to get the WPs for multiple taggers.
  If you are doing c-tagging or xbb-tagging, dedicated fx arguments are available ()you can find them all with `-h`.

  If you want to use the `ttbar` WPs get the efficiencies and rejections for the `zprime` sample, you can add `--zprime "path/to/zprime/*.h5"` to the command.
  Note that a default selection of $p_T > 250 ~GeV$ to jets in the `zprime` sample.

  If instead of defining the working points for a series of signal efficiencies, you wish to calculate a WP corresponding to a specific background rejection, the `--rejection` option can be given along with the desired background.

  By default the working points are printed to the terminal, but you can save the results to a YAML file with the `--outfile` option.

  See `wps --help` for more options and information.



  The same script can be used to calculate the efficiency and rejection values at a given discriminant cut value.
  The script `working_points.py` can be run after intalling this package as follows

  ```
  wps \
      --ttbar "path/to/ttbar/*.h5" \
      --tagger GN2v01 \
      --fx 0.1
      --disc_cuts 1.0 1.5
  ```
  The `--tagger`, `--fx`, and `--outfile` follow the same procedure as in the 'Calculate WPs' script as described above.





  This package contains a script to easily merge a set of H5 files.
  A virtual file is a fast and lightweight way to wrap a set of files.
  See the [h5py documentation](https://docs.h5py.org/en/stable/vds.html) for more information on virtual datasets.

  The script is `vds.py` and can be run after installing this package with

  ```
  vds <pattern> <output path>
  ```

  The `<pattern>` argument should be a quotes enclosed [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)), for example `"dsid/path/*.h5"`

  See `vds --help` for more options and information.




  A script to move/rename datasets inside an h5file.
  Useful for correcting discrepancies between group names.
  See [h5move.py](ftag/hdf5/h5move.py) for more info.




  A script to split a large h5 file into several smaller files.
  Useful if output files are too large for EOS/grid storage.
  See [h5split.py](ftag/hdf5/h5split.py) for more info.


