from bud import Pipeline, Action
# Define a pipeline
with Pipeline("my-first-pipeline") as p:
start = Action("start", type="log").with_config(
message="Pipeline started"
)
process = Action("process", type="transform").after(start)
end = Action("end", type="log").after(process).with_config(
message="Pipeline completed"
)
# Create the pipeline
pipeline = client.pipelines.create(
dag=p.to_dag(),
name=p.name,
description="My first pipeline"
)
# Execute the pipeline
execution = client.executions.create(
pipeline_id=pipeline.id,
params={"input_data": "Hello, World!"}
)
print(f"Execution ID: {execution.id}")
print(f"Status: {execution.status}")