Sygaldry: Why?
Design Philosophy
- Composition over inheritance.
Encourage writing code that uses composition over inheritance by making it easy to wire arbitrary pipelines made up of reusable pieces of code. Components are plain Python classes. Configuration is defined by YAML or TOML. Configuration can be nested, and include other configuration files. So users can can compose objects in whatever configuration they want.
- Zero modifications to your code.
Sygaldry only needs a dotted import path to instantiate a class or import a callable. Your application code stays exactly as it is. No base classes. No framework coupling. No registration hooks.
- Lightweight.
The only runtime dependencies are
pyyamlandrich-click. There is no scheduler, no database, no web server, and no daemon process.- Production-friendly configuration management.
Deep-merge includes, interpolation,
--set/--useoverrides, and theinteractiveCLI command make it practical to manage many similar pipelines across environments.
Comparison with Existing Libraries
Hydra
Hydra (Meta) is a configuration framework built on OmegaConf. It excels at managing complex configuration hierarchies and parameter sweeps. But it builds trees instead of graphs. Sygaldry builds graphs that allow multiple objects to share the same resolved instance. E.g. a database connection pool used by multiple parts of a pipeline.
Hydra |
Sygaldry |
|
|---|---|---|
Code changes required |
Yes – |
None – any class or callable works as-is |
Object instantiation |
|
Automatic bottom-up resolution of the entire object graph |
Composition model |
Config groups selected via overrides on the command line |
|
Dependencies |
|
|
Scope |
Configuration management with optional instantiation |
Full object-graph assembly from configuration |
Hydra is a natural fit when you need parameter sweeps or experiment tracking integrations. Sygaldry is a better fit when you want to assemble an object graph declaratively without changing your application code.
Dependency Injector
Dependency Injector is a dependency injection framework that uses container classes and provider objects to wire dependencies.
Dependency Injector |
Sygaldry |
|
|---|---|---|
Code changes required |
Minimal – but wiring is defined in Python |
None – wiring is defined in YAML or TOML |
Composition model |
Python provider objects ( |
Configuration keys ( |
Configuration format |
Python code, optionally reading from |
YAML or TOML as the primary interface |
Reusability |
Containers can be nested and overridden in Python |
Config files can be included, deep-merged, and overridden |
Dependency Injector gives you fine-grained programmatic control over instantiation. Sygaldry moves the wiring entirely into configuration, so the same components can be recombined without touching Python.
Gin
Gin (Google) is a lightweight
configuration framework that lets you bind function and constructor arguments
from a .gin file using @gin.configurable decorators.
Gin |
Sygaldry |
|
|---|---|---|
Code changes required |
Yes – functions and classes must be decorated with
|
None – any class or callable works as-is |
Configuration format |
Custom |
Standard YAML or TOML |
Composition model |
Parameter binding – Gin overrides default arguments on decorated callables |
Object graph – |
Object graph support |
Limited – Gin binds parameters but does not assemble or manage an object graph; references between configured objects must be handled manually |
First-class – |
Config inheritance |
File-level includes ( |
|
Dependencies |
|
|
Gin is popular in ML research for its simplicity: decorate a function and bind
its arguments from a config file. The trade-off is that your code must opt in
via @gin.configurable, and the .gin format is non-standard. Sygaldry
requires no decorators, uses standard file formats, and provides full
object-graph assembly with references, caching, and deep-merge config
inheritance.
Kedro
Kedro (McKinsey QuantumBlack) is an opinionated framework for reproducible data science pipelines.
Kedro |
Sygaldry |
|
|---|---|---|
Code changes required |
Yes – nodes are functions registered in a |
None |
Composition model |
Functional nodes wired by named datasets in a catalog |
Object graph assembled from |
Dependencies |
Heavy – |
|
Project structure |
Enforced directory layout and |
No required project structure |
Scope |
End-to-end ML pipeline framework with catalog, hooks, and runners |
Object-graph assembly – bring your own pipeline abstraction |
Kedro shines for ML projects that benefit from its catalog and reproducibility tooling. Sygaldry is a lower-level building block that doesn’t impose any project structure or data abstraction.
When Sygaldry is the right choice
Sygaldry is a good fit when:
You want to maintain pipelines that leverage (potentially) complex configuration of objects through multiple layers of composition.
You run many similar jobs that share components and you want to reuse them through configuration rather than copy-pasting code or subclassing framework base classes.
You want to keep your application code framework-free so it stays testable, portable, and easy to reason about.
You need a lightweight solution that adds two dependencies, not two hundred.
You manage pipelines across environments and want config inheritance (
_include,--set,--use) to keep the differences minimal and explicit.You want to explore and debug your object graph interactively with
sygaldry interactivebefore running anything in production.You already have an orchestrator (or cron) and just need a clean way to assemble and invoke the objects it runs.