| Foundations | syntax-essentials, type-systems, project-structure, code-quality | Variables, type hints, generics, src layout, ruff, mypy | | Patterns | async-programming, error-handling, decorators, context-managers, generators | async/await, exceptions, Result type, with statements, yield |
| Testing | pytest-essentials, mocking-strategies, property-testing | Fixtures, parametrize, unittest.mock, Hypothesis | | Web APIs | fastapi-patterns, pydantic-validation, database-access | Dependencies, middleware, validators, SQLAlchemy async | | Packaging | poetry-workflow, pyproject-config, docker-deployment | Lock files, PEP 621, multi-stage builds |
| Production | ci-cd-pipelines, monitoring, security | GitHub Actions, OpenTelemetry, OWASP, JWT |
現代 Python 輔導涵蓋語言基礎和進階生產模式。當被要求「編寫 Python 程式碼」、「解釋 Python 概念」、「設定 Python 專案」、「配置 Poetry 或 PDM」、「編寫 pytest 測試」、「建立 FastAPI 端點」、「執行 uvicorn 伺服器」、「設定 alembic 遷移」、「設定記錄」、「使用 pandas 處理資料觸發「Python 最佳實踐」、「類型提示」、「非同步 Python」、「打包」、「虛擬環境」、「Pydantic 驗證」、「依賴注入」、「SQLAlchemy 模型」。 來源:spillwavesolutions/agent-brain。