A ASGI Server based on Hyper libraries and inspired by Gunicorn
Project description
Hypercorn is an ASGI and WSGI web server based on the sans-io hyper, h11, h2, and wsproto libraries and inspired by Gunicorn. Hypercorn supports HTTP/1, HTTP/2, WebSockets (over HTTP/1 and HTTP/2), ASGI, and WSGI specifications. Hypercorn can utilise asyncio, uvloop, or trio worker types.
Hypercorn 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 hypercorn[h3] and then choose a quic binding e.g. hypercorn --quic-bind localhost:4433 ....
Hypercorn was initially part of Quart before being separated out into a standalone server. Hypercorn forked from version 0.5.0 of Quart.
Quickstart
Hypercorn can be installed via pip,
$ pip install hypercorn With hypercorn installed ASGI frameworks (or apps) can be served via Hypercorn via the command line,
$ hypercorn module:app Alternatively Hypercorn can be used programatically,
import asyncio from hypercorn.config import Config from hypercorn.asyncio import serve from module import app asyncio.run(serve(app, Config())) learn more (including a Trio example of the above) in the API usage docs.
Contributing
Hypercorn 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 Hypercorn is with Tox,
$ pipenv install tox $ tox this will check the code style and run the tests.
Help
The Hypercorn 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hypercorn-0.18.0.tar.gz.
File metadata
- Download URL: hypercorn-0.18.0.tar.gz
- Upload date:
- Size: 68.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | d63267548939c46b0247dc8e5b45a9947590e35e64ee73a23c074aa3cf88e9da | |
| MD5 | 607e5dcd270c47a886770ce906831406 | |
| BLAKE2b-256 | 440139f41a014b83dd5c795217362f2ca9071cf243e6a75bdcd6cd5b944658cc |
Provenance
The following attestation bundles were made for hypercorn-0.18.0.tar.gz:
Publisher: publish.yml on pgjones/hypercorn
- Statement:
- Statement type:
https://in-toto.io/Statement/v1 - Predicate type:
https://docs.pypi.org/attestations/publish/v1 - Subject name:
hypercorn-0.18.0.tar.gz - Subject digest:
d63267548939c46b0247dc8e5b45a9947590e35e64ee73a23c074aa3cf88e9da - Sigstore transparency entry: 685021809
- Sigstore integration time:
- Permalink:
pgjones/hypercorn@0e2311f1ad2ae587aaa590f3824f59aa5dc0e770 - Branch / Tag:
refs/tags/0.18.0 - Owner: https://github.com/pgjones
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com - Runner Environment:
github-hosted - Publication workflow:
publish.yml@0e2311f1ad2ae587aaa590f3824f59aa5dc0e770 - Trigger Event:
push
- Statement type:
File details
Details for the file hypercorn-0.18.0-py3-none-any.whl.
File metadata
- Download URL: hypercorn-0.18.0-py3-none-any.whl
- Upload date:
- Size: 61.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | 225e268f2c1c2f28f6d8f6db8f40cb8c992963610c5725e13ccfcddccb24b1cd | |
| MD5 | 0e892085e2be557c543813fa089f156e | |
| BLAKE2b-256 | 9335850277d1b17b206bd10874c8a9a3f52e059452fb49bb0d22cbb908f6038b |
Provenance
The following attestation bundles were made for hypercorn-0.18.0-py3-none-any.whl:
Publisher: publish.yml on pgjones/hypercorn
- Statement:
- Statement type:
https://in-toto.io/Statement/v1 - Predicate type:
https://docs.pypi.org/attestations/publish/v1 - Subject name:
hypercorn-0.18.0-py3-none-any.whl - Subject digest:
225e268f2c1c2f28f6d8f6db8f40cb8c992963610c5725e13ccfcddccb24b1cd - Sigstore transparency entry: 685021817
- Sigstore integration time:
- Permalink:
pgjones/hypercorn@0e2311f1ad2ae587aaa590f3824f59aa5dc0e770 - Branch / Tag:
refs/tags/0.18.0 - Owner: https://github.com/pgjones
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com - Runner Environment:
github-hosted - Publication workflow:
publish.yml@0e2311f1ad2ae587aaa590f3824f59aa5dc0e770 - Trigger Event:
push
- Statement type: