python

Configure Python 3.13+ projects with ruff, mypy, pytest, and pre-commit quality gates.

Updated Sep 16, 2025
One-click install
npx skills add https://github.com/singh-gur/opencode --skill python-singh-gur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python
Source: https://github.com/singh-gur/opencode/tree/main/skills/python
Command: npx skills add https://github.com/singh-gur/opencode --skill python-singh-gur

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python engineering for production systems often suffers from fragmented tooling, weak typing, and inconsistent quality gates across teams.

Core Features & Use Cases

  • Modern toolchain setup for Python 3.13+, strict typing, linting (ruff), type checking (mypy or basedpyright), testing (pytest) with coverage, and pre-commit quality gates.
  • Production-ready patterns using FastAPI, SQLAlchemy 2.0+, async design, and OpenAPI schema generation.
  • Guidance for building maintainable, observable Python services in production environments, including structured logging and error handling.

Quick Start

Activate this skill by configuring a Python project with a modern toolchain and begin implementing strongly typed FastAPI services.

Frequently Asked Questions about python

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

FAQPage Schema
How do I set up a modern Python toolchain with strict typing and automated quality gates?

Set up a modern Python toolchain by configuring Python 3.13+ with ruff for linting, mypy or basedpyright for strict type checking, and pytest with coverage. Enforce these automated quality gates using pre-commit hooks before shipping API services.

What are the best practices for building production-ready FastAPI services with SQLAlchemy?

Production-ready FastAPI services utilize SQLAlchemy 2.0+ patterns, async design, and OpenAPI schema generation. Best practices include enforcing strict typing and implementing structured logging and error handling for maintainable, observable Python environments.

Does this Python development approach work with my existing FastAPI and SQLAlchemy 2.0+ project?

Yes, this approach works with FastAPI and SQLAlchemy 2.0+ projects by applying strict type safety and modern toolchain integration. It enforces a baseline of technologies including Python 3.13+, ruff, mypy or basedpyright, and pytest to ensure production-grade quality.

Why do I need pre-commit hooks and type checkers like basedpyright for Python API development?

Pre-commit hooks and type checkers like basedpyright or mypy are needed for Python API development to enforce strict type safety and prevent fragmented tooling. They act as automated quality gates to catch inconsistencies before code reaches production environments.

Can I use ruff and pytest together to enforce quality gates in a Python 3.13+ project?

Yes, you can use ruff and pytest together in a Python 3.13+ project to enforce quality gates. Ruff handles linting while pytest manages testing with coverage, both integrated seamlessly through pre-commit hooks to ensure robust application development.