Declarative .mdcCursor/Claude/Windsurf Regeln und n8n-WorkflowsIDE-RegelZero-Secret-Leck geprüft

Python 3.12 + Astral uv + FastAPI Async Agent Service-Regeln

Deklarative Cursor/Claude/Windsurf-Regel zur Standardisierung reproduzierbarer uv.lock-Umgebungen, Ruff-Lints, strenger Pydantic v2-Modelle und begrenzter httpx-Timeouts.

Declarative Agent- und IDE-Regeldateien

---
description: Astral uv dependency locking, Pydantic v2 validation, and non-blocking FastAPI async handlers
globs: **/*.py,pyproject.toml
alwaysApply: false
---

# Python 3.12 + uv + FastAPI Production Standards

- Manage dependencies exclusively via `pyproject.toml` and `uv.lock` (`uv add`, `uv run`); never invoke global `pip install` without version pins.
- Define all FastAPI request/response and MCP tool payloads with Pydantic v2 `BaseModel` (`model_config = ConfigDict(extra='forbid')`).
- Never call blocking `requests.*`, `time.sleep()`, or synchronous subprocesses inside `async def` endpoints; use `httpx.AsyncClient(timeout=10.0)`.
- Reuse a shared `httpx.AsyncClient` and database pool inside FastAPI `lifespan` context managers to prevent socket exhaustion.
- Format and lint all Python modules cleanly with `ruff check --fix` and `ruff format` before committing.

## Verification Check
```bash
uv run ruff check . && uv run pytest -q
```

Community-Setup-Hinweise und Produktionsberichte (0)

Noch keine Community-Notizen. Teilen Sie unten Ihren Tipp zur Produktionskonfiguration mit.

Veröffentlichen Sie eine Einrichtungsnotiz oder einen Verifizierungstipp

Verfügbar gemachter MCP-Tools- und Ressourcenschema-Inspektor

Werkzeug-/Ressourcen-IDEingabeparameterAusführungsverhalten
uv_reproducible_lockfilepyproject.toml, uv.lockMandates uv run / uv sync --frozen and forbids unpinned global pip installs.