config
relationalai.config
Configuration loading and validation.
This module provides the create_config factory function to load PyRel configuration
from various sources (YAML/JSON config files, Snowflake config, DBT profiles, or
programmatically from Python dictionaries). The configuration is represented as a validated
Pydantic model with nested sections for connections, execution settings, data settings,
compiler settings, model settings, reasoners settings, and debug settings.
Examples
Section titled “Examples”Loading from a YAML config file (auto-discovered):
>>> from relationalai.config import create_config>>> cfg = create_config()>>> session = cfg.get_session() # Gets session from default connectionThe classes and functions in this module are re-exported in the base
relationalai.config namespace, so you can import them directly from there
instead of from this submodule.
Functions
Section titled “Functions”Functions exposed by this module.
create_config() Load configuration programmatically or from the highest-priority available config file source.
Classes
Section titled “Classes”Classes exposed by this module.
Config Represents a validated PyRel configuration.
RAIConfig Load PyRel configuration from `
raiconfig.yaml / raiconfig.yml`. ConfigFromSnowflake Load PyRel configuration from Snowflake's `
config.toml`. ConfigFromDBT Load PyRel configuration from DBT's `
profiles.yml`. ConfigFromRAIConfigToml Load PyRel configuration from deprecated `
raiconfig.toml`.