Skip to main content

minarrow

Arrow-compatible data that moves cleanly between Rust and Python, stays ready for SIMD, and plugs into the rest of the Python data ecosystem.

Apache 2.0

Documentation: minarrow.com

minarrow is a compact Python interface over Minarrow Rust.

It gives Rust and Python the same columnar data model, with Arrow-compatible memory layouts and 64-byte-aligned buffers. Data produced in Rust can be exposed directly to Python, operated on by native SIMD kernels, and passed to PyArrow, Polars, DuckDB and other Arrow-aware libraries through the Arrow PyCapsule interface.

import minarrow as ma

table = ma.Table(
    {
        "id": [1, 2, 3],
        "price": [9.5, 10.0, 11.2],
    },
    name="prices",
)

series = table["price"].to_polars()
relation = table.to_duckdb()

Minarrow is useful when:

  • Data is produced or processed in Rust and consumed in Python
  • Downstream libraries such as Polars benefit from SIMD-compatible, 64-byte-aligned memory
  • Arrow interoperability is required without taking an internal dependency on PyArrow
  • A small set of typed containers is preferable to a large object hierarchy
  • Higher-level computation is delegated to Polars, DuckDB, PyArrow or another execution engine

The columnar API centres on four containers:

  • Array for a single typed column
  • Table for a fixed set of equal-length columns
  • ChunkedArray for one logical column split across multiple chunks
  • ChunkedTable for a sequence of table batches

Together, they cover the common Arrow tabular data model. Nested Struct and List types are not currently supported.

The tensor API adds three focused containers:

  • NdArray for contiguous or zero-copy windowed f32/f64 data
  • ChunkedNdArray for compatible NdArray pieces backed by Rust SuperNdArray
  • XArray for named dimensions and coordinate-based selection over an NdArray

They provide storage, indexing, selection, and DLPack interchange. NdArray and XArray expose one tensor directly; each ChunkedNdArray chunk is a separate NdArray DLPack producer with its own data pointer. Numerical algorithms, statistics, and general tensor computation remain the job of NumPy, PyTorch, JAX, or another execution library.

Why not just use PyArrow?

PyArrow is an excellent Arrow implementation, but it solves a different problem. It brings the full Arrow C++ runtime into Python, together with a large type system, compute engine, file formats and dataset APIs.

Minarrow is for applications where the important path is Rust -> Python -> native analytics.

It uses the same Minarrow data model on both sides of the Rust–Python boundary, allocates supported buffers at 64-byte alignment (PyArrow only guarantees 8-byte), and exposes them through the Arrow PyCapsule interface. Rust can produce the data, Python can inspect and compose it, and Polars, DuckDB, PyArrow or a custom native kernel can consume it without an intermediate serialisation step.

For example, a Rust service can use Lightstream to receive a network feed directly into 64-byte-aligned Arrow buffers, expose those buffers to Python through Minarrow, and continue processing them with Python, native SIMD kernels, or machine-learning libraries without serialising or rebuilding the dataset.

Minarrow PyArrow
Rust–Python data model Native Minarrow types across both runtimes Rust integration through Arrow interchange interfaces
Host runtime Rust, embedded in the application service Arrow C++ runtime loaded into Python
Buffer alignment 64-byte aligned for Minarrow-backed buffers 8-byte Arrow alignment guarantee
Python API Focused columnar and tensor containers Full Arrow type and container hierarchy
Native SIMD use Buffers are ready for aligned SIMD kernels Consumers must inspect alignment or realign the data
Runtime role Application data model, interchange and composition Arrow compute, storage and dataset platform
Ecosystem integration Arrow PyCapsule and direct runtime bridges PyArrow APIs and Arrow interoperability
Dependency footprint Focused Rust extension Full Arrow C++ and Python distribution

Minarrow avoids making PyArrow a required part of the data path. Applications can depend only on Minarrow, hand its objects directly to capsule-aware libraries, and introduce PyArrow only where its broader functionality is useful.

import minarrow as ma

table = ma.Table(
    {
        "id": [1, 2, 3],
        "price": [9.5, 10.0, 11.2],
    }
)

polars_frame = table.to_polars()
duckdb_relation = table.to_duckdb()

PyArrow remains fully interoperable:

import pyarrow as pa

arrow_table = pa.table(table)
minarrow_table = ma.Table.from_arrow(arrow_table)

Rust and Python share the same data model

Minarrow arrays and tables exist on both sides of the Rust–Python boundary.

Rust code can construct the data, perform native processing, and expose it to Python without first serialising it into another format. Python can then pass the same Arrow-compatible buffers into Polars, DuckDB, PyArrow or another capsule-aware library zero-copy.

This suits:

  • Rust-based parsers and decoders
  • Python extensions with columnar outputs
  • Low-latency ingestion systems
  • Scientific and simulation code
  • Feature-generation pipelines
  • Native analytics kernels

This pattern suits systems where Rust provides the production application, transport and data services, while Python delivers the intelligence layer.

