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 hashes)
Built Distribution
Close
Hashes for asyncbasehttp-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70fb983c4df630a9b63081cb8ef6d2e06beb51c89f42a88da6c9a9c7ebf9fb89 |
|
MD5 | cafd12ea983672d72ee763908b1c0bb9 |
|
BLAKE2b-256 | b78806b5baecac1955166514ab573a13349eb5c4727b5c9326c49c0b4c613ae8 |