pypika-tortoise
Forked from pypika and streamline just for tortoise-orm
Decision gist · record as of 2026-08-14
Yes, if you use Tortoise ORM. It's the query builder Tortoise depends on, actively maintained, has no external dependencies, and carries permissive licensing. Install it as part of your Tortoise setup rather than as a standalone choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low install friction with no runtime dependencies.
- Actively maintained as of March 2026 with recent commits, though the repository has modest visibility (10 stars).
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0, a permissive license that allows commercial and private use with minimal restrictions—suitable for most projects.
last release 2026-03-13 (154 days) · last repo commit 2026-03-13 · 10 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 586,908 downloads/mo, #5,879 on PyPI
Alternatives
Verify before relying
pip install pypika-tortoise
from pypika_tortoise import Query, Table
users = Table('users')
q = Query.from_(users).select(users.id, users.name).where(users.active == True)- Whether this fork diverges significantly enough from pypika to warrant separate maintenance long-term
- Performance improvements claimed in the description—no benchmarks provided in the fact sheet
What it is and what it does
pypika-tortoise is a fork of the pypika SQL query builder, stripped down and adapted specifically for Tortoise ORM. It removes database support and features that Tortoise doesn't use, focusing instead on generating SQL queries efficiently for the ORM's particular use cases. The package exposes a programmatic interface to construct SQL queries—SELECT, WHERE, JOIN, and other clauses—using Python syntax that mirrors the structure of the resulting SQL.
It serves as the query-building layer for Tortoise ORM applications, allowing developers to construct database queries in code rather than writing raw SQL strings. With no external runtime dependencies and support for current Python versions, it integrates cleanly into Tortoise-based projects.
Use it for
- Building dynamic SELECT queries programmatically within Tortoise ORM models and migrations
- Constructing complex WHERE clauses and joins without writing raw SQL strings
- Generating parameterized queries to prevent SQL injection in Tortoise applications
- Simplifying query construction in data access layers that use Tortoise ORM
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use Tortoise ORM.
It's the query builder Tortoise depends on, actively maintained, has no external dependencies, and carries permissive licensing. Install it as part of your Tortoise setup rather than as a standalone choice.
Install
pypika-tortoise on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained as of March 2026 with recent commits, though the repository has modest visibility (10 stars).
Requires Python 3.9 or later.
License in practice
Licensed under Apache-2.0, a permissive license that allows commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install pypika-tortoise
from pypika_tortoise import Query, Table
users = Table('users')
q = Query.from_(users).select(users.id, users.name).where(users.active == True)
Verify before relying
- Whether this fork diverges significantly enough from pypika to warrant separate maintenance long-term
- Performance improvements claimed in the description—no benchmarks provided in the fact sheet
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 154 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 586,908 / month, #5,879 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: pypika_tortoise-0.6.5-py3-none-any.whl
Tags
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 › “tortoise orm sql builder”
- pypika-tortoiseGenerates SQL queries programmatically for Tortoise ORM, providing a…
- tortoise-ormTortoise ORM is an async-native Object-Relational Mapper for Python…
- opentelemetry-instrumentation-tortoiseormAdds distributed tracing to Tortoise ORM queries across MySQL,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also PyPika · tortoise-orm · aerich · opentelemetry-instrumentation-tortoiseorm · SQLAlchemy · django-query-builder · async-factory-boy · peewee · jinjasql2 · sqlalchemy-trino