airflow grpc operator
Project description
Airflow Grpc Operator
Fork on Airflow 2.0
Fix Airflow 1.10.x use grpc operator
Requirements:
apache-airflow
grpcio
protobuf
How to use:
from airflow_grpc.grpc_operator import GrpcOperator
args = {
'owner': 'Airflow',
'start_date': days_ago(1),
}
dag = DAG(
dag_id='dag_id',
default_args=args,
schedule_interval=None
)
def callback(response: Any, **context):
return response
run_this = GrpcOperator(
task_id='task_id',
dag=dag,
grpc_conn_id='grpc_connection_id_on_admin_connections',
stub_class=GrpcStubClass,
call_func='stub_function',
data={'request': proto_request_data},
response_callback=callback
)
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
airflow-grpc-0.0.4.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for airflow_grpc-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9334f017060d6f04519f53a58a2aec478db881b890d93dee7d9646a60518989d |
|
MD5 | 21e068b111f230fdaa517779d9dd954b |
|
BLAKE2b-256 | d5abdae64b628dc2a943f9ea7cbf5c5ee0110ade9b5c10772951c0dc4d00de12 |