python-modern-standards

Configure Python projects with uv, Ruff, and Pydantic for strict typing.

Updated Oct 31, 2024
One-click install
npx skills add https://github.com/thesammykins/dotfiles --skill python-modern-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-modern-standards
Source: https://github.com/thesammykins/dotfiles/tree/main/.agents/skills/python-modern-standards
Command: npx skills add https://github.com/thesammykins/dotfiles --skill python-modern-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces the 2025 Python stack by replacing legacy tooling with uv, ruff, and pydantic, and mandates strict type hints to improve reliability and maintainability.

Core Features & Use Cases

  • Setup Python projects using uv (The successor to pip/poetry).
  • Configure Ruff for linting/formatting, replacing Black/Flake8.
  • Implement Pydantic V2 for strict data validation and mypy in strict mode.
  • Pin Python version requirements in pyproject.toml and manage dependencies with uv.

Quick Start

Create a new Python project configured with uv, Ruff, and Pydantic, and enable strict typing.

Frequently Asked Questions about python-modern-standards

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

FAQPage Schema
How do I set up a new Python project with uv and ruff?

Standardize a new Python project by replacing legacy pip and flake8 tooling with uv for dependency management and ruff for linting. This configures pyproject.toml and pins Python version requirements to ensure a modern, reproducible build environment.

What is the best way to enforce strict typing in a FastAPI project?

Enforce strict typing in FastAPI projects by implementing Pydantic V2 for data validation and running mypy in strict mode. This approach mandates strict type hints throughout the codebase to improve reliability and maintainability.

Can I migrate an existing Django codebase to use uv and ruff?

Yes, you can migrate existing Django codebases requiring linting and type safety. The process configures pyproject.toml to use uv for dependency management and ruff for formatting, replacing legacy tools like Black and isort while ensuring uv.lock is tracked.

Does uv replace pip and poetry for Python dependency management?

Yes, uv acts as the successor to pip and poetry for Python dependency management. It manages project dependencies, generates a tracked uv.lock file for reproducible builds, and works alongside ruff and pydantic to enforce a modern Python stack.

Why use ruff instead of flake8 and isort for Python linting?

Use ruff to replace flake8 and isort for faster, consolidated Python linting and formatting. Configured via pyproject.toml, ruff streamlines code quality checks while integrating seamlessly with uv and strict mypy typing rules.

When do I need to pin Python version requirements in pyproject.toml?

Pin Python version requirements in pyproject.toml when standardizing new Python projects or migrating legacy codebases. This ensures reproducible builds and compatibility with modern stack tools like uv, ruff, and pydantic.