{"repo":"requests-cache/aiohttp-client-cache","free":true,"listed":false,"github":"https://github.com/requests-cache/aiohttp-client-cache","clone":"git clone https://github.com/requests-cache/aiohttp-client-cache.git","description":"An async persistent cache for aiohttp requests","language":"Python","stars":154,"topics":["aiohttp","async","asyncio","cache","client","http","persistence","requests","sqlite","redis"],"license":"MIT","category":"databases-storage","readme_excerpt":"aiohttp-client-cache aiohttp-client-cache is an async persistent cache for aiohttp client requests, based on requests-cache. Features - Ease of use: Use as a drop-in replacement for aiohttp.ClientSession - Customization: Works out of the box with little to no config, but with plenty of options available for customizing cache expiration and other behavior - Persistence: Includes several storage backends: SQLite, DynamoDB, MongoDB, DragonflyDB and Redis. Quickstart First, install with pip (python 3.9+ required): Note: Adding [all] will install optional dependencies for all supported backends. When adding this library to your application, you can include only the dependencies you actually need; see individual backend docs and pyproject.toml for details. Basic Usage Next, use aiohttp client cache.CachedSession in place of aiohttp.ClientSession. To briefly demonstrate how to use it: Replace this: With this: The URL in this example adds a delay of 1 second, simulating a slow or rate-limited website. With caching, the response will be fetched once, saved to demo cache.sqlite , and subsequent requests will return the cached response near-instantly. Configuration Several options are available to customize caching behavior. This example demonstrates a few of them: More Info To learn more, see: - User Guide - Cache Backends - API Reference - Examples Feedback If there is a feature you want, if you've discovered a bug, or if you have other general feedback, please create an issue for it!","default_branch":null,"files":null,"tree":[],"storefront":"/r/requests-cache","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/requests-cache/aiohttp-client-cache/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}