granular_configuration_language
.proxy
- class granular_configuration_language.proxy.EagerIOConfigurationProxy(
- llc: LazyLoadConfiguration,
Bases:
Mapping
Added in version 2.3.0.
Wraps a
LazyLoadConfiguration
instance to proxy all method and attribute calls to itsConfiguration
instance.Passes
isinstance( ... , Configuration)
checks, as this class isregister()
-ed as a subclass ofConfiguration
.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()
inLazyLoadConfiguration.eager_load()
, so it is not exposed explicitly.- Parameters:
llc (LazyLoadConfiguration) –
LazyLoadConfiguration
instance to be wrapped
- class granular_configuration_language.proxy.SafeConfigurationProxy(
- llc: LazyLoadConfiguration,
Bases:
Mapping
Wraps a
LazyLoadConfiguration
instance to proxy all method and attribute calls to itsConfiguration
instance.Passes
isinstance( ... , Configuration)
checks, as this class isregister()
-ed as a subclass ofConfiguration
.Implementation Reasoning
Wrapping
LazyLoadConfiguration
maintains all laziness build intoLazyLoadConfiguration
, while exposing all ofConfiguration
This class is used behind a
typing.cast()
inLazyLoadConfiguration.as_typed()
, so it is not exposed explicitly.- Parameters:
llc (LazyLoadConfiguration) –
LazyLoadConfiguration
instance to be wrapped