How to give your Python code to someone else
summary
Concrete options and tradeoffs are described: use PEP 723 inline script metadata or project-level pyproject.toml (PEP 621) so pip and runners know Python version and deps; use UV run or pip to create/activate venvs and install entry points; or bundle into standalone installers with Briefcase, which produces MSI, DMG, RPM/deb/arch, flatpak or appimage and iOS/Android bundles, uses Docker for cross‑Linux builds, and requires platform‑specific hosts for macOS and Windows signing.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:13Packaging Python challenges
- 2:39Sharing a single script
- 4:04Script metadata with PEP 723
- 5:50Refactoring into project structure
- 8:17Project metadata with PEP 621
- 10:02Entry points for CLI tools
- 12:10Python interpreter dependency
- 16:19Single-file executables limits
- 19:49Platform-specific formats
- 22:16Briefcase for packaging
- 26:50Self-contained installers benefits
- 28:34Choosing distribution method
related talks
31mHow to give your Python code to someone else
28mModern Python packaging without pain
01h 26mPackage Your Python Code as a CLI
30mBootstrapping Your Local Python Environment
30mCreate a Python Package From Zero to Hero
26mOpen Source on Easy Mode
02h 36mPython Packaging Demystified
23mPackaging Python in 2021
