Skip to content
Development
Skill

/python-packaging

Python package creation and PyPI distribution via pyproject.toml and entry points. Use when publishing a package or setting up build configuration.

From plugin
claude-night-market
343200 skills60 agents162 commands1 MCP

Claude Code

$ npx -y skills add athola/claude-night-market --skill python-packaging --agent claude-code

SKILL.md

python-packaging.SKILL.md
name: python-packaging
description: Python package creation and PyPI distribution via pyproject.toml and entry points. Use when publishing a package or setting up build configuration.
globs: "**/*.py"
alwaysApply: false
category: packaging
tags:
- python
- packaging
- pyproject.toml
- uv
- pip
- pypi
- distribution
tools: []
usage_patterns:
- package-creation
- pypi-publishing
- cli-tool-development
- library-distribution
complexity: beginner
estimated_tokens: 200
progressive_loading: true
modules:
- uv-workflow.md
- pyproject-patterns.md
- entry-points.md
- ci-cd-integration.md

Python Packaging

Modern Python packaging with pyproject.toml, uv, and best practices for distribution.

Quick Start

# Create new project with uv
uv init my-package
cd my-package

# Add dependencies
uv add requests click

# Build package
uv build

# Publish to PyPI
uv publish

**Verification:** Run the command with `--help` flag to verify availability.

When To Use

  • Creating distributable Python libraries
  • Building CLI tools
  • Publishing to PyPI
  • Setting up development environments
  • Managing project dependencies

When NOT To Use

  • Testing packages - use python-testing

instead

  • Optimizing package performance - use python-performance
  • Testing packages - use python-testing

instead

  • Optimizing package performance - use python-performance

Core Decisions

1. Layout Choice

# Source layout (recommended)
src/my_package/
    __init__.py
    module.py

# Flat layout (simple)
my_package/
    __init__.py
    module.py

**Verification:** Run the command with `--help` flag to verify availability.

**Source layout benefits:**

  • Clear separation of source and tests
  • Prevents accidental imports of uninstalled code
  • Better for packages with complex structure

2. Project Structure

**Minimal Project:**

**Verification:** Run `pytest -v` to verify tests pass.
my-project/
├── pyproject.toml
├── README.md
├── src/
│   └── my_package/
│       └── __init__.py
└── tests/
    └── test_init.py

**Verification:** Run `pytest -v` to verify tests pass.

**Complete Project:**

**Verification:** Run the command with `--help` flag to verify availability.
my-project/
├── pyproject.toml
├── README.md
├── LICENSE
├── .gitignore
├── src/
│   └── my_package/
│       ├── __init__.py
│       ├── cli.py
│       ├── core.py
│       └── utils.py
├── tests/
│   ├── conftest.py
│   └── test_core.py
└── docs/
    └── index.md

**Verification:** Run `pytest -v` to verify tests pass.

Detailed Topics

See modules for detailed information:

  • **[uv Workflow](modules/uv-workflow.md)** - Complete uv commands and troubleshooting
  • **[pyproject.toml Patterns](modules/pyproject-patterns.md)** - Configuration examples for different package types
  • **[Entry Points](modules/entry-points.md)** - Console scripts, GUI scripts, and plugins
  • **[CI/CD Integration](modules/ci-cd-integration.md)** - GitHub Actions and automated publishing

Best Practices

1. **Use source layout** for anything beyond simple packages 2. **Pin direct dependencies** with minimum versions 3. **Use optional dependency groups** for dev/docs/test 4. **Include py.typed** for type hint support 5. **Add detailed README** with usage examples 6. **Use semantic versioning** (MAJOR.MINOR.PATCH) 7. **Test on multiple Python versions** before publishing

Exit Criteria

  • [ ] Modern pyproject.toml configuration
  • [ ] Clear dependency specification
  • [ ] Proper version management
  • [ ] Tests included and passing
  • [ ] Build process reproducible
  • [ ] Publishing pipeline automated
Read more
@athola
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

343200 skills60 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
343
Star history of athola/claude-night-market on GitHub, a chart by star-history.com

Other skills on claude-night-market.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about python-packaging.

Which coding agents can use python-packaging?
python-packaging installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.