modern-python

Set up modern Python projects with uv, ruff, ty, and pytest.

92|27|Updated Apr 1, 2025
One-click install
npx skills add https://github.com/antoinebou12/uml-mcp --skill modern-python-antoinebou12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modern-python
Source: https://github.com/antoinebou12/uml-mcp/tree/main/.skill/skills/modern-python
Command: npx skills add https://github.com/antoinebou12/uml-mcp --skill modern-python-antoinebou12

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the setup and maintenance of modern Python projects by providing best practices and tooling for dependency management, linting, type checking, testing, and security.

Core Features & Use Cases

  • Unified Tooling: Integrates uv for dependency management, ruff for linting/formatting, ty for type checking, and pytest for testing.
  • Project Structure: Enforces a clean src/ layout and a single pyproject.toml for configuration.
  • Security: Incorporates pip-audit and detect-secrets for enhanced project security.
  • Use Case: When starting a new Python project, use this Skill to quickly establish a robust development environment that adheres to current best practices, ensuring code quality and security from the outset.

Quick Start

Use the modern-python skill to set up a new Python project with uv, ruff, and pytest.

Frequently Asked Questions about modern-python

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

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

Configure a modern Python project using a single pyproject.toml file to manage dependencies with uv, enforce linting with ruff, and structure code using a clean src/ layout for immediate best practices.

What is the best way to manage Python project configuration and security?

Manage Python project configuration and security by centralizing settings in pyproject.toml while integrating pip-audit and detect-secrets to scan dependencies and prevent sensitive data leaks.

How do I integrate pre-commit hooks for Python linting and type checking?

Integrate pre-commit hooks by configuring ruff for linting and ty for type checking within pyproject.toml, ensuring automated code quality validation runs locally before any commits are finalized.

Does uv work with pytest and pyproject.toml for dependency management?

Yes, uv integrates with pytest and pyproject.toml to manage testing dependencies centrally, ensuring a standardized Python project structure and reliable test execution environment.

Can I use ruff and ty to replace traditional Python linters and type checkers?

Yes, use ruff for fast linting and formatting alongside ty for type checking to replace traditional tools, consolidating all settings into a single pyproject.toml configuration file.

When should I use a src layout for my Python project?

Use a src/ layout for Python projects to separate importable packages from scripts, preventing accidental imports and ensuring pytest accurately validates the installed package behavior.