cache_requests package¶
cache_requests¶
Simple. Powerful. Persistent LRU caching for the requests library.
-
class
cache_requests.Session(ex=None, connection=None)[source]¶ Bases:
requests.sessions.Sessionrequests.Sessionwith memoized methods.
Submodules¶
cache_requests._compat¶
Python 2to3 compatibility handling.
-
class
cache_requests._compat.NullHandler(level=0)[source]¶ Bases:
logging.HandlerThis handler does nothing. It’s intended to be used to avoid the “No handlers could be found for logger XXX” one-off warning. This is important for library code, which may contain code to log events. If a user of the library does not configure logging, the one-off warning might be produced; to avoid this, the library developer simply needs to instantiate a NullHandler and add it to the top-level logger of the library module or package.
cache_requests.memoize¶
Memoize cache decorator.
cache_requests.sessions¶
Extend requests with cache decorator.
Private API¶
Source¶
-
class
cache_requests.sessions.MemoizeRequest(func=None, **kwargs)[source]¶ Bases:
cache_requests.memoize.MemoizeCache session method calls.
-
ex¶
-
redis¶
-
use_cache¶
-
-
class
cache_requests.sessions.CacheConfig(**kwargs)[source]¶ Bases:
cache_requests.utils.AttributeDictA strict dict with attribute access.