Skip to main content
Version: devel

common.configuration.resolve

initialize_credentials

def initialize_credentials(hint: Any,
initial_value: Any) -> CredentialsConfiguration

[view_source]

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]

[view_source]

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 context

  • merge_existing bool, optional - Merges existing section context with section_context in the arguments by executing merge_style function on section_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 and sections from existing context if they are not provided in section_context argument.

Yields:

  • Iterator[ConfigSectionContext] - Context manager with current section context

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.