Python Clean Architecture project scaffolder
Describe a project as a nested dictionary and the script creates every folder and empty file idempotently. It was the planned layout for ThuOneCopy v2.
- Period
- Dec 2024
- Technologies
- 2
- Diagrams
- 0
- Reading time
- 1 min
Source & download: Create a Whole Project Folder Structure from a Python Dictionary
What it does
A nested Python dict describes the project. A recursive create_structure(base_path, structure_dict) walks it: a dict becomes a sub-folder, a list becomes empty files in that folder, a “” value becomes a single empty file.
Generated layout:
project_root/
├─ src/app (main.py) · core (config.py) · data/{repositories, datasources} · domain (models.py)
│ services (file_service.py) · ui/{widgets, main_window.py, header.py} · utils (helpers.py)
├─ tests/ (test_file_service.py, test_main_window.py)
├─ assets/icons/ThuOneCopy.ico · assets/styles/style.qss
└─.gitignore · requirements.txt · README.md
Link to ThuOneCopy
ThuOneCopy.ico, style.qss (Qt stylesheet), main_window.py and file_service.py show this is the planned layout of ThuOneCopy v2 (P22, doc 026, a PyQt desktop app). The folder name “clean flutter” is a leftover: the script is the Python counterpart of S02 (doc 035).
Related projects
Flutter Clean Architecture generator (v1 to v4)
A Python generator that creates the 20+ folders and files of a Flutter Clean Architecture feature in one run, refined over four versions.
PythonCode generationFlutterBLoCAI and LLM experiments
Experiments with LLM APIs: a Flask chat over several providers, speech-to-text and model tests, and a React and shadcn debugging sandbox.
PythonFastAPI / FlaskLLM integrationReact+1Bulk test-document generator and Stitch-to-PDF storyboard
Python scripts that batch-generate numbered test documents (Word to PDF, Pillow images) plus a Stitch-to-PDF storyboard for QA and design review.
PythonPDF & document generationWant to discuss this project?
Happy to walk through the architecture, trade-offs or the code.