PluginBench
Rule

python projects guide

via PatrickJS/awesome-cursorrules

Python development guide emphasizing modular structure, testing, and AI-friendly practices.

What is python projects guide?

Provides a comprehensive approach to Python project organization and development standards. Use this rule when setting up new Python projects or refactoring existing ones to follow best practices for maintainability, testability, and AI-assisted development.

  • Enforce clear project structure with separate directories for source, tests, docs, and config
  • Promote modular design patterns with distinct files for models, services, controllers, and utilities
  • Guide configuration management using environment variables
  • Establish robust error handling, logging, and context capture patterns
  • Recommend pytest-based testing strategies and comprehensive test coverage
  • Enforce code style consistency using Ruff linter

Applies to

File patterns this rule matches.

**/*
Rule definition (reference)

Source of truth, from the repository.

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.

Related rules

Senior full-stack TypeScript, React, Node.js guidance with clean architecture, testing, and WHY-oriented reasoning.

**/*
41k
via PatrickJS/awesome-cursorrules

Quantitative factor research skills for designing, evaluating, and mining alpha factors in equities markets.

**/*
41k
via PatrickJS/awesome-cursorrules

Android development with Jetpack Compose, clean architecture, and Material Design 3.

**/*
41k
via PatrickJS/awesome-cursorrules

Angular development with Novo Elements UI library using standalone components.

**/*
41k
via PatrickJS/awesome-cursorrules

Expert Angular 18 + TypeScript development with Jest, emphasizing clean code and performance.

**/*
41k
via PatrickJS/awesome-cursorrules

Manage Kubernetes clusters, add-ons, stacks, and credentials via the Ankra CLI platform.

**/*.sh +5
41k
via PatrickJS/awesome-cursorrules