CLI to handle Airflow in Docker Environment
Project description
Airflow Docker CLI
A command-line tool to facilitate the setup of Apache Airflow using Docker and enable local DAG development and testing.
Features
- 🚀 Quick Airflow setup with Docker Compose
- 🔧 Local DAG development and testing
- 📦 Pre-configured Docker environment
- 🛠️ CLI interface for common Airflow operations
- 🧪 Testing utilities for DAG validation
Prerequisites
- Python 3.7+
- Docker and Docker Compose
- Git
Installation
From PyPI (Recommended)
pip install airflow-cli
Quick Start
1. Start Airflow Environment
actl up
This command will:
- Check Docker installation and environment
- Create last docker-compose.yml
- Start Airflow services with Docker Compose
2. Access Airflow UI
Open your browser and navigate to http://localhost:8080
Default credentials:
- Username:
airflow - Password:
airflow
3. Stop Airflow Environment
actl down
Usage
Available Commands
# Start Docker environment
actl up
# Stop Docker environment
actl down
# Run Airflow DAG inside Docker
actl run
# Run flake8 linter on DAGs
actl fix
# Show help
actl --help
DAG Development
- Place your DAG files in the
dags/directory - The directory is automatically mounted to the Airflow container
- Changes are reflected immediately (no restart required)
Expected DAG structure for run-dag command:
project/
├── dags/
│ └── my_dag/
│ ├── config.yml
│ └── dag.py
Example config.yml:
args:
id: "my_dag_id"
Testing DAGs
Run a DAG inside Docker
actl run
This command will:
- Look for DAG configuration files in
dags/*/config.yml - Execute the DAG inside the running Airflow container
Validate DAG syntax with flake8
actl fix
This will run flake8 linter on the dags/ folder to check for Python syntax issues.
Building from Source
# Build wheel
python -m build
# Install built package
pip install dist/airflow_cli-*.whl
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file airflow_cli-1.0.0.tar.gz.
File metadata
- Download URL: airflow_cli-1.0.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c701f661b5718b4756774eae23dd87f0462d9697809a0163aea7fe1276acd4bd
|
|
| MD5 |
227bd216e4561fcd88b0f5e4901ecf86
|
|
| BLAKE2b-256 |
cdc66b91209f24781ef17f3718677fd67ab24d3e098aee7c8c397841f5e03b00
|
File details
Details for the file airflow_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: airflow_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f0ae1a7e0acce3925a077f72a6e28db7b2887f381e06b93a1cfd88f1a0e27ec
|
|
| MD5 |
c54271da913d3757cbe9424d1199d31c
|
|
| BLAKE2b-256 |
1075217dc933b9e1a1df878df53699ad44aae698368fab1e0f62a3cde4bf618d
|