Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Minimalistic async HTTP server

Project description

# Minimalistic async HTTP server

This framework was inspired by [sanic]( framework.
This framework designed to be fast and be capable to start within 1.5 seconds at max (see [cold start problem](

## How to install

pip install async-http-minimal

## Example

import asyncio
import socket

from async_http import app
from async_http import router
from async_http import response

async def hello(request):
return response.text("hello-world!")

if __name__ == "__main__":
loop = asyncio.get_event_loop()
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(("localhost", 9999))

rtr = router.Router()
rtr.add("/hello", frozenset({"GET"}), hello)
srv = app.AsyncHTTPServer(name="hello-world-server", router=rtr)
start_serving, run_forever =, loop=loop)

# here you can do some additional operations before starting an infinite serving
# can be helpful for unix sockets, etc.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for async-http-minimal, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size async-http-minimal-0.0.5.tar.gz (21.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page