Skip to content

Packaging & Distribution

Ship your Python code — as single files, executables, or containers.

graph TD
    zipapp["zipapp"] --> pyinstaller["pyinstaller"]
    pyinstaller --> wsl["WSL GUI"]
    pyinstaller --> pyotp["pyotp-docker"]

    style zipapp fill:#fff3e0,stroke:#e65100
    style pyinstaller fill:#fff3e0,stroke:#e65100
    style wsl fill:#fff3e0,stroke:#e65100
    style pyotp fill:#ffebee,stroke:#c62828

    click zipapp "../wiki/lightning-talks/zipapp/"
    click pyinstaller "../wiki/lightning-talks/pyinstaller/"
    click wsl "../wiki/lightning-talks/wsl-gui/"
    click pyotp "../wiki/lightning-talks/pyotp-docker/"

The Sequence

  1. zipapp — Package a Python app as a single .pyz file using zipapp. Requires Python on the target machine.
  2. PyInstaller — Compile Python into a standalone executable. No Python required on target. Covers --onefile bundles and cross-platform considerations.
  3. WSL GUI — Run GUI applications (Tkinter, matplotlib) under Windows Subsystem for Linux with X11 forwarding.
  4. PyOTP + Docker — Containerize a Python application with Docker. (Also part of the Security path.)

Where to Go Next

  • Docker knowledge from PyOTP leads into deploying → AI/ML projects
  • Combine with → Getting Started (env-vars, pydantic) for proper configuration in packaged apps