python-rust-arrow-interop-example
pyttfwrap
python-rust-arrow-interop-example | pyttfwrap | |
---|---|---|
2 | 1 | |
19 | 1 | |
- | - | |
2.4 | 1.8 | |
3 months ago | over 2 years ago | |
Rust | Rust | |
Apache License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
python-rust-arrow-interop-example
- Use rust code in Python with pyo3
-
Apache Arrow and DataFusion 3.0
I condensed it to a simple example. Can't wait to see this officially supported to write fast operations that are not natively available.
pyttfwrap
-
Use rust code in Python with pyo3
I recently wanted to use some rust crates from Python and decided to give PyO3 a go and I must say it works really well.
Took about one evening to plug it all together and get it running. The guide at pyo3.rs was really helpful and maturin to build binary packages just works. You pass in python types and they arrive as rust-native types. Makes writing code feel very native.
The result: https://github.com/Grollicus/pyttfwrap takes a string and splits it as it would wrap when rendered with a given TTF font. Most of the code is about keeping a reference to the loaded font as that's an expensive operation.
Was some great fun and I'm sure I'll use it some more.
What are some alternatives?
Apache Arrow - Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
ormsgpack - Msgpack serialization/deserialization library for Python, written in Rust using PyO3 and rust-msgpack. Reboot of orjson. msgpack.org[Python]
pyo3-deserializer - An example deserializer written in Rust, callable from Python
maturin - Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages
geopolars - Geospatial extensions for Polars
PyCall.jl - Package to call Python functions from the Julia language