Skip to content

Commit e49e04f

Browse files
committed
some project structure clarity and additional templates
1 parent 7d6ad53 commit e49e04f

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

docs/python/project_structure.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@ sidebar_label: Project Structure
88

99

1010
* :file_folder: Project Root:
11-
- :memo: pyproject.toml (can be requirements.txt and setup.py)
11+
- :memo: pyproject.toml
12+
- :memo: setup.py `and` :memo: setup.cfg (**OPTIONAL**)
13+
14+
:::info
15+
* If not using `poetry`, `pyproject.toml` file can be omitted as `setup.py` can have dependencies as well.
16+
* `pyproject.toml` be used for [alternate build system](https://www.python.org/dev/peps/pep-0518/) if needed.
17+
:::
18+
19+
*
1220
- :file_folder: docs
1321
* Your documentation
22+
- :file_folder: bin (**OPTIONAL**) => For entrypoint scripts which calls {PROJECT_NAME}
23+
+ This can be generated using `setup.py` as well.
1424
- :file_folder: data (**OPTIONAL**)
1525
* Data for project.
1626

@@ -21,7 +31,9 @@ sidebar_label: Project Structure
2131

2232
:::
2333
*
24-
- :file_folder: {PROJECT_NAME}
34+
- :file_folder: {PROJECT_NAME}
35+
+ :memo: __init__.py
36+
+ :memo: __main__.py (**OPTIONAL**)
2537
+ :file_folder: utils
2638
+ :file_folder: service
2739
+ :file_folder: config
@@ -30,7 +42,7 @@ sidebar_label: Project Structure
3042
+ :memo: conftest.py
3143
- :memo: LICENSE (**OPTIONAL**)
3244
- :memo: README (can be `md` or `rst`)
33-
- :file_folder: :memo: Other configurable from third parties (**OPTIONAL**) such as tox.ini
45+
- :file_folder: :memo: Other files/folders from third parties (**OPTIONAL**) such as tox.ini
3446

3547
:::note
3648
+ **There can be cases where MVC folder structure as well as framework related folder structure can be used.**
@@ -40,5 +52,6 @@ sidebar_label: Project Structure
4052

4153

4254
### Project Template Generation Tool
55+
* [Python Package Authority Sample](https://github.com/pypa/sampleproject) can be used as bootstrap.
4356
* Look into [cookiecutter](https://cookiecutter.readthedocs.io/en/1.7.2/) tool for template generation.
4457
- [List of templates for cookiecutter](http://cookiecutter-templates.sebastianruml.name/)

0 commit comments

Comments
 (0)