dlt._workspace.deployment.manifest
generate_manifest_hash
def generate_manifest_hash(manifest: TJobsDeploymentManifest) -> str
SHA3-256 content hash of manifest, excluding version metadata.
hash_job_definition
def hash_job_definition(job_def: TJobDefinition) -> str
SHA3-256 content hash of a single job definition (canonical, sorted).
Uses the same serialization and algorithm as generate_manifest_hash so a caller can derive per-job hashes for change detection without recomputing the whole manifest hash.
bump_manifest_version
def bump_manifest_version(
manifest: TJobsDeploymentManifest) -> Tuple[int, str, str]
Bump version and hash if content modified.
Returns:
Tuple of (new_version, new_hash, old_hash).
migrate_manifest
def migrate_manifest(manifest_dict: DictStrAny, from_engine: int,
to_engine: int) -> TJobsDeploymentManifest
Migrate a manifest dict between engine versions.
save_manifest
def save_manifest(manifest: TJobsDeploymentManifest, f: BinaryIO) -> str
Bump version, serialize manifest, and write to binary IO.
Returns:
The new version hash.
load_manifest
def load_manifest(f: BinaryIO) -> TJobsDeploymentManifest
Read, migrate, and validate a manifest from binary IO.
expand_triggers
def expand_triggers(job_def: TJobDefinition) -> List[TTrigger]
Expand triggers with synthetic triggers from expose and deliver specs.
Adds manual:, tag:, and pipeline_name: triggers.
Returns a new list — does not modify job_def.
compute_default_trigger
def compute_default_trigger(job_def: TJobDefinition) -> Optional[TTrigger]
Pick the default trigger for a job: prefer schedule/every, else first eligible trigger.
manual and deployment triggers are never selected as the default.
validate_job_definition
def validate_job_definition(
job_def: TJobDefinition,
raise_on_error: bool = False) -> JobValidationResult
Validate a single job definition (self-contained checks only).
Parses triggers and freshness constraints for format errors, checks type/trigger consistency, interval alignment, and dashboard constraints.
Arguments:
job_def- The job definition to validate.raise_on_error- If True, raise InvalidJobDefinition when errors found.
Raises:
InvalidJobDefinition- When raise_on_error is True and validation fails.
validate_manifest
def validate_manifest(
manifest: TJobsDeploymentManifest) -> ManifestValidationResult
Validate a deployment manifest structurally and for consistency.
import_deployment_module
def import_deployment_module(module_name: str) -> ModuleType
Import a deployment module with pipeline execution and framework noise suppressed.
default_dashboard_job
def default_dashboard_job() -> TJobDefinition
Default workspace dashboard job definition.
default_dashboard_manifest
def default_dashboard_manifest() -> TJobsDeploymentManifest
Build a manifest containing only the default workspace dashboard job.
generate_manifest
def generate_manifest(
deployment_module: ModuleType,
use_all: bool = True) -> Tuple[TJobsDeploymentManifest, List[str]]
Generate a deployment manifest from a deployment module.
Discovers jobs by inspecting module-level objects: JobFactory instances
and framework modules (marimo, FastMCP, streamlit).
Arguments:
deployment_moduleModuleType - The imported deployment module.use_allbool - IfTrue, only names in__all__are discovered. IfFalse, scans__dict__directly (for ad-hoc deployments).
Returns:
Tuple of (manifest, warnings). Warnings include non-discoverable names.
manifest_from_module
def manifest_from_module(
name_or_path: str,
use_all: bool = True,
isolated: bool = False) -> Tuple[TJobsDeploymentManifest, List[str]]
Import a module, generate a manifest, and validate it.
Arguments:
name_or_path- Python module name or file path.use_all- Use__all__for job discovery.isolated- Run in a subprocess to avoid polluting the current interpreter.
Returns:
Tuple of (manifest, warnings).
Raises:
InvalidManifest- If the generated manifest fails validation.