• Stars
    star
    1,135
  • Rank 41,034 (Top 0.9 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Hypercorn is an ASGI and WSGI Server based on Hyper libraries and inspired by Gunicorn.

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

More Repositories

1

tozo

TypeScript
134
star
2

quart-schema

Quart-Schema is a Quart extension that provides schema validation and auto-generated API documentation.
Python
77
star
3

faster_than_flask_article

Python
38
star
4

quart-auth

Quart-Auth is an extension for Quart to provide for secure cookie authentication (session management).
Python
34
star
5

push-pull

Pull Request and Issue statistics
JavaScript
32
star
6

quart-db

Quart extension that provides managed connection(s) to postgresql database(s).
Python
27
star
7

flake8-sql

Flake8 plugin that checks SQL code against opinionated style rules
Python
26
star
8

quart-cors

Quart-CORS is an extension for Quart to enable and control Cross Origin Resource Sharing, CORS.
Python
25
star
9

quart-rate-limiter

Quart-Rate-Limiter is an extension for Quart to allow for rate limits to be defined and enforced on a per route basis.
Python
23
star
10

quart-trio

Quart-Trio is an extension for Quart to support the Trio event loop.
Python
21
star
11

asgi_server_from_scratch

Python
14
star
12

quart-flask-patch

Quart extension that patches Quart to work with Flask extensions.
Python
14
star
13

trio_quart_article

Simple chat example
HTML
9
star
14

http2_article

HTML
5
star
15

quart-tasks

Quart-Tasks is a Quart extension that provides scheduled background tasks.
Python
4
star
16

http2_multiplexing_article

HTML
3
star
17

nusoft

Package manager for neutrino physics
Python
2
star
18

snopy

Energy spectrum prediction plotting and limit setting for SNO+
Python
2
star
19

async_await_stack_article

JavaScript
2
star
20

AcquireTek

Tektronix MSO2000 scope acquisition code.
Python
2
star
21

nusim

Test g4py scripts
Python
1
star
22

pgjones_dev

The pgjones site
Svelte
1
star