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.
SupportsMcpFeatures Objects
class SupportsMcpFeatures(Protocol)
Protocol for contributing MCP tools, prompts, and providers via plug_mcp hook
name
unique name identifying this feature set
tools
tool functions or Tool objects to register
prompts
prompt functions or Prompt objects to register
providers
provider instances (e.g. SkillProvider) to register
plug_mcp
@hookspec()
def plug_mcp(features: Set[str]) -> Optional[SupportsMcpFeatures]
Spec for plugin hook that contributes MCP tools, prompts, and providers.
MCP server will broadcast features to all registered plugins that may
decide to return a MCP feature (combination of tools, skills and prompts)
or not. The server collects all non-None results and registers everything on the
FastMCP instance.
Arguments:
features- set of feature keywords the server requests