Directory structure Specification-Stackoverflow.com-project structure
Suggested patterns
Assuming that your project is named Foo, I would recommend the most convenient and quick directory structure that would suffice:
foo/
|--bin/
| |--foo (main program directory, startup script, call main)
|
|--foo/
| |--tests/
| | |--__init__.py
| | |--test_main.py
| |
| |--__init__.py (with this file is called package)
| |--main.py (main entrance of the program)
|
|--docs/
| |--conf.py
| |--Abc.rst
|
|--setup.py
|--Requirements.txt
|--README
Briefly explain:
- Bin/: To store some executable files of the project, of course you can name script/and so on.
- foo/: Stores all source code for the project. (1) All modules and packages in the source code should be placed in this directory. Do not place the top level directory. (2) Its subdirectory tests/storage unit test code; (3) The entrance of the program is preferably named main.py.
- Docs/: Store some documents.
- setup.py: Scripts to install, deploy, and package.
- Requirements.txt: A list of external Python packages that store software dependencies.
- README: project documentation.
Python's Software directory structure specification