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.1.5.tar.gz
(10.0 kB
view hashes)
Built Distribution
Close
Hashes for airflow_docker-0.1.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4663404b34687cbc72f5f409b83d46e7a1e1d21bdbbfdd16777ceb491d566b4 |
|
MD5 | d562131afd27905e0f3255ec90c8e609 |
|
BLAKE2b-256 | fdc58ed4f50148a91a528f48f23368894d42aae0ff7c7c98d6c4c5a35bb3acea |