dlt._workspace.deployment.detectors
Module-level framework detectors for interactive job discovery.
Each detector probes an imported module for a known framework singleton (marimo.App, FastMCP, streamlit) and produces a TJobDefinition.
detect_local_module is a separate detector for plain Python modules
that should run as batch jobs via __main__. It validates the module
is local to the workspace (below or equal to the parent module).
detect_module_job
def detect_module_job(module: ModuleType) -> Optional[TJobDefinition]
Detects if module may be a job by running frameworks detectors
is_local_module
def is_local_module(module: ModuleType, parent_module: ModuleType) -> bool
Check if module's file is below parent_module's directory and not in a venv.
detect_local_module
def detect_local_module(module: ModuleType,
parent_module: ModuleType) -> Optional[TJobDefinition]
Detect a plain local Python module as a batch job.
Only matches modules local to the workspace. Skips modules already detected by framework detectors. Not part of the framework detection chain — called separately.