Skip to main content

Ferro: The Pydantic x Rust ORM

PyTest Ruff Zensical UV Rust Python PyPI License Downloads Codecov Issues

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-runtimes for 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:

  1. Python Layer: Developers define models using standard Python classes; a metaclass registers them with the backend.
  2. Rust Engine: Built on SQLx and Sea-Query for 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 the migrations CLI (ferro migrate)
pip install "ferro-orm[cli]"
# Or with the Alembic bridge
pip install "ferro-orm[alembic]"

Schema changes go through auto-migrate while you develop and reviewed migrations (ferro migrate new, ferro migrate up) in production — see Schema Management. 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.25.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ferro-orm 0.25.0
File Size Uploaded Provenance Actions
ferro_orm-0.25.0.tar.gz 2.6 MB With provenance Details for ferro_orm-0.25.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ferro-orm 0.25.0
File Actions
ferro_orm-0.25.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for ferro_orm-0.25.0-cp39-abi3-win_amd64.whl
ferro_orm-0.25.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for ferro_orm-0.25.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
ferro_orm-0.25.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for ferro_orm-0.25.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
ferro_orm-0.25.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for ferro_orm-0.25.0-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 33.1 MB

Release files / ferro_orm-0.25.0.tar.gz

Download URL ferro_orm-0.25.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
5bf6cce350a074d69656eb0ea71518d827c1aa72c9c9f8f87553a66e1a580391
BLAKE2b-256 checksum
How to use checksums
54199792b0d18b83752fea21c3a4d8e5c46b24132bd03114a39dd103bfb61b2e
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 Oct 19, 2026.

Transparency log

Release files / ferro_orm-0.25.0-cp39-abi3-win_amd64.whl

Download URL ferro_orm-0.25.0-cp39-abi3-win_amd64.whl
Size 7.5 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a39dd9251cf75001a878ebe23312a36dde583be98ba4b0f2a1bc0867494bd089
BLAKE2b-256 checksum
How to use checksums
e5b5f96a1d4df1ff300e82e5de4631e7990aa9130a7d76cff5b6310895f22882
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 Oct 19, 2026.

Transparency log

Release files / ferro_orm-0.25.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL ferro_orm-0.25.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
15a6728e275950351db29fcdc6831fc3a610052282ed3013dd88cfa1d17b83ce
BLAKE2b-256 checksum
How to use checksums
2df3023b5e5af2ee1cdf4f6a9610fd16ec290f7f4a9870de823e927011734ed8
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 Oct 19, 2026.

Transparency log

Release files / ferro_orm-0.25.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL ferro_orm-0.25.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 7.9 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
80ef7ebccfc24f10042fc94cba5c61fd0834f18fe971880251f6515e89cb760e
BLAKE2b-256 checksum
How to use checksums
4226e11a85976734754bafd5c68d0bb9b6c31f7c72cc58060c82e5c0050dcf79
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 Oct 19, 2026.

Transparency log

Release files / ferro_orm-0.25.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL ferro_orm-0.25.0-cp39-abi3-macosx_11_0_arm64.whl
Size 7.2 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
88a99ff8e7edb04a1a9c1f7400fd8f83f8c7fe314b488bb354a9432146fa1361
BLAKE2b-256 checksum
How to use checksums
c2c9cc44078be504eb9595f5045dedef45b33bed5b50f404641de7ecdddf77ab
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 Oct 19, 2026.

Transparency log

Security for ferro-orm 0.25.0

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.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for ferro_orm-0.25.0.tar.gz

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 Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.25.0 This release

5 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page