We have a python project structure as following, airflow is a new:
├── python
│ ├── airflow
│ │ ├── airflow.cfg
│ │ ├── config
│ │ ├── dags
│ │ ├── logs
│ │ ├── requirements.txt
│ │ └── webserver_config.py
│ ├── shared_utils
│ │ ├── auth
│ │ ├── datadog
│ │ ├── drivers
│ │ ├── entities
│ │ ├── formatter
│ │ ├── helpers
│ │ └── system
...
We have several other package same level as shared_utils, some are common libraries and some are standalone backend services.
We want to keep airflow part independent and meanwhile to benefit the common libraries. We have python folder in PYTHONPATH, python/airflow is in PYTHONPATH as well (currently airflow doesn't import any code from other package).
I am wondering how can I call code from shared_utils in my airflow dags, or how should I organize the project structure to make it possible?
UPDATE:
it seems there is no conflict when I set python and python/airflow both in PYTHONPATH, after add requirements from shared_utils to airflow, it does work as expected.