aiothrottles
aiothrottles synchronization primitives are designed to be extension to asyncio synchronization primitives.
For more details, see aiothrottles Documentation.
Usage
Throttle implements a rate limiting for asyncio task. A throttle can be used to guarantee limited access to a shared resources.
The preferred way to use a Throttle is an async with statement:
throttle = Throttle('3/s')
# ... later
async with throttle:
# access shared state
which is equivalent to:
throttle = Throttle('3/s')
# ... later
await throttle.acquire()
try:
# access shared state
finally:
throttle.release()
A call rate is determined by the rate argument.
Pass the rate in the following formats:
"{integer limit}/{unit time}""{limit's numerator}/{limit's denominator}{unit time}"
rate examples:
4/s,5/m,6/h,7/d1/second,2/minute,3/hour,4/day1/3s,12/37m,1/5h,8/3d
Installation
pip install aiothrottles
or
python setup.py install
Supported Python Versions
Python 3.6, 3.7, 3.8 and 3.9 are supported.
Test
Run all tests.
python setup.py test
Run tests with PyTest.
python -m pytest [-k TEST_NAME] [-m MARKER]
License
aiothrottles is released under the BSD 3-Clause License.
Metadata
Release files for aiothrottles 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiothrottles-0.2.0.tar.gz | 5.9 kB | Without provenance | Details for aiothrottles-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiothrottles-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for aiothrottles-0.2.0-py3-none-any.whl |
Total release size: 11.9 kB
Release files / aiothrottles-0.2.0.tar.gz
| Download URL | aiothrottles-0.2.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c726c574752afe7c4f952ce7b46c4b06dee76dae636fe5352fb7709bac1e0da3
|
|
BLAKE2b-256 checksum How to use checksums |
32053d2d509e48820d3517f710671c26dce280711817459203fad5dc3ab35545
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.12
|
Release files / aiothrottles-0.2.0-py3-none-any.whl
| Download URL | aiothrottles-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c51c77c0e884cfc79b49eeaac0893d19ff92d6f8d48f323f00e6dbf9882d476a
|
|
BLAKE2b-256 checksum How to use checksums |
6f2c467e251c7e850228b0cd5af04ba502a59aa32de0d8b306da7162cbd1a34a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.12
|
Security for aiothrottles 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.