Overview
Starlette 0.45, released on December 29, 2024, drops Python 3.8 support and modernizes the codebase.
Main Features
Dropped Python 3.8
Python 3.8 is no longer supported. The code now uses Python 3.9+ features like | type unions and new asyncio APIs.
python
# pip install starlette>=0.45
# Requires Python 3.9+
from starlette.applications import Starlette
from starlette.routing import Route
from starlette.responses import JSONResponse
async def info(request):
data: dict | None = {'version': '0.45'}
return JSONResponse(data)
app = Starlette(routes=[Route('/info', info)])
