{ "info": { "author": "Joe Gregorio", "author_email": "joe@bitworking.org", "bugtrack_url": null, "classifiers": [], "description": "Httplib2\n\n--------------------------------------------------------------------\nThis is a modified version of the original httplib2 library\nto support streaming of large http responses, instead of loading them \ninto memory as in the original library.\nSee CHANGELOG for more information.\n\nThe package can be installed throught pip:\n\n pip install streaming_httplib2\n\nA distributed cache class is available in dcache.py\nYou can use it to create multi-process or even multi-machines \nweb cache (using distributed file systems like GlusterFS).\n\n--------------------------------------------------------------------\nIntroduction\n\nA comprehensive HTTP client library, httplib2.py supports many \nfeatures left out of other HTTP libraries.\n\nHTTP and HTTPS\n HTTPS support is only available if the socket module was \n compiled with SSL support. \nKeep-Alive\n Supports HTTP 1.1 Keep-Alive, keeping the socket open and \n performing multiple requests over the same connection if \n possible. \nAuthentication\n The following three types of HTTP Authentication are \n supported. These can be used over both HTTP and HTTPS.\n\n * Digest\n * Basic\n * WSSE\n\nCaching\n The module can optionally operate with a private cache that \n understands the Cache-Control: header and uses both the ETag \n and Last-Modified cache validators. \nAll Methods\n The module can handle any HTTP request method, not just GET \n and POST.\nRedirects\n Automatically follows 3XX redirects on GETs.\nCompression\n Handles both 'deflate' and 'gzip' types of compression.\nLost update support\n Automatically adds back ETags into PUT requests to resources \n we have already cached. This implements Section 3.2 of \n Detecting the Lost Update Problem Using Unreserved Checkout.\nUnit Tested\n A large and growing set of unit tests. \n\n\nFor more information on this module, see:\n\n http://bitworking.org/projects/httplib2/\n\n\n--------------------------------------------------------------------\nInstallation\n\nThe httplib2 module is shipped as a distutils package. To install\nthe library, unpack the distribution archive, and issue the following\ncommand:\n\n $ python setup.py install\n\n\n--------------------------------------------------------------------\nUsage\nA simple retrieval:\n\n import httplib2\n h = httplib2.Http(\".cache\")\n (resp_headers, content) = h.request(\"http://example.org/\", \"GET\")\n\nThe 'content' is the content retrieved from the URL. The content \nis already decompressed or unzipped if necessary.\n\nTo PUT some content to a server that uses SSL and Basic authentication:\n\n import httplib2\n h = httplib2.Http(\".cache\")\n h.add_credentials('name', 'password')\n (resp, content) = h.request(\"https://example.org/chapter/2\", \n \"PUT\", body=\"This is text\", \n headers={'content-type':'text/plain'} )\n\nUse the Cache-Control: header to control how the caching operates.\n\n import httplib2\n h = httplib2.Http(\".cache\")\n (resp, content) = h.request(\"http://bitworking.org/\", \"GET\")\n ...\n (resp, content) = h.request(\"http://bitworking.org/\", \"GET\", \n headers={'cache-control':'no-cache'})\n\nThe first request will be cached and since this is a request \nto bitworking.org it will be set to be cached for two hours, \nbecause that is how I have my server configured. Any subsequent \nGET to that URI will return the value from the on-disk cache \nand no request will be made to the server. You can use the \nCache-Control: header to change the caches behavior and in \nthis example the second request adds the Cache-Control: \nheader with a value of 'no-cache' which tells the library \nthat the cached copy must not be used when handling this request. \n\n\n--------------------------------------------------------------------\nHttplib2 Software License\n\nCopyright (c) 2006 by Joe Gregorio\n\nPermission is hereby granted, free of charge, to any person \nobtaining a copy of this software and associated documentation \nfiles (the \"Software\"), to deal in the Software without restriction, \nincluding without limitation the rights to use, copy, modify, merge, \npublish, distribute, sublicense, and/or sell copies of the Software, \nand to permit persons to whom the Software is furnished to do so, \nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be \nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, \nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES \nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS \nBE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN \nACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN \nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE \nSOFTWARE.\n\n\n\n0.7.2 (streaming version)\n Changed behaviour to return file like object instead of strings for content.\n Changed cache to handle streaming too.\n\n0.7.1\n Fix failure to install cacerts.txt for 2.x installs.\n\n0.7.0\n The two major changes in this release are SSL Certificate\n checking and App Engine support. By default the certificates\n of an HTTPS connection are checked, but that can be disabled\n via disable_ssl_certificate_validation. The second change\n is that on App Engine there is a new connection object\n that utilizes the urlfetch capabilities on App Engine, including\n setting timeouts and validating certificates.\n\n The following issues have been addressed:\n\n Fixes issue 72. Always lowercase authorization header.\n Fix issue 47. Redirects that become a GET should not have a body.\n Fixes issue 19. Set Content-location on redirected HEAD requests\n Fixes issue 139. Redirect with a GET on 302 regardless of the originating method. \n Fixes issue 138. Handle unicode in headers when writing and retrieving cache entries. Who says headers have to be ASCII! \n Add certificate validation. Work initially started by Christoph Kern.\n Set a version number. Fixes issue # 135.\n Sync to latest version of socks.py\n Add gzip to the user-agent, in case we are making a request to an app engine project: http://code.google.com/appengine/kb/general.html#compression\n Uses a custom httplib shim on App Engine to wrap urlfetch, as opposed\n Add default support for optimistic concurrency on PATCH requests\n Fixes issue 126. IPv6 under various conditions would fail.\n Fixes issue 131. Handle socket.timeout's that occur during send.\n proxy support: degrade gracefully when socket.socket is unavailable\n\n\n0.6.0\n\n The following issues have been addressed:\n\n #51 - Failure to handle server legitimately closing connection before request body is fully sent\t\n #77 - Duplicated caching test\t \n #65 - Transform _normalize_headers into a method of Http class\n #45 - Vary header\t \n #73 - All files in Mercurial are executable\t \n #81 - Have a useful .hgignore\t \t \n #78 - Add release tags to the Mercurial repository\t\t \n #67 - HEAD requests cause next request to be retried\t \n\n Mostly bug fixes, the big enhancement is the addition of proper Vary: header\n handling. Thanks to Chris Dent for that change.\n\n The other big change is the build process for distributions so that both python2 and python3\n are included in the same .tar.gz/.zip file.\n\n0.5.0\n\n Added Python 3 support\n\n Fixed the following bugs:\n\n #12 - Cache-Control: only-if-cached incorrectly does request if item not in cache \n #39 - Deprecation warnings in Python 2.6\n #54 - Http.request fails accesing Google account via http proxy\n #56 - Block on response.read() for HEAD requests.\n #57 - Timeout ignore for Python 2.6\n #58 - Fixed parsing of Cache-Control: header to make it more robust\n\n Also fixed a deprecation warning that appeared between Python 3.0 and 3.1.\n\n0.4.0\n\n Added support for proxies if the Socksipy module is installed.\n\n Fixed bug with some HEAD responses having content-length set to \n zero incorrectly.\n\n Fixed most except's to catch a specific exception.\n\n Added 'connection_type' parameter to Http.request().\n \n The default for 'force_exception_to_status_code' was changed to False. Defaulting\n to True was causing quite a bit of confusion.\n\n\n0.3.0\n Calling Http.request() with a relative URI, as opposed to an absolute URI,\n will now throw a specific exception.\n\n Http() now has an additional optional parameter for the socket timeout.\n\n Exceptions can now be forced into responses. That is, instead of\n throwing an exception, a good httlib2.Response object is returned\n that describe the error with an appropriate status code.\n\n Many improvements to the file cache:\n\n 1. The names in the cache are now much less \n opaque, which should help with debugging.\n\n 2. The disk cache is now Apache mod_asis compatible. \n \n 3. A Content-Location: header is supplied and stored in the\n cache which points to the original requested URI.\n\n User supplied If-* headers now override httplib2 supplied\n versions.\n\n IRIs are now fully supported. Note that they MUST be passed in\n as unicode objects.\n\n Http.add_credentials() now takes an optional domain to restrict\n the credentials to being only used on that domain.\n\n Added Http.add_certificate() which allows setting \n a key and cert for SSL connnections.\n\n Many other bugs fixed.\n\n\n0.2.0\n Added support for Google Auth.\n\n Added experimental support for HMACDigest. \n\n Added support for a pluggable caching system. Now supports\n the old system of using the file system and now memcached.\n\n Added httplib2.debuglevel which turns on debugging. \n\n Change Response._previous to Response.previous.\n\n Addded Http.follow_all_redirects which forces\n httplib2 to follow all redirects, as opposed to \n following only the safe redirects. This makes the\n GData protocol easier to use.\n\n All known bugs fixed to date.\n\n0.1.1\n\n Fixed several bugs raised by James Antill:\n 1. HEAD didn't get an Accept: header added like GET.\n 2. HEAD requests did not use the cache.\n 3. GET requests with Range: headers would erroneously return a full cached response.\n 4. Subsequent requests to resources that had timed out would raise an exception.\n And one feature request for 'method' to default to GET.\n\n Xavier Verges Farrero supplied what I needed to make the \n library work with Python 2.3.\n\n I added distutils based setup.py.\n\n0.1 Rev 86 \n \n Initial Release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/madlag/streaming_httplib2", "keywords": "http streaming", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "streaming_httplib2", "package_url": "https://pypi.org/project/streaming_httplib2/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/streaming_httplib2/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/madlag/streaming_httplib2" }, "release_url": "https://pypi.org/project/streaming_httplib2/0.7.6/", "requires_dist": null, "requires_python": null, "summary": "A comprehensive HTTP client library modified to add response streaming support.", "version": "0.7.6" }, "last_serial": 800156, "releases": { "0.7.5": [ { "comment_text": "", "digests": { "md5": "6fc31f3306fa15e7220365ea7f71201d", "sha256": "68b1748140c5dd4d74fadd9630af6b1aafcfabac08ab7a02655e9f936c8c34f6" }, "downloads": -1, "filename": "streaming_httplib2-0.7.5.tar.gz", "has_sig": false, "md5_digest": "6fc31f3306fa15e7220365ea7f71201d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36093, "upload_time": "2012-03-26T16:05:07", "url": "https://files.pythonhosted.org/packages/45/9f/5b7f987067eba14b7a2b18247c0dabe545ac3739eb70527cac5a70c6f801/streaming_httplib2-0.7.5.tar.gz" } ], "0.7.6": [ { "comment_text": "", "digests": { "md5": "a0324f7e3b741c3c1cb5634baadd5a25", "sha256": "32aefc840163add76ded8dab9db552612671e48c5b8edef21790d43e10a8bd57" }, "downloads": -1, "filename": "streaming_httplib2-0.7.6.tar.gz", "has_sig": false, "md5_digest": "a0324f7e3b741c3c1cb5634baadd5a25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40269, "upload_time": "2012-11-20T10:46:02", "url": "https://files.pythonhosted.org/packages/b8/c7/d245ae7f719ef8233a2a9fe0332ce5bde6b1b48eb70e5a5dafb6e6f12f69/streaming_httplib2-0.7.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a0324f7e3b741c3c1cb5634baadd5a25", "sha256": "32aefc840163add76ded8dab9db552612671e48c5b8edef21790d43e10a8bd57" }, "downloads": -1, "filename": "streaming_httplib2-0.7.6.tar.gz", "has_sig": false, "md5_digest": "a0324f7e3b741c3c1cb5634baadd5a25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40269, "upload_time": "2012-11-20T10:46:02", "url": "https://files.pythonhosted.org/packages/b8/c7/d245ae7f719ef8233a2a9fe0332ce5bde6b1b48eb70e5a5dafb6e6f12f69/streaming_httplib2-0.7.6.tar.gz" } ] }