{ "info": { "author": "Sam et Max", "author_email": "lesametlemax@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "DEPRECATION WARNING\n====================\n\n.. WARNING::\n\n There is a much better lib than this one for the job: txrequests_ .\n\n You are now invited to use this instead.\n\n\nIf I have any improvements to make, I'll make them to txrequests and not here.\n\n\nTwisted adapter for the requests library\n============================================\n\nTiny add-on for the requests_ HTTP library so it can\nbe used transparently with Twisted_ by deferring blocking calls to threads.\n\nIt just wraps all requests in deferToThread, really.\n\nUsage:\n\n.. code-block:: python\n\n # To use requests with Twisted, you just need to use\n # a our requests.Session subclass manually.\n # See http://docs.python-requests.org/en/latest/user/advanced/\n # for some informations about the Session class.\n from requests_twisted import TwistedRequestsSession\n session = TwistedRequestsSession()\n\n # Then after, instead of doing requests.get|post|whatever(), you just do\n # session.get|post|whatever().\n # It returns a defer :\n defer = session.get('http://github.com/sametmax/')\n def print_status(response):\n print(response.url, response.status_code)\n\n # Which you just handle as you would usually do.\n defer.addCallback(print_status)\n\nThere are no changes to the request API, the only difference is the defer.\n\nIf you are doing a lot of requests, remember you can change the reactor thread pool by doing :\n\n.. code-block:: python\n\n from twisted.internet import reactor\n reactor.suggestThreadPoolSize(number_of_threads)\n\nThe default size of the thread pool depends on the reactor being used; the default reactor uses a minimum size of 5 and a maximum size of 10. Be careful that you understand threads and their resource usage before drastically altering the thread pool sizes.\n\nInstallation\n============\n\n pip install requests-twisted\n\nInformations\n============\n\nSupports : Python 2.7 (maybe 2.6, I didn't test it)\nLicence : Zlib\n\n.. _`requests`: https://github.com/kennethreitz/requests\n.. _`Twisted`: http://twistedmatrix.com\n.. _`txrequests`: https://pypi.python.org/pypi/txrequests", "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/sametmax/requests-twisted", "keywords": null, "license": "Zlib Licence", "maintainer": null, "maintainer_email": null, "name": "requests-twisted", "package_url": "https://pypi.org/project/requests-twisted/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/requests-twisted/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/sametmax/requests-twisted" }, "release_url": "https://pypi.org/project/requests-twisted/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Twisted adapter for the requests library.", "version": "0.1.2" }, "last_serial": 1409329, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "069eb47914113100231e4fd865aeaaaa", "sha256": "067ebbee5850b4b72f8c0482ba757debf7ca5b49b4f7d0d3fe44417083532054" }, "downloads": -1, "filename": "requests-twisted-0.1.tar.gz", "has_sig": false, "md5_digest": "069eb47914113100231e4fd865aeaaaa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3109, "upload_time": "2015-01-21T08:42:51", "url": "https://files.pythonhosted.org/packages/39/b3/05566838d0f5a72ad427c6e6f7498e1d88e644404ce3036938b80e6654f6/requests-twisted-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1c78f136f7d2b09f9165efe9cd27ed00", "sha256": "c7b6e38bee5a7322ba40e6a26f4bc1f1b2848195dbfa7d275e5042f6250e163c" }, "downloads": -1, "filename": "requests-twisted-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1c78f136f7d2b09f9165efe9cd27ed00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3120, "upload_time": "2015-01-21T09:47:43", "url": "https://files.pythonhosted.org/packages/ff/e0/4fd3c58f8ca55b7b615b5030bdc043fe35d583c5ecf3c4c380d949941240/requests-twisted-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d16b92730ba57df056652323c8351ea8", "sha256": "7e460d7fe85c0c576df7a805889dd83c146507d6644d51002c03ed3eb6c0a85b" }, "downloads": -1, "filename": "requests-twisted-0.1.2.tar.gz", "has_sig": false, "md5_digest": "d16b92730ba57df056652323c8351ea8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3322, "upload_time": "2015-02-04T12:04:58", "url": "https://files.pythonhosted.org/packages/22/39/83fc4b42962b0b201b9df7be85108f9d9a2982c8cf4f86b75eabeaf4d343/requests-twisted-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d16b92730ba57df056652323c8351ea8", "sha256": "7e460d7fe85c0c576df7a805889dd83c146507d6644d51002c03ed3eb6c0a85b" }, "downloads": -1, "filename": "requests-twisted-0.1.2.tar.gz", "has_sig": false, "md5_digest": "d16b92730ba57df056652323c8351ea8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3322, "upload_time": "2015-02-04T12:04:58", "url": "https://files.pythonhosted.org/packages/22/39/83fc4b42962b0b201b9df7be85108f9d9a2982c8cf4f86b75eabeaf4d343/requests-twisted-0.1.2.tar.gz" } ] }