Skip to main content

Airflow Embedash

Embed dashboards in the Apache Airflow UI. Point it at a Metabase, Grafana or Datadog URL and the dashboard shows up as a page inside Airflow, next to your DAGs.

Dashboards are managed from a settings page in the UI — no code changes, no redeploy.

Compatibility

Airflow Supported How it renders
2.x Yes Flask-AppBuilder views (plugin/airflow2.py)
3.0 No Plugin FastAPI apps and external views do not exist before 3.1
3.1+ Yes FastAPI app plus one external view (plugin/airflow3.py)

plugin/__init__.py picks the layer from the running Airflow version, so the same package works on both. The HTML templates are shared.

Installation

pip install airflow-embedash

The plugin registers itself through the airflow.plugins entry point — nothing to copy into your plugins/ folder. Restart the API server (Airflow 3) or webserver (Airflow 2) afterwards.

Installing by copying the package into plugins/ is not supported. Airflow scans that folder file by file, which imports both version layers directly and fails on whichever one does not match your Airflow version.

Configuration

All settings are Airflow Variables, not environment variables.

Variable Description Required
embeded_dashboards The dashboard list. Managed for you by the settings page — you should not need to edit it by hand. Created on first save
embeded_dashboards_metabase_token Metabase secret key, used to sign embed URLs for private dashboards. Only for private dashboards
embeded_dashboards_menu_label Label for the nav entry. Defaults to Dashboards. Optional

Changing embeded_dashboards_menu_label needs an API server restart, because Airflow reads plugin nav entries once at load.

Usage

Adding a dashboard

Open the nav entry, then Add New Dashboard. Four fields:

  • Dashboard Name — shown in the list.
  • Description — free text.
  • URL — for a public dashboard, the URL to embed as-is. For a private Metabase dashboard, your Metabase site URL (for example https://metabase.example.com).
  • Payload — leave empty for a public dashboard. Fill it in to make the dashboard private.

Public vs private

Public (empty payload): the URL is embedded in an iframe unchanged. Works with any dashboard tool that allows framing — Grafana, Datadog, a public Metabase link.

Private (payload set): Metabase signed embedding. The payload is the Metabase resource claim, for example:

{"resource": {"dashboard": 1}, "params": {}}

On each view the plugin adds a 10-minute exp, signs the payload with embeded_dashboards_metabase_token (HS256), and frames <url>/embed/dashboard/<token>#bordered=true&titled=true. The token is minted per request, so it is never stored in the Variable and expires quickly.

URLs (Airflow 3)

Every page has its own address, so dashboards can be bookmarked and shared:

URL Page
/plugin/embedash Dashboard list
/plugin/embedash/add Add form
/plugin/embedash/edit/<id> Edit form
/plugin/embedash/view/<id> An embedded dashboard

Airflow frames plugin pages, so the address bar belongs to the Airflow UI rather than to the framed page. The plugin keeps the two in step: each page writes its own URL into the address bar, and follows it when Airflow changes it (clicking the nav entry while a dashboard is open returns you to the list). See embedashSyncUrl in plugin/templates/af3_base.html.

New dashboards appear in the list immediately. On Airflow 2 the menu is built at plugin load, so a restart is needed there before a new dashboard shows up in the menu.

Permissions

Airflow does not authenticate plugin endpoints, so this plugin does it explicitly:

  • Airflow 3.1+ — every page requires a logged-in user. Adding, editing and deleting additionally require Variable edit access, since that is where dashboards are stored.
  • Airflow 2 — read access on the website resource.

Package structure

airflow_embedash/
└── plugin/
    ├── __init__.py           # Entry point; selects the layer by Airflow version
    ├── airflow2.py           # Airflow 2 layer (Flask-AppBuilder)
    ├── airflow3.py           # Airflow 3.1+ layer (FastAPI + external view)
    └── templates/            # Shared by both layers
        ├── af3_base.html         # Standalone page shell for Airflow 3, plus URL syncing
        ├── index.html            # Airflow 3 entry page; forwards to the page in the URL
        ├── settings.html         # Dashboard list
        ├── add_dashboard.html
        ├── edit_dashboard.html
        ├── view.html             # The iframe that holds a dashboard
        └── view_not_set_up.html
tests/
└── test_airflow3_plugin.py   # End-to-end check against a running Airflow 3
dev/                          # Local Airflow 3 environment (Docker Compose)

Development

Start a local Airflow 3.1 with the plugin installed:

make up          # docker compose -f dev/docker-compose.yaml up -d
make logs
make down

The UI is at http://localhost:8080 (airflow / airflow). dev/docker-compose.yaml mounts airflow_embedash/ over its editable install in the container, so local edits are live:

  • Template changes are picked up on the next page load.
  • Python changes need a restart: docker restart dev-airflow-apiserver-1.

To exercise the Airflow 2 layer instead, use the other compose file. Both bind host port 8080, so stop one before starting the other:

docker compose -f dev/docker-compose.yaml stop            # Airflow 3, project "dev"
docker compose -f dev/docker-compose_v2.yaml up -d --build # Airflow 2.11, project "embedash-af2"

They are separate Compose projects on purpose — sharing a project name makes the services they have in common reuse each other's images, and an Airflow 2 service will happily start from the Airflow 3 image and fail in confusing ways. Log in with admin / admin there.

Check the plugin loaded under Admin → Plugins, or:

curl -s localhost:8080/api/v2/plugins/importErrors   # with an auth token

Tests

tests/test_airflow3_plugin.py walks the whole flow against a running instance — authentication, create, private view, edit, invalid payload, delete — using only the standard library:

python tests/test_airflow3_plugin.py

AIRFLOW_URL=http://localhost:8080 AIRFLOW_USER=airflow AIRFLOW_PASSWORD=airflow \
  python tests/test_airflow3_plugin.py

It creates a dashboard named embedash-e2e and deletes it again. It never writes embeded_dashboards_metabase_token; if that Variable already exists, the signed-URL path is checked too, otherwise that assertion is skipped.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes, with a test where there is logic to break
  4. Confirm python tests/test_airflow3_plugin.py passes against a local Airflow
  5. Open a pull request

License

This project is licensed under the MIT License.

Metadata

Release files for airflow-embedash 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for airflow-embedash 0.3.2
File Size Uploaded Provenance Actions
airflow_embedash-0.3.2.tar.gz 15.7 kB With provenance Details for airflow_embedash-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for airflow-embedash 0.3.2
File Interpreter ABI Platform Actions
airflow_embedash-0.3.2-py3-none-any.whl Python 3 none any Details for airflow_embedash-0.3.2-py3-none-any.whl

Total release size: 36.8 kB

Release files / airflow_embedash-0.3.2.tar.gz

Download URL airflow_embedash-0.3.2.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f245a3fae0948aaf8c4f178f6502f583edd53e0ee113f84517c12407021307c7
BLAKE2b-256 checksum
How to use checksums
93f17cf002c71ee12ba680f2378753d9a4aaa8b2ff4f1f8aed1cf26615c08552
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

Release files / airflow_embedash-0.3.2-py3-none-any.whl

Download URL airflow_embedash-0.3.2-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f4097c502b9ce1ab435c654a879890e63c13adc102db5f1faf88c63517095a9
BLAKE2b-256 checksum
How to use checksums
1cc32e82993c9348deb3abedf10561ad23a122bc889f3e49b9563e70db33b584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

Security for airflow-embedash 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for airflow_embedash-0.3.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page