Skip to main content

A ASGI Server based on Hyper libraries and inspired by Gunicorn.

Project description

Hypercorn logo

Build Status docs pypi http python license

Hypercorn is an ASGI 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/2, and ASGI/3 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 ASGI server. Hypercorn forked from version 0.5.0 of Quart.

Quickstart

Hypercorn can be installed via pip,

$ pip install hypercorn

and requires Python 3.7.0 or higher.

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 GitLab. 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 merge 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


Download files

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

Source Distribution

Hypercorn-noteable-0.11.3.tar.gz (105.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Hypercorn_noteable-0.11.3-py3-none-any.whl (55.5 kB view details)

Uploaded Python 3

File details

Details for the file Hypercorn-noteable-0.11.3.tar.gz.

File metadata

  • Download URL: Hypercorn-noteable-0.11.3.tar.gz
  • Upload date:
  • Size: 105.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for Hypercorn-noteable-0.11.3.tar.gz
Algorithm Hash digest
SHA256 22b70dd9cde3336638acfaf9a56623bdf3d8c6717aff64730412df00b3709e1d
MD5 301200b1c055b6a7d9aaaf5f10c18891
BLAKE2b-256 8f67c964958982e15b6ae7b79532613627629a55512c2c235adf181bc99ba9be

See more details on using hashes here.

File details

Details for the file Hypercorn_noteable-0.11.3-py3-none-any.whl.

File metadata

  • Download URL: Hypercorn_noteable-0.11.3-py3-none-any.whl
  • Upload date:
  • Size: 55.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for Hypercorn_noteable-0.11.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6e54df0cfb7bbbd1ac9c321e60357e50f6f072cc67d7b5e8602207aa448dcf84
MD5 87e82fbebcfa7eabd10fc75b7ffe58bd
BLAKE2b-256 4b82b83b9b0f10d016bfb5ff2021d8c17c1c13cfe109913469ca50e26e7e5bf1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page