Skip to content

Phở Founder Lifetime: $59 once, 1 year of Phở AI included. Limited seats. See the offer

Engineering · Skill

Python Packaging

Create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to PyPI. Use when packaging Python libraries, creating CLI tools, or distributing Python code.

Open in Phở

What the skill covers

The sections of its instructions, in order.

  1. 01 When to Use This Skill
  2. 02 Core Concepts
  3. 1. Package Structure
  4. 2. Modern Packaging Standards
  5. 3. Build Backends
  6. 4. Distribution
  7. 03 Quick Start
  8. Minimal Package Structure
  9. Minimal pyproject.toml
  10. 04 Package Structure Patterns
  11. Pattern 1: Source Layout (Recommended)
  12. Pattern 2: Flat Layout
  13. Pattern 3: Multi-Package Project
  14. 05 Detailed patterns and worked examples

Reference files

2 files Phở can open while it uses the skill.

  • references/advanced-patterns.md
  • references/details.md

More in Python development

  • Async Python Patterns

    Master Python asyncio, concurrent programming, and async/await patterns for high-performance applications. Use when building async APIs, concurrent systems, or I/O-bound…

  • Python Anti-Patterns Checklist

    Use this skill when reviewing Python code for common anti-patterns to avoid. Use as a checklist when reviewing code, before finalizing implementations, or when debugging issues…

  • Python Background Jobs & Task Queues

    Python background job patterns including task queues, workers, and event-driven architecture. Use when implementing async task processing, job queues, long-running operations, or…

  • Python Code Style & Documentation

    Python code style, linting, formatting, naming conventions, and documentation standards. Use when writing new code, reviewing style, configuring linters, writing docstrings, or…

  • Python Configuration Management

    Python configuration management via environment variables and typed settings. Use when externalizing config, setting up pydantic-settings, managing secrets, or implementing…

  • Python Design Patterns

    Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance. Use this skill when designing a new service or component…

  • Python Error Handling

    Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception…

  • Python Observability

    Python observability patterns including structured logging, metrics, and distributed tracing. Use when adding logging, implementing metrics collection, setting up tracing, or…

  • Python Performance Optimization

    Profile and optimize Python code using cProfile, memory profilers, and performance best practices. Use when debugging slow Python code, optimizing bottlenecks, or improving…

  • Python Project Structure & Module Architecture

    Python project organization, module architecture, and public API design. Use when setting up new projects, organizing modules, defining public interfaces with __all__, or…

  • Python Resilience Patterns

    Python resilience patterns including automatic retries, exponential backoff, timeouts, and fault-tolerant decorators. Use when adding retry logic, implementing timeouts, building…

  • Python Resource Management

    Python resource management with context managers, cleanup patterns, and streaming. Use when managing connections, file handles, implementing cleanup logic, or building streaming…

  • Python Testing Patterns

    Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing…

  • Python Type Safety

    Python type safety with type hints, generics, protocols, and strict type checking. Use when adding type annotations, implementing generic classes, defining structural interfaces…

  • UV Package Manager

    Master the uv package manager for fast Python dependency management, virtual environments, and modern Python project workflows. Use when setting up Python projects, managing…

Similar engineering skills

Frequently asked questions

What does Python Packaging do?

Create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to PyPI. Use when packaging Python libraries, creating CLI tools, or distributing Python code.

Is Python Packaging free to use?

Yes. Python Packaging is published by Seth Hobson under the MIT licence, and you can use it with a free Phở account.

How do I use Python Packaging in Phở?

Press Open in Phở, then Try to apply it to your next message, or add the Python development set so Phở loads it whenever a request matches.

Does Python Packaging need other tools?

No. It works in a normal Phở chat with what you type or upload.

Copied unchanged from wshobson/agents at commit 7e2fb55 and credited to Seth Hobson, who is not affiliated with Phở. The full instructions and licence text ship with the skill inside Phở.