Update 2025-04-13_16:26:34

This commit is contained in:
root
2025-04-13 16:26:35 +02:00
commit 0e49903693
2239 changed files with 407432 additions and 0 deletions

View File

@ -0,0 +1,185 @@
Metadata-Version: 2.3
Name: uvicorn
Version: 0.34.0
Summary: The lightning-fast ASGI server.
Project-URL: Changelog, https://github.com/encode/uvicorn/blob/master/CHANGELOG.md
Project-URL: Funding, https://github.com/sponsors/encode
Project-URL: Homepage, https://www.uvicorn.org/
Project-URL: Source, https://github.com/encode/uvicorn
Author-email: Tom Christie <tom@tomchristie.com>, Marcelo Trylesinski <marcelotryle@gmail.com>
License: BSD-3-Clause
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.9
Requires-Dist: click>=7.0
Requires-Dist: h11>=0.8
Requires-Dist: typing-extensions>=4.0; python_version < '3.11'
Provides-Extra: standard
Requires-Dist: colorama>=0.4; (sys_platform == 'win32') and extra == 'standard'
Requires-Dist: httptools>=0.6.3; extra == 'standard'
Requires-Dist: python-dotenv>=0.13; extra == 'standard'
Requires-Dist: pyyaml>=5.1; extra == 'standard'
Requires-Dist: uvloop!=0.15.0,!=0.15.1,>=0.14.0; (sys_platform != 'win32' and (sys_platform != 'cygwin' and platform_python_implementation != 'PyPy')) and extra == 'standard'
Requires-Dist: watchfiles>=0.13; extra == 'standard'
Requires-Dist: websockets>=10.4; extra == 'standard'
Description-Content-Type: text/markdown
<p align="center">
<img width="320" height="320" src="https://raw.githubusercontent.com/tomchristie/uvicorn/master/docs/uvicorn.png" alt='uvicorn'>
</p>
<p align="center">
<em>An ASGI web server, for Python.</em>
</p>
---
[![Build Status](https://github.com/encode/uvicorn/workflows/Test%20Suite/badge.svg)](https://github.com/encode/uvicorn/actions)
[![Package version](https://badge.fury.io/py/uvicorn.svg)](https://pypi.python.org/pypi/uvicorn)
[![Supported Python Version](https://img.shields.io/pypi/pyversions/uvicorn.svg?color=%2334D058)](https://pypi.org/project/uvicorn)
**Documentation**: [https://www.uvicorn.org](https://www.uvicorn.org)
---
Uvicorn is an ASGI web server implementation for Python.
Until recently Python has lacked a minimal low-level server/application interface for
async frameworks. The [ASGI specification][asgi] fills this gap, and means we're now able to
start building a common set of tooling usable across all async frameworks.
Uvicorn supports HTTP/1.1 and WebSockets.
## Quickstart
Install using `pip`:
```shell
$ pip install uvicorn
```
This will install uvicorn with minimal (pure Python) dependencies.
```shell
$ pip install 'uvicorn[standard]'
```
This will install uvicorn with "Cython-based" dependencies (where possible) and other "optional extras".
In this context, "Cython-based" means the following:
- the event loop `uvloop` will be installed and used if possible.
- the http protocol will be handled by `httptools` if possible.
Moreover, "optional extras" means that:
- the websocket protocol will be handled by `websockets` (should you want to use `wsproto` you'd need to install it manually) if possible.
- the `--reload` flag in development mode will use `watchfiles`.
- windows users will have `colorama` installed for the colored logs.
- `python-dotenv` will be installed should you want to use the `--env-file` option.
- `PyYAML` will be installed to allow you to provide a `.yaml` file to `--log-config`, if desired.
Create an application, in `example.py`:
```python
async def app(scope, receive, send):
assert scope['type'] == 'http'
await send({
'type': 'http.response.start',
'status': 200,
'headers': [
(b'content-type', b'text/plain'),
],
})
await send({
'type': 'http.response.body',
'body': b'Hello, world!',
})
```
Run the server:
```shell
$ uvicorn example:app
```
---
## Why ASGI?
Most well established Python Web frameworks started out as WSGI-based frameworks.
WSGI applications are a single, synchronous callable that takes a request and returns a response.
This doesnt allow for long-lived connections, like you get with long-poll HTTP or WebSocket connections,
which WSGI doesn't support well.
Having an async concurrency model also allows for options such as lightweight background tasks,
and can be less of a limiting factor for endpoints that have long periods being blocked on network
I/O such as dealing with slow HTTP requests.
---
## Alternative ASGI servers
A strength of the ASGI protocol is that it decouples the server implementation
from the application framework. This allows for an ecosystem of interoperating
webservers and application frameworks.
### Daphne
The first ASGI server implementation, originally developed to power Django Channels, is [the Daphne webserver][daphne].
It is run widely in production, and supports HTTP/1.1, HTTP/2, and WebSockets.
Any of the example applications given here can equally well be run using `daphne` instead.
```
$ pip install daphne
$ daphne app:App
```
### Hypercorn
[Hypercorn][hypercorn] was initially part of the Quart web framework, before
being separated out into a standalone ASGI server.
Hypercorn supports HTTP/1.1, HTTP/2, and WebSockets.
It also supports [the excellent `trio` async framework][trio], as an alternative to `asyncio`.
```
$ pip install hypercorn
$ hypercorn app:App
```
### Mangum
[Mangum][mangum] is an adapter for using ASGI applications with AWS Lambda & API Gateway.
### Granian
[Granian][granian] is an ASGI compatible Rust HTTP server which supports HTTP/2, TLS and WebSockets.
---
<p align="center"><i>Uvicorn is <a href="https://github.com/encode/uvicorn/blob/master/LICENSE.md">BSD licensed</a> code.<br/>Designed & crafted with care.</i><br/>&mdash; 🦄 &mdash;</p>
[asgi]: https://asgi.readthedocs.io/en/latest/
[daphne]: https://github.com/django/daphne
[hypercorn]: https://github.com/pgjones/hypercorn
[trio]: https://trio.readthedocs.io
[mangum]: https://github.com/jordaneremieff/mangum
[granian]: https://github.com/emmett-framework/granian

View File

@ -0,0 +1,85 @@
../../../bin/uvicorn,sha256=-B9IgtrSeZtZ7pYIzIdqqzr-oKAW3Yh2m3XWPiFQYJ4,231
uvicorn-0.34.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
uvicorn-0.34.0.dist-info/METADATA,sha256=bS8aEm2BGuEU-2n8mLQYHWl5dD0TLAU3IxswLCB4QcU,6534
uvicorn-0.34.0.dist-info/RECORD,,
uvicorn-0.34.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
uvicorn-0.34.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
uvicorn-0.34.0.dist-info/entry_points.txt,sha256=FW1w-hkc9QgwaGoovMvm0ZY73w_NcycWdGAUfDsNGxw,46
uvicorn-0.34.0.dist-info/licenses/LICENSE.md,sha256=7-Gs8-YvuZwoiw7HPlp3O3Jo70Mg_nV-qZQhTktjw3E,1526
uvicorn/__init__.py,sha256=6QKvxaTzHjM48izaeuZXBkVrqShBw6KeHswYwj4FwHg,147
uvicorn/__main__.py,sha256=DQizy6nKP0ywhPpnCHgmRDYIMfcqZKVEzNIWQZjqtVQ,62
uvicorn/__pycache__/__init__.cpython-311.pyc,,
uvicorn/__pycache__/__main__.cpython-311.pyc,,
uvicorn/__pycache__/_subprocess.cpython-311.pyc,,
uvicorn/__pycache__/_types.cpython-311.pyc,,
uvicorn/__pycache__/config.cpython-311.pyc,,
uvicorn/__pycache__/importer.cpython-311.pyc,,
uvicorn/__pycache__/logging.cpython-311.pyc,,
uvicorn/__pycache__/main.cpython-311.pyc,,
uvicorn/__pycache__/server.cpython-311.pyc,,
uvicorn/__pycache__/workers.cpython-311.pyc,,
uvicorn/_subprocess.py,sha256=HbfRnsCkXyg7xCWVAWWzXQTeWlvLKfTlIF5wevFBkR4,2766
uvicorn/_types.py,sha256=5FcPvvIfeKsJDjGhTrceDv8TmwzYI8yPF7mXsXTWOUM,7775
uvicorn/config.py,sha256=bMSdgFZpD6wfQ0-ieIl3Ha3IVDFCGLtt0mpg-JVNtuY,20897
uvicorn/importer.py,sha256=nRt0QQ3qpi264-n_mR0l55C2ddM8nowTNzT1jsWaam8,1128
uvicorn/lifespan/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
uvicorn/lifespan/__pycache__/__init__.cpython-311.pyc,,
uvicorn/lifespan/__pycache__/off.cpython-311.pyc,,
uvicorn/lifespan/__pycache__/on.cpython-311.pyc,,
uvicorn/lifespan/off.py,sha256=nfI6qHAUo_8-BEXMBKoHQ9wUbsXrPaXLCbDSS0vKSr8,332
uvicorn/lifespan/on.py,sha256=1KYuFNNyQONIjtEHhKZAJp-OOokIyjj74wpGCGBv4lk,5184
uvicorn/logging.py,sha256=-eCE4nOJmFbtB9qfNJuEVNF0Y13LGUHqvFzemYT0PaQ,4235
uvicorn/loops/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
uvicorn/loops/__pycache__/__init__.cpython-311.pyc,,
uvicorn/loops/__pycache__/asyncio.cpython-311.pyc,,
uvicorn/loops/__pycache__/auto.cpython-311.pyc,,
uvicorn/loops/__pycache__/uvloop.cpython-311.pyc,,
uvicorn/loops/asyncio.py,sha256=qPnQLT2htZkcGG_ncnTyrSH38jEkqjg8guwP0lA146A,301
uvicorn/loops/auto.py,sha256=BWVq18ce9SoFTo3z5zNW2IU2850u2tRrc6WyK7idsdI,400
uvicorn/loops/uvloop.py,sha256=K4QybYVxtK9C2emDhDPUCkBXR4XMT5Ofv9BPFPoX0ok,148
uvicorn/main.py,sha256=iv6ptgDBnko0W-VkHs0e3I4UrF7_5sEZrntQNKJGFNY,16915
uvicorn/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
uvicorn/middleware/__pycache__/__init__.cpython-311.pyc,,
uvicorn/middleware/__pycache__/asgi2.cpython-311.pyc,,
uvicorn/middleware/__pycache__/message_logger.cpython-311.pyc,,
uvicorn/middleware/__pycache__/proxy_headers.cpython-311.pyc,,
uvicorn/middleware/__pycache__/wsgi.cpython-311.pyc,,
uvicorn/middleware/asgi2.py,sha256=YQrQNm3RehFts3mzk3k4yw8aD8Egtj0tRS3N45YkQa0,394
uvicorn/middleware/message_logger.py,sha256=IHEZUSnFNaMFUFdwtZO3AuFATnYcSor-gVtOjbCzt8M,2859
uvicorn/middleware/proxy_headers.py,sha256=f1VDAc-ipPHdNTuLNHwYCeDgYXoCL_VjD6hDTUXZT_U,5790
uvicorn/middleware/wsgi.py,sha256=F45FLfMZc510LiYpu7VQnoFpRof4k5pm5CTER4urs3U,7120
uvicorn/protocols/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
uvicorn/protocols/__pycache__/__init__.cpython-311.pyc,,
uvicorn/protocols/__pycache__/utils.cpython-311.pyc,,
uvicorn/protocols/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
uvicorn/protocols/http/__pycache__/__init__.cpython-311.pyc,,
uvicorn/protocols/http/__pycache__/auto.cpython-311.pyc,,
uvicorn/protocols/http/__pycache__/flow_control.cpython-311.pyc,,
uvicorn/protocols/http/__pycache__/h11_impl.cpython-311.pyc,,
uvicorn/protocols/http/__pycache__/httptools_impl.cpython-311.pyc,,
uvicorn/protocols/http/auto.py,sha256=YfXGyzWTaaE2p_jkTPWrJCXsxEaQnC3NK0-G7Wgmnls,403
uvicorn/protocols/http/flow_control.py,sha256=050WVg31EvPOkHwynCoMP1zXFl_vO3U4durlc5vyp4U,1701
uvicorn/protocols/http/h11_impl.py,sha256=4b-KswK57FBaRPeHXlK_oy8pKM6vG1haALCIeRH-1bA,20694
uvicorn/protocols/http/httptools_impl.py,sha256=tuQBCiD6rf5DQeyQwHVc45rxH9ouojMpkXi9KG6NRBk,21805
uvicorn/protocols/utils.py,sha256=rCjYLd4_uwPeZkbRXQ6beCfxyI_oYpvJCwz3jEGNOiE,1849
uvicorn/protocols/websockets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
uvicorn/protocols/websockets/__pycache__/__init__.cpython-311.pyc,,
uvicorn/protocols/websockets/__pycache__/auto.cpython-311.pyc,,
uvicorn/protocols/websockets/__pycache__/websockets_impl.cpython-311.pyc,,
uvicorn/protocols/websockets/__pycache__/wsproto_impl.cpython-311.pyc,,
uvicorn/protocols/websockets/auto.py,sha256=kNP-h07ZzjA9dKRUd7MNO0J7xhRJ5xVBfit7wCbdB0A,574
uvicorn/protocols/websockets/websockets_impl.py,sha256=0y4kk-zR-uPdmpjq9OYuzJk7g9amlispUmM91lyqRdY,15517
uvicorn/protocols/websockets/wsproto_impl.py,sha256=ga8JzDUU2QrQsjgQdgIilfbmBHIrH4zbyGM4maovTRo,15381
uvicorn/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
uvicorn/server.py,sha256=jdPRUFI_0UCpmBxB8PrpY7hpsgwGTdlKt0IrxFN0jm8,12893
uvicorn/supervisors/__init__.py,sha256=wT8eOEIqT1yWQgytZtv5taWMul7xoTIY0xm1m4oyPTw,507
uvicorn/supervisors/__pycache__/__init__.cpython-311.pyc,,
uvicorn/supervisors/__pycache__/basereload.cpython-311.pyc,,
uvicorn/supervisors/__pycache__/multiprocess.cpython-311.pyc,,
uvicorn/supervisors/__pycache__/statreload.cpython-311.pyc,,
uvicorn/supervisors/__pycache__/watchfilesreload.cpython-311.pyc,,
uvicorn/supervisors/basereload.py,sha256=arOe3PqQp0L5FvCYDsVg8jUev-57syWFzHhggsM18VY,3858
uvicorn/supervisors/multiprocess.py,sha256=Opt0XvOUj1DIMXYwb4OlkJZxeh_RjweFnTmDPYItONw,7507
uvicorn/supervisors/statreload.py,sha256=hXznDIW3f54ltxik6hXsBSC-1qBFL30eCvtPSlIvn1o,1569
uvicorn/supervisors/watchfilesreload.py,sha256=41FGNMXPKrKvPr-5O8yRWg43l6OCBtapt39M-gpdk0E,3010
uvicorn/workers.py,sha256=7KGgGAapxGkGeXUcBGunOjSNdI9R44KCoWTGEAqAdfs,3895

View File

@ -0,0 +1,4 @@
Wheel-Version: 1.0
Generator: hatchling 1.26.3
Root-Is-Purelib: true
Tag: py3-none-any

View File

@ -0,0 +1,2 @@
[console_scripts]
uvicorn = uvicorn.main:main

View File

@ -0,0 +1,27 @@
Copyright © 2017-present, [Encode OSS Ltd](https://www.encode.io/).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.