# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-requests-cache VERSION= 1.3.3 KEYWORDS= python VARIANTS= v13 v14 SDESC[v13]= Persistent cache for python requests (3.13) SDESC[v14]= Persistent cache for python requests (3.14) HOMEPAGE= https://github.com/requests-cache/requests-cache CONTACT= Python_Automaton[python@ravenports.com] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/a5/bf/c1775e49b350225bd851576ba75263bc728d8f05c0e31439a45f3429cc7b DISTFILE[1]= requests_cache-1.3.3-py3-none-any.whl:main DIST_SUBDIR= python-src DF_INDEX= 1 SPKGS[v13]= single SPKGS[v14]= single OPTIONS_AVAILABLE= PY313 PY314 OPTIONS_STANDARD= none VOPTS[v13]= PY313=ON PY314=OFF VOPTS[v14]= PY313=OFF PY314=ON DISTNAME= requests_cache-1.3.3.dist-info GENERATED= yes [PY313].RUN_DEPENDS_ON= python-attrs:single:v13 python-cattrs:single:v13 python-platformdirs:single:v13 python-requests:single:v13 python-url-normalize:single:v13 python-urllib3:single:v13 [PY313].USES_ON= python:v13,wheel [PY314].RUN_DEPENDS_ON= python-attrs:single:v14 python-cattrs:single:v14 python-platformdirs:single:v14 python-requests:single:v14 python-url-normalize:single:v14 python-urllib3:single:v14 [PY314].USES_ON= python:v14,wheel [FILE:2737:descriptions/desc.single] [![]](https://requests-cache.readthedocs.io) [Build] [Codecov] [Documentation] [Code Shelter] [PyPI] [Conda] [Arch] [![PyPI - Python Versions]](https://pypi.org/project/requests-cache) [![PyPI - Downloads]](https://pypi.org/project/requests-cache) ## Summary **requests-cache** is a persistent HTTP cache that provides an easy way to get better performance with the python [requests] library. Complete project documentation can be found at [requests-cache.readthedocs.io]. ## Features * **Ease of use:** Keep using the `requests` library you're already familiar with. Add caching with a [drop-in replacement] for `requests.Session`, or [install globally] to add transparent caching to all `requests` functions. * **Performance:** Get sub-millisecond response times for cached responses. When they expire, you still save time with [conditional requests]. * **Persistence:** Works with several [storage backends] including SQLite, Redis, MongoDB, and DynamoDB; or save responses as plain JSON files, YAML, and more * **Expiration:** Use [Cache-Control] and other standard HTTP headers, define your own expiration schedule, keep your cache clutter-free with backends that natively support TTL, or any combination of strategies * **Customization:** Works out of the box with zero config, but with a robust set of features for configuring and extending the library to suit your needs * **Compatibility:** Can be combined with other [popular libraries based on requests] ## Quickstart First, install with pip: ```bash pip install requests-cache ``` Then, use [requests_cache.CachedSession] to make your requests. It behaves like a normal [requests.Session], but with caching behavior. To illustrate, we'll call an endpoint that adds a delay of 1 second, simulating a slow or rate-limited website. **This takes 1 minute:** ```python import requests session = requests.Session() for i in range(60): session.get('https://httpbin.org/delay/1') ``` **This takes 1 second:** ```python import requests_cache session = requests_cache.CachedSession('demo_cache') for i in range(60): session.get('https://httpbin.org/delay/1') ``` With caching, the response will be fetched once, saved to `demo_cache.sqlite`, and subsequent requests will return the cached response near-instantly. ### Patching If you don't want to manage a session object, or just want to quickly test it out in your application without modifying any code, requests-cache can also be installed globally, and all requests will be transparently cached: ```python import requests import requests_cache requests_cache.install_cache('demo_cache') requests.get('https://httpbin.org/delay/1') ``` [FILE:127:distinfo] c8df20ff874ebfc026959e3874e6c12bd6724934cdb10925915908453d4b17e4 70788 python-src/requests_cache-1.3.3-py3-none-any.whl