load_config

geodetic_engine.osdudb.load_config(*, config_file=None, env=None, load_dotenv_file=True, **overrides)[source]

Build an OsduBuildConfig from file, environment and overrides.

Unlike the Georepository workflow there is nothing secret to configure, so a config file is optional and a build can be driven entirely by the catalog override.

Parameters:
  • config_file (Path | None, default: None) – TOML file with an [osdudb] table. When omitted, GEODETIC_ENGINE_CONFIG is read, and then geodetic-osdudb.toml in the working directory.

  • env (Mapping[str, str] | None, default: None) – Environment mapping. Defaults to os.environ.

  • load_dotenv_file (bool, default: True) – Load a .env file into the environment first, so an operator can keep one settings file for both workflows.

  • **overrides (Any) – Explicit values taking precedence over all other sources.

Return type:

OsduBuildConfig

Returns:

A validated configuration.

Raises:

ConfigurationError – If the catalogue is not named or does not exist, or a value is malformed, or the config file has an unknown setting.

Example

>>> load_config(catalog=Path("CRS_CT.json"))
OsduBuildConfig(catalog='CRS_CT.json', authorities=['OSDU'], ...)