{ "info": { "author": "financial", "author_email": "1012593988@qq.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation", "Topic :: Software Development :: Libraries" ], "description": "async-request\n=============\n\nA lightweight network request framework based on requests & asyncio\n\ninstall\n-------\n\n```bash\npip install async_request\n```\n\nusage\n-----\n```python\nfrom async_request import Request, crawl\n\n\ndef parse_baidu(response):\n print(response.url, response.status_code)\n yield Request('https://cn.bing.com/', callback=parse_bing)\n\n\ndef parse_bing(response):\n print(response.url, response.status_code)\n print(response.xpath('//a/@href').get())\n yield Request('https://github.com/financialfly/async-request', callback=parse_github)\n\n\ndef parse_github(response):\n print(response.url, response.status_code)\n yield {'hello': 'github'}\n\n\ndef process_result(result):\n print(result)\n\n\nif __name__ == '__main__':\n request_list = [Request(url='https://www.google.com', callback=parse_baidu)]\n crawl(request_list, result_callback=process_result)\n```\nAnd you'll see the result like this:\n```\nhttps://www.baidu.com/ 200\nhttps://cn.bing.com/ 200\njavascript:void(0)\nhttps://github.com/financialfly/async-request 200\n{'hello': 'github'}\n```\n\ntest\n----\nUse `fetch` function to get a response immediately:\n```python\nfrom async_request import fetch\n\ndef parse():\n response = fetch('https://www.bing.com')\n print(response)\n \n \nif __name__ == '__main__':\n parse()\n```\nthe output will like this:\n```\n\n```\n\nUse the `test` decorator is also a method to test spider:\n```python\nimport async_request as ar\n\n\n@ar.test('https://www.baidu.com')\ndef parse(response):\n print(response.url, response.status_code)\n \n \nif __name__ == '__main__':\n parse()\n```\nthen run the script, you will see the result:\n```\nhttps://www.baidu.com/ 200\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/financialfly/async-request", "keywords": "", "license": "BSD License", "maintainer": "financial", "maintainer_email": "1012593988@qq.com", "name": "async-request", "package_url": "https://pypi.org/project/async-request/", "platform": "all", "project_url": "https://pypi.org/project/async-request/", "project_urls": { "Homepage": "https://github.com/financialfly/async-request" }, "release_url": "https://pypi.org/project/async-request/0.1623/", "requires_dist": null, "requires_python": "", "summary": "A lightweight network request framework", "version": "0.1623" }, "last_serial": 5769912, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "81f438fa59ab43e99062a8709e0d308d", "sha256": "e31c918cc72a5140db3abbfb3f404a468dc52d2b42bc5d88d454d715b8a48463" }, "downloads": -1, "filename": "async-request-0.1.tar.gz", "has_sig": false, "md5_digest": "81f438fa59ab43e99062a8709e0d308d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3676, "upload_time": "2019-05-16T06:00:19", "url": "https://files.pythonhosted.org/packages/1d/3b/d22d667493e56582d92c53fd22374f6e45fe9fa13ce9365872a6ec4015ae/async-request-0.1.tar.gz" } ], "0.14": [ { "comment_text": "", "digests": { "md5": "2e7ff925ec52102e63296f64716a42ae", "sha256": "28f8807168745bbeb386aa8b8f60efb489326c940df2df106ad055125911e5b8" }, "downloads": -1, "filename": "async-request-0.14.tar.gz", "has_sig": false, "md5_digest": "2e7ff925ec52102e63296f64716a42ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3674, "upload_time": "2019-05-16T06:02:35", "url": "https://files.pythonhosted.org/packages/de/df/f9adbeb0424c41ffad2c6b5f305045f557fc3eec7f1b960acd6ee8d3cf66/async-request-0.14.tar.gz" } ], "0.141": [ { "comment_text": "", "digests": { "md5": "abb257554759c6ee1ebb2b4458a28714", "sha256": "30d17a37561ec5db32654735868b2393621967c216f80c739f435d33d88d2f9c" }, "downloads": -1, "filename": "async-request-0.141.tar.gz", "has_sig": false, "md5_digest": "abb257554759c6ee1ebb2b4458a28714", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3918, "upload_time": "2019-05-16T07:13:32", "url": "https://files.pythonhosted.org/packages/49/f9/e00c7d381e0ef5d42748cdf31ab0df34a5cf2fa6944dce0f064dc6bb633b/async-request-0.141.tar.gz" } ], "0.15": [ { "comment_text": "", "digests": { "md5": "63b64c39abee80007c3ef400f6386906", "sha256": "a0afa05e25a89c9c3c9fadd02607e639bfc713d155a954f0f251786d1e265eec" }, "downloads": -1, "filename": "async-request-0.15.tar.gz", "has_sig": false, "md5_digest": "63b64c39abee80007c3ef400f6386906", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3911, "upload_time": "2019-05-16T07:18:10", "url": "https://files.pythonhosted.org/packages/4d/fa/3d744b0e1f5de9f06e028c60872ddcfc7c891803fc61a81ac80282d54851/async-request-0.15.tar.gz" } ], "0.151": [ { "comment_text": "", "digests": { "md5": "d9633b46f688e1cccde3400727c1b601", "sha256": "efd83cd17522ca00c21a8814e65807630fbb21f3ecf019cfcc227337baea380d" }, "downloads": -1, "filename": "async-request-0.151.tar.gz", "has_sig": false, "md5_digest": "d9633b46f688e1cccde3400727c1b601", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3897, "upload_time": "2019-05-16T07:23:00", "url": "https://files.pythonhosted.org/packages/65/12/2580eba4a8017408e8622df28301306edf2372b53fcbd6700d15ee235d9a/async-request-0.151.tar.gz" } ], "0.152": [ { "comment_text": "", "digests": { "md5": "15fae876267bdf068be9a5fe2a3d56fc", "sha256": "6ca71c3a2bd6a79789f8d6fbdfd846d2297551ef7219e109632eef0d5a6c5071" }, "downloads": -1, "filename": "async-request-0.152.tar.gz", "has_sig": false, "md5_digest": "15fae876267bdf068be9a5fe2a3d56fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3905, "upload_time": "2019-05-16T07:28:57", "url": "https://files.pythonhosted.org/packages/88/ac/b28d97046499c0bb81255e08c1f2943c801a9d659fec19364364ca1e5bae/async-request-0.152.tar.gz" } ], "0.153": [ { "comment_text": "", "digests": { "md5": "150f952cd5aad1c60a419298eaf94c08", "sha256": "24b06949fc93a2dbceb1ca90140f219ef88df0323a519f8bd07af9a33e3f12e4" }, "downloads": -1, "filename": "async-request-0.153.tar.gz", "has_sig": false, "md5_digest": "150f952cd5aad1c60a419298eaf94c08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3913, "upload_time": "2019-05-16T09:25:25", "url": "https://files.pythonhosted.org/packages/4b/90/29b6f7a443b4846b5eded7cd5fb9adb6e35ce9ace416a422415239f3a537/async-request-0.153.tar.gz" } ], "0.154": [ { "comment_text": "", "digests": { "md5": "9a4c157e06c680ebe7e31acdd2ce74d0", "sha256": "46ac6a9669a501e056b2b33b0c03bf11a7a0788c578080600af504f5105a95d9" }, "downloads": -1, "filename": "async-request-0.154.tar.gz", "has_sig": false, "md5_digest": "9a4c157e06c680ebe7e31acdd2ce74d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3697, "upload_time": "2019-05-17T01:55:51", "url": "https://files.pythonhosted.org/packages/89/05/e9d234f6b30df4efbcafe3adb053080b8d03ec704565d088c8cc26e61343/async-request-0.154.tar.gz" } ], "0.155": [ { "comment_text": "", "digests": { "md5": "e7c9c7fca98c503de813b10f072fd518", "sha256": "e6a6ef415b247ed8997331b854fd8686485580fe6b861146ffb1c36773845724" }, "downloads": -1, "filename": "async-request-0.155.tar.gz", "has_sig": false, "md5_digest": "e7c9c7fca98c503de813b10f072fd518", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3701, "upload_time": "2019-05-17T02:19:25", "url": "https://files.pythonhosted.org/packages/b5/f3/eae8b31b6b8f6a7f84065e3ffbf527e4bdf80174ceed3baca2ec31db307c/async-request-0.155.tar.gz" } ], "0.156": [ { "comment_text": "", "digests": { "md5": "6902bb7d19f45aaec2b102185c871643", "sha256": "22f6742e286dffaacaa11ffb3009afcff646cd236da812202e3577f4f29922af" }, "downloads": -1, "filename": "async-request-0.156.tar.gz", "has_sig": false, "md5_digest": "6902bb7d19f45aaec2b102185c871643", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4004, "upload_time": "2019-06-21T04:30:45", "url": "https://files.pythonhosted.org/packages/e0/2a/4e8ff479ae79916f262992e510e6d09f5fbf9b74612046192fa40b002c32/async-request-0.156.tar.gz" } ], "0.157": [ { "comment_text": "", "digests": { "md5": "91826ccfeac4c6a22a428e0355b283b3", "sha256": "362a76bce5ae27c834e48b2f959ebfdd539a7a023b31f298aad7ac372997b733" }, "downloads": -1, "filename": "async-request-0.157.tar.gz", "has_sig": false, "md5_digest": "91826ccfeac4c6a22a428e0355b283b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4040, "upload_time": "2019-06-21T04:45:19", "url": "https://files.pythonhosted.org/packages/a9/ec/630f978b8bb4f662042e998891c1fca6e9f72ce9b681d5faf6a6875b4293/async-request-0.157.tar.gz" } ], "0.158": [ { "comment_text": "", "digests": { "md5": "361fc0b2181ad7fc0d5e7d31646742b0", "sha256": "2718d0b7dc6d5d449b6b5e99aab7b86a511986565936b830a66946385d81015a" }, "downloads": -1, "filename": "async-request-0.158.tar.gz", "has_sig": false, "md5_digest": "361fc0b2181ad7fc0d5e7d31646742b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4104, "upload_time": "2019-06-21T07:38:47", "url": "https://files.pythonhosted.org/packages/78/ff/11b42cdd3efbec0e1652c4f98f491f37e2ae43cc57c1d999b44875c30275/async-request-0.158.tar.gz" } ], "0.159": [ { "comment_text": "", "digests": { "md5": "8a33a8113c3cdf35a5535135fd174b1a", "sha256": "9b4863fb6dfee19b7880a1949af18a3fdf9aa1b34f93490246d11d2a36259e63" }, "downloads": -1, "filename": "async-request-0.159.tar.gz", "has_sig": false, "md5_digest": "8a33a8113c3cdf35a5535135fd174b1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4392, "upload_time": "2019-06-24T06:27:28", "url": "https://files.pythonhosted.org/packages/bd/e6/0f2057ca51a908ceefc6ecdd335ad13f7523d801477695c6671461d2f363/async-request-0.159.tar.gz" } ], "0.16": [ { "comment_text": "", "digests": { "md5": "6af8954b28f58dac5683f3c8170c18e6", "sha256": "4d64fa850173e510db2ab3464646f57f49ef594bebe4011fe24839996042ce01" }, "downloads": -1, "filename": "async-request-0.16.tar.gz", "has_sig": false, "md5_digest": "6af8954b28f58dac5683f3c8170c18e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4528, "upload_time": "2019-07-09T03:10:08", "url": "https://files.pythonhosted.org/packages/f9/f4/44176ea074131b22f1d975ce373b13a57d9ebad9c65af024ad23f9bdba1b/async-request-0.16.tar.gz" } ], "0.161": [ { "comment_text": "", "digests": { "md5": "118d79295646a996cb169ab18fbec3fc", "sha256": "04481162ef8973e04e7a93a35617898b41c9b54fce916319c057c43459c9a7ec" }, "downloads": -1, "filename": "async-request-0.161.tar.gz", "has_sig": false, "md5_digest": "118d79295646a996cb169ab18fbec3fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4345, "upload_time": "2019-07-26T01:36:18", "url": "https://files.pythonhosted.org/packages/f5/3d/332c9320719a02268acb9a44d37a0c8f817e885c9df10e443f8e5e86ef9f/async-request-0.161.tar.gz" } ], "0.1612": [ { "comment_text": "", "digests": { "md5": "febe6c845c0e5bad82e1478f2f88f924", "sha256": "2c2b0cff01aa8a3101ef533d5943e09e997b3d5832a9d4be5e576b4fa76a71f1" }, "downloads": -1, "filename": "async-request-0.1612.tar.gz", "has_sig": false, "md5_digest": "febe6c845c0e5bad82e1478f2f88f924", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4404, "upload_time": "2019-07-26T01:55:39", "url": "https://files.pythonhosted.org/packages/eb/7e/60da1e3567757b2376d06bc442c2b8b3cb4bc86d06e57ac977962ac8e398/async-request-0.1612.tar.gz" } ], "0.1613": [ { "comment_text": "", "digests": { "md5": "357a2255e08d7fea07dce6314fea3464", "sha256": "a643e386279f087829a92361fb5facb37404dff1439e463cabd4a29c8101a889" }, "downloads": -1, "filename": "async-request-0.1613.tar.gz", "has_sig": false, "md5_digest": "357a2255e08d7fea07dce6314fea3464", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4736, "upload_time": "2019-08-05T07:00:01", "url": "https://files.pythonhosted.org/packages/08/ed/6641787eb12258f660ba33b4ecc441e2a1689e9f550eca5497306373812e/async-request-0.1613.tar.gz" } ], "0.1614": [ { "comment_text": "", "digests": { "md5": "98f43c6ae2910eb698e540a9355e4c32", "sha256": "478d912d294b63cc2fa1b06e13ffd3655228bbb9d1de98fd10265a0c4058ad63" }, "downloads": -1, "filename": "async-request-0.1614.tar.gz", "has_sig": false, "md5_digest": "98f43c6ae2910eb698e540a9355e4c32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4757, "upload_time": "2019-08-05T07:28:49", "url": "https://files.pythonhosted.org/packages/c9/99/c13c747f092123ce5906f8be854f7c654745b3e3e067f8e1361e0912bce0/async-request-0.1614.tar.gz" } ], "0.1615": [ { "comment_text": "", "digests": { "md5": "6950992f73f891b3bf7849a44d82fa43", "sha256": "e2208907c475017f39cb0f4bf093fbb5fc27707b594709cbe1c975673d554b0a" }, "downloads": -1, "filename": "async-request-0.1615.tar.gz", "has_sig": false, "md5_digest": "6950992f73f891b3bf7849a44d82fa43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4849, "upload_time": "2019-08-11T03:29:00", "url": "https://files.pythonhosted.org/packages/67/4d/631926d43cb194d0977f97fe489223961072d4ee42cd61f626551d4a7a93/async-request-0.1615.tar.gz" } ], "0.1616": [ { "comment_text": "", "digests": { "md5": "c3c2ab8083a1e9820d6ec79638cd2a94", "sha256": "bc3cb28090041a7c6f544bd2f54e49f7a48a66b5ca54940c52a1acf2d8af4a5f" }, "downloads": -1, "filename": "async-request-0.1616.tar.gz", "has_sig": false, "md5_digest": "c3c2ab8083a1e9820d6ec79638cd2a94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4857, "upload_time": "2019-08-11T03:36:40", "url": "https://files.pythonhosted.org/packages/20/95/0aa5110331c791b58ab7696b876b2d1eca42d51ad47196b752a72182b707/async-request-0.1616.tar.gz" } ], "0.1617": [ { "comment_text": "", "digests": { "md5": "f1a41fa46b26e4fea12aa7526d698d68", "sha256": "6a433c95edf7843817bdcb6605ed6fbd3cb8b561b53e6a245d999466723967ff" }, "downloads": -1, "filename": "async-request-0.1617.tar.gz", "has_sig": false, "md5_digest": "f1a41fa46b26e4fea12aa7526d698d68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5033, "upload_time": "2019-08-11T04:40:25", "url": "https://files.pythonhosted.org/packages/ef/e8/e3870ea96807482822e5804662426a6642c65627f2623507af17b88b8693/async-request-0.1617.tar.gz" } ], "0.1618": [ { "comment_text": "", "digests": { "md5": "3ce5e366fe103876482d02afb0b1b64f", "sha256": "597df420817b410c2c10707f40155d1d3717c48a18a54a5a9d63c703ed9bbe85" }, "downloads": -1, "filename": "async-request-0.1618.tar.gz", "has_sig": false, "md5_digest": "3ce5e366fe103876482d02afb0b1b64f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5115, "upload_time": "2019-08-11T08:01:20", "url": "https://files.pythonhosted.org/packages/0a/74/8863935a1f8643dcb5deca1d4c02b780e47e92d733d629fcfecca0eddc58/async-request-0.1618.tar.gz" } ], "0.1619": [ { "comment_text": "", "digests": { "md5": "97f155ac95cf7cb934a7236ea1db0946", "sha256": "ef1536ee83db8b281478db445b9848b30607f9386b34a260b800d3de2eb1b5d2" }, "downloads": -1, "filename": "async-request-0.1619.tar.gz", "has_sig": false, "md5_digest": "97f155ac95cf7cb934a7236ea1db0946", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5120, "upload_time": "2019-08-11T08:40:32", "url": "https://files.pythonhosted.org/packages/45/18/a0ad064588435daef2e4d533ff8bddde02e44c4418bd9b235c9da6685d81/async-request-0.1619.tar.gz" } ], "0.162": [ { "comment_text": "", "digests": { "md5": "2a99a0c550cb5c96a0b2854b8eeaa1d0", "sha256": "ed27cf2226fec63927cb057b9167816ad712cdc4d5c1730572b7d5496c95e010" }, "downloads": -1, "filename": "async-request-0.162.tar.gz", "has_sig": false, "md5_digest": "2a99a0c550cb5c96a0b2854b8eeaa1d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5206, "upload_time": "2019-08-11T13:20:08", "url": "https://files.pythonhosted.org/packages/6b/ab/6b984bd460a3c915f2a871725593ffd523e439cd9d6da534e5a65fa4e55b/async-request-0.162.tar.gz" } ], "0.1621": [ { "comment_text": "", "digests": { "md5": "3ac8cc03626954b066615e0eb67ec4d8", "sha256": "df96e717ff4db288b2fa45229a28ee32f4ee519b87918d7de583fe739c6320a1" }, "downloads": -1, "filename": "async-request-0.1621.tar.gz", "has_sig": false, "md5_digest": "3ac8cc03626954b066615e0eb67ec4d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5401, "upload_time": "2019-08-12T03:12:10", "url": "https://files.pythonhosted.org/packages/03/07/de2f23e665c537f65eba68e8a05034d0ef6878885f59b5ad0be4be06ea6e/async-request-0.1621.tar.gz" } ], "0.1622": [ { "comment_text": "", "digests": { "md5": "db06aa513588dc826172eaa29fe235be", "sha256": "4a1769ef8177f4ae3e059dd75ef5c4377a32d9e916c8d8c6681ffba82719d779" }, "downloads": -1, "filename": "async-request-0.1622.tar.gz", "has_sig": false, "md5_digest": "db06aa513588dc826172eaa29fe235be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5462, "upload_time": "2019-08-13T12:51:36", "url": "https://files.pythonhosted.org/packages/d5/01/9050231ab4dc0b400750879e4231014e7a08bbad82ce6537d3c87ba04353/async-request-0.1622.tar.gz" } ], "0.1623": [ { "comment_text": "", "digests": { "md5": "daef022085fcb232df18608f741ea5a9", "sha256": "29b45da168564d479d4193b4708d71456839b970a62d1a1f82c511c0bb9d5458" }, "downloads": -1, "filename": "async-request-0.1623.tar.gz", "has_sig": false, "md5_digest": "daef022085fcb232df18608f741ea5a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5276, "upload_time": "2019-09-02T09:33:30", "url": "https://files.pythonhosted.org/packages/26/25/f350709fbcaddd2348034ae7e2ef04100f7991d748de79b18ed935e4fbd2/async-request-0.1623.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "daef022085fcb232df18608f741ea5a9", "sha256": "29b45da168564d479d4193b4708d71456839b970a62d1a1f82c511c0bb9d5458" }, "downloads": -1, "filename": "async-request-0.1623.tar.gz", "has_sig": false, "md5_digest": "daef022085fcb232df18608f741ea5a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5276, "upload_time": "2019-09-02T09:33:30", "url": "https://files.pythonhosted.org/packages/26/25/f350709fbcaddd2348034ae7e2ef04100f7991d748de79b18ed935e4fbd2/async-request-0.1623.tar.gz" } ] }