Skip to content

Choose the right framework

Tenchi focuses on backend changes that humans and agents can understand, implement, and verify. Its small application model combines typed contracts, plain use cases, and explicit ports with inspection, generation, and compatibility evidence.

At a glance

FrameworkStrongest fitMain tradeoff
FastAPITyped HTTP APIs with interactive documentationBuilt-in API ergonomics and dependency injection; application architecture remains a project choice
StarletteSmall ASGI toolkit and low-level controlThe application supplies its contract and use-case conventions
LitestarTyped ASGI applications with integrated capabilitiesMore built-in features and framework concepts
Django NinjaTyped APIs inside the Django ecosystemUses Django's infrastructure and conventions
TenchiContract-first backends with a shared development workflow for people and agentsPrescribed source structure and explicit wiring; infrastructure integrations remain application-owned

Choose Tenchi when

Choose another framework when

Tenchi and Starlette

Tenchi exposes Starlette where that is useful. create_app() returns a Starlette application, accepts Starlette middleware, and allows explicitly declared passthrough responses for streaming, files, and redirects. Tenchi adds contract ownership around those primitives rather than replacing the ASGI ecosystem.

Tenchi and FastAPI

Both frameworks use Python annotations and Pydantic at the boundary. FastAPI optimizes for concise route declaration and ecosystem reach. Tenchi separates the contract from the use case so the same application function is not owned by HTTP, and it includes a contract-driven runtime client and conservative OpenAPI compatibility analysis.

The tradeoff is explicit source structure and application-owned wiring. Evaluate it by making a representative change: find the affected behavior, change its contract, implement and test it, then review the compatibility evidence. That shows whether the conventions help your team more clearly than the size of the first endpoint example.