Config

class gafaelfawr.config.Config(realm: str, session_secret: str, redis_url: str, proxies: Tuple[_BaseNetwork, ...], after_logout_url: str, issuer: IssuerConfig, verifier: VerifierConfig, github: Optional[GitHubConfig], oidc: Optional[OIDCConfig], known_scopes: Mapping[str, str], safir: SafirConfig)

Bases: object

Configuration for Gafaelfawr.

Some configuration parameters from the settings file are copied into multiple configuration dataclasses. This allows the configuration for each internal component to be self-contained and unaware of the configuration of the rest of the application.

Methods Summary

from_file(path, **overrides) Construct a Config object from a settings file.
log_settings(logger) Log information about the application settings.

Methods Documentation

classmethod from_file(path: str, **overrides) → Config

Construct a Config object from a settings file.

Parameters:
  • path (str) – Path to the settings file in YAML.
  • **overrides (typing.Any) – Settings that override settings read from the configuration file.
Returns:

config – The corresponding Config object.

Return type:

Config

log_settings(logger: logging.Logger) → None

Log information about the application settings.

Parameters:logger (logging.Logger) – The logger to use for those log messages.