setup-python-project
SKILL.md
Setup Python Project
Overview
New projects start with the full safety net configured. Templates are at ~/Projects/docs/dev/python_coding/templates/.
Setup Checklist
-
Create directory structure:
mkdir -p src/APPNAME tests/unit tests/integration tests/fixtures scripts docs .vscode -
Copy template files:
templates/pyproject.toml->pyproject.toml(update[project]section)templates/AGENTS.md->AGENTS.md(fill TODO sections)templates/pre-commit-config.yaml->.pre-commit-config.yamltemplates/gitignore->.gitignoretemplates/vscode_settings.json->.vscode/settings.jsontemplates/vscode_extensions.json->.vscode/extensions.jsonrules/coding_rules.md->docs/coding_rules.md
-
Create entry points:
# src/APPNAME/__init__.py __version__ = "0.1.0" # src/APPNAME/__main__.py import sys def main() -> int: print("Hello from APPNAME!") return 0 if __name__ == "__main__": sys.exit(main()) -
Create initial test:
# tests/test_main.py from APPNAME.__main__ import main def test_main_runs(capsys: pytest.CaptureFixture[str]) -> None: assert main() == 0 -
Initialize environment:
git init uv sync --all-extras --group dev uv run pre-commit install uv run poe lint_full uv run poe test -
Verify everything works:
uv run poe appruns the applicationuv run poe lint_fullpasses with 0 errorsuv run poe testpasses
Customization Points
- Qt app: uncomment PySide6/qasync in pyproject.toml, add
ui/directory - CLI app: uncomment typer in pyproject.toml, add
cli/directory - HTTP client: uncomment httpx in pyproject.toml
- Wrapper enforcement: add
[tool.ruff.lint.flake8-tidy-imports.banned-api]section
Reference
See guides/project-layout.md for detailed layout documentation.
Weekly Installs
1
Repository
quick-brown-fox…s_pythonFirst Seen
10 days ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1