A light sdk to be used by the operators in airflow-docker and in task code to participate in host/container communication.
Project description
# Airflow Docker Helper
[![CircleCI](https://circleci.com/gh/huntcsg/airflow-docker-helper/tree/master.svg?style=svg)](https://circleci.com/gh/huntcsg/airflow-docker-helper/tree/master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3e2f177d8c314f43903fe9d9b7af0647)](https://www.codacy.com/app/fool.of.god/airflow-docker-helper?utm_source=github.com&utm_medium=referral&utm_content=huntcsg/airflow-docker-helper&utm_campaign=Badge_Grade) [![codecov](https://codecov.io/gh/huntcsg/airflow-docker-helper/branch/master/graph/badge.svg)](https://codecov.io/gh/huntcsg/airflow-docker-helper)
## Description
A light sdk to be used by the operators in airflow-docker and in task code to participate in host/container communication.
## Installation
```bash
pip install airflow-docker-helper
```
## Usage
### Sensor
```python
from airflow_docker_helper import client
if sensed:
client.sensor(True)
else:
client.sensor(False)
```
### Short Circuit
```python
from airflow_docker_helper import client
if should_short_circuit:
client.short_circuit()
```
### Branching
You can pass a list...
```python
from airflow_docker_helper import client
branch_to_task_ids = ['foo', 'bar']
client.branch_to_tasks(branch_to_task_ids)
```
... or a string.
```python
from airflow_docker_helper import client
client.branch_to_tasks('some-other-task')
```
[![CircleCI](https://circleci.com/gh/huntcsg/airflow-docker-helper/tree/master.svg?style=svg)](https://circleci.com/gh/huntcsg/airflow-docker-helper/tree/master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3e2f177d8c314f43903fe9d9b7af0647)](https://www.codacy.com/app/fool.of.god/airflow-docker-helper?utm_source=github.com&utm_medium=referral&utm_content=huntcsg/airflow-docker-helper&utm_campaign=Badge_Grade) [![codecov](https://codecov.io/gh/huntcsg/airflow-docker-helper/branch/master/graph/badge.svg)](https://codecov.io/gh/huntcsg/airflow-docker-helper)
## Description
A light sdk to be used by the operators in airflow-docker and in task code to participate in host/container communication.
## Installation
```bash
pip install airflow-docker-helper
```
## Usage
### Sensor
```python
from airflow_docker_helper import client
if sensed:
client.sensor(True)
else:
client.sensor(False)
```
### Short Circuit
```python
from airflow_docker_helper import client
if should_short_circuit:
client.short_circuit()
```
### Branching
You can pass a list...
```python
from airflow_docker_helper import client
branch_to_task_ids = ['foo', 'bar']
client.branch_to_tasks(branch_to_task_ids)
```
... or a string.
```python
from airflow_docker_helper import client
client.branch_to_tasks('some-other-task')
```
Project details
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
Close
Hashes for airflow-docker-helper-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1a2ec8fc1fec33c2fc720edaaf8fbc201df07e8c1391f302fafd8e227708867 |
|
MD5 | 8132fea949c1a65b21472f878a4e63bf |
|
BLAKE2b-256 | 5e7f5dcb0720ca6636176fe33b3e18af2dfcbe55f554e44f2d2ab4eaa41e2551 |
Close
Hashes for airflow_docker_helper-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 111bd153d2d10e83c6c17e7acffb1cdd44bf041cfbe3a21c2c9f767aa20995c2 |
|
MD5 | afb9e4f3d5a1572825e067e108d9b2bf |
|
BLAKE2b-256 | b690c345787d1b05e30613fb9a89dccd6d65edd7cdc1a8f85874add6cad13f0b |