I want to define constants like BASE_DIR in a top level python file settings.py and access those constants from "all" files in my project, e.g. from import_scripts/import_users.py and export_scripts/export_users.py (Standalone helper scripts).
I tried a lot of different things like importing settings.py relative from import_users.py and import it in import_scripts/__init__py. No success so far.
Edit: I added the parent folder in my script e.g. in import_users.py to sys.path. But I don't want to do it in every script again and again so I was looking for a way to do it ONCE in my repository using a constant.
my_app
├── import_scripts
│ ├── import_users.py
├── export_scripts
│ ├── export_users.py
├── lib
│ ├── csv_reader.py
└── settings.py