Configuration Module

The spine.config package provides SPINE’s configuration loading system. It is the canonical entry point for reading YAML configuration files with SPINE-specific features such as hierarchical includes, overrides, collection operations, and optional downloads.

SPINE configuration loading system.

This package provides a sophisticated configuration loading system with: - Hierarchical file includes with cycle detection - Metadata support for versioning and configuration - Override semantics with dot-notation - Collection operations (list/dict) - Configurable strict modes

Main Entry Point

load_config : Load a SPINE configuration file

See loader module docstring for full configuration language specification.

Core Interfaces

Most users interact with the configuration package through the file-based loader and the exception types it raises when configuration resolution fails.

load.load_config(config_str[, root_dir, ...])

Load a SPINE configuration from a YAML string.

load.load_config_file(cfg_path[, download])

Load a SPINE configuration from a file.

download.download_from_url(url[, ...])

Download a file from URL and return the cached path.

download.get_cache_dir()

Get the directory for caching downloaded files.

errors.ConfigError

Base exception for all configuration errors.

errors.ConfigIncludeError

Raised when an included file cannot be found or loaded.

errors.ConfigCycleError(cycle_path)

Raised when a circular include dependency is detected.

errors.ConfigPathError

Raised when a configuration path cannot be resolved or does not exist.

errors.ConfigTypeError

Raised when a configuration operation is applied to the wrong type.

errors.ConfigOperationError

Raised when a configuration operation (e.g., collection op) fails.

errors.ConfigValidationError

Raised when configuration validation fails (e.g., compatibility checks).