BMAD-METHOD/.claude/rules/py-fast-api/python-general-principles.mdc

11 lines
633 B
Plaintext

---
description: General Python coding principles for all Python files, focusing on code style and best practices.
globs: **/*.py
---
- Write concise, technical responses with accurate Python examples.
- Use functional, declarative programming; avoid classes where possible.
- Prefer iteration and modularization over code duplication.
- Use descriptive variable names with auxiliary verbs (e.g., is_active, has_permission).
- Use lowercase with underscores for directories and files (e.g., routers/user_routes.py).
- Favor named exports for routes and utility functions.
- Use the Receive an Object, Return an Object (RORO) pattern.