About this project

Starlette is a lightweight ASGI (Asynchronous Server Gateway Interface) framework designed for building asynchronous web applications in Python. It provides core features such as HTTP routing, WebSocket handling, background task execution, startup/shutdown events, CORS, GZip compression, static file serving, streaming responses, session/cookie management, and full test coverage. The codebase is fully type-annotated and supports both asyncio and trio backends. Starlette can be used as a standalone framework or as a toolkit — its components are modular and can be integrated independently into other ASGI-compatible projects. It requires only 'anyio' as a hard dependency; optional features like test client, Jinja2 templates, OpenTelemetry middleware, form parsing, session support, and schema generation require additional packages, installable via 'starlette[full]'. Performance benchmarks show it competes well against other frameworks. It pairs with ASGI servers like Uvicorn for deployment. The project is BSD licensed and emphasizes clean API design to encourage reusable middleware and mountable applications across the ASGI ecosystem.