python-guidelines

Enforce Python backend coding standards with ruff and mypy.

42|Updated Oct 14, 2024
One-click install
npx skills add https://github.com/community-of-python/pylines --skill python-guidelines-community-of-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-guidelines
Source: https://github.com/community-of-python/pylines/tree/main/pylines-skill
Command: npx skills add https://github.com/community-of-python/pylines --skill python-guidelines-community-of-python

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

It addresses the need for a consistent, high-quality coding standard and best practices for Python backend and full-stack projects, reducing bugs and improving maintainability.

Core Features & Use Cases

  • Code Style & Quality: Enforces style and formatting rules using ruff and mypy to maintain code consistency.
  • Best Practice Guidelines: Provides detailed instructions on typing, naming, architecture, and error handling for robust Python code.
  • Use Case: Teams implementing scalable REST APIs with FastAPI or Litestar, following these standards for predictable, secure, and maintainable development.

Quick Start

Follow the guidelines to ensure your Python code adheres to the recommended standards and practices, integrating them into your CI/CD pipeline.

Frequently Asked Questions about python-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Python coding standards and type annotations for my backend team?

Establish Python coding standards by integrating static analysis tools like ruff and mypy into your workflow to enforce strict type annotations and consistent naming conventions. This ensures code consistency and improves maintainability across your backend project.

What are the best practices for building scalable REST APIs with FastAPI or Litestar?

Best practices for scalable REST APIs involve following unified coding standards covering style, typing, architecture, and testing. Integrating these standards into your CI/CD pipeline ensures predictable, secure, and maintainable development for FastAPI or Litestar projects.

Do I need static analysis tools like mypy and ruff to maintain Python code quality?

You need static analysis tools like mypy and ruff to maintain Python code quality by automatically enforcing style, formatting rules, and strict type annotations. This reduces bugs and guarantees a reliable, maintainable codebase for your team.

How does unified coding standard practice improve Python team collaboration?

Unified coding standard practice improves Python team collaboration by providing detailed instructions on typing, naming, architecture, and error handling. This establishes a consistent, high-quality codebase that reduces friction and enhances overall development predictability.

Can I integrate Python backend development standards into a CI/CD pipeline?

You can integrate these Python backend development standards into your CI/CD pipeline to automatically validate code style, typing, and architecture. This continuous enforcement guarantees reliable, maintainable, and scalable Python codebases throughout the development lifecycle.