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.7.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for airflow_grpc-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dbc8c44d8a50203f98d78752aa4ac6c2d1d345aa27895c2fc253055f1da0ebb |
|
MD5 | 1d443df7c3e3ea0acdd975486a8b01d4 |
|
BLAKE2b-256 | a85f00dbfbc80843513b1b6e98270f0d1d80e6b7b9872f0a4877d55a23f2fd11 |