API Reference

piccolo-orm

Async ORM for Python with a fluent query builder, migrations, and Pydantic integration, built on PostgreSQL and SQLite.

Official Documentation ↗
CompatibilityThis documentation covers version v1.0. Check the official docs for the latest API surface.

Installation

pippip install piccolo-orm

Methods

piccolo-orm is async orm for python with a fluent query builder, migrations, and pydantic integration, built on postgresql and sqlite. This page documents the core methods, installation, and common usage patterns for the current stable release.

Installation

Install piccolo-orm with your preferred package manager using the command shown in the frontmatter. The package is published to the Python Package Index and ships with TypeScript types where applicable.

Core methods

The methods listed in the frontmatter cover the primary API surface. Each signature reflects the v1.0 release. Consult the official documentation linked in sourceUrl for advanced options, edge cases, and breaking changes between major versions.

Frequently asked questions

The faq section in the frontmatter answers the most common questions about piccolo-orm, including comparisons with alternatives, configuration tips, and runtime requirements. If your question is not covered, check the source URL for the full guide.

Errors

The official API reference declares the following error types:

API reference evidence

Fetched from official sources on 2026-11-08T19:58:23+08:00 via WebFetch https://piccolo-orm.readthedocs.io/en/latest/;WebFetch https://piccolo-orm.readthedocs.io/en/latest/piccolo/api_reference/index.html(仓库 piccolo/utils/sync.py 抓取返回空).

FAQ

Is it async-only?
Yes. Queries are awaitable; use run_sync for synchronous contexts like migrations.
Which databases are supported?
PostgreSQL and SQLite; asyncpg and aiosqlite are used under the hood.
Does it support migrations?
Yes. Use piccolo migrations create and piccolo migrations forwards; migrations are auto-generated from table definitions.