SIMD-ready buffers

Minarrow allocates supported buffers on 64-byte boundaries, matching the alignment required by wide SIMD paths such as AVX2 and AVX-512.

For compatible workloads, this adds a low-latency layer of parallelism alongside standard multi-core execution:

  • Native kernels can operate directly on the buffers without copying or realigning the data.
  • The buffers remain in host memory and can be processed immediately by the CPU.
  • GPUs offer greater peak throughput for sufficiently large, highly parallel workloads, but first require the data to be transferred into device memory.
  • For smaller batches and latency-sensitive workloads, the transfer can take longer than the computation itself, making CPU SIMD the faster end-to-end path for many tabular workloads that require a rapid decision.

The alignment is preserved when Minarrow-owned data moves from Rust into Python. Python extensions and Arrow PyCapsule consumers can access the same underlying buffers and pass them directly to compatible native kernels.

By contrast, PyArrow guarantees 8-byte alignment rather than 64-byte alignment. A native kernel that requires 64-byte-aligned input may therefore need to copy the data into a new allocation before processing it. For small and latency-sensitive workloads, that copy can take longer than the SIMD calculation itself.

Small Python surface

Minarrow exposes one container per structural role rather than one Python class for every Arrow type.

array.dtype
array.dtype.group
array.bit_width
array.arrow_type

.dtype provides a compact application-level type, while .arrow_type retains the complete Arrow logical type.

Pluggable execution

Minarrow stores and exchanges columnar data. It does not attempt to replace a dataframe or query engine.

Use Minarrow for the Rust–Python boundary, then choose the execution engine appropriate to the workload:

polars_frame = table.to_polars()
duckdb_relation = table.to_duckdb()
arrow_table = table.to_arrow()

This keeps the data layer small without restricting the rest of the application to a Minarrow-specific API.

Release files for minarrow 0.18.1

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

Source distribution (sdist)

Source distribution for minarrow 0.18.1
File Size Uploaded
minarrow-0.18.1.tar.gz 2.9 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for minarrow 0.18.1
File
minarrow-0.18.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
minarrow-0.18.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
minarrow-0.18.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
minarrow-0.18.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
minarrow-0.18.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 7.1 MB

Release files / minarrow-0.18.1.tar.gz

Download URL minarrow-0.18.1.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
8905481155210cae286e4bf042c7d2bbfe29dc49c3578c6face1ba960624716a
BLAKE2b-256 checksum
How to use checksums
16a515e683de6742fde0ee71dec8c86ff7d5b8ffb5e104ce9d993b709bd37914
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 10, 2026.

Transparency log

Release files / minarrow-0.18.1-cp39-abi3-win_amd64.whl

Download URL minarrow-0.18.1-cp39-abi3-win_amd64.whl
Size 860.2 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1dfa7b662446f65f6aba17daba204d2e2ba666fdaccbf0a3440bc8619deb5dd2
BLAKE2b-256 checksum
How to use checksums
4f24f5c97d25cc535b221091405c74d5255fd3da904cf1580749d5e875782c24
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 10, 2026.

Transparency log

Release files / minarrow-0.18.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL minarrow-0.18.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 882.8 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
2b0417807e48fb0e276306b00c458ca89d675899e8459675487592f557feb1c9
BLAKE2b-256 checksum
How to use checksums
74b480ef6c4cb7be0cc790c877db0f7ad151dd55b97a627c987702e1b5397d30
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 10, 2026.

Transparency log

Release files / minarrow-0.18.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL minarrow-0.18.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 811.2 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2592fbbb0b25eddf16e76bd7cbc4d2686c1427f024ebec96fc1fb27310bdfec4
BLAKE2b-256 checksum
How to use checksums
cd8eaa90111ba8bc6e09a1250710dd19517d92b15a87d7d7264d60cec375555a
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 10, 2026.

Transparency log

Release files / minarrow-0.18.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL minarrow-0.18.1-cp39-abi3-macosx_11_0_arm64.whl
Size 802.1 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6efb3f8d26f3fe87285479cd0fdfaabcae7c6aa61f740a5dde91acfd1d76988a
BLAKE2b-256 checksum
How to use checksums
1744a64e4b4da2163ca616117c6e1eb7ab176d5df0ac9cba972ce7dc0a6c2014
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 10, 2026.

Transparency log

Release files / minarrow-0.18.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL minarrow-0.18.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 840.9 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8c5d47073dd34e4f9de12d0d5c0ad0673234ab291fb573cae4801a79606b01cf
BLAKE2b-256 checksum
How to use checksums
47b87ebdb826422dffb3d0d277da448c9012bf78e3b958bf6d2180a9316c8e4c
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 10, 2026.

Transparency log

Release history Release notifications | RSS feed

0.18.2

6 release files

This release

0.18.1 This release

6 release files

0.17.0

6 release files

0.16.0

6 release files

0.1.0

6 release files

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