

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1234567# Python & FastAPI Standards89**Applies To:** All Python source files10**Enforced By:** `python-developer` agent, Ruff, mypy, CI gates11**Reference:** `.claude/standards/python.md`, `.claude/standards/fastapi.md`1213---1415## The 8 Python Non-Negotiables1617### 1 — Type Annotations on Everything1819Every function and method must be fully annotated. `mypy --strict` must pass.2021```python22# ✅ CORRECT23def find_orders(customer_id: str, statuses: list[str]) -> list[Order]:24 ...2526# ❌ VIOLATION — untyped27def find_orders(customer_id, statuses):28 ...29```3031### 2 — `logging` Not `print()`3233```python34# ✅ CORRECT35import logging36logger = logging.getLogger(__name__)37logger.info("Order placed: order_id=%s", order.id)3839# ❌ VIOLATION40print(f"Order placed: {order.id}")41```4243### 3 — No Bare `except:`4445```python46# ✅ CORRECT47try:48 result = service.call()49except ServiceUnavailableError as exc:50 logger.error("Service call failed", exc_info=True)51 raise5253# ❌ VIOLATION — catches SystemExit, KeyboardInterrupt54try:55 result = service.call()56except:57 pass58```5960### 4 — No `import *`6162```python63# ✅ CORRECT64from myapp.domain.orders import Order, OrderStatus6566# ❌ VIOLATION67from myapp.domain.orders import *68```6970### 5 — Pydantic / Dataclass for Domain Objects7172```python73# ✅ CORRECT74from dataclasses import dataclass7576@dataclass(frozen=True)77class OrderId:78 value: str7980# ❌ VIOLATION — raw dict as domain object81def process(order: dict) -> dict:82 ...83```8485### 6 — Constructor Injection (No Global State)8687```python88# ✅ CORRECT — dependency injected via FastAPI Depends89from typing import Annotated90from fastapi import Depends9192OrderServiceDep = Annotated[OrderService, Depends(get_order_service)]9394@router.post("/orders")95async def create_order(service: OrderServiceDep) -> OrderResponse:96 ...9798# ❌ VIOLATION — module-level instantiation99db = create_engine(DATABASE_URL) # global state100```101102### 7 — `async def` for All I/O103104```python105# ✅ CORRECT106async def get_order(order_id: str) -> Order:107 return await order_repo.find(order_id)108109# ❌ VIOLATION — blocking call in async context110async def get_order(order_id: str) -> Order:111 import requests112 resp = requests.get(f"/orders/{order_id}") # blocks event loop113```114115### 8 — Settings via `BaseSettings`116117```python118# ✅ CORRECT119from pydantic_settings import BaseSettings120121class AppSettings(BaseSettings):122 database_url: str123 secret_key: str124125# ❌ VIOLATION — hardcoded configuration126DATABASE_URL = "postgresql://user:password@localhost/db"127```128129---130131## FastAPI Route Rules132133- All routes `async def` with explicit `response_model=`134- Domain errors → global exception handler returning RFC 7807 `ProblemDetail`135- Dependency injection via `Annotated[T, Depends(factory)]`136- Never return raw `dict` from a route137138```python139# ✅ CORRECT FastAPI route140@router.post("/v1/orders", response_model=OrderResponse, status_code=201)141async def create_order(142 body: CreateOrderRequest,143 service: OrderServiceDep,144) -> OrderResponse:145 result = await service.place_order(body.to_command())146 return OrderResponse.from_domain(result)147```148149---150151## Anti-Patterns Checklist152153| Anti-Pattern | Fix |154|---|---|155| `print()` | `logger.info(...)` |156| Bare `except:` | `except SpecificError:` |157| `import *` | Explicit imports |158| Mutable default args | `None` sentinel |159| Raw `dict` domain objects | `@dataclass(frozen=True)` or Pydantic |160| Global DB/service instances | `Depends(factory)` per request |161| Blocking I/O in `async def` | `await` with async library |162| `time.sleep()` in tests | `asyncio.wait_for` or `tenacity` |163
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| doubts-suplab/eeik-bootstrap.clinerules/golden-rules.md · 1 | Cline rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.clinerules/project.md · 1 | Cline rules | teststylegit | 63/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/architecture.mdc · 1 | Cursor rules | do-not | 52/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/capabilities.mdc · 1 | Cursor rules | teststylegit | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/golden-rules.mdc · 1 | Cursor rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/security.mdc · 1 | Cursor rules | security | 39/100 | today | |
| doubts-suplab/eeik-bootstrap.github/copilot-instructions.md · 1 | Copilot instructions | lint-formatstyletesting-strategygit+2 | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/a2a-protocol.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/ai-governance.instructions.md · 1 | Copilot instructions | stylearchdo-notagent-behaviour | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/angular.instructions.md · 1 | Copilot instructions | teststyletypestesting-strategy+4 | 69/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/architecture-governance.instructions.md · 1 | Copilot instructions | testlint-formatstylegit+4 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/autogen.instructions.md · 1 | Copilot instructions | typessecurityagent-behaviour | 50/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-architecture.instructions.md · 1 | Copilot instructions | styletypessecurityperformance | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-data-ml-ai.instructions.md · 1 | Copilot instructions | deployment | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cdk-terraform.instructions.md · 1 | Copilot instructions | teststylearchtypes+2 | 96/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cicd.instructions.md · 1 | Copilot instructions | stylesecuritydeploymentdo-not+1 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/containerisation.instructions.md · 1 | Copilot instructions | buildstylesecuritydo-not | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/crewai.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/data-engineering.instructions.md · 1 | Copilot instructions | teststyletypesgit+5 | 69/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/deployment.instructions.md · 1 | Copilot instructions | teststylegitdeployment | 77/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/doubts-suplab-eeik-bootstrap-cursor-rules-python)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.