python-package-development

Configure pyproject.toml and src layout for Python package publishing.

2|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/justanesta/claude-code-resources --skill python-package-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-package-development
Source: https://github.com/justanesta/claude-code-resources/tree/main/skills/python/python-package-development
Command: npx skills add https://github.com/justanesta/claude-code-resources --skill python-package-development

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Packaging and publishing Python projects can be error-prone and inconsistent. This Skill provides a structured blueprint that guides developers through modern packaging practices.

Core Features & Use Cases

  • pyproject.toml configuration and build backend guidance (hatchling/setuptools) to standardize builds.
  • Clear guidance on a src layout, versioning strategy, dependency management, testing, and documentation to improve release quality.
  • Use Case: A team kicks off a new library and uses this Skill to set up reproducible builds and an effortless publishing workflow to PyPI.

Quick Start

Create a new Python package project structure using a modern src layout and pyproject configuration.

Frequently Asked Questions about python-package-development

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

FAQPage Schema
How do I set up a Python project with pyproject.toml and a src layout?

Python packaging with pyproject.toml streamlines project configuration by replacing setup.py with a declarative standard. It manages build backends, dependencies, and metadata in one file, ensuring reproducible builds and consistent project setups.

What is the best way to manage versioning and publishing workflows for Python packages?

The best way to manage Python package versioning and publishing is by integrating versioning strategies and build backend configurations within pyproject.toml. This standardizes releases and enables effortless publishing workflows to PyPI.

Does this packaging approach work with both hatchling and setuptools build backends?

Yes, this packaging approach works with both hatchling and setuptools build backends. The guidance provides specific configuration examples to standardize builds regardless of which modern backend you choose for your project.

How do I configure dependencies and testing in a modern Python package?

Configuring dependencies and testing in a modern Python package requires defining them within your pyproject.toml file. This centralizes your project requirements and integrates testing workflows directly into your build and release process.

When do I need to adopt a src layout for Python packaging?

You need to adopt a src layout for Python packaging when you want to enforce strict separation between your package code and other project files. This structure prevents local import errors and improves testing reliability.