Starlette is a lightweight ASGI web framework and asynchronous HTTP toolkit used to build high-performance HTTP and WebSocket services. It functions as a WebSocket server framework and a collection of ASGI middleware components for managing network requests through non-blocking asynchronous logic.
The framework provides tools for real-time communication via persistent bidirectional channels and infrastructure for high-performance APIs. It includes specialized capabilities for response compression, incremental data streaming, and the execution of non-blocking background tasks after a response is sent.
The toolkit covers a broad surface of web application needs, including static asset delivery, session management, and cross-origin resource sharing configuration. It also provides mechanisms for managing the application lifecycle through startup and shutdown events.