"Pipeline orchestration and operator CLI for Money Ex Machina — Prefect-backed flows, text-first ergonomics, and optional asset metadata."
Project description
mxm-pipeline
Prefect-backed orchestration • CLI/TUI-first • Provenance everywhere • Optional asset sidecars
mxm-pipeline provides the orchestration core for Money Ex Machina.
It offers a backend-agnostic model and API for defining, compiling, and executing
directed workflows (task graphs) using simple declarative specifications.
The package is intentionally small, strictly typed, and designed for compositional
use across the MXM ecosystem, with data pipelines as a primary application but
no hard dependency on any specific domain.
The current backend implementation targets Prefect (local execution).
Future adapters (Airflow, Dagster, temporal.io, Ray) will plug into the same
public API.
Installation
pip install mxm-pipeline
To enable orchestration backends (currently Prefect):
pip install "mxm-pipeline[orchestration]"
Requires Python 3.13+.
Quick Start
1. List available flows
mxm-pipeline list
2. Visualise a flow graph
mxm-pipeline graph demo
3. Run a flow
mxm-pipeline run demo --param x=4 --param y=7
4. Use the API directly
from mxm.pipeline import api
from mxm.pipeline.registry import get_flow
spec = get_flow("demo")
flow = api.compile_flow(spec)
result = api.execute_flow(flow, {"x": 4, "y": 7})
print(result)
The API always returns a dict[str, JSONValue] mapping task names to results.
How It Works
mxm-pipeline is structured into three explicit layers:
1. Spec Layer (spec.py)
Defines the declarative building blocks of a pipeline:
TaskSpecFlowSpecAssetDecl
A flow describes tasks, dependencies, parameters, and assets without reference to any execution engine.
2. API Layer (api.py)
The public interface:
compile_flow(spec) -> MXMFlowexecute_flow(flow, params) -> dict[str, JSONValue]
This layer is backend-neutral.
It hides Prefect (or any future orchestration system) from callers.
3. Adapter Layer (adapters/)
Each backend implements:
build_*_flow(spec)execute_*_flow()- An
MXMFlowwrapper exposing a uniform interface.
The current implementation is:
adapters/prefect_adapter.py
It performs deterministic flow construction, retry management, parameter merging, asset logging, and dependency resolution.
Registry
Flows are registered via:
from mxm.pipeline.registry import register_flow
All registered flows appear automatically in the CLI:
mxm-pipeline list
This allows packages within the MXM ecosystem to expose flows without importing Prefect or the adapter layer.
Status and Scope
The package is stable for local execution and suitable for programmatic use in other MXM components.
Out of scope for v0.1.0:
- Distributed or cloud execution
- Asset cataloguing and freshness policies (scheduled for M4)
- Workflow scheduling and event-driven triggers
- UI or dashboard layers
The design emphasises simplicity, transparency, and reliability for development and research workflows.
Roadmap
- M2.2 — Backend failsafe, error modes, structured runtime logs
- M3 — Event-driven orchestration, enriched CLI, DAG export formats
- M4 — Full asset layer (catalogue, caching, partitioning, freshness)
- M5 — Multi-backend support (Airflow, Ray, Dagster)
- M6 — Operators / runtime console for the Money Machine
Development
Format, lint, type-check, and test the project:
make check
All code is required to pass:
ruffblackisortpyright(strict)pytest
License
MIT License. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mxm_pipeline-0.1.0.tar.gz.
File metadata
- Download URL: mxm_pipeline-0.1.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2884ad722034cdea017d5c62c022e5ac3654e814b939faea29ff2f63e49d9d4
|
|
| MD5 |
0df9d8ac75a23ba344763e2a267431c8
|
|
| BLAKE2b-256 |
5d15e11b0cd5afe96c8f6eb3b5a9ce46e7dfb80365aeccb1bef3c3c22020bc30
|
Provenance
The following attestation bundles were made for mxm_pipeline-0.1.0.tar.gz:
Publisher:
release.yml on moneyexmachina/mxm-pipeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mxm_pipeline-0.1.0.tar.gz -
Subject digest:
a2884ad722034cdea017d5c62c022e5ac3654e814b939faea29ff2f63e49d9d4 - Sigstore transparency entry: 732812031
- Sigstore integration time:
-
Permalink:
moneyexmachina/mxm-pipeline@ae0cf11c061c2700a0d5566fd2837d512e908611 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/moneyexmachina
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ae0cf11c061c2700a0d5566fd2837d512e908611 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mxm_pipeline-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mxm_pipeline-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cac70e256e1230f530786cfeabfedce2463fb548bf50d26ae8fda21b0c82610
|
|
| MD5 |
1c72930281e01bc30fd5dcaef4de7032
|
|
| BLAKE2b-256 |
90a9cfe3c42e6fdccf420ae1510ea9993b210c68fe5e12604ac29bc60b2c972e
|
Provenance
The following attestation bundles were made for mxm_pipeline-0.1.0-py3-none-any.whl:
Publisher:
release.yml on moneyexmachina/mxm-pipeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mxm_pipeline-0.1.0-py3-none-any.whl -
Subject digest:
2cac70e256e1230f530786cfeabfedce2463fb548bf50d26ae8fda21b0c82610 - Sigstore transparency entry: 732812032
- Sigstore integration time:
-
Permalink:
moneyexmachina/mxm-pipeline@ae0cf11c061c2700a0d5566fd2837d512e908611 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/moneyexmachina
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ae0cf11c061c2700a0d5566fd2837d512e908611 -
Trigger Event:
push
-
Statement type: