Registry / workflow / airflow-mcd

airflow-mcd

JSON →
library0.3.12pypypi✓ verified 82d ago

Monte Carlo's Apache Airflow Provider integrates Monte Carlo with Airflow to enable data observability features like incident alerts, lineage visibility, and pipeline control via Circuit Breakers. It is compatible with Apache Airflow 1.10.14 or greater and requires Python 3.7 or greater. The library is actively maintained with regular updates.

pip install airflow-mcd
INSTALL
IMPORT
SIG · AIRFLOW-MCD
A
airflow-mcd
workflowpythonv0.3.12
Install
14.3s avg
Import
12119ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.12 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 12.410s · 42.4MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 14.3s · import 11.828s · 61MB
50MB installed
● package 50MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_provider_info
from airflow_mcd import get_provider_info
from airflow_mcd.callbacks import mcd_callbacks
get_version
from airflow_mcd import get_version
PackageNotFoundError
from airflow_mcd import PackageNotFoundError

This quickstart demonstrates how to integrate Monte Carlo callbacks into an Apache Airflow DAG. The `mcd_callbacks.dag_callbacks` and `mcd_callbacks.task_callbacks` are used to automatically send webhooks to Monte Carlo upon various DAG and task events (success, failure, etc.), providing observability. For full functionality, Monte Carlo API credentials must be configured as an Airflow connection.

from __future__ import annotations import pendulum from airflow.models.dag import DAG from airflow.operators.bash import BashOperator from airflow_mcd.callbacks import mcd_callbacks with DAG( dag_id="monte_carlo_example_dag", start_date=pendulum.datetime(2023, 1, 1, tz="UTC"), catchup=False, schedule=None, tags=["monte_carlo", "example"], **mcd_callbacks.dag_callbacks, # Apply broad DAG-level callbacks ) as dag: start_task = BashOperator( task_id="start_task", bash_command="echo 'Starting DAG'", **mcd_callbacks.task_callbacks, # Apply broad Task-level callbacks ) process_data = BashOperator( task_id="process_data", bash_command="echo 'Processing data...'; sleep 5", # You can override specific callbacks if needed: # on_failure_callback=mcd_callbacks.mcd_task_failure_callback, **mcd_callbacks.task_callbacks, ) end_task = BashOperator( task_id="end_task", bash_command="echo 'DAG finished'", **mcd_callbacks.task_callbacks, ) start_task >> process_data >> end_task
Debug
Known issues
breakingWhen upgrading to Airflow 2.9.0 or later, ensure `airflow-mcd` is updated to version 0.3.3 or higher. Older versions of `airflow-mcd` are not compatible with Airflow 2.9.0+ and may cause connection failures.
fix
Upgrade `airflow-mcd` to 0.3.3 or later: `pip install -U airflow-mcd`.
affects: <0.3.3 (with Airflow >= 2.9.0)
gotchaIf task-level callbacks are configured, DAG-level callbacks (e.g., `mcd_callbacks.dag_callbacks`) must also be defined. Without DAG callbacks, Monte Carlo cannot update the DAG run status, leading to DAGs appearing perpetually 'Running' and preventing failure alerts.
fix
Always include `**mcd_callbacks.dag_callbacks` (or explicit DAG callbacks) in your DAG definition if you are using any task-level callbacks.
affects: All
gotchaThe `Monte Carlo Data Gateway` connection type in Airflow does not support Circuit Breakers operations. For Circuit Breaker functionality, you must use the `Monte Carlo Data` connection type configured with an API Key ID (login) and API Secret (password).
fix
Create an Airflow connection of type `Monte Carlo Data` for Circuit Breakers, ensuring the API Key ID is in the 'Login' field and the API Secret in the 'Password' field.
affects: All
breakingFor Airflow 3.0 compatibility, `airflow-mcd` package version 0.3.10 and later is required. Earlier versions of `airflow-mcd` may not function correctly with Airflow 3.0 onwards.
fix
Upgrade `airflow-mcd` to 0.3.10 or later: `pip install -U airflow-mcd`.
affects: <0.3.10 (with Airflow >= 3.0)
Upgrade
Version history
0.3.12latest on PyPI · released May 7, 2026
Audit
Dependencies
apache-airflowrequiredThis package is an Apache Airflow provider, requiring Airflow for functionality.
Agent activity
66 hits · last 30 days
node
58
Amazon
1
OpenAI (training)
1
Resources
airflow-mcd — pip install airflow-mcd · libregistry