Observed since 21 Oct, 11:42 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A library to optimize the speed of rate limited async calls.
A library to optimize the speed of rate limited async calls, by alternating between bursts and sleeps.
Install the package using pip:
pip install aioburst
Import the limiter:
from aioburst import aioburst
Instantiate the limiter using the create method, setting the limit (number of calls) and period (period over
which the number of calls are restricted):
limiter = AIOBurst.create(limit=10, period=1.0)
async with limiter:
...
The code above would allow 10 asynchronous entries (into the context manager) without any limit. Then it adds
"sleepers" for the next calls. The sleeper tells the next entry when it can start. The 11th call gets the sleeper
set by the 1st call that returned and waits until the period has elapsed. This approach ensures that there are
never more than limit simultaneous calls but that the next call can start as soon as possible. The result is that
in a sliding window of period you should see exactly limit calls as active, regardless of how fast or slow any
individual call returns.
You can also stack limiters:
limiter1 = AIOBurst.create(limit=10, period=1.0)
limiter2 = AIOBurst.create(limit=100, period=60.0)
async with limiter1:
async with limiter2:
...
Use this for cases where an API has a two-level rate limit like 10 calls per second or 100 calls per minute---both limits will be respected. The stack is also idempotent, meaning that whichever way you stack the limiters, both limits will be respected:
limiter1 = AIOBurst.create(limit=10, period=1.0)
limiter2 = AIOBurst.create(limit=100, period=60.0)
async with limiter1:
async with limiter2:
...
# The limit above will do the exact same thing as the limit below
async with limiter2:
async with limiter1:
...
pypistats · 47 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-20 – 2026-10-20 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-19 – 2026-10-19 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-17 – 2026-10-17 | 3 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-13 – 2026-10-13 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-11 – 2026-10-11 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-10 – 2026-10-10 | 6 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-09 – 2026-10-09 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-08 – 2026-10-08 | 7 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-06 – 2026-10-06 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-04 – 2026-10-04 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-03 – 2026-10-03 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-10-02 – 2026-10-02 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-30 – 2026-09-30 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-28 – 2026-09-28 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-27 – 2026-09-27 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-26 – 2026-09-26 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-25 – 2026-09-25 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-23 – 2026-09-23 | 3 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-22 – 2026-09-22 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-12 – 2026-09-12 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-07 – 2026-09-07 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-04 – 2026-09-04 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-02 – 2026-09-02 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-09-01 – 2026-09-01 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-31 – 2026-08-31 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-29 – 2026-08-29 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-28 – 2026-08-28 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-27 – 2026-08-27 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-26 – 2026-08-26 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-25 – 2026-08-25 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-24 – 2026-08-24 | 5 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-23 – 2026-08-23 | 3 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-22 – 2026-08-22 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-21 – 2026-08-21 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-19 – 2026-08-19 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-17 – 2026-08-17 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-15 – 2026-08-15 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-14 – 2026-08-14 | 3 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-09 – 2026-08-09 | 4 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-05 – 2026-08-05 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-03 – 2026-08-03 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-02 – 2026-08-02 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-08-01 – 2026-08-01 | 8 | 2026-10-21T17:46:32.9351056Z |
| 2026-07-28 – 2026-07-28 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-07-27 – 2026-07-27 | 2 | 2026-10-21T17:46:32.9351056Z |
| 2026-07-24 – 2026-07-24 | 1 | 2026-10-21T17:46:32.9351056Z |
| 2026-07-23 – 2026-07-23 | 3 | 2026-10-21T17:46:32.9351056Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.0 | 20 Oct 2022 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 11:42 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:2b8d70c4b66f0b0f1c4fc16022a5549742190606dc5ee89e1f28a4f69f184101