piccolo-orm
Async ORM for Python with a fluent query builder, migrations, and Pydantic integration, built on PostgreSQL and SQLite.
Official Documentation ↗v1.0. Check the official docs for the latest API surface.Installation
pip install piccolo-ormMethods
No methods match this filter.
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:
ValueError(exception(Table 构造时 _ignore_missing=False 且缺少列值)) — official text: “IfFalseaValueErrorwill be raised if any column values haven’t been provided.” (source: https://piccolo-orm.readthedocs.io/en/latest/piccolo/api_reference/index.html, fetched 2026-11-08T19:58:23+08:00)
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 抓取返回空).
Table→ signature from https://piccolo-orm.readthedocs.io/en/latest/piccolo/api_reference/index.html; official text: “The class represents a database table. An instance represents a row. The constructor can be used to assign column values.”select→ signature from https://piccolo-orm.readthedocs.io/en/latest/piccolo/api_reference/index.html; official text: “Get data in the form of a list of dictionaries, with each dictionary representing a row. These are all equivalent:await Band.select().columns(Band.name) await Band.select(Band.name) await Band.select('name')”
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.
Report a problem with this API docOpens a pre-filled issue on GitHub.