Async resilience utilities — circuit breaker, rate limiter, cache, http client
Project description
asyncresil
Async resilience utilities for Python services. A small, focused toolkit extracted from production code so the same primitives can be shared across projects instead of re-implemented per repo.
The GitHub repo is named
aura-utilsfor historical reasons (this library was extracted from the Aura project'smcp_server/utils/). The PyPI package and Python module are bothasyncresil— installed viapip install asyncresiland imported asfrom asyncresil import ….
Modules
| Module | What it does | Why it exists |
|---|---|---|
http_client |
httpx-based async client with retries, exponential backoff, and timeouts |
Transient network failures shouldn't surface to callers — retry the obvious cases. |
circuit_breaker |
State machine (closed → open → half_open) that fails fast when a downstream is broken |
Stops cascading failures and retry storms when a dependency is down. |
rate_limiter |
Token-bucket limiter for async code | Stay under third-party API limits, smooth bursts. |
cache |
Cache protocol with MemoryCache (default) and RedisCache (optional dep) |
Skip repeat work — cut latency, cost, and downstream load. |
The four compose into a typical outbound call chain:
caller → cache → rate_limiter → circuit_breaker → http_client → external service
Each layer protects the layers below from unnecessary load.
Install
pip install asyncresil # core (in-memory cache only)
pip install 'asyncresil[redis]' # adds Redis-backed cache
Requires Python 3.11+.
Intended consumers
Internal services that need a shared resilience layer:
- Aura — MCP server (the original source of these utilities)
- Eval Framework — uses the cache + rate limiter for batched LLM evaluation
- Agentic Engine — uses the circuit breaker around tool calls
- LLM Gateway — uses the http client + circuit breaker for upstream provider calls
Status
0.1.0 — early alpha. API is not yet stable.
License
MIT — see LICENSE.
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 asyncresil-0.1.0.tar.gz.
File metadata
- Download URL: asyncresil-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8d6fce9a8b937020aac2dccf2a8d554fbe8acc4aa97c5806420f5ff7da30fe6
|
|
| MD5 |
d245d7812e3d789b6e8ff5e5bc610b33
|
|
| BLAKE2b-256 |
4e17ea995fbb955505e2b9d1d0fc607cd59468a1d596ef3e7cb7aa6d2b43a6a1
|
Provenance
The following attestation bundles were made for asyncresil-0.1.0.tar.gz:
Publisher:
release.yml on kevinreber/aura-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asyncresil-0.1.0.tar.gz -
Subject digest:
c8d6fce9a8b937020aac2dccf2a8d554fbe8acc4aa97c5806420f5ff7da30fe6 - Sigstore transparency entry: 1564432719
- Sigstore integration time:
-
Permalink:
kevinreber/aura-utils@1ecba46bba30f2040bc8bc5fd31a72a23df8310c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kevinreber
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1ecba46bba30f2040bc8bc5fd31a72a23df8310c -
Trigger Event:
push
-
Statement type:
File details
Details for the file asyncresil-0.1.0-py3-none-any.whl.
File metadata
- Download URL: asyncresil-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 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 |
e9d8d2a9edd234bc584d533789d8b5871dabcd8e400044e48206a0a46213d091
|
|
| MD5 |
fd839e9c653035fe5afa62ec99b9b5ec
|
|
| BLAKE2b-256 |
258a0bf5515b49d5b738ddbc0ff6c649ad69730e11434d380eff8550c1a1b475
|
Provenance
The following attestation bundles were made for asyncresil-0.1.0-py3-none-any.whl:
Publisher:
release.yml on kevinreber/aura-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asyncresil-0.1.0-py3-none-any.whl -
Subject digest:
e9d8d2a9edd234bc584d533789d8b5871dabcd8e400044e48206a0a46213d091 - Sigstore transparency entry: 1564432741
- Sigstore integration time:
-
Permalink:
kevinreber/aura-utils@1ecba46bba30f2040bc8bc5fd31a72a23df8310c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kevinreber
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1ecba46bba30f2040bc8bc5fd31a72a23df8310c -
Trigger Event:
push
-
Statement type: