$npx skillfedfor your agent

tortoise-orm

Easy async ORM for python, built with relations in mind

Worth itPyPI Python ModulesReleased Aug 2026636.5K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — tortoise_orm-1.1.8-py3-none-any.whl
v1.1.8 · released 2026-08-10 · Python >=3.10 · 6 runtime deps: pypika-tortoise, iso8601, aiosqlite, anyio, tomlkit, typing-extensions

Yes. Tortoise ORM is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively under Apache-2.0. It is a solid choice for async Python projects that need to work with relational databases and want a Django-like API. Install it if you are building async applications and prefer ORM abstraction over raw SQL; skip it if you need synchronous database access or prefer a different query style.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; database-specific drivers (aiosqlite, asyncpg, aiomysql, etc.) must be installed separately via extras (e.g., pip install tortoise-orm[asyncpg]).
  • Low friction installation with a pure-Python wheel.
  • Active maintenance with a recent release and 5609 repository stars.

License · maintenance · safety

Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most projects.

last release 2026-08-10 (4 days) · last repo commit 2026-08-13 · 5,609 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 636,466 downloads/mo, #5,626 on PyPI

Verify before relying

pip install tortoise-orm

from tortoise import Tortoise, fields
from tortoise.models import Model

class User(Model):
    id = fields.IntField(primary_key=True)
    name = fields.CharField(max_length=20)

await Tortoise.init(
    db_url='sqlite://db.sqlite3',
    modules={'models': ['__main__']}
)
await Tortoise.generate_schemas()
user = await User.create(name='Alice')
print(user.name)
  • Performance characteristics and overhead compared to raw SQL or other async ORMs in production workloads.
  • Maturity of migration system and real-world experience with complex schema evolution.
  • Community size and availability of third-party extensions or integrations beyond documented frameworks.
Same gist for agents: .md · .json

What it is and what it does

Tortoise ORM is an async-native Object-Relational Mapper inspired by Django, designed to let developers work with relational databases using Python objects instead of raw SQL. It abstracts database interactions across SQLite, MySQL, PostgreSQL, Microsoft SQL Server, and Oracle, reducing boilerplate, preventing SQL injection through parameterized queries, and centralizing schema definitions. The package is built on asyncio and integrates with async frameworks.

You define models by inheriting from tortoise.models.Model, then initialize Tortoise to establish relationships and connect to your database. Once initialized, you can create, filter, and query records using async methods like .create(), .filter(), and .prefetch_related(). The package includes a built-in migration CLI for version-controlled schema changes, and supports complex operations like many-to-many relationships, nested prefetching, and filtering across related models.

Use it for

  • Building async web APIs where you need to query databases without blocking the event loop.
  • Defining and managing relational schemas with version-controlled migrations in production applications.
  • Reducing SQL boilerplate in projects that work with multiple database backends (PostgreSQL, MySQL, SQLite, Oracle).
  • Implementing complex queries involving foreign keys, many-to-many relationships, and nested filtering across related models.
  • Preventing SQL injection vulnerabilities by using parameterized queries through an ORM abstraction layer.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Tortoise ORM is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively under Apache-2.0. It is a solid choice for async Python projects that need to work with relational databases and want a Django-like API. Install it if you are building async applications and prefer ORM abstraction over raw SQL; skip it if you need synchronous database access or prefer a different query style.

Install

tortoise-orm on PyPI

Before you install

Low friction installation with a pure-Python wheel. Active maintenance with a recent release and 5609 repository stars. Supports CPython 3.10 and later across multiple platforms.

Requires Python 3.10 or later; database-specific drivers (aiosqlite, asyncpg, aiomysql, etc.) must be installed separately via extras (e.g., pip install tortoise-orm[asyncpg]).

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most projects.

Quickstart

pip install tortoise-orm

from tortoise import Tortoise, fields
from tortoise.models import Model

class User(Model):
    id = fields.IntField(primary_key=True)
    name = fields.CharField(max_length=20)

await Tortoise.init(
    db_url='sqlite://db.sqlite3',
    modules={'models': ['__main__']}
)
await Tortoise.generate_schemas()
user = await User.create(name='Alice')
print(user.name)

Verify before relying

  • Performance characteristics and overhead compared to raw SQL or other async ORMs in production workloads.
  • Maturity of migration system and real-world experience with complex schema evolution.
  • Community size and availability of third-party extensions or integrations beyond documented frameworks.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
pypika-tortoiseiso8601aiosqliteanyiotomlkittyping-extensions
MaintenanceActively maintained 4 days since the last release
Last repo commit
First released
Downloads636,466 / month, #5,626 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PL/SQLProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: DatabaseTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: tortoise_orm-1.1.8-py3-none-any.whl

Tags

Capabilities
async orm pythonasyncio database mapperdjango-like orm asyncasync sql query builderpython async database ormtortoise ormasync relational mapper
Topics
async-firstmigrationsmulti-database
PyPI keywords
sqlmysqlpostgrespsqlsqliteaiosqliteasyncpgrelationaldatabaserdbmsormobject mapperasyncasyncioaiopsycopg

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “asyncio database mapper”

  • tortoise-ormTortoise ORM is an async-native Object-Relational Mapper for Python…
  • odmanticODMantic is an async-first Object Document Mapper for MongoDB that…
  • ponyPony is an object-relational mapper that lets you write database…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also aerich · pony · pypika-tortoise · SQLAlchemy · opentelemetry-instrumentation-tortoiseorm · prisma · ormar · async-factory-boy · peewee · databases