Configuration: YAML vs. Class-Based βοΈ
flowyml offers flexible configuration options to suit different development styles and deployment needs. You can define your pipelines and settings using either Python classes (for maximum flexibility and IDE support) or YAML files (for separation of concerns and easy modification without code changes).
π Class-Based Configuration (Python)
This is the default and most powerful way to configure flowyml. It leverages Python's type system and allows for dynamic configuration logic.
Example
Pros: - Full power of Python (loops, conditionals, imports). - IDE autocompletion and type checking. - Easy to debug.
π YAML-Based Configuration
YAML configuration is ideal for production deployments where you want to change parameters without modifying code, or for defining pipeline structures declaratively.
Example pipeline.yaml
Loading YAML Configuration
Pros: - Language-agnostic format. - Easy to inject into CI/CD pipelines. - Clear separation of code and configuration.
π Hybrid Approach
You can also mix both approaches. For example, define the pipeline structure in Python but load specific parameters from a YAML file.