How to give your Python code to someone else
summary
Clear, practical survey of how to actually get Python code into other people’s hands: use script metadata via PEP 723 and runners like uv run to auto-create venvs for single-file scripts; use project metadata in pyproject.toml (PEP 621) and entry points or pipx for installable tools; for non‑Python users bundle into native installers or single artifacts with PyInstaller/PyOxidizer or, more fully featured, Briefcase, which builds MSI/DMG/RPM/Flatpak/AppImage and iOS/Android bundles, handles signing and CI/Docker builds, but requires platform‑specific build hosts and yields ~15–16 MB minimal binaries (strippable to ~7–8 MB).
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:10Python code sharing challenges
- 3:13PEP 723 for script metadata
- 5:20Refactoring for sharing
- 7:26PEP 621 project metadata
- 9:10Packaging without Git or zip
- 11:15Python runtime dependency issues
- 14:44Single-file executables limits
- 17:53Redistributable artifacts
- 20:00Briefcase cross-platform
- 25:57Choosing distribution method
- 27:22Q&A: Cross-platform size
- 29:29Q&A: Executable restrictions
related talks
30mHow to give your Python code to someone else
01h 26mPackage Your Python Code as a CLI
28mModern Python packaging without pain
26mOpen Source on Easy Mode
31mYou *can* take it with you: Packaging your Python code with Briefcase
02h 36mPython Packaging Demystified
02h 25mModern Python Developer's Toolkit
30mBootstrapping Your Local Python Environment
