pyridis
pyridis is the API and plugin to support python scripts inside iridis
It consists in two main APIs:
pyridis-api: the primary API used to implement each node in the dataflow graph.pyridis-message: the secondary API used to implement messages to be passed between nodes
The main part of this project is then the PythonFileExtPlugin, which is a plugin compiled as a cdylib that must be passed
to the iridis runtime in order to be able to load .py files as a node.
Usage
In a single .py file, you can define a node like this:
:
pass
= await
= await
break
return
Then you must load the PythonFileExtPlugin to your rust iridis runtime:
let runtime = new
.await?;
Note: it's also possible to load this plugin statically with .load_statically_linked_plugin::<PythonFileExtPlugin>()
Finally you can load your nodes into the runtime just like rust nodes:
runtime
.run
.await
Before you try to run anything, you must have activated a python virtual environment. Tests have been made with uv and it works just fine:
Then you will need the api:
And finally you can build your application:
However, the generated executable will not be able to find the correct python libs of the environment by default. You will need to tweak the
LD_LIBRARY_PATH:
# adjust to reflect the location of your .venv
For a complete example of a project with multiple nodes—see pyridis-benchmark.
Examples
Multiple examples can be found in this directory and can be launched with just:
Example of message definitions
Example of applications
Rust
For now it's only possible to interact with an iridis runtime with rust. See iridis for a detailed description of the project
Benchmark
See pyridis-benchmark for a detailed description of the benchmark.