finds.dev

tortoise/tortoise-orm

Familiar asyncio ORM for python, built with relations in mind

View on GitHubHomepage ↗

★ 5,578PythonApache-2.0updated Jun 2026

// the take

Tortoise ORM is an async-native Python ORM with a Django-like API, targeting FastAPI/Sanic/asyncio applications that need proper relation support without blocking I/O. It supports PostgreSQL, MySQL, SQLite, MSSQL, and Oracle with multiple async driver options per database. If you're building an async Python backend and miss Django's ORM ergonomics, this is the most mature option in that space.

Built-in migration framework with a CLI that does autodetection, reversible operations, RunPython/RunSQL, and multi-app projects — no need to bolt on Alembic separately. Multiple async driver choices per database (asyncpg vs psycopg for Postgres, aiomysql vs asyncmy for MySQL) means you're not locked into one library's quirks. Pydantic integration is first-class with generated serializers, not an afterthought. Benchmarks against SQLAlchemy async and others show competitive performance on PostgreSQL reads and writes.

The async context manager requirement for iteration is a footgun — you get silently cached results on the second loop, which will cause subtle bugs if you're not paying attention. Global Tortoise.init() state means testing and multi-tenancy are annoying; there's no clean per-request connection scoping like SQLAlchemy sessions give you. The migration autodetector has known gaps with complex schema changes (renaming models, cross-app FK changes), and the comprehensive_migrations_project example has 25 migrations just to cover edge cases — a sign the happy path isn't that wide. MS SQL and Oracle support is via asyncodbc which is slower and less battle-tested than the PostgreSQL drivers.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
5,578
Forks
486
Language
Python
License
Apache-2.0
Last commit
10 Jun 2026

// nearby

If tortoise-orm isn't quite it.

All repos →