SDK

Settings

Immutable SDK configuration, usually built by `from_env`.

On this page

class

Signature #

class Settings(api_token: str, vault_url: str = 'https://vault.diagnos.health', timeout_seconds: float = 30.0, openbao_addr: str | None = None, openbao_token: str | None = None, openbao_mount: str = 'secret', openbao_path_prefix: str = 'diagnos', openbao_namespace: str | None = None, harden_process: bool = True, time_precision: TimePrecision | None = None)

Immutable SDK configuration, usually built by from_env.

Members #

api_token: str #

attribute

vault_url: str = 'https://vault.diagnos.health' #

attribute

timeout_seconds: float = 30.0 #

attribute

openbao_addr: str | None = None #

attribute

openbao_token: str | None = None #

attribute

openbao_mount: str = 'secret' #

attribute

openbao_path_prefix: str = 'diagnos' #

attribute

openbao_namespace: str | None = None #

attribute

harden_process: bool = True #

attribute

time_precision: Literal['month', 'day', 'hour', 'minute', 'second'] | None = None #

attribute

from_env(env: Mapping[str, str] | None = None) -> Settings #

method

Read the environment variables documented in `docs/PROTOCOL.md §11`. `env` defaults to `os.environ` but accepts an explicit mapping so tests never have to monkeypatch process-global state.