{ "info": { "author": "Ross McFarland", "author_email": "ross@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "asynchttp is an almost drop in replacement for httplib2 that provides\nasynchronous http request behavior.\n\nasynchttp uses python threading and Queues and provides callback mechanisms to\nallow de-serialization and process to happen in the background (worker threads)\nas well. You can queue up arbitrary numbers of requests and a specified maximum\nnumber of workers will process each request in turn.\n\nThere are two known differences between straight httplib2 and asynchttp:\n\n* exceptions are thrown when the response and/or content is accessed. since\n sending the request and receiving the response is happening in the background\n exceptions won't be thrown during the call to request.\n\n* content (returned from request) is an object rather than a plain string. This\n is required since the content isn't actually known until the background worker\n has completed the request, the returned content is a \"promise\" object of\n sorts. It defines a __str__ method that should in most cases cause the object\n to behave as required, but unfortunately there may be times when you have to\n str(content) to force it in to a string to get the desired behavior. (a side\n note, but content should really be a buffer/io object rather than a plain\n string in the first place.)\n\nExample\n=======\n\nA simple example making a single request (not that interesting)::\n\n >>> from asynchttp import Http\n >>> http = Http()\n >>> url = 'http://proximobus.appspot.com/agencies.json'\n >>> response, content = http.request(url)\n # http.request will return immediately and response and content will be\n # \"promise\" objects that will block (if necessary) when accessed. you\n # could/should continue to do other work or send off more requests here and\n # when you're ready...\n >>> print response.status\n 200\n # if the request had already completed in the background the status code\n # would immediately print. if not the script would block until the work had\n # completed and then print.\n\nSee the examples directory for more detailed/interesting examples.\n\nLogging\n=======\n\nAsynchronous code can be a pain to debug so asynchttp is pretty aggressive when\nit comes to logging. If you're trying to track things down your best bet is\nprobably to turn on debug logging, at least for the asynchttp logger, and to use\na format that includes the the time and thread id or name.\n\nAdding the following snippet to your app should do the trick::\n\n import logging\n\n fmt = '%(asctime)s %(thread)d %(name)s %(levelname)-8s %(message)s'\n logging.basicConfig(level=DEBUG, format=format)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ross/python-asynchttp", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "asynchttp", "package_url": "https://pypi.org/project/asynchttp/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/asynchttp/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/ross/python-asynchttp" }, "release_url": "https://pypi.org/project/asynchttp/0.0.4/", "requires_dist": null, "requires_python": null, "summary": "A simple httplib2 based asynchronous HTTP library for python", "version": "0.0.4" }, "last_serial": 786536, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "04be11cfb1df5fb0c5cfe0416484c5bf", "sha256": "4e0bc063294f417c914990bc8d72b4ca7271f7c0c2aa438459cabfef51cc1388" }, "downloads": -1, "filename": "asynchttp-0.0.3-py2.7.egg", "has_sig": true, "md5_digest": "04be11cfb1df5fb0c5cfe0416484c5bf", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 8109, "upload_time": "2011-08-31T05:35:51", "url": "https://files.pythonhosted.org/packages/7c/36/10e91c5ac98e7df88efd821f3c4a92ca175e57984855009a740bb6283c9c/asynchttp-0.0.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "7a3c1d85814b3a8154bee692eec4469c", "sha256": "d39a795b13b6cb085b8c603208d52b11907437aac5be436321d0b2667b38ceae" }, "downloads": -1, "filename": "asynchttp-0.0.3.tar.gz", "has_sig": true, "md5_digest": "7a3c1d85814b3a8154bee692eec4469c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4536, "upload_time": "2011-08-31T05:35:47", "url": "https://files.pythonhosted.org/packages/70/12/639a24777377c285fc3e3ee8b56aee075ea31175a237f6a52102244f895a/asynchttp-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "a5ffa9536948d02eb8e560e2115b76b3", "sha256": "92f375f935790ab641508bb6285163ffd89cf528095cc93d99ee253a86086a84" }, "downloads": -1, "filename": "asynchttp-0.0.4.tar.gz", "has_sig": false, "md5_digest": "a5ffa9536948d02eb8e560e2115b76b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4596, "upload_time": "2011-10-28T04:48:56", "url": "https://files.pythonhosted.org/packages/f6/a0/dd8f751c63b0484f0680fb7444184c953c2150b1fdbd948d6f29cb6d194c/asynchttp-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a5ffa9536948d02eb8e560e2115b76b3", "sha256": "92f375f935790ab641508bb6285163ffd89cf528095cc93d99ee253a86086a84" }, "downloads": -1, "filename": "asynchttp-0.0.4.tar.gz", "has_sig": false, "md5_digest": "a5ffa9536948d02eb8e560e2115b76b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4596, "upload_time": "2011-10-28T04:48:56", "url": "https://files.pythonhosted.org/packages/f6/a0/dd8f751c63b0484f0680fb7444184c953c2150b1fdbd948d6f29cb6d194c/asynchttp-0.0.4.tar.gz" } ] }