Skip to main content

Small decorator based DAG to orchestrate jobs

Project description

minidag

PyPI - Python Version

Bare minimum DAG implementation for in-process sorting of jobs with dependency injection. Runs jobs in topological order.

Install: pip install minidag

Usage:

from minidag import MiniDAG

dag = MiniDAG()

@dag.job()
def job1():
    return 1

@dag.job()
def job2(job1):
    return job1 + 1

@dag.job()
def job3(job1, job2):
    return job1 + job2

@dag.job()
def job4(some_external_value, job3)
    return some_external_value + job3

dag.run(some_external_value=10)
# > {'job1': 1, 'job2': 2, 'job3': 3, 'job4': 13, 'some_external_value': 10}

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

minidag-0.1.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

minidag-0.1.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file minidag-0.1.1.tar.gz.

File metadata

  • Download URL: minidag-0.1.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for minidag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 af6f56e0f719b380b5e4c4928d1ef174f98df3d07949e0f30576a78a3128bb82
MD5 04c02fadb1868e4fa3e6859ca1bd1b50
BLAKE2b-256 58ad6ecebdbae35e18a5e162fc2006c6a0400d489cbf652e3db8aceefe0c428b

See more details on using hashes here.

File details

Details for the file minidag-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: minidag-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for minidag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e43e99825eed67ebee7a1a56bf53d1cd6ed4622657b528e0db40f4ab36235207
MD5 6d1dbd7aff2f82f03ef94c22b839967c
BLAKE2b-256 70b737580a4c6a77f2edb8086dee582f87cb1e672cb5320792826b84d68ee351

See more details on using hashes here.

Supported by

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