#211211th of 358 in Backends, databases and hosting
tortoise-orm
Async Python ORM with a Django-like API and built-in migrations
- Stars
- 5.6k
- License
- Apache-2.0
- Last commit
- Nov 2026
- Last release
- Oct 2026
- Language
- Python
5,510 on 26 Apr 20265,644 on 22 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Tortoise ORM is an asyncio object-relational mapper for Python 3.10+ with a Django-style model and query API. It supports SQLite, PostgreSQL, MySQL, Microsoft SQL Server and Oracle, and ships a migration CLI (init, makemigrations, migrate, sqlmigrate). It is a general database library, not an AI project, so it fits the backends category as a data layer for apps.
Who it is for: Python developers building async apps (FastAPI, Sanic) who want an ORM
Strengths
- Async-native API with Django-like models, filters, prefetch_related and related-field lookups
- Built-in migrations: autodetect changes, RunPython/RunSQL, reversible ops, SQL preview
- Covers SQLite, PostgreSQL, MySQL, MS SQL and Oracle, with a choice of drivers for some
- Publishes benchmarks against other Python ORMs on PostgreSQL 17
Weaknesses
- A library only: no server, auth, storage or hosting, so it is not a full backend
- MS SQL and Oracle both go through the asyncodbc extra
- generate_schemas is development-only; production needs the migration framework
- No AI or LLM features; it is a general-purpose ORM
What it needs
- no GPU
- Needs Python 3.10+, aiosqlite (SQLite default), asyncpg or psycopg (PostgreSQL), aiomysql or asyncmy (MySQL), asyncodbc (MS SQL, Oracle)
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe.
Known problems
Reported, then fixed by a linked change
- Postgres connection string (dsn) with multi-host does not work ↗ (opens in a new tab)3 reactions · closed 5 Nov 2026Fixed by fix(config): accept multi-host PostgreSQL URLs ↗ (opens in a new tab)
- Bug: `pydantic_model_creator` incorrectly marks fields as `Optional` when default is not `None` ↗ (opens in a new tab)2 reactions · closed 8 Feb 2026Fixed by Fix pydantic setting optional for fields with default values ↗ (opens in a new tab)
- Tortoise.generate_schemas() raises exception ↗ (opens in a new tab)2 reactions · closed 16 Dec 2025Fixed by Fix exception when creating aiosqlite connections on aiosqlite==0.22.0 ↗ (opens in a new tab)
- New migrations: LookupError: Model state models.Tournament is unknown ↗ (opens in a new tab)1 reactions · closed 7 Feb 2026Fixed by Migration fixes and improvements, add example project with all fields ↗ (opens in a new tab)
- Tortoise orm's expand_db_url() throws ValueError("Invalid IPv6 URL") for my db_url ↗ (opens in a new tab)0 reactions · closed 10 Feb 2026Fixed by Fix expand_db_url to handle special characters in passwords ↗ (opens in a new tab)
Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.
Also in Backends, databases and hosting
See all 358| Rank | Project | Score |
|---|---|---|
| #209 | arangodbMulti-model database for graphs, JSON documents and full-text search via AQL | 67 out of 100 |
| #210 | ubicloudOpen-source IaaS control plane for VMs, Postgres and Kubernetes on bare metal | 67 out of 100 |
| #212 | orientdbJava multi-model NoSQL database with graph, document and SQL support | 67 out of 100 |
| #213 | spring-cloud-gatewayAPI gateway for Spring Boot 3 with route predicates and per-route filters | 67 out of 100 |
| #214 | graphql-phpPHP implementation of the GraphQL specification, ported from graphql-js | 67 out of 100 |