Skip to main content

Tiny, stdlib-only DAG runner for Python.

Project description

slimflow

Tiny, stdlib-only DAG runner for Python.

Install

pip install slimflow

Usage

from slimflow import Task, Workflow, Runner

extract = Task(name="extract", func=fetch_data)
transform = Task(name="transform", func=clean, depends_on=[extract])
load = Task(name="load", func=write_to_db, depends_on=[transform], max_retries=3)

workflow = Workflow("my-pipeline", [extract, transform, load])
results = Runner(threads=4).run(workflow)

Run artifacts

Pass artifacts_dir= to Runner to persist run_results.json (one per run) at the end of each workflow. Failed or skipped tasks also get a sidecar log file. Below is the schema.

{
  "schema_version": 1,
  "run_id": "8c7a...",
  "workflow_name": "my-pipeline",
  "started_at": "2026-05-23T17:04:11.000000Z",
  "ended_at":   "2026-05-23T17:09:32.000000Z",
  "duration_s": 321.4,
  "python_version": "3.12.4",
  "slimflow_version": "0.1.0",
  "caller_path": "main.py",
  "tasks": [
    {
      "name": "extract",
      "status": "success",
      "attempts": 1,
      "started_at": "2026-05-23T17:04:11.000000Z",
      "ended_at":   "2026-05-23T17:07:55.000000Z",
      "duration_s": 224.0,
      "thread_name": "ThreadPoolExecutor-0_2",
      "depends_on": [],
      "func_module": "my_pipeline.tasks",
      "func_qualname": "fetch_data",
      "func_source_path": "my_pipeline/tasks.py",
      "func_source_line": 12,
      "error": null,
      "traceback": null,
      "log_path": null
    }
  ]
}

Func metadata caveats

func_module / func_qualname / func_source_path are best-effort. Plain functions, functools.partial, and @functools.wraps-decorated functions all resolve cleanly. Lambdas show as "<lambda>". Callable objects fall back to their class name. None of this affects execution — only the BI-grouping tags.

Issues

github.com/whimsical/slimflow/issues

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

slimflow-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

slimflow-0.1.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file slimflow-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for slimflow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0a499ab3e6a5a870091cf7f2d8c8e3843d9ecf831955c1afa13f7e8ef8a8f968
MD5 4fddae84cbf4d9e37636b3cbc466e3ce
BLAKE2b-256 69fe8064ff8e9e0bda7fa8f566e9ba36485f1501b166536f0c392fe295de096d

See more details on using hashes here.

Provenance

The following attestation bundles were made for slimflow-0.1.0.tar.gz:

Publisher: publish.yml on WhimsicalCode/slimflow

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

File details

Details for the file slimflow-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for slimflow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a35cd1b88351daae388dfc73192ee19c5d730a64c2be36f2287af1fd0bd7b7c1
MD5 600dd4b75b4f24ef7e60d218ff029899
BLAKE2b-256 c51440bed72cbf6e918e37191b2bec631e1bfb64eee8f6aa48b23dd8233e1be3

See more details on using hashes here.

Provenance

The following attestation bundles were made for slimflow-0.1.0-py3-none-any.whl:

Publisher: publish.yml on WhimsicalCode/slimflow

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