Current collected state Current
Observed since 21 Oct, 09:44 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Simple aiohttp Server for both static and python/php file
This is a simple http async server which extends python -m http.server.
(WARN: It's not recommended for production environments, just use it in development or testing environments only!):
pip install ahui-aiohttp-server
pip3 install ahui-aiohttp-server
$ tree .
./
app/
echo1.py
echo2.py
echo.php
return.py
js/
test.js
$ python -m ahui_aiohttp_server
$ python -m ahui_aiohttp_server --host 127.0.0.1 --port 5000
$ cat app/echo1.py
print('Hello World!')
$ curl http://127.0.0.1:5000/app/echo1.py
Hello World!
$ curl http://127.0.0.1:5000/js/test.js
<js content>
$ curl http://127.0.0.1:5000/app/echo.php
<js content>
If you want to get request data(such as: get, post, cookie, ..., use aiohttp_handler(request) instead:
$ cat app/echo2.py
def aiohttp_handler(request):
print(request.query) # use print
$ curl http://127.0.0.1:5000/app/echo2.py?var=value
{'var':'value'}
$ cat app/return.py
from aiohttp import web
async def aiohttp_handler(request):
data = await request.post()
return web.Response(body=str(data)) # use return
$ curl http://127.0.0.1:5000/app/return.py?var=value - 'k1=v2'
{'k1':'v2'}
$ curl http://127.0.0.1:5000/js/test.js
<js content>
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.16 | 6 Aug 2018 | 1 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 09:44 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:6f5d65c0f1c53c1fd09aec41688ad395c58b34ebb3ac3f34a151c2aeb96439df