CacheControl


NameCacheControl JSON
Version 0.14.1 PyPI version JSON
download
home_pageNone
Summaryhttplib2 caching for requests
upload_time2024-11-04 22:10:06
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
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": null,
    "name": "CacheControl",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "requests, http, caching, web",
    "author": null,
    "author_email": "Eric Larson <ericlarson@ionrock.com>, Frost Ming <me@frostming.com>, William Woodruff <william@yossarian.net>",
    "download_url": "https://files.pythonhosted.org/packages/d2/23/db12e0b6b241e33f77f7cce01a06b4cc6f8071728656cc0ea262d2a14dad/cachecontrol-0.14.1.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": null,
    "summary": "httplib2 caching for requests",
    "version": "0.14.1",
    "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": "f1aa481eb52af52aae093c61c181f2308779973ffd6f0f5f6c0881b2138f3087",
                "md5": "c00823864344174ad2f3c951eab12f60",
                "sha256": "65e3abd62b06382ce3894df60dde9e0deb92aeb734724f68fa4f3b91e97206b9"
            },
            "downloads": -1,
            "filename": "cachecontrol-0.14.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c00823864344174ad2f3c951eab12f60",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 22085,
            "upload_time": "2024-11-04T22:10:04",
            "upload_time_iso_8601": "2024-11-04T22:10:04.501038Z",
            "url": "https://files.pythonhosted.org/packages/f1/aa/481eb52af52aae093c61c181f2308779973ffd6f0f5f6c0881b2138f3087/cachecontrol-0.14.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d223db12e0b6b241e33f77f7cce01a06b4cc6f8071728656cc0ea262d2a14dad",
                "md5": "a4d0596a36c2601a1ea72cfcad5de87a",
                "sha256": "06ef916a1e4eb7dba9948cdfc9c76e749db2e02104a9a1277e8b642591a0f717"
            },
            "downloads": -1,
            "filename": "cachecontrol-0.14.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a4d0596a36c2601a1ea72cfcad5de87a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 28928,
            "upload_time": "2024-11-04T22:10:06",
            "upload_time_iso_8601": "2024-11-04T22:10:06.042469Z",
            "url": "https://files.pythonhosted.org/packages/d2/23/db12e0b6b241e33f77f7cce01a06b4cc6f8071728656cc0ea262d2a14dad/cachecontrol-0.14.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-04 22:10:06",
    "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.35367s