We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41364ec commit 855aa51Copy full SHA for 855aa51
1 file changed
rules/python-fastapi-production/.cursorrules
@@ -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