A ASGI Server based on Hyper libraries and inspired by Gunicorn
Project description
Anycorn is an ASGI and WSGI web server based on the sans-io hyper, h11, h2, and wsproto libraries and inspired by Gunicorn. Anycorn supports HTTP/1, HTTP/2, WebSockets (over HTTP/1 and HTTP/2), ASGI, and WSGI specifications. Anycorn utilises anyio worker types.
Anycorn can optionally serve the current draft of the HTTP/3 specification using the aioquic library. To enable this install the h3 optional extra, pip install anycorn[h3] and then choose a quic binding e.g. anycorn --quic-bind localhost:4433 ....
Anycorn is a fork of Hypercorn that replaces asyncio where asyncio and Trio implementations are replaced with AnyIO. Anycorn forked from version 0.16.0 of Hypercorn.
Quickstart
Anycorn can be installed via pip,
$ pip install anycorn
and requires Python 3.8 or higher.
With anycorn installed ASGI frameworks (or apps) can be served via Anycorn via the command line,
$ anycorn module:app
Alternatively Anycorn can be used programatically,
import anyio
from anycorn.config import Config
from anycorn import serve
from module import app
anyio.run(serve, app, Config())
learn more in the API usage docs.
Contributing
Anycorn is developed on Github. If you come across an issue, or have a feature request please open an issue. If you want to contribute a fix or the feature-implementation please do (typo fixes welcome), by proposing a pull request.
Testing
The best way to test Anycorn is with Tox,
$ pipenv install tox
$ tox
this will check the code style and run the tests.
Help
The Anycorn documentation is the best place to start, after that try searching stack overflow, if you still can’t find an answer please open an issue.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file anycorn-0.16.0.tar.gz
.
File metadata
- Download URL: anycorn-0.16.0.tar.gz
- Upload date:
- Size: 37.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74edcebe95f56124cd13340c086993507abf37234d8f72c6c2dbfbf3adcd2410 |
|
MD5 | b16f5df779b6f3ae811062747987bea3 |
|
BLAKE2b-256 | 856929b1a8b942db4c7ea931f882d72e755f69f5f546213dd6b5598eb625f6f6 |
File details
Details for the file anycorn-0.16.0-py3-none-any.whl
.
File metadata
- Download URL: anycorn-0.16.0-py3-none-any.whl
- Upload date:
- Size: 49.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3a6abd04a5c95e169d13c740c3440071bc46dfdd30ecfe97c6e8c96c708c049 |
|
MD5 | bef1fc761c551d5a93186a1937ee177e |
|
BLAKE2b-256 | 10b3eb6e3fbe1af36c7d1ad06149d12fce2794a43c6d5c4c66ffb62714399469 |