CacheControl


NameCacheControl JSON
Version 0.14.0 PyPI version JSON
download
home_page
Summaryhttplib2 caching for requests
upload_time2024-02-02 02:53:30
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords requests http caching web
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ..
  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/


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "CacheControl",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "requests,http,caching,web",
    "author": "",
    "author_email": "Eric Larson <ericlarson@ionrock.com>, Frost Ming <me@frostming.com>, William Woodruff <william@yossarian.net>",
    "download_url": "https://files.pythonhosted.org/packages/06/55/edea9d90ee57ca54d34707607d15c20f72576b96cb9f3e7fc266cb06b426/cachecontrol-0.14.0.tar.gz",
    "platform": null,
    "description": "..\n  SPDX-FileCopyrightText: SPDX-FileCopyrightText: 2015 Eric Larson\n\n  SPDX-License-Identifier: Apache-2.0\n\n==============\n CacheControl\n==============\n\n.. image:: https://img.shields.io/pypi/v/cachecontrol.svg\n    :target: https://pypi.python.org/pypi/cachecontrol\n    :alt: Latest Version\n\n.. image:: https://github.com/psf/cachecontrol/actions/workflows/tests.yml/badge.svg\n  :target: https://github.com/psf/cachecontrol/actions/workflows/tests.yml\n\nCacheControl is a port of the caching algorithms in httplib2_ for use with\nrequests_ session object.\n\nIt was written because httplib2's better support for caching is often\nmitigated by its lack of thread safety. The same is true of requests in\nterms of caching.\n\n\nQuickstart\n==========\n\n.. code-block:: python\n\n  import requests\n\n  from cachecontrol import CacheControl\n\n\n  sess = requests.session()\n  cached_sess = CacheControl(sess)\n\n  response = cached_sess.get('https://google.com')\n\nIf the URL contains any caching based headers, it will cache the\nresult in a simple dictionary.\n\nFor more info, check out the docs_\n\n.. _docs: http://cachecontrol.readthedocs.org/en/latest/\n.. _httplib2: https://github.com/httplib2/httplib2\n.. _requests: http://docs.python-requests.org/\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "httplib2 caching for requests",
    "version": "0.14.0",
    "project_urls": {
        "Homepage": "https://pypi.org/project/CacheControl/",
        "Issues": "https://github.com/psf/cachecontrol/issues",
        "Source": "https://github.com/psf/cachecontrol"
    },
    "split_keywords": [
        "requests",
        "http",
        "caching",
        "web"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a3a97d331fec593a4b2953338df33e954aac6ff79eb5a073bca2783766bc7722",
                "md5": "d0f4fddbc2dce2629d6c7714e8ea027f",
                "sha256": "f5bf3f0620c38db2e5122c0726bdebb0d16869de966ea6a2befe92470b740ea0"
            },
            "downloads": -1,
            "filename": "cachecontrol-0.14.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d0f4fddbc2dce2629d6c7714e8ea027f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 22064,
            "upload_time": "2024-02-02T02:53:29",
            "upload_time_iso_8601": "2024-02-02T02:53:29.430967Z",
            "url": "https://files.pythonhosted.org/packages/a3/a9/7d331fec593a4b2953338df33e954aac6ff79eb5a073bca2783766bc7722/cachecontrol-0.14.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0655edea9d90ee57ca54d34707607d15c20f72576b96cb9f3e7fc266cb06b426",
                "md5": "e26dab81728aed5cf223489fb1dba5bd",
                "sha256": "7db1195b41c81f8274a7bbd97c956f44e8348265a1bc7641c37dfebc39f0c938"
            },
            "downloads": -1,
            "filename": "cachecontrol-0.14.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e26dab81728aed5cf223489fb1dba5bd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 28899,
            "upload_time": "2024-02-02T02:53:30",
            "upload_time_iso_8601": "2024-02-02T02:53:30.686083Z",
            "url": "https://files.pythonhosted.org/packages/06/55/edea9d90ee57ca54d34707607d15c20f72576b96cb9f3e7fc266cb06b426/cachecontrol-0.14.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-02 02:53:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "psf",
    "github_project": "cachecontrol",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "cachecontrol"
}
        
Elapsed time: 0.24478s