import airflow
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.python import PythonOperator
= lambda: print(1)
f = DAG(dag_id="simple-workflow", start_date=airflow.utils.dates.days_ago(10))
dag = BashOperator(task_id="bash", bash_command="echo 'a'", dag=dag)
a = PythonOperator(task_id="python", python_callable=f, dag=dag)
b >> b a
<Task(PythonOperator): python>