Skip to content

Application configuration

Validated configuration for an analytics project.

ProjectConfig

Bases: BaseModel

Project configuration with settings for individual components.

model_config class-attribute instance-attribute

model_config = pydantic.ConfigDict(extra='forbid', frozen=True)

application class-attribute instance-attribute

application: ProjectSettings = pydantic.Field(default_factory=ProjectSettings)

engine class-attribute instance-attribute

engine: EngineConfig = pydantic.Field(default_factory=engine_config.EngineConfig)

params class-attribute instance-attribute

params: Params = pydantic.Field(default_factory=lambda: Params(root={}))

paths class-attribute instance-attribute

paths: Paths = pydantic.Field(default_factory=lambda: Paths(root={}))

code class-attribute instance-attribute

code: PythonCodeSettings = pydantic.Field(default_factory=PythonCodeSettings)

test class-attribute instance-attribute

test: TestSettings = pydantic.Field(default_factory=TestSettings)

reject_legacy_runtimes classmethod

reject_legacy_runtimes(value: object) -> object

Report renamed code configuration instead of ignoring it.

ProjectSettings

Bases: BaseModel

Project-level defaults for specification sources and execution.

model_config class-attribute instance-attribute

model_config = pydantic.ConfigDict(extra='forbid', frozen=True, strict=True)

python_spec class-attribute instance-attribute

python_spec: str | None = pydantic.Field(default=None, min_length=1)

json_spec class-attribute instance-attribute

json_spec: str | None = pydantic.Field(default=None, min_length=1)

yaml_spec class-attribute instance-attribute

yaml_spec: str | None = pydantic.Field(default=None, min_length=1)

validate_spec_source

validate_spec_source() -> ProjectSettings

Require specification sources to be mutually exclusive.

Params

Bases: RootModel[dict[str, Any]]

Flat map of required global parameter values.

model_config class-attribute instance-attribute

model_config = pydantic.ConfigDict(strict=True, frozen=True)

validate_values classmethod

validate_values(value: object) -> object

Require Python-identifier keys and scalar values.

Paths

Bases: RootModel[dict[str, str]]

Project-relative or absolute paths available to function bindings.

model_config class-attribute instance-attribute

model_config = pydantic.ConfigDict(strict=True, frozen=True)

validate_values classmethod

validate_values(value: object) -> object

Require a flat mapping of Python identifiers to path strings.