Skip to content

Example of using the Apache Arrow C Data Interface between Python and Rust

License

Notifications You must be signed in to change notification settings

jhoekx/python-rust-arrow-interop-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Rust Apache Arrow interop example

This project contains an example Python module, implemented in Rust using pyo3. The Python module accepts an Apache Arrow array and doubles the values in it.

It uses the Apache Arrow C Data Interface.

This code is mostly copied from the Apache Arrow integration test that introduced the interop, with some Clippy warnings fixed.

Usage

Install Python poetry, e.g.:

pip install poetry

Install Python dependencies:

poetry install

Build the Rust Python module:

poetry run maturin develop

Run the example:

$ poetry run python run.py
[
  2,
  4,
  6
]

Related reading

About

Example of using the Apache Arrow C Data Interface between Python and Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published