Skip to main content
Version: 1.4.0 (latest)

common.configuration.specs.pluggable_run_context

SupportsRunContext Objects

class SupportsRunContext(Protocol)

[view_source]

Describes where dlt looks for settings, pipeline working folder. Implementations must be picklable.

__init__

def __init__(run_dir: Optional[str], *args: Any, **kwargs: Any)

[view_source]

An explicit run_dir, if None, run_dir should be auto-detected by particular implementation

name

@property
def name() -> str

[view_source]

Name of the run context. Entities like sources and destinations added to registries when this context is active, will be scoped to it. Typically corresponds to Python package name ie. dlt.

global_dir

@property
def global_dir() -> str

[view_source]

Directory in which global settings are stored ie ~/.dlt/

run_dir

@property
def run_dir() -> str

[view_source]

Defines the current working directory

settings_dir

@property
def settings_dir() -> str

[view_source]

Defines where the current settings (secrets and configs) are located

data_dir

@property
def data_dir() -> str

[view_source]

Defines where the pipelines working folders are stored.

runtime_kwargs

@property
def runtime_kwargs() -> Dict[str, Any]

[view_source]

Additional kwargs used to initialize this instance of run context, used for reloading

initial_providers

def initial_providers() -> List[ConfigProvider]

[view_source]

Returns initial providers for this context

get_data_entity

def get_data_entity(entity: str) -> str

[view_source]

Gets path in data_dir where entity (ie. pipelines, repos) are stored

get_run_entity

def get_run_entity(entity: str) -> str

[view_source]

Gets path in run_dir where entity (ie. sources, destinations etc.) are stored

get_setting

def get_setting(setting_path: str) -> str

[view_source]

Gets path in settings_dir where setting (ie. secrets.toml) are stored

PluggableRunContext Objects

class PluggableRunContext(ContainerInjectableContext)

[view_source]

Injectable run context taken via plugin

reload

def reload(run_dir: Optional[str] = None,
runtime_kwargs: Dict[str, Any] = None) -> None

[view_source]

Reloads the context, using existing settings if not overwritten with method args

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.