wshobson avatar

Python Packaging

Handles the complete Python packaging workflow from project structure to PyPI publication. Creates proper pyproject.toml configs, sets up src/ layouts, configures build backends like setuptools or hatchling, and generates CLI entry points. Covers both simple library packages and complex multi-package projects with optional dependencies. The examples are comprehensive, walking through everything from minimal configurations to full-featured setups with versioning, metadata, and development tooling. Essential if you're moving beyond throwing scripts in a repo and want proper distributable packages that others can actually pip install.

skills.sh installs
13.4K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill python-packaging --agent claude-code

Installs into .claude/skills of the current project.

Files

Python Packaging

Comprehensive guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI.

When to Use This Skill

  • Creating Python libraries for distribution
  • Building command-line tools with entry points
  • Publishing packages to PyPI or private repositories
  • Setting up Python project structure
  • Creating installable packages with dependencies
  • Building wheels and source distributions
  • Versioning and releasing Python packages
  • Creating namespace packages
  • Implementing package metadata and classifiers

Core Concepts

1. Package Structure

  • Source layout: src/package_name/ (recommended)
  • Flat layout: package_name/ (simpler but less flexible)
  • Package metadata: pyproject.toml, setup.py, or setup.cfg
  • Distribution formats: wheel (.whl) and source distribution (.tar.gz)

2. Modern Packaging Standards

  • PEP 517/518: Build system requirements
  • PEP 621: Metadata in pyproject.toml
  • PEP 660: Editable installs
  • pyproject.toml: Single source of configuration

3. Build Backends

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
Python, CLI & Terminal

More from wshobson/agents

All 174

Recommended

More Python
1astral-sh avatarruffastral-sh/claude-code-pluginsGuide for using ruff, the extremely fast Python linter and formatter. Use this when linting, formatting, or fixing Python code.3.7Kskills.sh installs
2bobmatnyc avatarsqlalchemy-ormbobmatnyc/claude-mpm-skillsSQLAlchemy Python SQL toolkit and ORM with powerful query builder, relationship mapping, and database migrations via Alembic873skills.sh installs
3aj-geddes avatarfastapi-developmentaj-geddes/useful-ai-promptsBuild high-performance FastAPI applications with async routes, validation, dependency injection, security, and automatic API documentation. Use when developing 624skills.sh installs
4laurigates avatarruff-lintinglaurigates/claude-pluginsPython linting with ruff. Fast linting, rule selection, auto-fixing, and config. Use when checking Python code quality, enforcing standards, or finding bugs.509skills.sh installs
5cfircoo avatarsqlalchemy-postgrescfircoo/claude-code-toolkitExpert guidance for SQLAlchemy 2.0 + Pydantic + PostgreSQL. Use when setting up database layers, defining models, creating migrations, or any database-related w507skills.sh installs
6bobmatnyc avatarmypybobmatnyc/claude-mpm-skillsmypy - Static type checker for Python with gradual typing, strict mode, Protocol support, and framework integration478skills.sh installs