Kaizo is a declarative YAML-based configuration parser for Python. It allows you to dynamically load, resolve, and execute Python objects, functions, and plugins from YAML configuration files.
Key features:
- Cross-file imports
- Lazy execution
- Result caching
- Plugin dispatch
- Variable references
- Local Python module support
Install Kaizo via pip:
pip install kaizoOr install from source:
git clone https://github.com/NaughtFound/kaizo.git
cd kaizo
pip install -e .Requirements:
- Python 3.10+
- PyYAML
Create a simple configuration file hello.yaml:
hello:
module: builtins
source: print
args:
- "Hello Kaizo"Load and execute it:
from kaizo import ConfigParser
parser = ConfigParser("hello.yaml")
config = parser.parse()
# Accessing the entry automatically resolves and executes it
config["hello"] # Outputs: Hello KaizoFull documentation, including configuration, parser architecture, plugins, and utilities, is available in the docs:
Contributions are welcome! Please submit issues or pull requests via GitHub.