Skip to main content

Library for Apache Airflow DAG development

Project description

DagWeaver

Library for Apache Airflow DAG development. @weave decorator marks pipeline steps.

Install

pip install dagweaver[airflow]

Usage

Weaves — one @weave per file in weaves/:

my_project/
  weaves/
    raw_data.py      # @weave def raw_data(): ...
    processed.py     # @weave(upstream=["raw_data"]) def processed(data): ...
  dags/
    my_dag.py        # DAG definition (below)

weaves/raw_data.py:

from dagweaver import weave

@weave
def raw_data():
    return "data"

weaves/processed.py:

from dagweaver import weave

@weave(upstream=["raw_data"])
def processed(data):
    return data.upper()

dags/my_dag.py:

from airflow import DAG
from dagweaver import build_weaves, build_dag
import my_project.weaves as weaves_pkg

with DAG("my_dag", start_date=..., schedule=None) as dag:
    weaves = build_weaves(weaves_pkg)
    build_dag(dag, weaves)

Dev

pip install -e ".[dev]"
pytest

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

dagweaver-0.1.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

dagweaver-0.1.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dagweaver-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for dagweaver-0.1.1.tar.gz
Algorithm Hash digest
SHA256 696922d066f78415de88ae7e3288e5f087873d552ec76e5248fa94826dad80b5
MD5 43835d309b63d249ff9014071cd795a9
BLAKE2b-256 1ce1f4cbd1b51197d2b3f9d20ec4a4b2b28bcc2415392763078d2ba58897088f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dagweaver-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for dagweaver-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03640bdad776bc32319f147a41b04cfbcf0f3113e0065e59772310311e8200f1
MD5 c65569c0b1444510f3f9ee437dcac38f
BLAKE2b-256 e84da22822f6e50eaa0cb1e95b7ec8cd277f00a696db8acf95e3d3e0911fdbe2

See more details on using hashes here.

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