6 stable releases

Uses new Rust 2024

57.1.0 Nov 24, 2025
57.0.0 Oct 23, 2025
56.2.0 Sep 23, 2025
56.1.0 Aug 25, 2025
55.2.0 Jun 26, 2025

#247 in FFI

Download history 23792/week @ 2025-08-27 30179/week @ 2025-09-03 32924/week @ 2025-09-10 86925/week @ 2025-09-17 36783/week @ 2025-09-24 45897/week @ 2025-10-01 54543/week @ 2025-10-08 37302/week @ 2025-10-15 41140/week @ 2025-10-22 37431/week @ 2025-10-29 41168/week @ 2025-11-05 37268/week @ 2025-11-12 47973/week @ 2025-11-19 23746/week @ 2025-11-26 35257/week @ 2025-12-03 60134/week @ 2025-12-10

175,089 downloads per month
Used in 12 crates (3 directly)

Apache-2.0

2MB
42K SLoC

Pass Arrow objects from and to PyArrow, using Arrow's C Data Interface and pyo3.

For underlying implementation, see the [ffi] module.

One can use these to write Python functions that take and return PyArrow objects, with automatic conversion to corresponding arrow-rs types.

#[pyfunction]
fn double_array(array: PyArrowType<ArrayData>) -> PyResult<PyArrowType<ArrayData>> {
    let array = array.0; // Extract from PyArrowType wrapper
    let array: Arc<dyn Array> = make_array(array); // Convert ArrayData to ArrayRef
    let array: &Int32Array = array.as_any().downcast_ref()
        .ok_or_else(|| PyValueError::new_err("expected int32 array"))?;
    let array: Int32Array = array.iter().map(|x| x.map(|x| x * 2)).collect();
    Ok(PyArrowType(array.into_data()))
}
pyarrow type arrow-rs type
pyarrow.DataType [DataType]
pyarrow.Field [Field]
pyarrow.Schema [Schema]
pyarrow.Array [ArrayData]
pyarrow.RecordBatch [RecordBatch]
pyarrow.RecordBatchReader [ArrowArrayStreamReader] / Box<dyn RecordBatchReader + Send> (1)

(1) pyarrow.RecordBatchReader can be imported as [ArrowArrayStreamReader]. Either [ArrowArrayStreamReader] or Box<dyn RecordBatchReader + Send> can be exported as pyarrow.RecordBatchReader. (Box<dyn RecordBatchReader + Send> is typically easier to create.)

PyArrow has the notion of chunked arrays and tables, but arrow-rs doesn't have these same concepts. A chunked table is instead represented with Vec<RecordBatch>. A pyarrow.Table can be imported to Rust by calling pyarrow.Table.to_reader() and then importing the reader as a [ArrowArrayStreamReader].

Dependencies

~8.5MB
~155K SLoC