A high-performance, Rust-backed ORM for Python.
Project description
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 as runtime backends. Named multi-database routing and custom connection-pool kwargs are planned, but not part of the current public API.
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
active_users = await User.where(User.is_active == True).all()
print(f"Found {len(active_users)} active users.")
if __name__ == "__main__":
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ferro_orm-0.4.0.tar.gz.
File metadata
- Download URL: ferro_orm-0.4.0.tar.gz
- Upload date:
- Size: 299.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cea8e72bf8c4a30ff9ada547e5eeb10514509eb17b144ff8d03ab396fe90799a
|
|
| MD5 |
64dfe5e7c54c1f6826386205a3801850
|
|
| BLAKE2b-256 |
7dd38817d1eeed2c8917c162a5cf81a2fb56a97efc4d04895352e876af81d404
|
Provenance
The following attestation bundles were made for ferro_orm-0.4.0.tar.gz:
Publisher:
release.yml on syn54x/ferro-orm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ferro_orm-0.4.0.tar.gz -
Subject digest:
cea8e72bf8c4a30ff9ada547e5eeb10514509eb17b144ff8d03ab396fe90799a - Sigstore transparency entry: 1393610814
- Sigstore integration time:
-
Permalink:
syn54x/ferro-orm@911e77d15a63df893543bfe6500c5283e8f066f3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/syn54x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@911e77d15a63df893543bfe6500c5283e8f066f3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ferro_orm-0.4.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: ferro_orm-0.4.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 4.3 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1100ef4f9ffecdf659d9aeedcc9a53c0477a77128e14caac8b13cbcff1d56ad
|
|
| MD5 |
bcf57d5e5bffc51429d2b72aa1ddead9
|
|
| BLAKE2b-256 |
893a56caa4d3d31ec4a9d460777b97970c7b99b413098aa1a3e70b8a0d514fa3
|
Provenance
The following attestation bundles were made for ferro_orm-0.4.0-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on syn54x/ferro-orm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ferro_orm-0.4.0-cp39-abi3-win_amd64.whl -
Subject digest:
f1100ef4f9ffecdf659d9aeedcc9a53c0477a77128e14caac8b13cbcff1d56ad - Sigstore transparency entry: 1393610820
- Sigstore integration time:
-
Permalink:
syn54x/ferro-orm@911e77d15a63df893543bfe6500c5283e8f066f3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/syn54x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@911e77d15a63df893543bfe6500c5283e8f066f3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ferro_orm-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: ferro_orm-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14fe09e59a0c45b44bf248c335489cf608805f18e9193aec9a410ac23ec8133a
|
|
| MD5 |
0163641841423fd7db6140063c25b671
|
|
| BLAKE2b-256 |
48c8a6322cc3206ea25c9ade51412eae1373d50d0f487ece27115ce279b788f2
|
Provenance
The following attestation bundles were made for ferro_orm-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on syn54x/ferro-orm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ferro_orm-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
14fe09e59a0c45b44bf248c335489cf608805f18e9193aec9a410ac23ec8133a - Sigstore transparency entry: 1393610829
- Sigstore integration time:
-
Permalink:
syn54x/ferro-orm@911e77d15a63df893543bfe6500c5283e8f066f3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/syn54x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@911e77d15a63df893543bfe6500c5283e8f066f3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ferro_orm-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: ferro_orm-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d9513c056ce54ebd30b125e42bf12c55bf5294d6c74255a2533e93e65dcc1e3
|
|
| MD5 |
df748d8f4918343a4ff57d6d313de7a3
|
|
| BLAKE2b-256 |
43d93ad9b80c2e88a43ce3dfecb1b70a28a50212db65d1e586b1676924ed6e8e
|
Provenance
The following attestation bundles were made for ferro_orm-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on syn54x/ferro-orm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ferro_orm-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
6d9513c056ce54ebd30b125e42bf12c55bf5294d6c74255a2533e93e65dcc1e3 - Sigstore transparency entry: 1393610835
- Sigstore integration time:
-
Permalink:
syn54x/ferro-orm@911e77d15a63df893543bfe6500c5283e8f066f3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/syn54x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@911e77d15a63df893543bfe6500c5283e8f066f3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ferro_orm-0.4.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: ferro_orm-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f8d5f71e18358616befad70d74aae038244e53b838cce2073ca1e6ba3612c23
|
|
| MD5 |
90057283a4cd772518d95304a9e45b46
|
|
| BLAKE2b-256 |
58679414036db8fcacc3fcef30fbda32b7a7665b6abc16d834a6327c7684ae92
|
Provenance
The following attestation bundles were made for ferro_orm-0.4.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on syn54x/ferro-orm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ferro_orm-0.4.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
6f8d5f71e18358616befad70d74aae038244e53b838cce2073ca1e6ba3612c23 - Sigstore transparency entry: 1393610818
- Sigstore integration time:
-
Permalink:
syn54x/ferro-orm@911e77d15a63df893543bfe6500c5283e8f066f3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/syn54x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@911e77d15a63df893543bfe6500c5283e8f066f3 -
Trigger Event:
workflow_dispatch
-
Statement type: