
Litestar Has a Free API — The Python Web Framework Built for Performance
Litestar (formerly Starlite) is a high-performance Python ASGI framework with built-in OpenAPI docs, dependency injection, and ORM integration. It's faster than FastAPI and more feature-complete out of the box. Why Litestar? Faster than FastAPI in benchmarks Built-in DI, caching, rate limiting, sessions SQLAlchemy integration — first-class ORM support DTO system — automatic serialization/filtering Quick Start pip install litestar[standard] from litestar import Litestar , get , post from dataclasses import dataclass @dataclass class Message : text : str sender : str @get ( ' /hello/{name:str} ' ) async def hello ( name : str ) -> dict : return { ' message ' : f ' Hello, { name } ! ' } @post ( ' /messages ' ) async def create_message ( data : Message ) -> Message : return data app = Litestar ([ hello , create_message ]) litestar run # Docs at /schema/swagger Controllers from litestar import Controller , get , post , put , delete class UserController ( Controller ): path = ' /users ' @get
Continue reading on Dev.to Python
Opens in a new tab




