Installation
Install the Genja package for the language you are using.
cargo add genja
Or add it to Cargo.toml:
[dependencies]
genja = "0.1.0"
The genja crate pulls in the Rust crates required for the public Genja
API, including genja-core, genja-core-derive, and
genja-plugin-manager.
pip install genja-py
The Python distribution is named genja-py, but the import name is
genja:
import genja as genja_lib
Verify
use genja::genja_core::Settings;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let settings = Settings::default();
println!("Runner plugin: {}", settings.runner().plugin());
Ok(())
}
import genja as genja_lib
settings = genja_lib.Settings()
print(f"Runner plugin: {settings.runner.plugin}")
Examples
Cargo and pip installations include the library package, not the repository's example source files. To run the examples, clone the repository and run them from the checkout:
git clone https://github.com/Smertan/genja.git
cd genja
cargo run -p genja --example basic_runtime
cargo run -p genja --example filter_hosts
cargo run -p genja --example run_task
cargo run -p genja --example run_task_tree
Python examples are available under genja/examples/python.