Simple async wrapper to python http server
Project description
Async Http Server
The simplest async python http server library.
Example
import asyncio
from asyncbasehttp import request_handler, Request, Response
@request_handler
async def handle_request(req: Request):
return Response.create_ok_response(f'You requested path: {req.path}'.encode())
async def main():
server = await asyncio.start_server(handle_request, port=8000)
print("http://localhost:8000")
await server.serve_forever()
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
asyncbasehttp-1.0.tar.gz
(9.7 kB
view details)
Built Distribution
File details
Details for the file asyncbasehttp-1.0.tar.gz
.
File metadata
- Download URL: asyncbasehttp-1.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cea7b61113bb1e69d1c90f32919f004e7f56a7e1e2955e8a6286ce40f9da188 |
|
MD5 | 0a54720a0b116eadd39bc435e69fb883 |
|
BLAKE2b-256 | 8b0e666c878b9855cff5fa3f91a51d314bfbcdc1867c3caa2c80fe01f6f5a29d |
File details
Details for the file asyncbasehttp-1.0-py3-none-any.whl
.
File metadata
- Download URL: asyncbasehttp-1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70fb983c4df630a9b63081cb8ef6d2e06beb51c89f42a88da6c9a9c7ebf9fb89 |
|
MD5 | cafd12ea983672d72ee763908b1c0bb9 |
|
BLAKE2b-256 | b78806b5baecac1955166514ab573a13349eb5c4727b5c9326c49c0b4c613ae8 |