This commit is contained in:
Untriex Programming
2021-03-17 08:57:57 +01:00
parent 339be0ccd8
commit ed6afdb5c9
3074 changed files with 423348 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
Copyright P G Jones 2018.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,159 @@
Metadata-Version: 2.1
Name: Hypercorn
Version: 0.11.2
Summary: A ASGI Server based on Hyper libraries and inspired by Gunicorn.
Home-page: https://gitlab.com/pgjones/hypercorn/
Author: P G Jones
Author-email: philip.graham.jones@googlemail.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Requires-Dist: h11
Requires-Dist: h2 (>=3.1.0)
Requires-Dist: priority
Requires-Dist: toml
Requires-Dist: wsproto (>=0.14.0)
Requires-Dist: typing-extensions ; python_version < "3.8"
Provides-Extra: h3
Requires-Dist: aioquic (<1.0,>=0.9.0) ; extra == 'h3'
Provides-Extra: tests
Requires-Dist: hypothesis ; extra == 'tests'
Requires-Dist: mock ; extra == 'tests'
Requires-Dist: pytest ; extra == 'tests'
Requires-Dist: pytest-asyncio ; extra == 'tests'
Requires-Dist: pytest-cov ; extra == 'tests'
Requires-Dist: pytest-trio ; extra == 'tests'
Requires-Dist: trio ; extra == 'tests'
Provides-Extra: trio
Requires-Dist: trio (>=0.11.0) ; extra == 'trio'
Provides-Extra: uvloop
Requires-Dist: uvloop ; extra == 'uvloop'
Hypercorn
=========
.. image:: https://assets.gitlab-static.net/pgjones/hypercorn/raw/master/artwork/logo.png
:alt: Hypercorn logo
|Build Status| |docs| |pypi| |http| |python| |license|
Hypercorn is an `ASGI
<https://github.com/django/asgiref/blob/master/specs/asgi.rst>`_ web
server based on the sans-io hyper, `h11
<https://github.com/python-hyper/h11>`_, `h2
<https://github.com/python-hyper/hyper-h2>`_, and `wsproto
<https://github.com/python-hyper/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
<https://github.com/aiortc/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
<https://gitlab.com/pgjones/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
<https://docs.python.org/3/installing/index.html>`_,
.. code-block:: console
$ 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,
.. code-block:: console
$ hypercorn module:app
Alternatively Hypercorn can be used programatically,
.. code-block:: python
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
<https://pgjones.gitlab.io/hypercorn/how_to_guides/api_usage.html>`_
docs.
Contributing
------------
Hypercorn is developed on `GitLab
<https://gitlab.com/pgjones/hypercorn>`_. If you come across an issue,
or have a feature request please open an `issue
<https://gitlab.com/pgjones/hypercorn/issues>`_. If you want to
contribute a fix or the feature-implementation please do (typo fixes
welcome), by proposing a `merge request
<https://gitlab.com/pgjones/hypercorn/merge_requests>`_.
Testing
~~~~~~~
The best way to test Hypercorn is with `Tox
<https://tox.readthedocs.io>`_,
.. code-block:: console
$ pipenv install tox
$ tox
this will check the code style and run the tests.
Help
----
The Hypercorn `documentation <https://pgjones.gitlab.io/hypercorn/>`_
is the best place to start, after that try searching stack overflow,
if you still can't find an answer please `open an issue
<https://gitlab.com/pgjones/hypercorn/issues>`_.
.. |Build Status| image:: https://gitlab.com/pgjones/hypercorn/badges/master/pipeline.svg
:target: https://gitlab.com/pgjones/hypercorn/commits/master
.. |docs| image:: https://img.shields.io/badge/docs-passing-brightgreen.svg
:target: https://pgjones.gitlab.io/hypercorn/
.. |pypi| image:: https://img.shields.io/pypi/v/hypercorn.svg
:target: https://pypi.python.org/pypi/Hypercorn/
.. |http| image:: https://img.shields.io/badge/http-1.0,1.1,2-orange.svg
:target: https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
.. |python| image:: https://img.shields.io/pypi/pyversions/hypercorn.svg
:target: https://pypi.python.org/pypi/Hypercorn/
.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://gitlab.com/pgjones/hypercorn/blob/master/LICENSE

View File

