Skip to main content

A ASGI Server forked from hypercorn with more extra feature beyond ASGI

Project description

Hypercorn is now hosted at github.com/pgjones/hypercorn.

Hypercorn

Hypercorn logo

Build Status docs pypi http python license

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

and requires Python 3.8 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 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


Download files

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

Source Distribution

nonecorn-0.17.3.tar.gz (180.5 kB view details)

Uploaded Source

Built Distribution

nonecorn-0.17.3-py3-none-any.whl (72.1 kB view details)

Uploaded Python 3

File details

Details for the file nonecorn-0.17.3.tar.gz.

File metadata

  • Download URL: nonecorn-0.17.3.tar.gz
  • Upload date:
  • Size: 180.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for nonecorn-0.17.3.tar.gz
Algorithm Hash digest
SHA256 8c75c366979f5b11c2bea646133ca1c52f6e20ee03948c192518c496f387ec55
MD5 d3cc6c6e8d6d6a03ce42360178b0d20d
BLAKE2b-256 81513bff01e452f1d12848d1c88be8a59c361d2a7e1b16e1e99c968af62ae8d4

See more details on using hashes here.

File details

Details for the file nonecorn-0.17.3-py3-none-any.whl.

File metadata

  • Download URL: nonecorn-0.17.3-py3-none-any.whl
  • Upload date:
  • Size: 72.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for nonecorn-0.17.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8c391be6ae61655805ab2b5c4637953f040db1268ddc75be720f450a7ebe2ad0
MD5 1efa432b7ad8659a7c0b3c28f3eead0d
BLAKE2b-256 dfcba3a50d0e82554845fb93d8a20c119b648f27fa818e4352ca8e6d0f6dda72

See more details on using hashes here.

Supported by

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