dlt._workspace._workspace_context
WorkspaceRunContext Objects
class WorkspaceRunContext(ProfilesRunContext)
A run context with workspace.
name
@property
def name() -> str
Defines workspace name which is (normalized) parent folder name
global_dir
@property
def global_dir() -> str
Directory in which global settings are stored ie ~/.dlt/
run_dir
@property
def run_dir() -> str
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
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
Default run context assumes that entities are defined in root dir
is_workspace_dir
def is_workspace_dir(run_dir: str) -> bool
Checks if project_dir
contains dlt project, this is true if a config file is found
active
def active() -> WorkspaceRunContext
Returns currently active Workspace