Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Apache Airflow Core Pyproject

From Leeroopedia


Knowledge Sources
Domains Build_System, Packaging
Last Updated 2026-02-08 21:00 GMT

Overview

Package configuration for apache-airflow-core defining the build system (hatchling), 80+ runtime dependencies, optional extras, version 3.2.0, and Python >=3.10 requirement.

Description

The airflow-core/pyproject.toml file is a 325-line TOML configuration that defines the apache-airflow-core package -- the core scheduling, API server, and execution engine for Apache Airflow. Key aspects:

  • Build system: Uses Hatchling (v1.27.0) as the build backend with pinned build dependencies including GitPython, packaging, pathspec, pluggy, and trove-classifiers.
  • Python version: Requires >=3.10,!=3.14 (Python 3.14 proactively excluded pending dependency support).
  • Version: 3.2.0, automatically synchronized from src/airflow/__init__.py via a prek hook.
  • Runtime dependencies: Over 80 direct dependencies including:
    • Web framework: fastapi[standard-no-fastapi-cloud-cli], uvicorn, starlette
    • Database: sqlalchemy[asyncio]>=2.0.36, alembic>=1.13.1, aiosqlite
    • Scheduling: croniter, pendulum>=3.1.0
    • Serialization: pydantic>=2.11.0, dill, jsonschema
    • Observability: opentelemetry-api, opentelemetry-exporter-otlp, structlog>=25.4.0
    • Pre-installed providers: common-compat, common-io, common-sql, smtp, standard
    • Task SDK: apache-airflow-task-sdk<1.3.0,>=1.2.0
  • Optional extras: async (eventlet, gevent, greenlet), graphviz, kerberos, memray, gunicorn, otel, statsd, and all (combines graphviz, gunicorn, kerberos, otel, statsd).
  • Entry point: airflow = "airflow.__main__:main" as the CLI command.
  • Build targets: Configures sdist and wheel targets with shared distribution force-includes for configuration, logging, secrets, timezones, and other shared modules.

Usage

# Install apache-airflow-core with all extras
pip install apache-airflow-core[all]

# Install with specific extras
pip install apache-airflow-core[async,kerberos]

# Install base package only
pip install apache-airflow-core

Code Reference

Source Location

  • Repository: Apache_Airflow
  • File: airflow-core/pyproject.toml
  • Lines: 325

Signature

[build-system]
requires = [
    "GitPython==3.1.45",
    "hatchling==1.27.0",
    "packaging==25.0",
    # ...
]
build-backend = "hatchling.build"

[project]
name = "apache-airflow-core"
description = "Core packages for Apache Airflow, schedule and API server"
license = "Apache-2.0"
requires-python = ">=3.10,!=3.14"
version = "3.2.0"

dependencies = [
    "fastapi[standard-no-fastapi-cloud-cli]>=0.128.1,<0.128.4",
    "sqlalchemy[asyncio]>=2.0.36",
    "alembic>=1.13.1, <2.0",
    "pendulum>=3.1.0",
    "pydantic>=2.11.0",
    "apache-airflow-task-sdk<1.3.0,>=1.2.0",
    # ... 80+ dependencies
]

[project.optional-dependencies]
"async" = ["eventlet>=0.37.0", "gevent>=25.4.1", "greenlet>=3.1.0", "greenback>=1.2.1"]
"graphviz" = ["graphviz>=0.20; sys_platform != 'darwin'"]
"kerberos" = ["pykerberos>=1.1.13", "requests-kerberos>=0.14.0", "thrift-sasl>=0.4.2"]
"all" = ["apache-airflow-core[graphviz,gunicorn,kerberos,otel,statsd]"]

[project.scripts]
airflow = "airflow.__main__:main"

[tool.hatch.version]
path = "src/airflow/__init__.py"

[tool.hatch.build.targets.sdist.force-include]
"../shared/configuration/src/airflow_shared/configuration" = "src/airflow/_shared/configuration"
"../shared/logging/src/airflow_shared/logging" = "src/airflow/_shared/logging"
# ... other shared distributions

I/O Contract

Inputs

Name Type Required Description
Source code Python modules Yes Python source files under airflow-core/src/airflow/
Shared distributions Python packages Yes Shared library code force-included from ../shared/ directories
UI assets Built JavaScript/CSS No Pre-compiled UI assets in src/airflow/ui/dist/
Version file src/airflow/__init__.py Yes Contains __version__ used as package version

Outputs

Name Type Description
sdist .tar.gz Source distribution archive including shared distributions
wheel .whl Built distribution with compiled UI assets and shared code
airflow CLI Console script Entry point for the airflow command-line tool

Usage Examples

Install With Extras

# Install core with all optional extras
pip install apache-airflow-core[all]

# Install with specific extras for async support
pip install apache-airflow-core[async]

# Install with Kerberos authentication support
pip install apache-airflow-core[kerberos]

Development Installation

# Install in development mode with uv
cd airflow-core
uv pip install -e ".[all]"

Optional Extras Summary

Extra Dependencies Description
async eventlet, gevent, greenlet, greenback Async execution support
graphviz graphviz (non-macOS) DAG visualization rendering
kerberos pykerberos, requests-kerberos, thrift-sasl Kerberos authentication
memray memray Memory profiling
gunicorn gunicorn WSGI HTTP server
otel opentelemetry-exporter-prometheus Prometheus metrics export
statsd statsd StatsD metrics client
all (combines above except async and memray) All standard extras

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment