An opinionated implementation of exclusively using airflow DockerOperators for all Operators
Project description
airflow-docker
Description
An opinionated implementation of exclusively using airflow DockerOperators for all Operators.
Default Operator
from airflow_docker.operator import Operator
task = Operator(
image='some-image:latest',
...
)
Default Sensor
from airflow_docker.operator import Sensor
sensor = Sensor(
image='some-image:latest',
...
)
Task Code
from airflow_docker_helper import client
client.sensor(True)
Branch Operator
Dag Task
from airflow_docker.operator import BranchOperator
branching_task = BranchOperator(
image='some-image:latest',
...
)
Task Code
from airflow_docker_helper import client
client.branch_to_tasks(['task1', 'task2'])
Short Circuit Operator
Dag Task
from airflow_docker.operator import ShortCircuitOperator
short_circuit = ShortCircuitOperator(
image='some-image:latest',
...
)
Task Code
from airflow_docker_helper import client
client.short_circuit() # This task will short circuit if this function gets called
Context Usage
Dag Task
from airflow_docker.operator import Operator
task = Operator(
image='some-image:latest',
provide_context=True,
...
)
Task Code
from airflow_docker_helper import client
context = client.context()
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
airflow-docker-0.2.0.tar.gz
(9.2 kB
view details)
Built Distribution
File details
Details for the file airflow-docker-0.2.0.tar.gz
.
File metadata
- Download URL: airflow-docker-0.2.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4718170201eccc98bbe2ee7867b4566f67cb1c1ff3e22600029d591fe3e6dbef |
|
MD5 | 778a97a265ffa8deb2c1a0cae9e6c307 |
|
BLAKE2b-256 | a94d2d2ee3be172664e27a313f0ed1e5066d5d08924c8d72bfde7b43d2f257cf |
File details
Details for the file airflow_docker-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: airflow_docker-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bea267710ab60b9af2a25b3c2e2209714469274d85bf57f986221e65ed4a34af |
|
MD5 | dcdbedf4ace940cbc7aafc14d4b561f2 |
|
BLAKE2b-256 | ac4fcd829b9790050ead8890db5ec38b11620fb29f4759868c96041b9f7713e6 |