Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 606 Bytes

File metadata and controls

21 lines (17 loc) · 606 Bytes

Structuring a Python Project

This is a simple and clean example how to structure a Python project such that (absolute/relative) imports don't get messed up.

Requirements

  • Python 3

Usage

There are three python files included in this example. The idea is that all of them can be run individually and the imports still work if run from the project root:

python main.py
python app/addition.py
python app/conversion.py

Alternatively you can also just run:

bash run.sh

Acknowledgements

Inspired by this answer on stack overflow.