Skip to content

Core API

asset

asset(_func=None, *, deps=None, partition_def=None, resource=None, materialization=None, version=None)

A decorator to define an asset, its dependencies, and its configuration schema.

AssetContext

AssetContext dataclass

Holds contextual information for an asset's execution.

Flow

Flow

An explicit target set and its exact asset registry.

Passing a graph is a checked, deprecated migration form. It is retained only so older callers can move to direct targets without changing execution meaning.

plan(run_config=None)

Return the fully validated plan without invoking an asset.

run_async(run_config=None, *, event_consumer=None) async

Execute a preflighted plan and return its terminal result.

PartitionGroup

PartitionGroup dataclass

Bound the selected partition keys progressing through an asset chain.

assets are ordered from the upstream asset to the downstream asset. The flow planner checks that the names form a valid partitioned chain.

ResourcePolicy

ResourcePolicy dataclass

Maximum simultaneous asset invocations for one named resource.

RateLimit dataclass

Maximum asset invocation starts in a rolling window within one run.

Retry decisions

Fail dataclass

Finish this logical attempt without another invocation.

Retry dataclass

Request another invocation after an explicit, run-local delay.

OpenCircuit dataclass

Fail this attempt and stop pending body invocations on its resource.

RunConfig

RunConfig

Bases: TypedDict

run

run(asset_names, run_config=None, *, registry=default_registry, event_consumer=None)

Synchronously run explicit targets, unless this thread already has a loop.

DatePartitionDef

DatePartitionDef dataclass

Bases: PartitionDef

Represents a definition for a date-based partition.

normalize_key(key)

Normalize a canonical ISO date string or plain :class:date.

range(start_date, end_date)

Expand an explicit inclusive bounded date range.

PartitionDef

PartitionDef dataclass

Bases: ABC

Defines one compatible domain of partition keys.

Existing definitions that only implement :meth:range retain identity key normalization. Definitions that need a stronger contract can override the metadata and :meth:normalize_key methods without changing the executor.

domain property

A stable identifier for keys that may share one selection.

key_format property

Describe the accepted key form without enumerating keys.

kind property

A human-readable definition kind for inspection output.

supports_range property

Whether this definition accepts explicit bounded range selection.

normalize_key(key)

Return the canonical in-memory representation of one selected key.

Materialization protocol

The optional adapter protocol and its identity values are part of the public API. See Reuse committed partition outputs for the opt-in workflow and adapter responsibilities.

Materialization

Materialization

Bases: Protocol

User supplied storage adapter for materialized asset outputs.

commit(context, output)

Atomically publish output and return its committed identity.

load(record)

Load the output represented by a compatible committed record.

resolve(context)

Return a candidate record for this identity, if one exists.

MaterializationContext

MaterializationContext dataclass

Identity used to resolve or commit one asset partition output.

MaterializationRecord

MaterializationRecord dataclass

Opaque adapter record describing a possibly committed output.