common.configuration.resolve
initialize_credentials
def initialize_credentials(hint: Any,
initial_value: Any) -> CredentialsConfiguration
Instantiate credentials of type hint
with initial_value
. The initial value must be a native representation (typically string)
or a dictionary corresponding to credential's fields. In case of union of credentials, the first configuration in the union fully resolved by
initial value will be instantiated.
inject_section
def inject_section(
section_context: ConfigSectionContext,
merge_existing: bool = True,
lock_context: bool = False) -> ContextManager[ConfigSectionContext]
Context manager that sets section specified in section_context
to be used during configuration resolution. Optionally merges the context already in the container with the one provided
Arguments:
section_context
ConfigSectionContext - Instance providing a pipeline name and section contextmerge_existing
bool, optional - Merges existing section context withsection_context
in the arguments by executingmerge_style
function onsection_context
. Defaults to True.lock_context
bool, optional - Instruct to threadlock the current thread to prevent race conditions in context injection.Default Merge Style: Gets
pipeline_name
andsections
from existing context if they are not provided insection_context
argument.
Yields:
Iterator[ConfigSectionContext]
- Context manager with current section context