Skill

Package and Distribute Python Code

A guide to creating, structuring, and distributing Python packages, from pyproject.toml to publishing on PyPI.


71
Spark score
out of 100
Updated last month
Version 13.1.1

Add to Favorites

Why it matters

Create, structure, and distribute robust Python packages. This skill guides you through modern packaging tools, pyproject.toml, and publishing to PyPI or private repositories.

Outcomes

What it gets done

01

Build installable Python packages with dependencies

02

Publish libraries and command-line tools to repositories

03

Structure and version Python projects for release

04

Generate wheels and source distributions

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-python-packaging | bash

Overview

Python Packaging

A guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and PyPI publishing. Use it when creating a Python library or CLI tool for distribution, setting up project structure, or versioning and publishing a release.

What it does

A guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI. Points to a companion resources/implementation-playbook.md for detailed patterns and examples.

When to use - and when NOT to

Use it when creating a Python library for distribution, building a CLI tool with entry points, publishing to PyPI or a private repository, setting up project structure, building wheels and source distributions, versioning and releasing a package, creating namespace packages, or implementing package metadata and classifiers. Not a fit for tasks unrelated to Python packaging.

Inputs and outputs

Input: a Python codebase needing packaging, distribution, or a release process. Output: a structured, installable package with pyproject.toml configuration, entry points, metadata and classifiers, and build artifacts (wheel and source distribution) ready to publish.

Who it's for

Python developers packaging a library or CLI tool for distribution to PyPI or a private index.

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.