Skip to content

Commit 855aa51

Browse files
committed
Add rules/python-fastapi-production/.cursorrules
1 parent 41364ec commit 855aa51

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.cursorrules — Python Production
2+
3+
- Every function signature must include type hints.
4+
- Never bare except: — catch specific exceptions or re-raise.
5+
- Pydantic BaseModel for API boundary data. @dataclass for internal structures.
6+
- Pass dependencies as parameters. No global variables in business logic.
7+
- Always pathlib.Path. / operator for path joining.
8+
- Never time.sleep() in async. Use asyncio.sleep().
9+
- Validate env vars at startup. No os.environ.get() silent defaults.

0 commit comments

Comments
 (0)