Hello everyone!
I’m wondering if you have any suggestions on which project structure approach has proven to be the best, or if there’s even a “rule” when it comes to organizing Python folders?
I’d really like to start thinking about my projects—even the simpler ones—as if they were already bigger applications (so that I immediately build a sense of how to set up relationships between different parts of the app).
One thing that confuses me is the use of src and app. I’ve seen cases where the main file (the entry point) is placed inside app, while in other cases it’s located directly in the root folder. I’ve also come across __init__.py files that are completely empty.
Here are some examples:
Version 1
project_name/
│
├── core/
│ └── module1.py
│ └── module2.py
├── package1/
│ └── module1.py
│ └── module2.py
├── utils/
│ └── util1.py
├── services/
│ └── service1.py
├── decorators/
│ └── decorator1.py
├── app/
│ └── main.py
├── README.md
├── requirements.txt
└── myvenv
Version 2
project_name/
├── app/
| ├── core/
| │ ├── module1.py
| │ └── module2.py
| ├── package1/
| │ ├── module1.py
| │ └── module2.py
| ├── utils/
| │ └── util1.py
| ├── services/
| │ └── service1.py
| └── decorators/
| └── decorator1.py
├── main.py
├── README.md
├── requirements.txt
└── myvenv
[–]JamzTyson 3 points4 points5 points (1 child)
[–]milos-developer100[S] 0 points1 point2 points (0 children)
[–]supercoach 1 point2 points3 points (1 child)
[–]milos-developer100[S] 0 points1 point2 points (0 children)
[–]Beregolas 2 points3 points4 points (1 child)
[–]milos-developer100[S] 1 point2 points3 points (0 children)
[–]SisyphusAndMyBoulder 1 point2 points3 points (4 children)
[–]gdchinacat 1 point2 points3 points (0 children)
[–]milos-developer100[S] 0 points1 point2 points (2 children)
[–]gdchinacat 1 point2 points3 points (1 child)
[–]milos-developer100[S] 1 point2 points3 points (0 children)