python-packaging

Create and structure Python packages with pyproject.toml for PyPI distribution.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/sadroad/.dotfiles --skill python-packaging-sadroad
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-packaging
Source: https://github.com/sadroad/.dotfiles/tree/main/modules/home-manager/opencode/skills/python-packaging
Command: npx skills add https://github.com/sadroad/.dotfiles --skill python-packaging-sadroad

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating, structuring, and distributing Python packages, making it easier to share your code with others.

Core Features & Use Cases

  • Package Structure: Define standard project layouts (source, flat, multi-package).
  • Configuration: Manage package metadata using pyproject.toml.
  • Build Backends: Support for setuptools, hatchling, flit, poetry.
  • Distribution: Publish to PyPI or TestPyPI.
  • CLI Tools: Create command-line interfaces using click or argparse.
  • Advanced Features: Namespace packages, C extensions, data file inclusion.

Quick Start

Use the python-packaging skill to create a basic Python package structure with a pyproject.toml file.

Frequently Asked Questions about python-packaging

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

FAQPage Schema
How do I create a Python package using pyproject.toml?

To create a Python package using pyproject.toml, define standard project layouts and manage package metadata within the pyproject.toml file following modern PEP 517/518 standards. This establishes a reproducible structure for your code.

What build backends can I use for Python packaging with pyproject.toml?

Python packaging with pyproject.toml supports multiple build backends including setuptools, hatchling, flit, and poetry. You can choose the appropriate build backend in your configuration to manage your project's specific distribution needs.

How do I publish a Python package to PyPI?

To publish a Python package to PyPI, configure your project metadata and build your distribution files. You can then upload and publish your package directly to PyPI or TestPyPI for testing before final release.

Can I include C extensions and data files when building Python packages?

Yes, you can include C extensions and data files when building Python packages. Advanced Python packaging features support namespace packages, C extensions, and data file inclusion alongside standard source and flat layouts.

Does this Python packaging approach support creating CLI tools?

Yes, this Python packaging approach supports creating command-line interfaces. You can integrate CLI tools into your package using click or argparse, allowing you to distribute executable scripts alongside your Python libraries.