This framework was inspired by [sanic](https://github.com/huge-success/sanic) framework.
This framework designed to be fast and be capable to start within 1.5 seconds at max (see [cold start problem](https://medium.com/@denismakogon/investigating-pythons-performance-issue-cold-start-8ebf443a8a20)).
## How to install
```bash
pip install async-http-minimal
```
## Example
```python
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 = srv.run(sock=sock, loop=loop)
start_serving()
# here you can do some additional operations before starting an infinite serving
# can be helpful for unix sockets, etc.
run_forever()
```
Metadata
Release files for async-http-minimal 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| async-http-minimal-0.0.5.tar.gz | 21.6 kB | Without provenance | Details for async-http-minimal-0.0.5.tar.gz |
Release files / async-http-minimal-0.0.5.tar.gz
| Download URL | async-http-minimal-0.0.5.tar.gz |
|---|---|
| Size | 21.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2108bee1f46e841fc5264501e8b1df93d8d4ffe51a9b6bb1785b7bd7740379e6
|
|
BLAKE2b-256 checksum How to use checksums |
1f29b1e75be142e462d83d7a5c030445bb4e529d55a4dc3da8dc9652f0f42fad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.1
|
Security for async-http-minimal 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.