Skip to main content

Add embeded dashboars to Airflow

Project description

Airflow Embedash

A Python package for embedding dashboards in Apache Airflow UI. This plugin allows you to easily integrate Metabase, Datadog and Grafana dashboards into your Airflow environment, providing a seamless way to view data visualizations alongside your workflows.

Features

  • Easy Dashboard Integration: Embed Metabase dashboards directly into Apache Airflow UI
  • Flexible Configuration: Customize menu labels and authentication tokens
  • Multiple Airflow Versions Support: Compatible with Airflow 2.x and 3.x
  • Secure Access: Supports Metabase token-based authentication for private dashboards

Installation

Install the package using pip:

pip install airflow-embedash

Or in development mode:

pip install -e .

Usage

Basic Setup

  1. Configure Metabase Settings: Set the required Airflow variables:

    • embeded_dashboards_metabase_token: Your Metabase API token for private dashboards
  2. Configure Menu Label:

    • Default menu label is "Dashboards"
    • Override by setting the embeded_dashboards_menu_label environment variable
  3. Add new dashboards

    • Go to settings menu and add new dashboard
    • Restart the service

Package Structure

airflow_embedash/
├── __init__.py          # Package initialization
├── plugin/              # Plugin implementation directory
│   ├── __init__.py      # Plugin entry point
│   ├── airflow2.py      # Airflow 2.x compatibility layer
│   └── templates/       # HTML templates for dashboard views
│       ├── add_dashboard.html  # Add dashboard form
│       ├── edit_dashboard.html # Edit dashboard form
│       ├── settings.html       # Settings view
│       ├── view_not_set_up.html # Not configured view
│       └── view.html          # Main dashboard view
└── plugin/__init__.py   # Plugin initialization

Development

To contribute to this project:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Ensure all tests pass:
    make test
    
  5. Submit a pull request

Development Setup

The project includes development containers and Docker configurations:

  1. Using Docker:

    docker-compose up -d
    
  2. Local Development:

    • Install development dependencies: pip install -e ".[dev]"
    • Run tests: make test

Configuration Options

Environment Variables

Variable Description Required
embeded_dashboards_metabase_token Metabase API token for private dashboards Optional
embeded_dashboards_menu_label Custom menu label in Airflow UI Optional

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Submit a pull request

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airflow_embedash-0.2.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airflow_embedash-0.2.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file airflow_embedash-0.2.0.tar.gz.

File metadata

  • Download URL: airflow_embedash-0.2.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for airflow_embedash-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5f09894d67f74b89f5acb82ec3c4d863e009e4ad898d13ec551d12d361258dbc
MD5 872c6e7f22a67293c77cf8d3172da528
BLAKE2b-256 81bfd0f6da0242912435931d32539ef186247d117bca15c6bb554b2c9d53210b

See more details on using hashes here.

Provenance

The following attestation bundles were made for airflow_embedash-0.2.0.tar.gz:

Publisher: python-publish.yml on teoria/airflow-embedash

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file airflow_embedash-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for airflow_embedash-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 016eee3a447eb2fbf48374751a9067d5ac5cb71eec3cc232d097b8ed682e1dd6
MD5 85b64aa2b2ba4478c78f29e25742cf91
BLAKE2b-256 fd20bea9f0e5b7e5f98421114b633ba15bfe2a8544d2577bf70016a4728ef96f

See more details on using hashes here.

Provenance

The following attestation bundles were made for airflow_embedash-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on teoria/airflow-embedash

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page