What problem does it solve?
This Skill simplifies the complex process of creating and distributing Python packages. It guides you through modern packaging standards, project structuring, dependency management, and publishing to PyPI, ensuring your Python code is easily installable, shareable, and professionally presented.
Core Features & Use Cases
- Modern Packaging: Master
pyproject.toml for metadata, build systems, and tool configurations.
- Project Structure: Implement recommended
src/ layout for clean, professional libraries.
- CLI Tools: Create command-line interfaces with
click or argparse and define entry points.
- PyPI Publishing: Build wheels and source distributions, then publish to PyPI or TestPyPI.
- Use Case: Prepare a new Python utility library for public release, ensuring it's correctly packaged, has clear dependencies, and can be easily installed by other developers via
pip.
Quick Start
Example: Minimal pyproject.toml
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "my-package"
version = "0.1.0"
description = "A short description"
authors = [{name = "Your Name", email = "[email protected]"}]
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"requests>=2.28.0",
]