Starlette is a lightweight ASGI framework and toolkit designed for building asynchronous web services in Python. The repository, maintained primarily by Kludex with significant contributions from lovelydinosaur and adriangb, serves as a production-ready foundation for async web applications that prioritizes simplicity and performance.
The framework provides a comprehensive set of features for HTTP web development. It includes built-in WebSocket support, in-process background tasks, and startup and shutdown event handling. Starlette offers a test client built on httpx, middleware for CORS and GZip compression, static file serving, streaming responses, and session and cookie management. The codebase maintains 100% test coverage and is fully type annotated, with minimal hard dependencies beyond anyio. The framework is compatible with both asyncio and trio backends and performs competitively against independent benchmarks.
Starlette's design philosophy emphasizes modularity and flexibility. Rather than forcing developers into a monolithic framework structure, it can be used as either a complete framework or as an ASGI toolkit where individual components are employed independently. This approach promotes the creation of reusable components that can be shared across different ASGI frameworks, fostering an ecosystem of shared middleware and mountable applications. The clean API separation makes each component easier to understand and work with in isolation.
The optional dependency structure reflects this modularity. While only anyio is required, additional packages can be installed as needed: httpx for the test client, Jinja2 for templating, python-multipart for form parsing, itsdangerous for session middleware, and pyyaml for schema generation support. Users can install all optional dependencies with a single command for full functionality.
According to GitGenius activity tracking, the repository demonstrates active maintenance with a median issue and pull request response latency of 3.9 hours across tracked items, indicating responsive community engagement. The most frequently labeled issues relate to good first issue contributions, confirmation requirements, and test client functionality. Kludex leads the contribution activity with 329 tracked events, followed by lovelydinosaur with 59 events and adriangb with 38 events. The repository shares contributors with notable projects including simonw/datasette, python/cpython, and holoviz/panel, suggesting its integration into broader Python ecosystem projects.
The framework is distributed under a BSD license and requires an ASGI server implementation such as uvicorn to run applications. Its lightweight nature combined with comprehensive feature coverage makes it suitable for developers seeking a balance between simplicity and functionality in async Python web development.