I am reading about Python packaging here and came across the two types directory structures : src and Flat
**
In the src, this tree structure is given,
.
├── README.md
├── noxfile.py
├── pyproject.toml
├── setup.py
├── src/
│ └── awesome_package/
│ ├── __init__.py
│ └── module.py
└── tools/
├── generate_awesomeness.py
└── decrease_world_suck.py
The files under tools/ `
generate_awesomeness.py,decrease_world_suck.py
are separated from the src. (I’ve referred to these files when I say “related files” in the question in the sense that these are also part of package)
Is this what’s happening?
When a user pip installs my package, he would be calling the functions from these separated files and these files import the module.py inside src to access the functions’ implementation? For what exact reason do we need this separation? what are the problems we might face if we have these files also included inside src?
I am exploring the nuances of packaging and happen to stumble upon this doubt. Wanted to ensure that I am following correct practices and won’t be breaking the codebase unintentionally.