The code from this repository reflects the final state of the application built in my Build Python Extensions for Apache Arrow Data with nanoarrow on YouTube.
If you don't already have meson, be sure to install that first:
python -m pip install meson
You can then configure and build the project:
meson setup builddir && cd builddir
meson compile
From the build folder, you can directly import the library and use it:
import pyarrow as pa
import pyarrow_ext
arr = pa.array([1, 2, 3])
pyarrow_ext.sum(arr)