Ferro: The Pydantic x Rust ORM
Ferro is a high-performance, asynchronous ORM for Python, powered by a core engine written in Rust. Designed for simplicity and it only has one dependency: Pydantic. Delivering ergonomics familiar to the modern Pythonista and the speed and safety of Rust's SQLx and Sea-Query.
Key Features
- High-Performance Core: All SQL generation and row hydration are handled by a dedicated Rust engine, minimizing "Python Tax" on data-heavy operations.
- Async First: Built from the ground up for asynchronous applications, utilizing
pyo3-async-runtimesfor non-blocking I/O. - Pydantic Integration: Leverages Pydantic V2 for schema definition and data validation, providing full IDE support and type safety.
- Zero-Copy Intent: Designed with zero-copy principles to maximize throughput during large-scale data retrieval.
- Identity Map: Ensures object consistency across your application by tracking active model instances in a thread-safe registry.
Architecture
Ferro operates through a dual-layer architecture connected via a high-performance FFI (Foreign Function Interface) bridge:
- Python Layer: Developers define models using standard Python classes; a metaclass registers them with the backend.
- Rust Engine: Built on
SQLxandSea-Queryfor GIL-free row parsing and object instantiation.
Installation
Ferro is distributed as pre-compiled wheels for macOS, Linux, and Windows.
pip install ferro-orm
# Or with migration support
pip install "ferro-orm[alembic]"
Ferro currently supports SQLite and PostgreSQL. Register multiple named connections with connect(..., name="...") when a process needs more than one database — see the connections guide.
Quick Start
import asyncio
from ferro import Field, Model, connect
class User(Model):
id: int | None = Field(default=None, primary_key=True)
username: str
is_active: bool = True
async def main():
await connect("sqlite:example.db?mode=rwc", auto_migrate=True)
# Create
alice = await User.create(username="alice")
# Query (lambda predicates — name the parameter after the model, e.g. user for User)
active_users = await User.where(lambda user: user.is_active == True).all()
print(f"Found {len(active_users)} active users.")
if __name__ == "__main__":
asyncio.run(main())
Metadata
Release files for ferro-orm 0.21.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ferro_orm-0.21.0.tar.gz | 1.5 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| ferro_orm-0.21.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| ferro_orm-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| ferro_orm-0.21.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| ferro_orm-0.21.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 24.4 MB
Release files / ferro_orm-0.21.0.tar.gz
| Download URL | ferro_orm-0.21.0.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fb9fc5189f6b847730a237d65cab46f2321762ef7f7ab28dccc1baed7b8a5fc
|
|
BLAKE2b-256 checksum How to use checksums |
5dc482cdee5ac65fd120727f7af9824600c2f1e5aab25db92501a4af0bac4882
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / ferro_orm-0.21.0-cp39-abi3-win_amd64.whl
| Download URL | ferro_orm-0.21.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c7de2a27c057e111091d690cef7ea4c25636606465995a2e68ac88214fd0ab09
|
|
BLAKE2b-256 checksum How to use checksums |
6227da534e277e0c76c2027dcd7ff3b4f4a1e8a2d871872195d9f69fdf840a1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / ferro_orm-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ferro_orm-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
15cd8eee26721a7500d69a23741936d4a193cc53a89a954b2ef6065c08a1a88b
|
|
BLAKE2b-256 checksum How to use checksums |
e8c2418d3808d6a2cecf33cf071e5f3df9bfa9b259a6930ee054b0909fc15779
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / ferro_orm-0.21.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | ferro_orm-0.21.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
58799c09a08e923c3875b28821a33e72a9f5022a16dabb519245e0809e698f41
|
|
BLAKE2b-256 checksum How to use checksums |
85792aa9c8184a94e0559e0c8d82afc461f217551ec9b11fadca44827d0578af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / ferro_orm-0.21.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | ferro_orm-0.21.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
fed6a4c7aeec809acd41828424b334211d37aa2a34363e1be4c45b26b879dcd1
|
|
BLAKE2b-256 checksum How to use checksums |
bf3ba025798d95a362d730300558f1d72ebcd78b64f969ff52b37ffa75287d20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency log