httpx API client toolkit — pagination, retry, rate limiting, auth refresh, middleware.
Project description
crashbytes-apiclient
httpx API client toolkit — pagination, retry, rate limiting, auth refresh, middleware.
Install
pip install crashbytes-apiclient
Usage
from crashbytes_apiclient import (
ApiClient, BearerAuth, RetryMiddleware, CursorPaginator,
)
client = ApiClient(
base_url="https://api.example.com",
auth=BearerAuth("your-token"),
middlewares=[RetryMiddleware(max_retries=3)],
)
# Simple requests
response = client.get("/users")
response = client.post("/users", json={"name": "Alice"})
# Paginated iteration
for batch in client.paginate("/items", CursorPaginator()):
for item in batch:
process(item)
client.close()
Features
- Auth:
BearerAuth,RefreshableAuth(auto-refresh on 401) - Middleware:
RetryMiddleware,RateLimitMiddleware, custom middleware protocol - Pagination:
CursorPaginator,PageNumberPaginator - HTTP Methods:
.get(),.post(),.put(),.patch(),.delete() - Context Manager:
with ApiClient(...) as client:
License
MIT
Project details
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 crashbytes_apiclient-1.1.0.tar.gz.
File metadata
- Download URL: crashbytes_apiclient-1.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86e6e6a3a97f9540ecb30c078f6158ff9f1dacc5b255f2f81c3ad393d399bbe0
|
|
| MD5 |
c414ff1fc0e724016f2f4805faa70193
|
|
| BLAKE2b-256 |
2f9b2cdb033f18ee52dc7d72ce375ff2ebe553a5b6cc740a38a461251b2e2361
|
Provenance
The following attestation bundles were made for crashbytes_apiclient-1.1.0.tar.gz:
Publisher:
publish.yml on CrashBytes/crashbytes-apiclient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crashbytes_apiclient-1.1.0.tar.gz -
Subject digest:
86e6e6a3a97f9540ecb30c078f6158ff9f1dacc5b255f2f81c3ad393d399bbe0 - Sigstore transparency entry: 1435298308
- Sigstore integration time:
-
Permalink:
CrashBytes/crashbytes-apiclient@4dc2ca9fa85d8923419e108f18f145eeb264a5f7 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/CrashBytes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4dc2ca9fa85d8923419e108f18f145eeb264a5f7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file crashbytes_apiclient-1.1.0-py3-none-any.whl.
File metadata
- Download URL: crashbytes_apiclient-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f07282ae4de5ecaf21a2c8a3c38c4a3da77fe4066dbe1e55f369973a8cd3bf54
|
|
| MD5 |
e984a8b542277cb1bc292e03c6498e78
|
|
| BLAKE2b-256 |
360af5e12597a9d4930d66aec9bf5e80d4628fea44c3cc16cf220240a112c035
|
Provenance
The following attestation bundles were made for crashbytes_apiclient-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on CrashBytes/crashbytes-apiclient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crashbytes_apiclient-1.1.0-py3-none-any.whl -
Subject digest:
f07282ae4de5ecaf21a2c8a3c38c4a3da77fe4066dbe1e55f369973a8cd3bf54 - Sigstore transparency entry: 1435298312
- Sigstore integration time:
-
Permalink:
CrashBytes/crashbytes-apiclient@4dc2ca9fa85d8923419e108f18f145eeb264a5f7 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/CrashBytes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4dc2ca9fa85d8923419e108f18f145eeb264a5f7 -
Trigger Event:
push
-
Statement type: