[Python-modules-commits] [python-requests-cache] 01/08: Import python-requests-cache_0.4.13.orig.tar.gz
Sandro Tosi
morph at moszumanska.debian.org
Thu Jan 5 19:10:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository python-requests-cache.
commit 115a2067424052e23f7f905f1047723191a321b9
Author: Sandro Tosi <morph at debian.org>
Date: Thu Jan 5 13:55:30 2017 -0500
Import python-requests-cache_0.4.13.orig.tar.gz
---
HISTORY.rst | 6 +
PKG-INFO | 434 ++++++++++++++-------------
README.rst | 2 +-
docs/user_guide.rst | 4 +-
history_issue.py | 27 --
howdoi_issue.py | 19 --
requests_cache.egg-info/PKG-INFO | 434 ++++++++++++++-------------
requests_cache.egg-info/SOURCES.txt | 2 -
requests_cache/__init__.py | 2 +-
requests_cache/backends/base.py | 9 +-
requests_cache/backends/storage/mongodict.py | 18 +-
setup.cfg | 16 +-
setup.py | 2 +-
tests/test_cache.py | 19 +-
14 files changed, 494 insertions(+), 500 deletions(-)
diff --git a/HISTORY.rst b/HISTORY.rst
index 4e9fc21..12a31d9 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -3,6 +3,12 @@
History
-------
+0.4.13 (2016-12-23)
++++++++++++++++++++
+* Support PyMongo3, thanks to @craigls #72
+* Fix streaming releate issue #68
+
+
0.4.12 (2016-03-19)
+++++++++++++++++++
* Fix ability to pass backend instance in ``install_cache`` #61
diff --git a/PKG-INFO b/PKG-INFO
index 8bcc8bf..518a798 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,214 +1,220 @@
-Metadata-Version: 1.1
-Name: requests-cache
-Version: 0.4.12
-Summary: Persistent cache for requests library
-Home-page: https://github.com/reclosedev/requests-cache
-Author: Roman Haritonov
-Author-email: reclosedev at gmail.com
-License: BSD License
-Description: requests-cache
- ---------------
-
- Requests-cache is a transparent persistent cache for requests_ (version >= 1.1.0) library.
-
- .. _requests: http://python-requests.org/
-
- .. image:: https://travis-ci.org/reclosedev/requests-cache.svg?branch=master
- :target: https://travis-ci.org/reclosedev/requests-cache
-
- .. image:: https://coveralls.io/repos/reclosedev/requests-cache/badge.svg?branch=master&service=github
- :target: https://coveralls.io/github/reclosedev/requests-cache?branch=master
-
-
- Usage example
- -------------
-
- Just write:
-
- .. code-block:: python
-
- import requests
- import requests_cache
-
- requests_cache.install_cache('demo_cache')
-
- And all responses with headers and cookies will be transparently cached to
- `demo_cache.sqlite` database. For example, following code will take only
- 1-2 seconds instead of 10, and will run instantly on next launch:
-
- .. code-block:: python
-
- for i in range(10):
- requests.get('http://httpbin.org/delay/1')
-
- It can be useful when you are creating some simple data scraper with constantly
- changing parsing logic or data format, and don't want to redownload pages or
- write complex error handling and persistence.
-
- Note
- ----
-
- ``requests-cache`` ignores all cache headers, it just caches the data for the
- time you specify.
-
- If you need library which knows how to use HTTP headers and status codes,
- take a look at `httpcache <https://github.com/Lukasa/httpcache>`_ and
- `CacheControl <https://github.com/ionrock/cachecontrol>`_.
-
- Links
- -----
-
- - **Documentation** at `readthedocs.org <http://readthedocs.org/docs/requests-cache/>`_
-
- - **Source code and issue tracking** at `GitHub <https://github.com/reclosedev/requests-cache>`_.
-
- - **Working example** at `Real Python <https://realpython.com/blog/python/caching-external-api-requests>`_.
-
-
- .. :changelog:
-
- History
- -------
-
- 0.4.12 (2016-03-19)
- +++++++++++++++++++
- * Fix ability to pass backend instance in ``install_cache`` #61
-
-
- 0.4.11 (2016-03-07)
- +++++++++++++++++++
- * ``ignore_parameters`` feature, thanks to @themiurgo and @YetAnotherNerd (#52, #55)
- * More informative message for missing backend dependencies, thanks to @Garrett-R (#60)
-
-
- 0.4.10 (2015-04-28)
- +++++++++++++++++++
- * Better transactional handling in sqlite #50, thanks to @rgant
- * Compatibility with streaming in requests >= 2.6.x
-
-
- 0.4.9 (2015-01-17)
- ++++++++++++++++++
-
- * ``expire_after`` now also accepts ``timedelta``, thanks to @femtotrader
- * Added Ability to include headers to cache key (``include_get_headers`` option)
- * Added string representation for ``CachedSession``
-
-
- 0.4.8 (2014-12-13)
- ++++++++++++++++++
-
- * Fix bug in reading cached streaming response
-
-
- 0.4.7 (2014-12-06)
- ++++++++++++++++++
-
- * Fix compatibility with Requests > 2.4.1 (json arg, response history)
-
-
- 0.4.6 (2014-10-13)
- ++++++++++++++++++
-
- * Monkey patch now uses class instead lambda (compatibility with rauth)
- * Normalize (sort) parameters passed as builtin dict
-
-
- 0.4.5 (2014-08-22)
- ++++++++++++++++++
-
- * Requests==2.3.0 compatibility, thanks to @gwillem
-
-
- 0.4.4 (2013-10-31)
- ++++++++++++++++++
-
- * Check for backend availability in install_cache(), not at the first request
- * Default storage fallbacks to memory if ``sqlite`` is not available
-
-
- 0.4.3 (2013-09-12)
- ++++++++++++++++++
-
- * Fix ``response.from_cache`` not set in hooks
-
-
-
- 0.4.2 (2013-08-25)
- ++++++++++++++++++
-
- * Fix ``UnpickleableError`` for gzip responses
-
-
-
- 0.4.1 (2013-08-19)
- ++++++++++++++++++
-
- * ``requests_cache.enabled()`` context manager
- * Compatibility with Requests 1.2.3 cookies handling
-
-
- 0.4.0 (2013-04-25)
- ++++++++++++++++++
-
- * Redis backend. Thanks to @michaelbeaumont
- * Fix for changes in Requests 1.2.0 hooks dispatching
-
-
- 0.3.0 (2013-02-24)
- ++++++++++++++++++
-
- * Support for ``Requests`` 1.x.x
- * ``CachedSession``
- * Many backward incompatible changes
-
- 0.2.1 (2013-01-13)
- ++++++++++++++++++
-
- * Fix broken PyPi package
-
- 0.2.0 (2013-01-12)
- ++++++++++++++++++
-
- * Last backward compatible version for ``Requests`` 0.14.2
-
-
- 0.1.3 (2012-05-04)
- ++++++++++++++++++
-
- * Thread safety for default ``sqlite`` backend
- * Take into account the POST parameters when cache is configured
- with 'POST' in ``allowable_methods``
-
-
- 0.1.2 (2012-05-02)
- ++++++++++++++++++
-
- * Reduce number of ``sqlite`` database write operations
- * ``fast_save`` option for ``sqlite`` backend
-
-
- 0.1.1 (2012-04-11)
- ++++++++++++++++++
-
- * Fix: restore responses from response.history
- * Internal refactoring (``MemoryCache`` -> ``BaseCache``, ``reduce_response``
- and ``restore_response`` moved to ``BaseCache``)
- * ``connection`` option for ``MongoCache``
-
-
- 0.1.0 (2012-04-10)
- ++++++++++++++++++
-
- * initial PyPI release
-
-Keywords: requests,cache,persistence
-Platform: UNKNOWN
-Classifier: License :: OSI Approved :: BSD License
-Classifier: Development Status :: 4 - Beta
-Classifier: Intended Audience :: Developers
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
+Metadata-Version: 1.1
+Name: requests-cache
+Version: 0.4.13
+Summary: Persistent cache for requests library
+Home-page: https://github.com/reclosedev/requests-cache
+Author: Roman Haritonov
+Author-email: reclosedev at gmail.com
+License: BSD License
+Description: requests-cache
+ ---------------
+
+ Requests-cache is a transparent persistent cache for requests_ (version >= 1.1.0) library.
+
+ .. _requests: http://python-requests.org/
+
+ .. image:: https://travis-ci.org/reclosedev/requests-cache.svg?branch=master
+ :target: https://travis-ci.org/reclosedev/requests-cache
+
+ .. image:: https://coveralls.io/repos/reclosedev/requests-cache/badge.svg?branch=master&service=github
+ :target: https://coveralls.io/github/reclosedev/requests-cache?branch=master
+
+
+ Usage example
+ -------------
+
+ Just write:
+
+ .. code-block:: python
+
+ import requests
+ import requests_cache
+
+ requests_cache.install_cache('demo_cache')
+
+ And all responses with headers and cookies will be transparently cached to
+ `demo_cache.sqlite` database. For example, following code will take only
+ 1-2 seconds instead of 10, and will run instantly on next launch:
+
+ .. code-block:: python
+
+ for i in range(10):
+ requests.get('http://httpbin.org/delay/1')
+
+ It can be useful when you are creating some simple data scraper with constantly
+ changing parsing logic or data format, and don't want to redownload pages or
+ write complex error handling and persistence.
+
+ Note
+ ----
+
+ ``requests-cache`` ignores all cache headers, it just caches the data for the
+ time you specify.
+
+ If you need library which knows how to use HTTP headers and status codes,
+ take a look at `httpcache <https://github.com/Lukasa/httpcache>`_ and
+ `CacheControl <https://github.com/ionrock/cachecontrol>`_.
+
+ Links
+ -----
+
+ - **Documentation** at `readthedocs.org <https://requests-cache.readthedocs.io/>`_
+
+ - **Source code and issue tracking** at `GitHub <https://github.com/reclosedev/requests-cache>`_.
+
+ - **Working example** at `Real Python <https://realpython.com/blog/python/caching-external-api-requests>`_.
+
+
+ .. :changelog:
+
+ History
+ -------
+
+ 0.4.13 (2016-12-23)
+ +++++++++++++++++++
+ * Support PyMongo3, thanks to @craigls #72
+ * Fix streaming releate issue #68
+
+
+ 0.4.12 (2016-03-19)
+ +++++++++++++++++++
+ * Fix ability to pass backend instance in ``install_cache`` #61
+
+
+ 0.4.11 (2016-03-07)
+ +++++++++++++++++++
+ * ``ignore_parameters`` feature, thanks to @themiurgo and @YetAnotherNerd (#52, #55)
+ * More informative message for missing backend dependencies, thanks to @Garrett-R (#60)
+
+
+ 0.4.10 (2015-04-28)
+ +++++++++++++++++++
+ * Better transactional handling in sqlite #50, thanks to @rgant
+ * Compatibility with streaming in requests >= 2.6.x
+
+
+ 0.4.9 (2015-01-17)
+ ++++++++++++++++++
+
+ * ``expire_after`` now also accepts ``timedelta``, thanks to @femtotrader
+ * Added Ability to include headers to cache key (``include_get_headers`` option)
+ * Added string representation for ``CachedSession``
+
+
+ 0.4.8 (2014-12-13)
+ ++++++++++++++++++
+
+ * Fix bug in reading cached streaming response
+
+
+ 0.4.7 (2014-12-06)
+ ++++++++++++++++++
+
+ * Fix compatibility with Requests > 2.4.1 (json arg, response history)
+
+
+ 0.4.6 (2014-10-13)
+ ++++++++++++++++++
+
+ * Monkey patch now uses class instead lambda (compatibility with rauth)
+ * Normalize (sort) parameters passed as builtin dict
+
+
+ 0.4.5 (2014-08-22)
+ ++++++++++++++++++
+
+ * Requests==2.3.0 compatibility, thanks to @gwillem
+
+
+ 0.4.4 (2013-10-31)
+ ++++++++++++++++++
+
+ * Check for backend availability in install_cache(), not at the first request
+ * Default storage fallbacks to memory if ``sqlite`` is not available
+
+
+ 0.4.3 (2013-09-12)
+ ++++++++++++++++++
+
+ * Fix ``response.from_cache`` not set in hooks
+
+
+
+ 0.4.2 (2013-08-25)
+ ++++++++++++++++++
+
+ * Fix ``UnpickleableError`` for gzip responses
+
+
+
+ 0.4.1 (2013-08-19)
+ ++++++++++++++++++
+
+ * ``requests_cache.enabled()`` context manager
+ * Compatibility with Requests 1.2.3 cookies handling
+
+
+ 0.4.0 (2013-04-25)
+ ++++++++++++++++++
+
+ * Redis backend. Thanks to @michaelbeaumont
+ * Fix for changes in Requests 1.2.0 hooks dispatching
+
+
+ 0.3.0 (2013-02-24)
+ ++++++++++++++++++
+
+ * Support for ``Requests`` 1.x.x
+ * ``CachedSession``
+ * Many backward incompatible changes
+
+ 0.2.1 (2013-01-13)
+ ++++++++++++++++++
+
+ * Fix broken PyPi package
+
+ 0.2.0 (2013-01-12)
+ ++++++++++++++++++
+
+ * Last backward compatible version for ``Requests`` 0.14.2
+
+
+ 0.1.3 (2012-05-04)
+ ++++++++++++++++++
+
+ * Thread safety for default ``sqlite`` backend
+ * Take into account the POST parameters when cache is configured
+ with 'POST' in ``allowable_methods``
+
+
+ 0.1.2 (2012-05-02)
+ ++++++++++++++++++
+
+ * Reduce number of ``sqlite`` database write operations
+ * ``fast_save`` option for ``sqlite`` backend
+
+
+ 0.1.1 (2012-04-11)
+ ++++++++++++++++++
+
+ * Fix: restore responses from response.history
+ * Internal refactoring (``MemoryCache`` -> ``BaseCache``, ``reduce_response``
+ and ``restore_response`` moved to ``BaseCache``)
+ * ``connection`` option for ``MongoCache``
+
+
+ 0.1.0 (2012-04-10)
+ ++++++++++++++++++
+
+ * initial PyPI release
+
+Keywords: requests,cache,persistence
+Platform: UNKNOWN
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
diff --git a/README.rst b/README.rst
index c749a1c..c642ca6 100644
--- a/README.rst
+++ b/README.rst
@@ -50,7 +50,7 @@ take a look at `httpcache <https://github.com/Lukasa/httpcache>`_ and
Links
-----
-- **Documentation** at `readthedocs.org <http://readthedocs.org/docs/requests-cache/>`_
+- **Documentation** at `readthedocs.org <https://requests-cache.readthedocs.io/>`_
- **Source code and issue tracking** at `GitHub <https://github.com/reclosedev/requests-cache>`_.
diff --git a/docs/user_guide.rst b/docs/user_guide.rst
index 56b148e..811be40 100644
--- a/docs/user_guide.rst
+++ b/docs/user_guide.rst
@@ -100,9 +100,9 @@ It can be used, for example, for request throttling with help of ``requests`` ho
Returns a response hook function which sleeps for `timeout` seconds if
response is not cached
"""
- def hook(response):
+ def hook(response, *args, **kwargs):
if not getattr(response, 'from_cache', False):
- print 'sleeping'
+ print('sleeping')
time.sleep(timeout)
return response
return hook
diff --git a/history_issue.py b/history_issue.py
deleted file mode 100644
index 5009d22..0000000
--- a/history_issue.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from contextlib import contextmanager
-import requests_cache
-import requests
-
-
-resp = requests.get("http://httpbin.org/redirect/4")
-for r in resp.history:
- print("url: {} request.url: {}".format(r.url, r.request.url))
-
-
- at contextmanager
-def cache_enabled(*args, **kwargs):
- requests_cache.install_cache(*args, **kwargs)
- try:
- yield
- finally:
- requests_cache.uninstall_cache()
-
-with requests_cache.enabled('test.db'):
- resp = requests.get("http://httpbin.org/get")
- print getattr(resp, 'from_cache', False)
- s = requests.session()
- for i in range(5):
- s.get("http://httpbin.org/redirect/3")
-
-resp = requests.get("http://httpbin.org/get")
-print getattr(resp, 'from_cache', False)
\ No newline at end of file
diff --git a/howdoi_issue.py b/howdoi_issue.py
deleted file mode 100644
index 62e2325..0000000
--- a/howdoi_issue.py
+++ /dev/null
@@ -1,19 +0,0 @@
-import sys
-
-from howdoi.howdoi import command_line_runner
-sys.argv.append("python fib")
-command_line_runner()
-
-sys.exit()
-import requests
-import requests_cache
-import random
-
-USER_AGENTS = ('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0',
- 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
- 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5',
- 'Mozilla/5.0 (Windows; Windows NT 6.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5',)
-
-requests_cache.install_cache('howdoi')
-requests.get(url='https://www.google.com/search?q=site:stackoverflow.com%20open%20browser',
- headers={'User-Agent': random.choice(USER_AGENTS)})
\ No newline at end of file
diff --git a/requests_cache.egg-info/PKG-INFO b/requests_cache.egg-info/PKG-INFO
index 8bcc8bf..518a798 100644
--- a/requests_cache.egg-info/PKG-INFO
+++ b/requests_cache.egg-info/PKG-INFO
@@ -1,214 +1,220 @@
-Metadata-Version: 1.1
-Name: requests-cache
-Version: 0.4.12
-Summary: Persistent cache for requests library
-Home-page: https://github.com/reclosedev/requests-cache
-Author: Roman Haritonov
-Author-email: reclosedev at gmail.com
-License: BSD License
-Description: requests-cache
- ---------------
-
- Requests-cache is a transparent persistent cache for requests_ (version >= 1.1.0) library.
-
- .. _requests: http://python-requests.org/
-
- .. image:: https://travis-ci.org/reclosedev/requests-cache.svg?branch=master
- :target: https://travis-ci.org/reclosedev/requests-cache
-
- .. image:: https://coveralls.io/repos/reclosedev/requests-cache/badge.svg?branch=master&service=github
- :target: https://coveralls.io/github/reclosedev/requests-cache?branch=master
-
-
- Usage example
- -------------
-
- Just write:
-
- .. code-block:: python
-
- import requests
- import requests_cache
-
- requests_cache.install_cache('demo_cache')
-
- And all responses with headers and cookies will be transparently cached to
- `demo_cache.sqlite` database. For example, following code will take only
- 1-2 seconds instead of 10, and will run instantly on next launch:
-
- .. code-block:: python
-
- for i in range(10):
- requests.get('http://httpbin.org/delay/1')
-
- It can be useful when you are creating some simple data scraper with constantly
- changing parsing logic or data format, and don't want to redownload pages or
- write complex error handling and persistence.
-
- Note
- ----
-
- ``requests-cache`` ignores all cache headers, it just caches the data for the
- time you specify.
-
- If you need library which knows how to use HTTP headers and status codes,
- take a look at `httpcache <https://github.com/Lukasa/httpcache>`_ and
- `CacheControl <https://github.com/ionrock/cachecontrol>`_.
-
- Links
- -----
-
- - **Documentation** at `readthedocs.org <http://readthedocs.org/docs/requests-cache/>`_
-
- - **Source code and issue tracking** at `GitHub <https://github.com/reclosedev/requests-cache>`_.
-
- - **Working example** at `Real Python <https://realpython.com/blog/python/caching-external-api-requests>`_.
-
-
- .. :changelog:
-
- History
- -------
-
- 0.4.12 (2016-03-19)
- +++++++++++++++++++
- * Fix ability to pass backend instance in ``install_cache`` #61
-
-
- 0.4.11 (2016-03-07)
- +++++++++++++++++++
- * ``ignore_parameters`` feature, thanks to @themiurgo and @YetAnotherNerd (#52, #55)
- * More informative message for missing backend dependencies, thanks to @Garrett-R (#60)
-
-
- 0.4.10 (2015-04-28)
- +++++++++++++++++++
- * Better transactional handling in sqlite #50, thanks to @rgant
- * Compatibility with streaming in requests >= 2.6.x
-
-
- 0.4.9 (2015-01-17)
- ++++++++++++++++++
-
- * ``expire_after`` now also accepts ``timedelta``, thanks to @femtotrader
- * Added Ability to include headers to cache key (``include_get_headers`` option)
- * Added string representation for ``CachedSession``
-
-
- 0.4.8 (2014-12-13)
- ++++++++++++++++++
-
- * Fix bug in reading cached streaming response
-
-
- 0.4.7 (2014-12-06)
- ++++++++++++++++++
-
- * Fix compatibility with Requests > 2.4.1 (json arg, response history)
-
-
- 0.4.6 (2014-10-13)
- ++++++++++++++++++
-
- * Monkey patch now uses class instead lambda (compatibility with rauth)
- * Normalize (sort) parameters passed as builtin dict
-
-
- 0.4.5 (2014-08-22)
- ++++++++++++++++++
-
- * Requests==2.3.0 compatibility, thanks to @gwillem
-
-
- 0.4.4 (2013-10-31)
- ++++++++++++++++++
-
- * Check for backend availability in install_cache(), not at the first request
- * Default storage fallbacks to memory if ``sqlite`` is not available
-
-
- 0.4.3 (2013-09-12)
- ++++++++++++++++++
-
- * Fix ``response.from_cache`` not set in hooks
-
-
-
- 0.4.2 (2013-08-25)
- ++++++++++++++++++
-
- * Fix ``UnpickleableError`` for gzip responses
-
-
-
- 0.4.1 (2013-08-19)
- ++++++++++++++++++
-
- * ``requests_cache.enabled()`` context manager
- * Compatibility with Requests 1.2.3 cookies handling
-
-
- 0.4.0 (2013-04-25)
- ++++++++++++++++++
-
- * Redis backend. Thanks to @michaelbeaumont
- * Fix for changes in Requests 1.2.0 hooks dispatching
-
-
- 0.3.0 (2013-02-24)
- ++++++++++++++++++
-
- * Support for ``Requests`` 1.x.x
- * ``CachedSession``
- * Many backward incompatible changes
-
- 0.2.1 (2013-01-13)
- ++++++++++++++++++
-
- * Fix broken PyPi package
-
- 0.2.0 (2013-01-12)
- ++++++++++++++++++
-
- * Last backward compatible version for ``Requests`` 0.14.2
-
-
- 0.1.3 (2012-05-04)
- ++++++++++++++++++
-
- * Thread safety for default ``sqlite`` backend
- * Take into account the POST parameters when cache is configured
- with 'POST' in ``allowable_methods``
-
-
- 0.1.2 (2012-05-02)
- ++++++++++++++++++
-
- * Reduce number of ``sqlite`` database write operations
- * ``fast_save`` option for ``sqlite`` backend
-
-
- 0.1.1 (2012-04-11)
- ++++++++++++++++++
-
- * Fix: restore responses from response.history
- * Internal refactoring (``MemoryCache`` -> ``BaseCache``, ``reduce_response``
- and ``restore_response`` moved to ``BaseCache``)
- * ``connection`` option for ``MongoCache``
-
-
- 0.1.0 (2012-04-10)
- ++++++++++++++++++
-
- * initial PyPI release
-
-Keywords: requests,cache,persistence
-Platform: UNKNOWN
-Classifier: License :: OSI Approved :: BSD License
-Classifier: Development Status :: 4 - Beta
-Classifier: Intended Audience :: Developers
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
+Metadata-Version: 1.1
+Name: requests-cache
+Version: 0.4.13
+Summary: Persistent cache for requests library
+Home-page: https://github.com/reclosedev/requests-cache
+Author: Roman Haritonov
+Author-email: reclosedev at gmail.com
+License: BSD License
+Description: requests-cache
+ ---------------
+
+ Requests-cache is a transparent persistent cache for requests_ (version >= 1.1.0) library.
+
+ .. _requests: http://python-requests.org/
+
+ .. image:: https://travis-ci.org/reclosedev/requests-cache.svg?branch=master
+ :target: https://travis-ci.org/reclosedev/requests-cache
+
+ .. image:: https://coveralls.io/repos/reclosedev/requests-cache/badge.svg?branch=master&service=github
+ :target: https://coveralls.io/github/reclosedev/requests-cache?branch=master
+
+
+ Usage example
+ -------------
+
+ Just write:
+
+ .. code-block:: python
+
+ import requests
+ import requests_cache
+
+ requests_cache.install_cache('demo_cache')
+
+ And all responses with headers and cookies will be transparently cached to
+ `demo_cache.sqlite` database. For example, following code will take only
+ 1-2 seconds instead of 10, and will run instantly on next launch:
+
+ .. code-block:: python
+
+ for i in range(10):
+ requests.get('http://httpbin.org/delay/1')
+
+ It can be useful when you are creating some simple data scraper with constantly
+ changing parsing logic or data format, and don't want to redownload pages or
+ write complex error handling and persistence.
+
+ Note
+ ----
+
+ ``requests-cache`` ignores all cache headers, it just caches the data for the
+ time you specify.
+
+ If you need library which knows how to use HTTP headers and status codes,
+ take a look at `httpcache <https://github.com/Lukasa/httpcache>`_ and
+ `CacheControl <https://github.com/ionrock/cachecontrol>`_.
+
+ Links
+ -----
+
+ - **Documentation** at `readthedocs.org <https://requests-cache.readthedocs.io/>`_
+
+ - **Source code and issue tracking** at `GitHub <https://github.com/reclosedev/requests-cache>`_.
+
+ - **Working example** at `Real Python <https://realpython.com/blog/python/caching-external-api-requests>`_.
+
+
+ .. :changelog:
+
+ History
+ -------
+
+ 0.4.13 (2016-12-23)
+ +++++++++++++++++++
+ * Support PyMongo3, thanks to @craigls #72
+ * Fix streaming releate issue #68
+
+
+ 0.4.12 (2016-03-19)
+ +++++++++++++++++++
+ * Fix ability to pass backend instance in ``install_cache`` #61
+
+
+ 0.4.11 (2016-03-07)
+ +++++++++++++++++++
+ * ``ignore_parameters`` feature, thanks to @themiurgo and @YetAnotherNerd (#52, #55)
+ * More informative message for missing backend dependencies, thanks to @Garrett-R (#60)
+
+
+ 0.4.10 (2015-04-28)
+ +++++++++++++++++++
+ * Better transactional handling in sqlite #50, thanks to @rgant
+ * Compatibility with streaming in requests >= 2.6.x
+
+
+ 0.4.9 (2015-01-17)
+ ++++++++++++++++++
+
+ * ``expire_after`` now also accepts ``timedelta``, thanks to @femtotrader
+ * Added Ability to include headers to cache key (``include_get_headers`` option)
+ * Added string representation for ``CachedSession``
+
+
+ 0.4.8 (2014-12-13)
+ ++++++++++++++++++
+
+ * Fix bug in reading cached streaming response
+
+
+ 0.4.7 (2014-12-06)
+ ++++++++++++++++++
+
+ * Fix compatibility with Requests > 2.4.1 (json arg, response history)
+
+
+ 0.4.6 (2014-10-13)
+ ++++++++++++++++++
+
+ * Monkey patch now uses class instead lambda (compatibility with rauth)
+ * Normalize (sort) parameters passed as builtin dict
+
+
+ 0.4.5 (2014-08-22)
+ ++++++++++++++++++
+
+ * Requests==2.3.0 compatibility, thanks to @gwillem
+
+
+ 0.4.4 (2013-10-31)
+ ++++++++++++++++++
+
+ * Check for backend availability in install_cache(), not at the first request
+ * Default storage fallbacks to memory if ``sqlite`` is not available
+
+
+ 0.4.3 (2013-09-12)
+ ++++++++++++++++++
+
+ * Fix ``response.from_cache`` not set in hooks
+
+
+
+ 0.4.2 (2013-08-25)
+ ++++++++++++++++++
+
+ * Fix ``UnpickleableError`` for gzip responses
+
+
+
+ 0.4.1 (2013-08-19)
+ ++++++++++++++++++
+
+ * ``requests_cache.enabled()`` context manager
+ * Compatibility with Requests 1.2.3 cookies handling
+
+
+ 0.4.0 (2013-04-25)
+ ++++++++++++++++++
+
+ * Redis backend. Thanks to @michaelbeaumont
+ * Fix for changes in Requests 1.2.0 hooks dispatching
+
+
+ 0.3.0 (2013-02-24)
+ ++++++++++++++++++
+
+ * Support for ``Requests`` 1.x.x
+ * ``CachedSession``
+ * Many backward incompatible changes
+
+ 0.2.1 (2013-01-13)
+ ++++++++++++++++++
+
+ * Fix broken PyPi package
+
+ 0.2.0 (2013-01-12)
+ ++++++++++++++++++
+
+ * Last backward compatible version for ``Requests`` 0.14.2
+
+
+ 0.1.3 (2012-05-04)
+ ++++++++++++++++++
+
+ * Thread safety for default ``sqlite`` backend
+ * Take into account the POST parameters when cache is configured
+ with 'POST' in ``allowable_methods``
+
+
+ 0.1.2 (2012-05-02)
+ ++++++++++++++++++
+
+ * Reduce number of ``sqlite`` database write operations
+ * ``fast_save`` option for ``sqlite`` backend
+
+
+ 0.1.1 (2012-04-11)
+ ++++++++++++++++++
+
+ * Fix: restore responses from response.history
+ * Internal refactoring (``MemoryCache`` -> ``BaseCache``, ``reduce_response``
+ and ``restore_response`` moved to ``BaseCache``)
+ * ``connection`` option for ``MongoCache``
+
+
+ 0.1.0 (2012-04-10)
+ ++++++++++++++++++
+
+ * initial PyPI release
+
+Keywords: requests,cache,persistence
+Platform: UNKNOWN
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Development Status :: 4 - Beta
... 212 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-requests-cache.git
More information about the Python-modules-commits
mailing list