What does it do?
Tortoise ORM lets Python code represent database tables and relationships as Python classes and objects, much like SQLAlchemy or Django’s ORM, but built natively around async code from day one rather than having async support bolted on afterward. Async code lets a program handle many database operations at once instead of waiting for each one to finish before starting the next, which matters a lot for busy web services handling many users simultaneously. Its design intentionally borrows heavily from Django’s ORM, so anyone who’s used Django will find its syntax and structure familiar right away. It’s commonly paired with modern async web frameworks that need a database layer able to keep up with their speed.
See it in action
This code defines a simple “Person” record, creates a small database file for it, adds one person named Alice, and prints everyone stored, without freezing the program while it waits.
import asyncio
from tortoise import Tortoise, fields
from tortoise.models import Model
class Person(Model):
name = fields.CharField(max_length=50)
async def main():
await Tortoise.init(db_url="sqlite://db.sqlite3", modules={"models": ["__main__"]})
await Tortoise.generate_schemas()
await Person.create(name="Alice")
print(await Person.all())
asyncio.run(main())
Why would a non-developer care?
Modern web applications increasingly rely on async code to handle lots of simultaneous users efficiently, but for a while Python’s database tools hadn’t fully caught up to that shift. Tortoise ORM matters because it closes that gap, giving async applications a database layer that doesn’t become the bottleneck slowing everything else down. Without native async database support, an otherwise fast async web service could end up waiting on the database anyway, undoing the whole point of going async in the first place.
Real-world examples
Tortoise ORM is commonly paired with FastAPI, one of the fastest-growing Python web frameworks, built specifically for async, high-performance APIs. It’s a common choice for newer projects that want Django-like database ergonomics without being locked into the full Django framework. Without a purpose-built async ORM like this, developers would need to either accept synchronous database bottlenecks in an otherwise async app, or manage async database calls with more manual, lower-level code.
Who uses it
Developers building async Python web applications, especially with FastAPI, who want Django-style database ergonomics without adopting all of Django.
How it compares to alternatives
SQLAlchemy has added async support over time but wasn’t originally designed around it, while Tortoise ORM was async-first from its creation. Django’s ORM offers similarly friendly syntax but is deeply tied to the synchronous Django framework itself. Peewee is a lighter synchronous alternative for projects that don’t need async at all.