Declarative .mdcReguły Cursor/Claude/Windsurf i przepływy pracy n8nReguła IDEAudyt wycieku o zerowej tajemnicy
Python 3.12 + Astral uv + FastAPI Zasady usługi agenta asynchronicznego
Deklaratywna reguła kursora/Claude'a/Windsurfingu standaryzująca powtarzalne środowiska uv.lock, linie Ruff, ścisłe modele Pydantic v2 i ograniczone limity czasu httpx.
Pliki agenta deklaratywnego i reguł IDE
---
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
```Uwagi dotyczące konfiguracji społeczności i recenzje produkcji (0)
Nie ma jeszcze żadnych notatek społeczności. Podziel się poniżej wskazówką dotyczącą konfiguracji produkcyjnej.
Odsłonięty inspektor narzędzi i schematów zasobów MCP
| Identyfikator narzędzia/zasobu | Parametry wejściowe | Zachowanie wykonawcze |
|---|---|---|
| uv_reproducible_lockfile | pyproject.toml, uv.lock | Mandates uv run / uv sync --frozen and forbids unpinned global pip installs. |