Skip to main content

Declarative and composable DAG framework for Python with persistent asset management

Project description

Stardag

PyPI version Python versions Documentation License

Declarative and composable DAGs for Python.

Stardag provides a clean Python API for representing persistently stored assets, the code that produces them, and their dependencies as a declarative Directed Acyclic Graph (DAG). It is a spiritual—but highly modernized—descendant of Luigi, designed for iterative data and ML workflows.

Built on Pydantic, Stardag uses expressive type annotations to reduce boilerplate and make task I/O contracts explicit—enabling composable tasks and pipelines while maintaining a fully declarative specification of every produced asset.

Quick Example

import stardag as sd

@sd.task
def get_range(limit: int) -> list[int]:
    return list(range(limit))

@sd.task
def get_sum(integers: sd.Depends[list[int]]) -> int:
    return sum(integers)

# Declarative DAG specification - no computation yet
sum_task = get_sum(integers=get_range(limit=4))

# Materialize all tasks' targets
sd.build(sum_task)

# Load results
assert sum_task.load() == 6
assert sum_task.integers.load() == [0, 1, 2, 3]

Installation

pip install stardag

Or with uv:

uv add stardag

Optional extras:

pip install stardag[s3]      # S3 storage support
pip install stardag[prefect] # Prefect integration
pip install stardag[modal]   # Modal integration

Documentation

Read the docs for tutorials, guides, and API reference.

Stardag Cloud

Stardag Cloud provides optional services for team collaboration and monitoring:

  • Web UI — Dashboard for build monitoring and task inspection
  • API Service — Task tracking and coordination across distributed builds

The SDK works fully standalone—the platform adds value for teams needing shared visibility and coordination.

Why Stardag?

  • Composability — Task instances as first-class parameters enable loose coupling and reusability
  • Declarative — Full DAG specification before execution; inspect, serialize, and reason about pipelines
  • Deterministic — Parameter hashing gives each task a unique, reproducible ID and output path
  • Pydantic-native — Tasks are Pydantic models with full validation and serialization support
  • Framework-agnostic — Integrate with Prefect, Modal, or run standalone

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stardag-0.5.8.tar.gz (462.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stardag-0.5.8-py3-none-any.whl (169.3 kB view details)

Uploaded Python 3

File details

Details for the file stardag-0.5.8.tar.gz.

File metadata

  • Download URL: stardag-0.5.8.tar.gz
  • Upload date:
  • Size: 462.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for stardag-0.5.8.tar.gz
Algorithm Hash digest
SHA256 6d2f91da721c5ae083093c6658dfedd9ea5db69bee71d181dba1e6ed7f14e777
MD5 72d98fda93e3d978f5a72e38a54a1548
BLAKE2b-256 e8b836b77d687b37b306847ee22654a27c36901722182248732753ac0a82428c

See more details on using hashes here.

Provenance

The following attestation bundles were made for stardag-0.5.8.tar.gz:

Publisher: publish.yml on stardag-dev/stardag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stardag-0.5.8-py3-none-any.whl.

File metadata

  • Download URL: stardag-0.5.8-py3-none-any.whl
  • Upload date:
  • Size: 169.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for stardag-0.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 02cf6d4e435cc3ab6d720efbe43e8b3f865b245bcecb0146b1da6aa25cef16df
MD5 31a003a71d648158e7f9129718fae395
BLAKE2b-256 be9a0fd29e78bcccc7014c9f3374b2fef0017b98d2e3bd9e7a1102085321dcf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for stardag-0.5.8-py3-none-any.whl:

Publisher: publish.yml on stardag-dev/stardag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page