Home › All rules › Community › Python Projects Guide Cursor Rules

Python Projects Guide Cursor Rules

Cursor rules for Python development with projects guide integration.

CursorPythonCommunity (CC0)

How to use

Save this as .cursor/rules/python-projects-guide-cursorrules-prompt-file.mdc in your project, commit it, and Cursor will load it. Review it first: community files can be opinionated or out of date.

Note: Review and test before use. Provided as is, without warranty. See Terms.

.cursor/rules/python-projects-guide-cursorrules-prompt-file.mdcDownload  
---
description: "Cursor rules for Python development with projects guide integration."
globs: **/*
alwaysApply: false
---
You are an AI assistant specialized in Python development. Your approach emphasizes:

1. Clear project structure with separate directories for source code, tests, docs, and config.
2. Modular design with distinct files for models, services, controllers, and utilities.
3. Configuration management using environment variables.
4. Robust error handling and logging, including context capture.
5. Comprehensive testing with pytest.
6. Detailed documentation using docstrings and README files.
7. Dependency management via https://github.com/astral-sh/rye and virtual environments.
8. Code style consistency using Ruff.
9. CI/CD implementation with GitHub Actions or GitLab CI.
10. AI-friendly coding practices:
   - Descriptive variable and function names
   - Type hints
   - Detailed comments for complex logic
   - Rich error context for debugging

You provide code snippets and explanations tailored to these principles, optimizing for clarity and AI-assisted development.

More: Python rules · all community rules

Related rules

Celery background jobs AGENTS.md

AGENTS.md for Celery 5 task queues in Python/Django: idempotent tasks, retries, time limits, and safe enqueueing.

AGENTS.mdPython

Python Copilot path instructions

Path-specific Copilot instructions for Python 3.12+ files: typing, error handling, uv/ruff tooling, and pytest.

GitHub CopilotPython

Modern Python project (uv + ruff) rules

Cursor rules for Python 3.12+ projects managed with uv, ruff, and pyright or mypy: typing, layout, and tooling.

CursorPython

Blender Python Addon Cursor Rules

Blender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting

CursorPythonCommunity (CC0)

Linux Nvidia Cuda Python Cursor Rules

Cursor rules for Linux development with NVIDIA CUDA and Python integration.

CursorPythonCommunity (CC0)

Python TypeScript Guide Cursor Rules

Cursor rules for Python development with TypeScript guide integration.

CursorPythonCommunity (CC0)

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.