1.4 KiB
1.4 KiB
Template Generation Request
Create a template/ folder in project root with reusable files for new Python projects.
Required Structure
template/
├── .env # Environment variables (sample)
├── .gitignore # Git ignore rules
├── AGENTS.md # AI assistant rules
├── CHANGELOG.md # Changelog template
├── DESIGN_DOCUMENT.md # Development guidelines
├── PROJECT.md # Project documentation template
├── main.py # Entry point with loguru
├── pyproject.toml # Poetry config (ruff, mypy, pytest)
├── src/
│ ├── __init__.py
│ └── core/
│ ├── __init__.py
│ ├── _version.py # Version fallback for PyInstaller
│ └── constants.py # Version extraction from toml + DEBUG mode
└── tests/
├── __init__.py
└── test_constants.py # Basic test
Key Features
- Version extraction from
pyproject.tomlwith_version.pyfallback for PyInstaller builds - DEBUG mode via
ENV_DEBUG=truein.env(adds " DEV" suffix to version) - loguru for logging (never print)
- Poetry for dependency management
- pytest for testing (no unittest)
- ruff + mypy for linting and type checking
Rules
- No
.examplesuffixes - the folder itself is the separator - Generic/reusable format
- Keep files simple and minimal