starlette 0.39.2
The little ASGI library that shines.
Starlette is a lightweight ASGI (Asynchronous Server Gateway Interface) framework/toolkit, ideal for building asynchronous web services in Python. It is production-ready and offers a range of features including HTTP web framework, WebSocket support, in-process background tasks, startup and shutdown events, and a test client built on HTTPX. Starlette also supports CORS, GZIP, static files, streaming responses, and session and cookie support. It is compatible with asyncio and trio backends and boasts great overall performance against independent benchmarks. The package can be used as a complete framework or as an ASGI toolkit, allowing for the use of any of its components independently. It requires Python 3.8+ and an ASGI server such as uvicorn, daphne, or hypercorn for operation.
Stars: 10153, Watchers: 10153, Forks: 915, Open Issues: 43The encode/starlette
repo was created 6 years ago and the last code push was 1 weeks ago.
The project is extremely popular with a mindblowing 10153 github stars!
How to Install starlette
You can install starlette using pip
pip install starlette
or add it to a project with poetry
poetry add starlette
Package Details
- Author
- None
- License
- None
- Homepage
- None
- PyPi:
- https://pypi.org/project/starlette/
- Documentation:
- https://www.starlette.io/
- GitHub Repo:
- https://github.com/encode/starlette
Classifiers
- Internet/WWW/HTTP
Related Packages
Errors
A list of common starlette errors.
Code Examples
Here are some starlette
code examples and snippets.
GitHub Issues
The starlette package has 43 open issues on GitHub
- Version 0.19.0
- Background tasks are cancelled if the client closes connection
- Add custom URL convertor register
- Raising Exceptions in sub-applications routes
- Add listener for disconnect to FileResponse
- Move
exception_handlers
type to starlette.types - Add security headers as middlewares
- Remove manual contextvar copy logic
- Let Request.url_for lookup routes in mounted app first
- Make the file argument to UploadFile required
- remove file parameter from UploadFile
- Feature: Add size attribute to UploadFile
- feat: fully type annotate datastructures.py
- Add Python 3.11-dev to the pipeline
- New exception page.