An httpx2 based fork of the httpx-limiter package that provides rate-limited httpx2 transports.
Project description
HTTPX2 Limiter
A lightweight package that provides rate-limited httpx2 transports.
This package is a fork of httpx-limiter
version 0.6.1, migrated from httpx to httpx2.
Installation
The package is published on PyPI. Install it, for example, with the aiolimiter backend:
pip install 'httpx2-limiter[aiolimiter]'
There is also a pyrate-limiter backend available:
pip install 'httpx2-limiter[pyrate]'
Usage
Apply a rate limit to all requests made through a client by wrapping the transport. If you want to be able to make twenty requests per second, for example:
import httpx2
from httpx2_limiter import AsyncRateLimitedTransport, Rate
from httpx2_limiter.aiolimiter import AiolimiterAsyncLimiter
async def main():
limiter = AiolimiterAsyncLimiter.create(Rate.create(magnitude=20))
async with httpx2.AsyncClient(
transport=AsyncRateLimitedTransport.create(limiter=limiter),
) as client:
response = await client.get("https://httpbin.org/get")
More advanced use cases, such as applying multiple rate limits or different rate limits per domain, are described in the documentation.
Copyright
- Original httpx-limiter Copyright © 2024, 2025 Moritz E. Beber.
- httpx2-limiter Copyright © 2026 Zach Gottesman.
- Free software distributed under the Apache Software License 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file httpx2_limiter-1.0.0.tar.gz.
File metadata
- Download URL: httpx2_limiter-1.0.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d41e59951b81531db84fc81cb1a71e186c67788760dc0abb66ed62faefddbc48
|
|
| MD5 |
40431fadd58ace6cfc372f734debab16
|
|
| BLAKE2b-256 |
359e5cf9ecdc6b2cdbcfa7b5f19f90dda78b787823a8a9fcfc5f82a7d5b64bd2
|
Provenance
The following attestation bundles were made for httpx2_limiter-1.0.0.tar.gz:
Publisher:
publish.yml on zach-overflow/httpx2-limiter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
httpx2_limiter-1.0.0.tar.gz -
Subject digest:
d41e59951b81531db84fc81cb1a71e186c67788760dc0abb66ed62faefddbc48 - Sigstore transparency entry: 2256435170
- Sigstore integration time:
-
Permalink:
zach-overflow/httpx2-limiter@776681076398605cd7a1a46d57c3729f078d5878 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/zach-overflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@776681076398605cd7a1a46d57c3729f078d5878 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file httpx2_limiter-1.0.0-py3-none-any.whl.
File metadata
- Download URL: httpx2_limiter-1.0.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62c6f5ed6b045d76d12ef26be6ddf15d79c29cb1076789a0bbf6aef4d4d989ac
|
|
| MD5 |
dedb55ccae7a89e87b7f3ffd62558add
|
|
| BLAKE2b-256 |
dbe467e2a3ae2ab4dfecc7a8df972397eef57212582a7d7645a2f773910cf98a
|
Provenance
The following attestation bundles were made for httpx2_limiter-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on zach-overflow/httpx2-limiter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
httpx2_limiter-1.0.0-py3-none-any.whl -
Subject digest:
62c6f5ed6b045d76d12ef26be6ddf15d79c29cb1076789a0bbf6aef4d4d989ac - Sigstore transparency entry: 2256435176
- Sigstore integration time:
-
Permalink:
zach-overflow/httpx2-limiter@776681076398605cd7a1a46d57c3729f078d5878 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/zach-overflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@776681076398605cd7a1a46d57c3729f078d5878 -
Trigger Event:
workflow_dispatch
-
Statement type: