abatcher
Simple parallel HTTP request batcher with rate limiting, retries, connection pooling, and more. The entire API is only 1 function.
🛠️ Usage
Using abatcher should be as simple as:
import abatcher
requests = [
# Simple URL GET request
"https://httpbin.org/anything",
# Custom request
{
"url": "https://httpbin.org/post",
"method": "POST",
"params": {"name": "Test"},
"headers": {"X-Custom": "value"},
},
]
results = abatcher.run(requests)
print(f"Batch requests results: {results}")
If you need more control, you can also send a custom client.
import httpx
import abatcher
custom_client = httpx.AsyncClient(
auth=("user", "pass"),
timeout=httpx.Timeout(45.0),
limits=httpx.Limits(max_connections=100, max_keepalive_connections=20),
)
results = abatcher.run(
requests,
client=custom_client,
max_concurrent=20,
max_per_second=10,
cache=True,
cache_dir="custom_cache",
cache_ttl=3600,
)
print(f"Batch requests results: {results}")
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
abatcher-0.2.0.tar.gz
(5.4 kB
view details)
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 abatcher-0.2.0.tar.gz.
File metadata
- Download URL: abatcher-0.2.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f39c72d99cd8c028f0fc800b4c741e8be6ff7ea1cce0d95c2fb1a426b937280
|
|
| MD5 |
9e9661ad1c99eace859a88b1a53166be
|
|
| BLAKE2b-256 |
e8b403907ecb4e323f83aad93f0212e8a340ff4cc0f5ede94635807c5387a8d0
|
File details
Details for the file abatcher-0.2.0-py3-none-any.whl.
File metadata
- Download URL: abatcher-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac243c664afacc8e62c819fff7b8db702d18e45fa948945f3cb35ccf8a6a9d80
|
|
| MD5 |
44e0d72557fb5da686b26802352b7920
|
|
| BLAKE2b-256 |
bde19a458296de657fa8bbf9b0a4ed6cc7edf418d6f2661491a1a4c9bbec78fb
|