← ClaudeAtlas

backend-pythonlisted

Python backend stack conventions — FastAPI/Django/Flask service conventions, packaging and virtualenv awareness, typecheck-as-build, ruff/black lint. Load when the resolved backend stack is python.
johantor/zion · ★ 1 · Code & Development · score 67
Install: claude install-skill johantor/zion
# Backend: Python You are working in a Python backend: a service framework (FastAPI, Django, or Flask — follow whichever the project already uses), a dependency manifest (`pyproject.toml`, or a legacy `requirements*.txt`/`setup.py`), and a virtual environment. Read the project's own layout before adding to it. A `src/<package>/` layout, a flat package at the repo root, and a Django project with per-app directories are all valid shapes — match the one that is there rather than importing a layout from another project. ## Crew config `/crew:init` proposes: build is the static gate — `mypy .` from a `[tool.mypy]`/`mypy.ini`, `pyright` from a `[tool.pyright]`/`pyrightconfig.json`, `none` when neither is configured (a confirmed absence, not an open question); test `pytest` when the project has it (a `[tool.pytest.ini_options]` table, a `pytest.ini`, or pytest in the dependencies), `python -m unittest discover` for a `unittest`-only project, `none` when neither; lint `ruff check .` / `flake8` plus `black --check .` where configured. Every command is prefixed with the project's runner when it has one (`poetry run`, `uv run`, `pdm run`, `pipenv run`) — a bare `pytest` resolves against whatever interpreter is active. ## Packaging and the environment The dependency manifest tells you which tool the project uses; use that one and no other: - `[tool.poetry]` in `pyproject.toml` → Poetry (`poetry run …`, `poetry add`). - `uv.lock`, or `[tool.uv]` → uv (`uv run …`, `uv add`). - `[too