# tortoise/tortoise-orm

Familiar asyncio ORM for python, built with relations in mind

Repository: https://github.com/tortoise/tortoise-orm
Canonical: https://ross.abutalabs.com/products/tortoise-orm
Homepage: https://tortoise.github.io
Language: Python
License: Apache-2.0
License Family: permissive
Topics: orm, asyncio, async, python3, sqlite, postgresql, mysql
Last push: 2026-08-24T16:57:01+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 97, longevity 100
- inputs: {"age_days": 3079, "days_push": 9, "days_rel": 23, "gap_med": 13.0, "n_releases_24m": 23}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5613, forks 499 (observed 2026-08-28T04:09:23.020397+00:00)

## What it is
Tortoise ORM is an asyncio-native Object Relational Mapper for Python with a Django-inspired API, supporting SQLite, PostgreSQL, MySQL, SQL Server, and Oracle. It provides model definitions, relations, queries, and schema migrations for async Python applications.

## Use cases
- use an async ORM for a FastAPI backend
- define database models with relations in asyncio Python
- migrate from Django ORM to an async stack
- query PostgreSQL without writing raw SQL in async code
- manage schema migrations for an async Python app
- benchmark-friendly ORM for high-throughput database reads and writes

## When to choose
- your application is asyncio-based and needs database access
- you want a Django-like model and query API in async Python
- you need support for multiple relational databases including PostgreSQL and MySQL
- you want a lightweight ORM with good performance

## When to avoid
- you need a fully synchronous ORM like Django ORM or SQLAlchemy sync
- your project requires long-term API stability, as breaking changes are expected
- you need NoSQL or non-relational database support
- you rely on Python versions older than 3.10

## Facets
- artifact type: library
- maturity: active
- function: orm, database, database-driver
- domain: databases, backend, web-development
- platform: python, cross-platform
- tags: asyncio, django-inspired, postgresql, mysql, sqlite, migrations, relational-database

## Member repositories
- tortoise/tortoise-orm (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:23.020397+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:55:25.202329+00:00, confidence not recorded.
  - readme: https://github.com/tortoise/tortoise-orm (fetched 2026-08-28T04:09:23.020397+00:00, sha c17b48905f53)
  - homepage: https://tortoise.github.io (fetched 2026-08-29T08:50:11.020198+00:00, sha 5fab6e8d4809)
  - registry_pypi: https://pypi.org/pypi/tortoise-orm/json (fetched 2026-08-29T08:50:11.029613+00:00, sha 2cf914589cdb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
