magpie.config

Attributes

SYNC_SERVICES_TYPES

SERVICE_TYPE_DICT

LOGGER

SERVICE_HOOK_ITEM_SCHEMA

SERVICE_CONFIG_ITEM_SCHEMA

SERVICES_CONFIGURATION_SCHEMA

JsonSchemaDefaultValidator

Functions

get_logger(→ logging.Logger)

Immediately sets the logger level to avoid duplicate log outputs from the root logger and this logger when

print_log(→ None)

Logs the requested message to the logger and optionally enforce printing to the console according to configuration

extend_with_default(→ jsonschema.protocols.Validator)

Validator that applies inplace defaults in the instance when provided by the schema.

validate_services_config(→ magpie.typedefs.ServicesConfig)

Validate configuration within the providers section.

Module Contents

magpie.config.SYNC_SERVICES_TYPES: Dict[magpie.typedefs.Str, Type[SyncServiceInterface]][source]
magpie.config.SERVICE_TYPE_DICT[source]
magpie.config.get_logger(name: magpie.typedefs.Str, level: int | None = None, force_stdout: bool = None, message_format: magpie.typedefs.Str | None = None, datetime_format: magpie.typedefs.Str | None = None) logging.Logger[source]

Immediately sets the logger level to avoid duplicate log outputs from the root logger and this logger when level is logging.NOTSET.

magpie.config.print_log(msg: magpie.typedefs.Str, logger: logging.Logger | None = None, level: int = logging.INFO, **kwargs: Any) None[source]

Logs the requested message to the logger and optionally enforce printing to the console according to configuration value defined by MAGPIE_LOG_PRINT.

magpie.config.LOGGER[source]
magpie.config.SERVICE_HOOK_ITEM_SCHEMA[source]
magpie.config.SERVICE_CONFIG_ITEM_SCHEMA[source]
magpie.config.SERVICES_CONFIGURATION_SCHEMA[source]
magpie.config.extend_with_default(validator_class: jsonschema.protocols.Validator) jsonschema.protocols.Validator[source]

Validator that applies inplace defaults in the instance when provided by the schema.

magpie.config.JsonSchemaDefaultValidator[source]
magpie.config.validate_services_config(services_configuration: magpie.typedefs.JSON) magpie.typedefs.ServicesConfig[source]

Validate configuration within the providers section.

Parameters:

services_configuration – Service definitions loaded from one or more combined configuration files.

Returns:

Services configuration with validated schema and applied defaults.