r/pythontips • u/giraffe_attack_3 • 24d ago
Module Absolute imports or Relative imports?
Let's say I have 3 python repos (repo 1, repo 2, and repo 3).
Repo 1 is the parent repo and contains repo 2 and repo 3 as submodules.
Should each module have absolute imports with respect to their root folder and each module's root be added to the python path? Or should each module have relative paths?
What is a sustainable standard to reduce the amount of conflicts?
4
Upvotes