Configuration#
ocom is configured through a pydantic-settings model. Every
field below can be set via an environment variable (or a .env file) named
after the field, prefixed with the uppercased project name — for example
debug is read from OCOM_DEBUG.
The reference below is generated on every docs build directly from the live
Settings model (via
autodoc-pydantic), so the
documented fields, types, defaults, and constraints stay in lockstep with the
code and each field’s description=. The rendered config summary reports the
model’s env_prefix (OCOM_);
compose a field’s environment variable by joining that prefix with the uppercased
field name as shown above (autodoc-pydantic does not render the fully-qualified
per-field names itself).
- pydantic settings ocom.core.config.Settings[source]
Bases:
BaseSettingsProcess-wide settings sourced from the environment or a
.envfile.Distinct from
AppConfig(the user-facing, TOML-backed tool configuration): these are environment-level knobs consumed by cross-cutting infrastructure.log_levelis read bycore/logging_setup.py;debugandconfig_dirare placeholders kept for parity with the template scaffold. All variables are prefixed with the project name (OCOM_).Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
extra: str = ignore
env_prefix: str = OCOM_
env_file: str = .env
env_file_encoding: str = utf-8
- Fields:
config_dir (pathlib.Path)debug (bool)log_level (str)
- field debug: bool = False
Enable debug mode
- field log_level: str = 'INFO'
Logging level
- field config_dir: Path = PosixPath('/home/runner/.ocom')
Configuration directory