Skip to main content
Version: devel

dlt._workspace._workspace_context

WorkspaceRunContext Objects

class WorkspaceRunContext(ProfilesRunContext)

View source on GitHub

A run context with workspace.

name

@property
def name() -> str

View source on GitHub

Defines workspace name which is (normalized) parent folder name

global_dir

@property
def global_dir() -> str

View source on GitHub

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

run_dir

@property
def run_dir() -> str

View source on GitHub

The default run dir is the current working directory but may be overridden by DLT_PROJECT_DIR env variable.

settings_dir

@property
def settings_dir() -> str

View source on GitHub

Returns a path to dlt settings directory. If not overridden it resides in current working directory

The name of the setting folder is '.dlt'. The path is current working directory '.' but may be overridden by DLT_PROJECT_DIR env variable.

get_run_entity

def get_run_entity(entity: str) -> str

View source on GitHub

Default run context assumes that entities are defined in root dir

is_workspace_dir

def is_workspace_dir(run_dir: str) -> bool

View source on GitHub

Checks if project_dir contains dlt project, this is true if a config file is found

active

def active() -> WorkspaceRunContext

View source on GitHub

Returns currently active Workspace

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.