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
- Fork the repository
- Create a feature branch
- Make your changes, with a test where there is logic to break
- Confirm
python tests/test_airflow3_plugin.pypasses against a local Airflow - Open a pull request
License
This project is licensed under the MIT License.
Metadata
Release files for airflow-embedash 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| airflow_embedash-0.3.0.tar.gz | 15.7 kB | With provenance | Details for airflow_embedash-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| airflow_embedash-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for airflow_embedash-0.3.0-py3-none-any.whl |
Total release size: 36.8 kB
Release files / airflow_embedash-0.3.0.tar.gz
| Download URL | airflow_embedash-0.3.0.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f96da1caa60a713606e725cbf5b2f2f258b7f31621fb0d01fe42080a55dfe02b
|
|
BLAKE2b-256 checksum How to use checksums |
4261da1f0828387b2a2ec2bf582b597029876223c2dccf9e25864d08f5947eff
|
| 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 logRelease files / airflow_embedash-0.3.0-py3-none-any.whl
| Download URL | airflow_embedash-0.3.0-py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9312a59ef3bae9919a7f4100ca77cde65029913e40c1f77661a40eff110f142f
|
|
BLAKE2b-256 checksum How to use checksums |
a956b26e0efb52fdeac906d2862d55b82eed81192b66a7d1de2f3c6b416be514
|
| 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 logSecurity for airflow-embedash 0.3.0
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.
Attestation for airflow_embedash-0.3.0.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 logA 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.