ClinePythonCode Style

Python Cline Rules

Cline AI coding rules for Python: automated coding patterns and best practices for the Cline VS Code extension.

.clinerules
- Write Python 3.11+ with full type annotations; use future annotations for forward refs
- Use uv for package management and virtual environments
- Apply ruff check and ruff format; configure in pyproject.toml
- Use Pydantic v2 with model validators for complex validation logic
- Use SQLAlchemy 2.0 with async session for database access
- Apply FastAPI for REST APIs; grpc for internal service communication
- Write pytest with parametrize for comprehensive test coverage
- Use rich for beautiful CLI output and traceback rendering

How to use with Cline

Create a `.clinerules` file in your project root. Cline reads this file and applies the rules to all AI-assisted coding.

#python#cline#fastapi#sqlalchemy#coding-rules

Related Rules