Skip to main content
Version: devel

dlt.common.configuration.providers.provider

ConfigProvider Objects

class ConfigProvider(abc.ABC)

[view_source]

get_value

@abc.abstractmethod
def get_value(key: str, hint: Type[Any], pipeline_name: str, *sections:
str) -> Tuple[Optional[Any], str]

[view_source]

Looks for a value under key in section(s) sections and tries to coerce the value to type hint. A pipeline context (top level section) will be added if pipeline_name was specified.

supports_secrets

@property
@abc.abstractmethod
def supports_secrets() -> bool

[view_source]

If true, provider is allowed to store secret. Configuration resolution fails if a secret value is discovered in a config provider that does not support secrets.

supports_sections

@property
@abc.abstractmethod
def supports_sections() -> bool

[view_source]

If true, config resolution will query this provider for all allowed section combinations otherwise values are queried only by field name.

name

@property
@abc.abstractmethod
def name() -> str

[view_source]

Human readable name of config provider

is_empty

@property
def is_empty() -> bool

[view_source]

Tells if config provider holds any values

is_writable

@property
def is_writable() -> bool

[view_source]

Tells if set_value may be used

locations

@property
def locations() -> Sequence[str]

[view_source]

Returns a list of locations where secrets are stored, human readable

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.