{ "info": { "author": "ahuigo", "author_email": "nobody@qq.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Ahui-aiohttp-server\n[![](https://img.shields.io/pypi/pyversions/ahui_aiohttp_server.svg?longCache=True)](https://pypi.org/pypi/ahui_aiohttp_server/)\n[![](https://img.shields.io/pypi/v/ahui_aiohttp_server.svg?maxAge=36000)](https://pypi.org/pypi/ahui_aiohttp_server/)\n\nThis is a simple http async server which extends `python -m http.server`.\\\n(WARN: It's not recommended for production environments, just use it in development or testing environments only!):\n- Support print to http response directly (same as php's echo)\n- Support async-await\n- Support php, python\n\n## Install\n\n pip install ahui-aiohttp-server\n pip3 install ahui-aiohttp-server\n\n## Start server\n\n $ tree .\n ./\n app/\n echo1.py\n echo2.py\n echo.php\n return.py\n js/\n test.js\n $ python -m ahui_aiohttp_server\n $ python -m ahui_aiohttp_server --host 127.0.0.1 --port 5000\n\n## Access server\n\n### Access via echo server(php-like):\n\n $ cat app/echo1.py\n print('Hello World!')\n\n $ curl http://127.0.0.1:5000/app/echo1.py\n Hello World!\n $ curl http://127.0.0.1:5000/js/test.js\n \n $ curl http://127.0.0.1:5000/app/echo.php\n \n\nIf you want to get request data(such as: `get, post, cookie, ...`, use `aiohttp_handler(request)` instead:\n\n $ cat app/echo2.py\n def aiohttp_handler(request):\n print(request.query) # use print \n\n $ curl http://127.0.0.1:5000/app/echo2.py?var=value\n {'var':'value'}\n\n### Access via normal aiohttp server:\n\n $ cat app/return.py\n from aiohttp import web\n async def aiohttp_handler(request):\n data = await request.post()\n return web.Response(body=str(data)) # use return\n\n $ curl http://127.0.0.1:5000/app/return.py?var=value - 'k1=v2'\n {'k1':'v2'}\n\n### Access static file:\n\n $ curl http://127.0.0.1:5000/js/test.js\n \n\n## Required\n1. aiohttp\n2. python>=3.6\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ahuigo/ahui-aiohttp-server", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ahui_aiohttp_server", "package_url": "https://pypi.org/project/ahui_aiohttp_server/", "platform": "", "project_url": "https://pypi.org/project/ahui_aiohttp_server/", "project_urls": { "Homepage": "http://github.com/ahuigo/ahui-aiohttp-server" }, "release_url": "https://pypi.org/project/ahui_aiohttp_server/0.1.16/", "requires_dist": [ "aiohttp" ], "requires_python": ">=3.5.3", "summary": "Simple aiohttp Server for both static and python/php file", "version": "0.1.16" }, "last_serial": 4140035, "releases": { "0.1.11": [ { "comment_text": "", "digests": { "md5": "4660e820614549bd9f7e711d77380126", "sha256": "75cef8f9e25bb217e7e38eb1bd909ff07d959eadbc9cc1bf56cd533c6a4b36a8" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.11-py3-none-any.whl", "has_sig": false, "md5_digest": "4660e820614549bd9f7e711d77380126", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3", "size": 2935, "upload_time": "2018-07-19T12:14:59", "url": "https://files.pythonhosted.org/packages/cf/61/10938bfc745a70752ca371d89bdc2f6f51278120c59b916c874bf2bfdce9/ahui_aiohttp_server-0.1.11-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27fdfbd21b817c9be1f50b816e206169", "sha256": "3d02687c125d79f264fe78dc83f91e2bfd955a819dbb5c7355a19db11fe90688" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.11.tar.gz", "has_sig": false, "md5_digest": "27fdfbd21b817c9be1f50b816e206169", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 2729, "upload_time": "2018-07-19T12:15:00", "url": "https://files.pythonhosted.org/packages/56/d6/c09c4140f795faf667db580c20633cf2139862511e6973dbf0467aa48821/ahui_aiohttp_server-0.1.11.tar.gz" } ], "0.1.12": [ { "comment_text": "", "digests": { "md5": "c075a43a2f87a3061a9ac4f544da3b2b", "sha256": "e159bad631dfb074914e14084cdd7ec4b639a812e9ac053b7ede99a06aade08a" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.12-py3-none-any.whl", "has_sig": false, "md5_digest": "c075a43a2f87a3061a9ac4f544da3b2b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3", "size": 3028, "upload_time": "2018-07-23T23:42:42", "url": "https://files.pythonhosted.org/packages/64/29/8feb3b7a217099f5ff41765f59a429a3043d3f8e0a78109ce035ea239648/ahui_aiohttp_server-0.1.12-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e50f7231f7ea0569c2bd0ed80800d979", "sha256": "f60c1aff52128a9bda612d89751af5e4a4d571910d67eed29c536cff3a0dfc53" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.12.tar.gz", "has_sig": false, "md5_digest": "e50f7231f7ea0569c2bd0ed80800d979", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 2934, "upload_time": "2018-07-23T23:42:44", "url": "https://files.pythonhosted.org/packages/16/57/c18aa49e8dda7993699714950d5bf96d78d294b80cdfd0ab5d83cb26d288/ahui_aiohttp_server-0.1.12.tar.gz" } ], "0.1.13": [ { "comment_text": "", "digests": { "md5": "b067cf489e2c1fd789071e66babd7406", "sha256": "01e0f2c71a1c17969c6af073663b121c26030327d5b6d747d28c34dec5142aa3" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.13-py3-none-any.whl", "has_sig": false, "md5_digest": "b067cf489e2c1fd789071e66babd7406", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3", "size": 3116, "upload_time": "2018-07-24T00:24:32", "url": "https://files.pythonhosted.org/packages/d1/26/c2c324875c87a30b48fdc179543311a0b39d3fb881aaf9d27b67bf8d7fca/ahui_aiohttp_server-0.1.13-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df86afc842bdd6501f9e8404192db4e7", "sha256": "fd1a32926f0d8c64405cd98e14dbf91130886cd1d9e39465f462a4471cd77209" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.13.tar.gz", "has_sig": false, "md5_digest": "df86afc842bdd6501f9e8404192db4e7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 3058, "upload_time": "2018-07-24T00:24:34", "url": "https://files.pythonhosted.org/packages/ac/fc/867f0e6daa78a17cec31637a3f96e910b1651608f3fce9bc6ad804f1384a/ahui_aiohttp_server-0.1.13.tar.gz" } ], "0.1.15": [ { "comment_text": "", "digests": { "md5": "e6789d0e541f35f49ccbcb28cfb43857", "sha256": "7f70ba55e3733afbedd824e949de5c4dc971b5c8774d6d0caac45fa91390ef1b" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.15-py3-none-any.whl", "has_sig": false, "md5_digest": "e6789d0e541f35f49ccbcb28cfb43857", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3", "size": 3205, "upload_time": "2018-08-02T07:25:46", "url": "https://files.pythonhosted.org/packages/22/61/c6f4445d536c2b10f28d9366e933b8856b447df625f8c887a55cc48d7721/ahui_aiohttp_server-0.1.15-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d105aedd92d3e8c633590a8a2c6b3a71", "sha256": "6a4b9bb9926f7fcd190cfb0ba7a1890740529a9030aa93d12a2bc6c0f2e40e86" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.15.tar.gz", "has_sig": false, "md5_digest": "d105aedd92d3e8c633590a8a2c6b3a71", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 3121, "upload_time": "2018-08-02T07:25:47", "url": "https://files.pythonhosted.org/packages/ff/42/5da069502e0b5c4d0d6b9f85e2dc44d00792d2f27e2ccd229a27fd618981/ahui_aiohttp_server-0.1.15.tar.gz" } ], "0.1.16": [ { "comment_text": "", "digests": { "md5": "95caf1da45c1da0ace2c96d45260fead", "sha256": "f20de21c582cacb4a82da4cc89700efdd265d4fef216d39866d3c4c9f06aa8b6" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.16-py3-none-any.whl", "has_sig": false, "md5_digest": "95caf1da45c1da0ace2c96d45260fead", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3", "size": 3254, "upload_time": "2018-08-06T11:56:07", "url": "https://files.pythonhosted.org/packages/4b/81/088b78014828b250d3874e10c90c158166b82a495568b5fd12f9e312b010/ahui_aiohttp_server-0.1.16-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "561892c2db8a5a41cac6bc8ca9fd31c6", "sha256": "fb61a19d054b07c4569dcea1d285624c5960e0caee2041a16ad4059d23876328" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.16.tar.gz", "has_sig": false, "md5_digest": "561892c2db8a5a41cac6bc8ca9fd31c6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 3177, "upload_time": "2018-08-06T11:56:08", "url": "https://files.pythonhosted.org/packages/86/b9/1750cf3a1b4a82a47685c1f4d1c759a04db4e68fc81e6032e74d9a67a0a9/ahui_aiohttp_server-0.1.16.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "95caf1da45c1da0ace2c96d45260fead", "sha256": "f20de21c582cacb4a82da4cc89700efdd265d4fef216d39866d3c4c9f06aa8b6" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.16-py3-none-any.whl", "has_sig": false, "md5_digest": "95caf1da45c1da0ace2c96d45260fead", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3", "size": 3254, "upload_time": "2018-08-06T11:56:07", "url": "https://files.pythonhosted.org/packages/4b/81/088b78014828b250d3874e10c90c158166b82a495568b5fd12f9e312b010/ahui_aiohttp_server-0.1.16-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "561892c2db8a5a41cac6bc8ca9fd31c6", "sha256": "fb61a19d054b07c4569dcea1d285624c5960e0caee2041a16ad4059d23876328" }, "downloads": -1, "filename": "ahui_aiohttp_server-0.1.16.tar.gz", "has_sig": false, "md5_digest": "561892c2db8a5a41cac6bc8ca9fd31c6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 3177, "upload_time": "2018-08-06T11:56:08", "url": "https://files.pythonhosted.org/packages/86/b9/1750cf3a1b4a82a47685c1f4d1c759a04db4e68fc81e6032e74d9a67a0a9/ahui_aiohttp_server-0.1.16.tar.gz" } ] }