Pre-release
This release is a pre-release and may not be stable for production use.
Caching for HTTPX.
Note: Early development / alpha, use at your own risk.
This package adds caching functionality to HTTPX
Adapted from Eric Larson's fantastic CacheControl for requests.
Project goals:
- Sans-io caching protocol
- Fully async compatible
- Support multiple http clients (currently only supports httpx)
Limitations:
- Currently only has in-memory cache storage (async redis would be nice!)
- Test suite was taken wholesale from CacheControl, so still uses a test server and mocking rather than taking advantage of the sans-io implementation.
Usage:
import asyncio
from httpx import AsyncClient
from httpx_caching import CachingClient
client = AsyncClient()
client = CachingClient(client)
async def run_example():
await client.get("http://example.com")
loop = asyncio.get_event_loop()
loop.run_until_complete(run_example())
Documentation:
TODO
See CacheControl's documentation for general documentation of the caching approach.
Metadata
Release files for httpx-caching 0.1a4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| httpx-caching-0.1a4.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| httpx_caching-0.1a4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.1 kB
Release files / httpx-caching-0.1a4.tar.gz
| Download URL | httpx-caching-0.1a4.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b7ed1f9d163f221b3cf88a8bb60b3a567028a7471a5618512c0ed4aefd96065
|
|
BLAKE2b-256 checksum How to use checksums |
d2e692ce0d1918b55753bf75fd89d1cb6dc815073703442be59600b1da272441
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/7.1.0 pkginfo/1.10.0 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.4 CPython/3.9.19
|
Release files / httpx_caching-0.1a4-py3-none-any.whl
| Download URL | httpx_caching-0.1a4-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ff823b930eb4b7dbd56e411a0aa5f00161ca90e5a5a130d814358bf742fa193
|
|
BLAKE2b-256 checksum How to use checksums |
030c9b4e1ef83fbea951d5b2bbc678c4ea890de171dc37545759e6350c600c77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/7.1.0 pkginfo/1.10.0 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.4 CPython/3.9.19
|