python-packaging

Package Python projects into distribution formats and publish to PyPI.

1|Updated Jul 24, 2025
One-click install
npx skills add https://github.com/civictechdc/votecatcher --skill python-packaging-civictechdc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-packaging
Source: https://github.com/civictechdc/votecatcher/tree/main/backend/.agent/skills/python-packaging
Command: npx skills add https://github.com/civictechdc/votecatcher --skill python-packaging-civictechdc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers create distribution-ready Python packages with proper project structure, metadata, and publishing workflows to PyPI.

Core Features & Use Cases

  • Comprehensive guidance on packaging Python projects using modern standards (pyproject.toml, setup.py, or setup.cfg)
  • Support for build backends (setuptools, hatchling, poetry) and multiple distribution formats (wheel, sdist)
  • Best practices for project layout, versioning, and publishing to PyPI or private indexes

Quick Start

Create a modern Python package with pyproject.toml, proper metadata, and steps to publish to PyPI as described in the guide.

Frequently Asked Questions about python-packaging

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

FAQPage Schema
How do I package a Python project for PyPI using pyproject.toml?

To package a Python project for PyPI, you configure project metadata in pyproject.toml following PEP 621, select a build backend like setuptools or hatchling, and generate distribution-ready wheel and sdist formats.

What is the difference between setuptools, hatchling, and poetry for Python packaging?

Setuptools, hatchling, and poetry are build backends that define how Python projects are packaged into distributions. They differ in dependency management approaches and configuration styles, with all supporting modern pyproject.toml metadata standards.

Does this Python packaging workflow support both CLI tools and libraries?

Yes, this Python packaging workflow supports distributing CLI tools, libraries, and applications. It covers project structure, metadata configuration, and release workflows needed to deploy any Python project type to PyPI or private indexes.

When do I need a wheel versus an sdist for Python package distribution?

You need a wheel for pre-built binary distributions that install quickly without compilation, and an sdist source distribution for building from source. Both formats are generated when packaging Python projects for comprehensive PyPI deployment.

Why do I need pyproject.toml metadata instead of just setup.py for Python packaging?

You need pyproject.toml metadata because it follows modern PEP 621 standards for Python packaging, replacing legacy setup.py configurations with a declarative format that standardizes project metadata across different build backends.

What's the best way to structure a Python project for PyPI publishing?

The best way to structure a Python project for PyPI publishing involves organizing source code with proper layout, configuring pyproject.toml metadata, implementing versioning best practices, and following established release workflows for distribution.