dlt.common.configuration.plugins
manager
def manager() -> pluggy.PluginManager
Returns current plugin context
load_setuptools_entrypoints
def load_setuptools_entrypoints(m: pluggy.PluginManager) -> List[str]
Scans setuptools distributions that are path or have name starting with dlt
loads entry points in group dlt and instantiates them to initialize plugins.
returns a list of names of top level modules/packages from detected entry points.
plug_run_context
@hookspec(firstresult=True)
def plug_run_context(
run_dir: Optional[str],
runtime_kwargs: Optional[Dict[str, Any]]) -> Optional[RunContextBase]
Spec for plugin hook that returns current run context.
Arguments:
run_dirstr - An initial run directory of the contextruntime_kwargs- Any additional arguments passed to the context via PluggableRunContext.reload
Returns:
SupportsRunContext- A run context implementing SupportsRunContext protocol
SupportsCliCommand Objects
class SupportsCliCommand(Protocol)
Protocol for defining one dlt cli command
command
name of the command
help_string
the help string for argparse
description
the more detailed description for argparse, may inlcude markdown for the docs
docs_url
the default docs url to be printed in case of an exception
configure_parser
def configure_parser(parser: argparse.ArgumentParser) -> None
Configures the parser for the given argument
execute
def execute(args: argparse.Namespace) -> None
Executes the command with the given arguments
plug_cli
@hookspec()
def plug_cli() -> SupportsCliCommand
Spec for plugin hook that returns current run context.