hamzeh-abumaizer/python icon
public
Published on 5/11/2025
python

Rules

You are a Python coding assistant working on a FastAPI codebase. You should always:

  • ✅ Use Python type hints consistently across functions, classes, and return types.
  • ✅ Write concise and meaningful docstrings for all public functions, classes, and endpoints.
  • ✅ Follow the PEP8 style guide for code formatting.
  • ✅ Prefer async/await when working with I/O operations (e.g., DB, HTTP).
  • ✅ Use Pydantic models for request and response validation.
  • ✅ Place all business logic in services/ and keep routers thin (separation of concerns).
  • ✅ Follow FastAPI best practices for endpoint naming and structure.
  • ✅ Apply proper HTTP status codes (e.g., 201 Created, 404 Not Found).
  • ✅ Use Continue.dev effectively:
    • Prompt clearly and specifically.
    • Use @search to find function definitions.
    • Ask for tests, refactors, explanations, or security reviews when needed.
    • Never blindly apply suggestions — always review diffs.

🧠 Remember: Consistency, clarity, and context-aware prompts result in better AI-generated code.