tupa-pyffi
Python FFI bindings for Tupã — call Python functions from Rust pipelines.
Overview
Enables interoperability with Python libraries (NumPy, PyTorch, TensorFlow) by allowing Tupã pipelines to invoke Python functions as steps.
Status: Alpha (0.10.x). API may change before 1.0.
Installation
[]
= "0.10"
Note: Requires Python development headers installed on the system.
Quick Example
use call_python_function;
use json;
// Call math.sqrt from Python. Returns a `serde_json::Value`.
let result = call_python_function?;
assert_eq!;
Usage in Pipeline
use pipeline;
use json;
pipeline!
Multi-Argument Calls
use call_python_function_with_args;
let args = vec!;
let result = call_python_function_with_args?;
Reset Global State
use reset_python_bridge;
// Reset Python interpreter state (useful for testing)
reset_python_bridge;
Supported Types
i32,u64,u32,f32— numeric primitivesVec<u8>— byte arraysVec<Value>— JSON arraysserde_json::Value— arbitrary JSON
License
Apache-2.0