granular_configuration_language .proxy

class granular_configuration_language.proxy.EagerIOConfigurationProxy(
llc: LazyLoadConfiguration,
)[source]

Bases: Mapping

Added in version 2.3.0.

Wraps a LazyLoadConfiguration instance to proxy all method and attribute calls to its Configuration instance.

Passes isinstance( ... , Configuration) checks, as this class is register()-ed as a subclass of Configuration.

Part of the EagerIO feature set

This immediately spawns a thread to load and build the Configuration in the background, so that future calls are non-/minimally blocking.

This class is used behind a typing.cast() in LazyLoadConfiguration.eager_load(), so it is not exposed explicitly.

Parameters:

llc (LazyLoadConfiguration) – LazyLoadConfiguration instance to be wrapped

class granular_configuration_language.proxy.SafeConfigurationProxy(
llc: LazyLoadConfiguration,
)[source]

Bases: Mapping

Wraps a LazyLoadConfiguration instance to proxy all method and attribute calls to its Configuration instance.

Passes isinstance( ... , Configuration) checks, as this class is register()-ed as a subclass of Configuration.

Implementation Reasoning

Wrapping LazyLoadConfiguration maintains all laziness build into LazyLoadConfiguration, while exposing all of Configuration

This class is used behind a typing.cast() in LazyLoadConfiguration.as_typed(), so it is not exposed explicitly.

Parameters:

llc (LazyLoadConfiguration) – LazyLoadConfiguration instance to be wrapped