FrameBridge 0.3.4 corresponding-source release
Snapshot assembled only from the signed corresponding-source archive. Source archive SHA-256: db91a270cdefc4be79056ed38a0b4a16747e1ab130592645eac40fa3809809df
This commit is contained in:
1 parent
b8c9b713d8
commit
cdd980e1eb
993 files changed
+255481
-1720
No files matched your search
@@ -0,0 +1,182 @@
|
||||
Metadata-Version: 2.5
|
||||
Name: starlette
|
||||
Version: 1.7.0
|
||||
Summary: The little ASGI library that shines.
|
||||
Project-URL: Homepage, https://github.com/Kludex/starlette
|
||||
Project-URL: Documentation, https://starlette.dev/
|
||||
Project-URL: Changelog, https://starlette.dev/release-notes/
|
||||
Project-URL: Funding, https://github.com/sponsors/Kludex
|
||||
Project-URL: Source, https://github.com/Kludex/starlette
|
||||
Author-email: Tom Christie <tom@tomchristie.com>
|
||||
Maintainer-email: Marcelo Trylesinski <marcelotryle@gmail.com>
|
||||
License-Expression: BSD-3-Clause
|
||||
License-File: LICENSE.md
|
||||
Classifier: Development Status :: 3 - Alpha
|
||||
Classifier: Environment :: Web Environment
|
||||
Classifier: Framework :: AnyIO
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
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 :: 3.14
|
||||
Classifier: Programming Language :: Python :: 3.15
|
||||
Classifier: Topic :: Internet :: WWW/HTTP
|
||||
Requires-Python: >=3.10
|
||||
Requires-Dist: anyio<5,>=4.0.0
|
||||
Requires-Dist: typing-extensions>=4.10.0; python_version < '3.13'
|
||||
Provides-Extra: full
|
||||
Requires-Dist: httpx2>=2.0.0; extra == 'full'
|
||||
Requires-Dist: httpx<0.29.0,>=0.27.0; extra == 'full'
|
||||
Requires-Dist: itsdangerous; extra == 'full'
|
||||
Requires-Dist: jinja2; extra == 'full'
|
||||
Requires-Dist: opentelemetry-api; extra == 'full'
|
||||
Requires-Dist: python-multipart>=0.0.18; extra == 'full'
|
||||
Requires-Dist: pyyaml; extra == 'full'
|
||||
Description-Content-Type: text/markdown
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Kludex/starlette/main/docs/img/starlette_dark.svg" width="420px">
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/Kludex/starlette/main/docs/img/starlette.svg" width="420px">
|
||||
<img alt="starlette-logo" src="https://raw.githubusercontent.com/Kludex/starlette/main/docs/img/starlette.svg">
|
||||
</picture>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<em>✨ The little ASGI framework that shines. ✨</em>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
[](https://github.com/Kludex/starlette/actions)
|
||||
[](https://pypi.python.org/pypi/starlette)
|
||||
[](https://pypi.org/project/starlette)
|
||||
[](https://discord.gg/RxKUF5JuHs)
|
||||
|
||||
---
|
||||
|
||||
**Documentation**: <a href="https://starlette.dev/" target="_blank">https://starlette.dev</a>
|
||||
|
||||
**Source Code**: <a href="https://github.com/Kludex/starlette" target="_blank">https://github.com/Kludex/starlette</a>
|
||||
|
||||
---
|
||||
|
||||
# Starlette
|
||||
|
||||
Starlette is a lightweight [ASGI][asgi] framework/toolkit,
|
||||
which is ideal for building async web services in Python.
|
||||
|
||||
It is production-ready, and gives you the following:
|
||||
|
||||
* A lightweight, low-complexity HTTP web framework.
|
||||
* WebSocket support.
|
||||
* In-process background tasks.
|
||||
* Startup and shutdown events.
|
||||
* Test client built on `httpx2`.
|
||||
* CORS, GZip, Static Files, Streaming responses.
|
||||
* Session and Cookie support.
|
||||
* 100% test coverage.
|
||||
* 100% type annotated codebase.
|
||||
* Few hard dependencies.
|
||||
* Compatible with `asyncio` and `trio` backends.
|
||||
* Great overall performance [against independent benchmarks][techempower].
|
||||
|
||||
## Installation
|
||||
|
||||
```shell
|
||||
$ pip install starlette
|
||||
```
|
||||
|
||||
You'll also want to install an ASGI server, such as [uvicorn](https://uvicorn.dev) or any of the [other ASGI server implementations](https://asgi.readthedocs.io/en/latest/implementations.html#servers).
|
||||
|
||||
```shell
|
||||
$ pip install uvicorn
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```python title="main.py"
|
||||
from starlette.applications import Starlette
|
||||
from starlette.responses import JSONResponse
|
||||
from starlette.routing import Route
|
||||
|
||||
|
||||
async def homepage(request):
|
||||
return JSONResponse({'hello': 'world'})
|
||||
|
||||
routes = [
|
||||
Route("/", endpoint=homepage)
|
||||
]
|
||||
|
||||
app = Starlette(debug=True, routes=routes)
|
||||
```
|
||||
|
||||
Then run the application using Uvicorn:
|
||||
|
||||
```shell
|
||||
$ uvicorn main:app
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
Starlette only requires `anyio`, and the following are optional:
|
||||
|
||||
* [`httpx2`][httpx2] - Required if you want to use the `TestClient`.
|
||||
* [`jinja2`][jinja2] - Required if you want to use `Jinja2Templates`.
|
||||
* [`opentelemetry-api`][opentelemetry-api] - Required for `OpenTelemetryMiddleware`.
|
||||
* [`python-multipart`][python-multipart] - Required if you want to support form parsing, with `request.form()`.
|
||||
* [`itsdangerous`][itsdangerous] - Required for `SessionMiddleware` support.
|
||||
* [`pyyaml`][pyyaml] - Required for `SchemaGenerator` support.
|
||||
|
||||
You can install all of these with `pip install starlette[full]`.
|
||||
|
||||
## Framework or Toolkit
|
||||
|
||||
Starlette is designed to be used either as a complete framework, or as
|
||||
an ASGI toolkit. You can use any of its components independently.
|
||||
|
||||
```python
|
||||
from starlette.responses import PlainTextResponse
|
||||
|
||||
|
||||
async def app(scope, receive, send):
|
||||
assert scope['type'] == 'http'
|
||||
response = PlainTextResponse('Hello, world!')
|
||||
await response(scope, receive, send)
|
||||
```
|
||||
|
||||
Run the `app` application in `example.py`:
|
||||
|
||||
```shell
|
||||
$ uvicorn example:app
|
||||
INFO: Started server process [11509]
|
||||
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
|
||||
```
|
||||
|
||||
Run uvicorn with `--reload` to enable auto-reloading on code changes.
|
||||
|
||||
## Modularity
|
||||
|
||||
The modularity that Starlette is designed on promotes building reusable
|
||||
components that can be shared between any ASGI framework. This should enable
|
||||
an ecosystem of shared middleware and mountable applications.
|
||||
|
||||
The clean API separation also means it's easier to understand each component
|
||||
in isolation.
|
||||
|
||||
---
|
||||
|
||||
<p align="center"><i>Starlette is <a href="https://github.com/Kludex/starlette/blob/main/LICENSE.md">BSD licensed</a> code.<br/>Designed & crafted with care.</i></br>— ⭐️ —</p>
|
||||
|
||||
[asgi]: https://asgi.readthedocs.io/en/latest/
|
||||
[httpx2]: https://pypi.org/project/httpx2/
|
||||
[jinja2]: https://jinja.palletsprojects.com/
|
||||
[opentelemetry-api]: https://opentelemetry.io/docs/languages/python/api/
|
||||
[python-multipart]: https://multipart.fastapiexpert.com/
|
||||
[itsdangerous]: https://itsdangerous.palletsprojects.com/
|
||||
[sqlalchemy]: https://www.sqlalchemy.org
|
||||
[pyyaml]: https://pyyaml.org/wiki/PyYAMLDocumentation
|
||||
[techempower]: https://github.com/TechEmpower/FrameworkBenchmarks
|
||||
@@ -0,0 +1,41 @@
|
||||
starlette/__init__.py,sha256=lEEx5lwinUby-YNl7w-VFGUcjcibsJ9EuzgJ2W7ocrU,22
|
||||
starlette/_exception_handler.py,sha256=8Vm915fWYe9xLo_za5iQ5WyrAvFBu2kEEJc7XreTyOk,2257
|
||||
starlette/_utils.py,sha256=NTNRqxu24V4GwVq5gnhQ0oFBlRnrjbywbKahzeiwrw0,4211
|
||||
starlette/applications.py,sha256=gYh-C6992lgRukt6Z-Scu6t66XsyG6cuR1x5f5iWkOk,5763
|
||||
starlette/authentication.py,sha256=rJx0wvk1xsVifLsyiHV6P_b3oAherBRXW6QkXKw3APM,5341
|
||||
starlette/background.py,sha256=D-XpUpFRgUBnZeA1tHgzMOgube6ICVZFlOA4ML0q1T8,1122
|
||||
starlette/concurrency.py,sha256=Pp4kXQYO85cWxY7XVNt5lcYvhYHUquyLguCec7hKKoM,1701
|
||||
starlette/config.py,sha256=GVwko0pGSusxuQHO35tL_Nt_ApL0fmVYL3IiHHYpLW4,4426
|
||||
starlette/convertors.py,sha256=F1rse3AacN9rsfJnTeuDnjbN51r_ouHc3WLyYkjkX_o,2304
|
||||
starlette/datastructures.py,sha256=NdxfT1u9a-NIoFGoz257evM14p1sq__46iMp9Xo_-60,23200
|
||||
starlette/endpoints.py,sha256=KI-tMTdlqi4rU1eR9hnOptdyGFxc_T1adwOKIgeOBm0,5304
|
||||
starlette/exceptions.py,sha256=-0sNmNNLa46g9V6xpsqOqqPwDRJMoe4vEqDAbCVQJTU,1492
|
||||
starlette/formparsers.py,sha256=rdPatCDCwT8yj1mDeFOAHknV7O4x3wU0cCZs4GbVaOI,12374
|
||||
starlette/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
starlette/requests.py,sha256=hpGwGuSez6CF_mQZNDZ49zt3yS_GOkERBqd9jpvwrEQ,12708
|
||||
starlette/responses.py,sha256=5Ypb6Ud-MLloC7Jw4PGw_G4lKuG6ZXZecNOUZzLTJ_c,22090
|
||||
starlette/routing.py,sha256=FSFciPQYfJjPSY51exiMDgb76A2V94t2MMTlH5JhGvQ,30472
|
||||
starlette/schemas.py,sha256=e9KnCHN1KBV9F8Ml54wC55ItHE5LES5WWXLVEYUgot0,5494
|
||||
starlette/staticfiles.py,sha256=UP3kCtjzAs1ZsdluuP7NLEq55ER_FI65LMfKVbrsMBg,9071
|
||||
starlette/status.py,sha256=XYcVn-aU522TYJ8BJxl0WUnf6J_3yBTQz7Tqgye8KO4,6430
|
||||
starlette/templating.py,sha256=y-ATlQrNDoLMZs5hrHzQBTapECBDr9wAl-bs8Blk5jw,5447
|
||||
starlette/testclient.py,sha256=noWneuuRPAkTsqnel3rmF1VOzQimReyJvKLggJ__dhs,21597
|
||||
starlette/types.py,sha256=87wTuwF1036QxRse3mL5qOuS9i4a9xaIZMqTjY-lvvo,1041
|
||||
starlette/websockets.py,sha256=mflI9LUwlf93_uujI8w-tY-noS-zdREbzaUmeOVDP9c,8518
|
||||
starlette/middleware/__init__.py,sha256=BORnOj0n0mL1OWUUs1PLTu1SASmvT8kEEDA6cbuhuPo,1349
|
||||
starlette/middleware/authentication.py,sha256=-RSwwJ0pIkrM0v-2Ip8HXVB24xtSp7ObzR3OfTC8wSA,1800
|
||||
starlette/middleware/base.py,sha256=5Od_lmyCvfI0jsEDWiQTiHy9DEbAb3tKAPedJ24tils,10500
|
||||
starlette/middleware/body_limit.py,sha256=L12EvFC-9ryO_A_2ngdDpt6WaVkwhAtqiuJPhyhqyA8,4609
|
||||
starlette/middleware/cors.py,sha256=_OnWebUt2WcPOCFtqs3KsVnGmVzbUlbuUWLcWNJaXE8,7688
|
||||
starlette/middleware/errors.py,sha256=E14AZhjybcfRH72ByiaQ7Mdt0AwnYZqiv6zGtC0F0xM,8126
|
||||
starlette/middleware/exceptions.py,sha256=7OgSUiBgwHS4VMmpaWlw21uDKNDmOMzLVZrWDLDUqWo,2784
|
||||
starlette/middleware/gzip.py,sha256=7ijfBszT4h6syblkcd89ple43WqYBgH-hCycsKuWtms,8805
|
||||
starlette/middleware/httpsredirect.py,sha256=fogRKypMx3gKzoHgJpKPIITGdKxFdUCEAqskRHndZBQ,1023
|
||||
starlette/middleware/opentelemetry.py,sha256=lAP3BYvOjunvnPBK9GcQaZR7MF6wVmYLbpc75-54hwI,5719
|
||||
starlette/middleware/sessions.py,sha256=8YpoNTO02-KWaUvtJdNe7lKExKxYuZD-hIRC3TdtBf4,5175
|
||||
starlette/middleware/trustedhost.py,sha256=WkeCKP_loVg5IBpjjMyoWXEnS0URQmon8Iee-dTz46U,2456
|
||||
starlette/middleware/wsgi.py,sha256=8_xjdUNjA-DcWY0owaqyiZlGcvml4UMIB18rGxtdNvg,5536
|
||||
starlette-1.7.0.dist-info/METADATA,sha256=94cPwZq3wuNkiHBXNAuftH6b2nTSSwbFjKOZSUq_4Bk,6610
|
||||
starlette-1.7.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
||||
starlette-1.7.0.dist-info/licenses/LICENSE.md,sha256=3LlWd6AiQCQxh-lk-UGEfRmxeCHPmeWvrmhPqzKMGb8,1518
|
||||
starlette-1.7.0.dist-info/RECORD,,
|
||||
@@ -0,0 +1,4 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: hatchling 1.32.0
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
@@ -0,0 +1,27 @@
|
||||
Copyright © 2018, [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.
|
||||
Reference in new issue
Block a user