CacheControl
توضیحات
httplib2 caching for requests
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | CacheControl-0.9.4 |
| نام | CacheControl |
| نسخه کتابخانه | 0.9.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Eric Larson, Frost Ming, William Woodruff |
| ایمیل نویسنده | Eric Larson <ericlarson@ionrock.com>, Frost Ming <me@frostming.com>, William Woodruff <william@yossarian.net> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/CacheControl/ |
| مجوز | - |
..
SPDX-FileCopyrightText: SPDX-FileCopyrightText: 2015 Eric Larson
SPDX-License-Identifier: Apache-2.0
==============
CacheControl
==============
.. image:: https://img.shields.io/pypi/v/cachecontrol.svg
:target: https://pypi.python.org/pypi/cachecontrol
:alt: Latest Version
.. image:: https://github.com/psf/cachecontrol/actions/workflows/tests.yml/badge.svg
:target: https://github.com/psf/cachecontrol/actions/workflows/tests.yml
CacheControl is a port of the caching algorithms in httplib2_ for use with
requests_ session object.
It was written because httplib2's better support for caching is often
mitigated by its lack of thread safety. The same is true of requests in
terms of caching.
Quickstart
==========
.. code-block:: python
import requests
from cachecontrol import CacheControl
sess = requests.session()
cached_sess = CacheControl(sess)
response = cached_sess.get('https://google.com')
If the URL contains any caching based headers, it will cache the
result in a simple dictionary.
For more info, check out the docs_
.. _docs: http://cachecontrol.readthedocs.org/en/latest/
.. _httplib2: https://github.com/httplib2/httplib2
.. _requests: http://docs.python-requests.org/
نیازمندی
| مقدار | نام |
|---|---|
| - | requests>=2.16.0 |
| - | msgpack<2.0.0,>=0.5.2 |
| xtr | cachecontrol[filecache,redis]; |
| xtr | cherrypy; |
| xtr | cheroot>=11.1.2; |
| xtr | codespell; |
| xtr | furo; |
| xtr | mypy; |
| xtr | pytest; |
| xtr | pytest-cov; |
| xtr | ruff; |
| xtr | sphinx; |
| xtr | sphinx-copybutton; |
| xtr | types-redis; |
| xtr | types-requests; |
| xtr | filelock>=3.8.0; |
| xtr | redis>=2.10.5; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl CacheControl-0.9.4:
pip install CacheControl.whl
نصب پکیج tar.gz CacheControl-0.9.4:
pip install CacheControl.tar.gz