arrowmodel
Dict-free, single-step conversion from Apache Arrow buffers to Pydantic v2 model instances.
arrowmodel uses a Rust core (via PyO3) to walk Arrow RecordBatch and Table buffers directly, building Pydantic model instances in a tight loop with no intermediate Python dicts. It replaces the to_pylist() + Model(**row) two-step with a single call that is roughly 2x faster for flat schemas.
Quick Start
Installation
pip install arrowmodel
No Rust toolchain needed -- pre-built wheels are provided.
First Use
import pyarrow as pa
from arrowmodel import ArrowModel
class User(ArrowModel):
id: int
name: str
score: float
batch = pa.record_batch(
{
"id": [1, 2, 3],
"name": ["Alice", "Bob", "Carol"],
"score": [9.5, 8.0, 7.3],
}
)
users = User.convert(batch)
# [User(id=1, name='Alice', score=9.5), ...]
Key Features
- Dict-free conversion: Arrow buffers go straight to
model_constructcalls in Rust -- noto_pylist(), no intermediate dicts. - ~2x faster for flat schemas: Roughly twice the throughput of the pure-Python approach, with less allocation pressure.
- Three API styles:
ArrowModelbase class for concise models,ArrowModelConverterfor reusable converters, andmodel_convert/model_iterfor one-shot use. - Validated mode: Pass
validate=Trueto run full Pydantic validation (model_validate_json) when you need type coercion or custom validators. - Pydantic alias support: Resolves
validation_alias,alias, field name, andpopulate_by_name/validate_by_name. - Nested models: Arrow
Structcolumns map to nested Pydantic models, including optional structs and deeply nested hierarchies. - Lazy iteration:
iter()yields one model at a time, materialising oneRecordBatchworth of instances in memory. - Broad type coverage: Integers, floats, decimals, booleans, strings, dates, timestamps, durations, times, binary, lists, structs, maps, dictionaries, unions, intervals, and more.
Input Compatibility
arrowmodel accepts any Arrow-PyCapsule-compatible input via the Arrow C Data Interface:
- pyarrow --
RecordBatch,Table - Polars --
DataFrame(exports via PyCapsule) - nanoarrow -- arrays and record batches
No pyarrow dependency is required at runtime. If your Arrow data comes from Polars or nanoarrow, it works without installing pyarrow.
License
Metadata
Release files for arrowmodel 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arrowmodel-1.0.1.tar.gz | 29.6 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| arrowmodel-1.0.1-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| arrowmodel-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| arrowmodel-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| arrowmodel-1.0.1-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
| arrowmodel-1.0.1-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 13.9 MB
Release files / arrowmodel-1.0.1.tar.gz
| Download URL | arrowmodel-1.0.1.tar.gz |
|---|---|
| Size | 29.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a0512ee7ddd401a4723450fc8f76ebc1ea331aab564eea570cb01acbc3e1fd0
|
|
BLAKE2b-256 checksum How to use checksums |
454fff00091f8325ea1cad369c4b94a41f8d0e3778492c5209bb215a80d282ad
|
| 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 14, 2026.
Transparency logRelease files / arrowmodel-1.0.1-cp311-abi3-win_amd64.whl
| Download URL | arrowmodel-1.0.1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
aa42832fdacf85e0baa293f69d5b829cf848d5d78a8d6d30c6daa972f23434c7
|
|
BLAKE2b-256 checksum How to use checksums |
11e7e44f6abf1185e3eeb6cd40b8272413c83427c80c4b9e263767f6df7af73d
|
| 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 14, 2026.
Transparency logRelease files / arrowmodel-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | arrowmodel-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a063b75cb5837420b2fd9f9c1e6df14317c59700ec9aea599375a772bf965d50
|
|
BLAKE2b-256 checksum How to use checksums |
4de288f5faa50c62c41cd29543b8cb9349d9ed2faa2bf39d8c9870dd507ef8d6
|
| 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 14, 2026.
Transparency logRelease files / arrowmodel-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | arrowmodel-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
e99f86127c2cb852bfe4ed6237ed91ebddffa13542954d6aa51de76748bb119d
|
|
BLAKE2b-256 checksum How to use checksums |
79415b9fbfc52c0bf344946f06158ee6f48a48d8755230f4b022cbf5659e7821
|
| 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 14, 2026.
Transparency logRelease files / arrowmodel-1.0.1-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | arrowmodel-1.0.1-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b96fafca62ff084cef7a43cf9ba8ae6640c5fc60618a1fd6ad7cd2e4d109a610
|
|
BLAKE2b-256 checksum How to use checksums |
dfff0f4957eb953177a7032b093c8ce2042feab48bcdce1e31282922c954ddc7
|
| 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 14, 2026.
Transparency logRelease files / arrowmodel-1.0.1-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | arrowmodel-1.0.1-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
f7a62d8439b20c68502e61881ccc95764ca9e305bcc0094efd13086c615c17eb
|
|
BLAKE2b-256 checksum How to use checksums |
e6b3d0fcc01abe13c747505664888cf396f42b635d25bccfb8f5d72f6c431527
|
| 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 14, 2026.
Transparency log