@@ -0,0 +1,84 @@
../../../bin/hypercorn,sha256=oOEgM4z3zmD0l9nolNOYsTXSJX4IAFqQw5isLyFE_Tk,254
Hypercorn-0.11.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
Hypercorn-0.11.2.dist-info/LICENSE,sha256=HjGdhzPYNEZ3zQ7mwqjMBgHHRId5HViyayt-8GMMK38,1050
Hypercorn-0.11.2.dist-info/METADATA,sha256=_YgWC-LPDlyhr8xY6Cjkd7wrlgSS5K4InaeuEhKzqhI,5216
Hypercorn-0.11.2.dist-info/RECORD,,
Hypercorn-0.11.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
Hypercorn-0.11.2.dist-info/WHEEL,sha256=OqRkF0eY5GHssMorFjlbTIq072vpHpF60fIQA6lS9xA,92
Hypercorn-0.11.2.dist-info/entry_points.txt,sha256=HV9e4tNKTeIJbe1PIswRWGn4jbCUQqfIbcAIV68Znuk,55
Hypercorn-0.11.2.dist-info/top_level.txt,sha256=zSgQlh13xK80SFqsUPaG5-83qTJOzqYTBfP9XFcvB_Y,10
hypercorn/__about__.py,sha256=bmMNWd6X6fx5JJd3CqzukH9Aez4xKCZuJNcmMU1pbEc,23
hypercorn/__init__.py,sha256=ZBbFBwpZeEyk7_9xleLlt7KqM48wYv7kjY2we02gsqs,99
hypercorn/__main__.py,sha256=W9ES4hoULQqPYUKUP_mMJWRzs_Zb3uQZpD30lWZmczk,9596
hypercorn/__pycache__/__about__.cpython-39.pyc,,
hypercorn/__pycache__/__init__.cpython-39.pyc,,
hypercorn/__pycache__/__main__.cpython-39.pyc,,
hypercorn/__pycache__/config.cpython-39.pyc,,
hypercorn/__pycache__/events.cpython-39.pyc,,
hypercorn/__pycache__/logging.cpython-39.pyc,,
hypercorn/__pycache__/run.cpython-39.pyc,,
hypercorn/__pycache__/statsd.cpython-39.pyc,,
hypercorn/__pycache__/typing.cpython-39.pyc,,
hypercorn/__pycache__/utils.cpython-39.pyc,,
hypercorn/asyncio/__init__.py,sha256=eq15FULu-0bJqMSMakcm0vxWz-m31NaKzJtCviZtKJI,1201
hypercorn/asyncio/__pycache__/__init__.cpython-39.pyc,,
hypercorn/asyncio/__pycache__/context.cpython-39.pyc,,
hypercorn/asyncio/__pycache__/lifespan.cpython-39.pyc,,
hypercorn/asyncio/__pycache__/run.cpython-39.pyc,,
hypercorn/asyncio/__pycache__/statsd.cpython-39.pyc,,
hypercorn/asyncio/__pycache__/task_group.cpython-39.pyc,,
hypercorn/asyncio/__pycache__/tcp_server.cpython-39.pyc,,
hypercorn/asyncio/__pycache__/udp_server.cpython-39.pyc,,
hypercorn/asyncio/context.py,sha256=GXFl5OHbsAIjERdjlvShs25jYG3_1EPXzVcyMas0ZEk,1919
hypercorn/asyncio/lifespan.py,sha256=cGj4Z85ll7jUSx0AaxBpV1SrvbMSKpj5O63NtTkkyRo,3231
hypercorn/asyncio/run.py,sha256=nrE8lECEUpxbg8Jrx9ozKKuyk37YsDsGZRsMQgDYZTU,8319
hypercorn/asyncio/statsd.py,sha256=0AhRzPxD2M2cWl-E8MVPeB2rMFgEV684InIE9F0zUy4,733
hypercorn/asyncio/task_group.py,sha256=HFvF7u_Nsf4k8I63KbnIi6JlnrVZNvNysT6bbTvnpyQ,927
hypercorn/asyncio/tcp_server.py,sha256=SuOqCbKExDzJ8AMvtt67bohDidT52F2S1_urbCTQbls,4982
hypercorn/asyncio/udp_server.py,sha256=eQBFVy-j-Gu9hGgzvflWSCAdJdoni5Y50stWyC44bUw,2120
hypercorn/config.py,sha256=Ol6c5b93IKTqJxtxGY7hBt2ed4m7U0xzdarY_7aTLEM,12753
hypercorn/events.py,sha256=bEitGLlNzRngMXAWw22nhw7PhhZCRaU9T9BdKNlpzoM,440
hypercorn/logging.py,sha256=XeLerzMiLqV0gWL6bF0pAEKDKFLEJ5tL0n50VE9QQ_g,6666
hypercorn/middleware/__init__.py,sha256=H2RPiJynxovfC6szNHzbZg5ec_C2IChYsft5blPRNNg,297
hypercorn/middleware/__pycache__/__init__.cpython-39.pyc,,
hypercorn/middleware/__pycache__/dispatcher.cpython-39.pyc,,
hypercorn/middleware/__pycache__/http_to_https.cpython-39.pyc,,
hypercorn/middleware/__pycache__/wsgi.cpython-39.pyc,,
hypercorn/middleware/dispatcher.py,sha256=K-FJiMixBYyP93HjqV1n59rG0-kpF-ORsHQlskeA__0,4362
hypercorn/middleware/http_to_https.py,sha256=I3bTSv0DKgZIMrq_QCHTq9tmIaMWYbdHUrHcQAjXPrQ,2628
hypercorn/middleware/wsgi.py,sha256=_yM3QY-lakZcgDbn_webKyi32B2HhJ9CNxP1O5WBRB8,4885
hypercorn/protocol/__init__.py,sha256=BBGsnx1I6qPHQ-ZYkNz1fpHS5RT3PVsFxxA_9Cvioxo,2612
hypercorn/protocol/__pycache__/__init__.cpython-39.pyc,,
hypercorn/protocol/__pycache__/events.cpython-39.pyc,,
hypercorn/protocol/__pycache__/h11.cpython-39.pyc,,
hypercorn/protocol/__pycache__/h2.cpython-39.pyc,,
hypercorn/protocol/__pycache__/h3.cpython-39.pyc,,
hypercorn/protocol/__pycache__/http_stream.cpython-39.pyc,,
hypercorn/protocol/__pycache__/quic.cpython-39.pyc,,
hypercorn/protocol/__pycache__/ws_stream.cpython-39.pyc,,
hypercorn/protocol/events.py,sha256=z4ujv2Xg085YNpbE36Hy6qDfSOPmi6rb8QfPpWEh2xw,675
hypercorn/protocol/h11.py,sha256=MsMrWJHv-Wv8-s9Rz2cdDf9wyWm0oqvvM0bN5ES_R0E,10593
hypercorn/protocol/h2.py,sha256=K3WYXYbHY3u19KsDi8vW7H0wzszKU0X-GHG9MKbmheE,13817
hypercorn/protocol/h3.py,sha256=Zn9Apxdkxjz_7mQWsM7M-u6_gVGqahfdVBkI5oClPfk,4954
hypercorn/protocol/http_stream.py,sha256=bBs1V_D3avhhFqz1IillgMa021DnEleprzIUn2IaOsU,6967
hypercorn/protocol/quic.py,sha256=qSHgGL4QBjz-TaJ5NNMNm3ZSOCl3fWtO9UjuRpBpIMo,4758
hypercorn/protocol/ws_stream.py,sha256=GQWz5NVzPICdup5b5-B3yktpFtzWpZcxTCUqYmu8z84,14020
hypercorn/py.typed,sha256=sow9soTwP9T_gEAQSVh7Gb8855h04Nwmhs2We-JRgZM,7
hypercorn/run.py,sha256=PUnAfyM_zw_rFNEWmnQDM1IIG_H9K4uwAheIvJTgefo,2247
hypercorn/statsd.py,sha256=viEyWGm1fOYB6KvU6kmNftV0wR8uBrBa-u7UECvzQeI,3784
hypercorn/trio/__init__.py,sha256=P7v1a9OHcoKK5EnfsMOHuS9LdTEGht3hPgteGiQ8N5M,1309
hypercorn/trio/__pycache__/__init__.cpython-39.pyc,,
hypercorn/trio/__pycache__/context.cpython-39.pyc,,
hypercorn/trio/__pycache__/lifespan.cpython-39.pyc,,
hypercorn/trio/__pycache__/run.cpython-39.pyc,,
hypercorn/trio/__pycache__/statsd.cpython-39.pyc,,
hypercorn/trio/__pycache__/tcp_server.cpython-39.pyc,,
hypercorn/trio/__pycache__/udp_server.cpython-39.pyc,,
hypercorn/trio/context.py,sha256=2-qUGgQLh7JS_Mlk2TyMEbr_MgPMcz_Sd3IOt9Hy_8o,2236
hypercorn/trio/lifespan.py,sha256=XdE-xVP8ZMAfY9YQ0sHZ7AAuHvUnSnvjq_3wuGK5p7k,2896
hypercorn/trio/run.py,sha256=X5IE0diyHjeZ9lw9DUx7xZq7cpgj8dRGtyCeYxf4Oxo,4348
hypercorn/trio/statsd.py,sha256=ilyrPPK49PcQJjs6tAfd1AtQvZd6kfP-q70N3waqrPo,450
hypercorn/trio/tcp_server.py,sha256=oSZdBp0Y54t1m0StYy37xAHa3UHIiGegtiwnMK6VwCg,5145
hypercorn/trio/udp_server.py,sha256=yrzPRYhaPGOT9tt406_m1Gq02QuW4bTbaI5cD28LuaA,1306
hypercorn/typing.py,sha256=9F9ApOXAeXhlkJO_QNKk_gsp6vgOR3g4iCtdpmymCX4,6737
hypercorn/utils.py,sha256=sgTGJV4qHy3zNEa2W-UySRFqPWlf5ViEGCG5lDM1TuQ,7558

View File

@@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.36.2)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@@ -0,0 +1,3 @@
[console_scripts]
hypercorn = hypercorn.__main__:main

View File

@@ -0,0 +1 @@
hypercorn