airflow-plugins
Airflow 3 Plugins
Airflow 3 plugins let you embed FastAPI apps, React UIs, middleware, macros, operator buttons, and custom timetables directly into the Airflow process. No sidecar, no extra server.
CRITICAL: Plugin components (fastapi_apps, react_apps, external_views) require Airflow 3.1+. NEVER import
flask,flask_appbuilder, or useappbuilder_views/flask_blueprints— these are Airflow 2 patterns and will not work in Airflow 3. If existing code uses them, rewrite the entire registration block using FastAPI.Security: FastAPI plugin endpoints are not automatically protected by Airflow auth. If your endpoints need to be private, implement authentication explicitly using FastAPI's security utilities.
Restart required: Changes to Python plugin files require restarting the API server. Static file changes (HTML, JS, CSS) are picked up immediately. Set
AIRFLOW__CORE__LAZY_LOAD_PLUGINS=Falseduring development to load plugins at startup rather than lazily.Relative paths always: In
external_views,hrefmust have no leading slash. In HTML and JavaScript, use relative paths for all assets andfetch()calls. Absolute paths break behind reverse proxies.
Before writing any code, verify
- Am I using
fastapi_apps/ FastAPI — notappbuilder_views/ Flask? - Are all HTML/JS asset paths and
fetch()calls relative (no leading slash)? - Are all synchronous SDK or SQLAlchemy calls wrapped in
asyncio.to_thread()? - Do the
static/andassets/directories exist before the FastAPI app mounts them? - If the endpoint must be private, did I add explicit FastAPI authentication?