{"name":"pyfuze: Package Python Projects into Standalone Executables","description":"pyfuze is a powerful tool designed to package Python projects into single, standalone executables. Leveraging `cosmopolitan` and `uv`, it offers flexible packaging modes, including bundle, online, and portable, to suit various deployment needs. This allows developers to easily distribute their Python applications across different platforms without requiring a Python environment on the target machine.","github":"https://github.com/TanixLu/pyfuze","url":"https://osrepos.com/repo/tanixlu-pyfuze","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/tanixlu-pyfuze","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/tanixlu-pyfuze.md","json":"https://osrepos.com/repo/tanixlu-pyfuze.json","topics":["pyfuze","Python packaging","executable builder","cross-platform","application distribution","bundle","freeze","pyinstaller alternative"],"keywords":["pyfuze","Python packaging","executable builder","cross-platform","application distribution","bundle","freeze","pyinstaller alternative"],"stars":null,"summary":"pyfuze is a powerful tool designed to package Python projects into single, standalone executables. Leveraging `cosmopolitan` and `uv`, it offers flexible packaging modes, including bundle, online, and portable, to suit various deployment needs. This allows developers to easily distribute their Python applications across different platforms without requiring a Python environment on the target machine.","content":"## Introduction\n\npyfuze is an innovative open-source tool that simplifies the process of transforming your Python projects into standalone executables. Built upon the robust foundations of [cosmopolitan](https://github.com/jart/cosmopolitan) and [uv](https://github.com/astral-sh/uv), pyfuze addresses the common challenge of distributing Python applications by bundling all necessary dependencies and the Python interpreter itself into a single file. It offers three distinct packaging modes, each tailored for specific requirements regarding offline capability, cross-platform compatibility, and package size.\n\n## Installation\n\nGetting started with pyfuze is straightforward. You can install it directly using pip:\n\nbash\npip install pyfuze\n\n\nAlternatively, you can run it directly with `uvx`:\n\nbash\nuvx pyfuze -h\n\n\n## Examples\n\npyfuze provides flexible options to package your Python applications, adapting to different project structures and deployment scenarios. Here are some common use cases:\n\n### Portable Mode\n\nThe portable mode is ideal for generating a standalone, cross-platform executable, particularly well-suited for simpler scripts. It requires no extraction or internet connection at runtime.\n\nbash\npyfuze ./examples/simple.py --mode portable --reqs requests\n\n\n### Bundle Mode\n\nFor more complex projects, the bundle mode packages your application with Python and all its dependencies. This example demonstrates packaging a folder-based project, specifying the entry file, including `pyproject.toml` and `uv.lock` for dependency management, and adding extra files while excluding others. The `--win-gui` option is perfect for GUI applications on Windows.\n\nbash\npyfuze ./examples/complex \\\n  --entry app.py \\\n  --pyproject ./examples/complex/pyproject.toml \\\n  --uv-lock ./examples/complex/uv.lock \\\n  --include ./examples/complex/config.txt \\\n  --exclude ./examples/complex/build.py \\\n  --unzip-path complex \\\n  --win-gui\n\n\n### Online Mode\n\nThe online mode creates a smaller, cross-platform package. It requires an internet connection at runtime to download Python and dependencies. This mode can be configured with mirror URLs for improved reliability in restricted network environments.\n\nbash\npyfuze ./examples/complex \\\n  --entry app.py \\\n  --pyproject ./examples/complex/pyproject.toml \\\n  --uv-lock ./examples/complex/uv.lock \\\n  --include ./examples/complex/config.txt \\\n  --exclude ./examples/complex/build.py \\\n  --unzip-path complex \\\n  --win-gui \\\n  --mode online \\\n  --uv-install-script-windows <uv-windows-installer-mirror-url> \\\n  --uv-install-script-unix <uv-unix-installer-mirror-url> \\\n  --env INSTALLER_DOWNLOAD_URL=<uv-binary-mirror-url> \\\n  --env UV_PYTHON_INSTALL_MIRROR=<python-install-mirror-url> \\\n  --env UV_DEFAULT_INDEX=<pypi-mirror-url>\n\n\n## Why use pyfuze?\n\npyfuze offers a compelling solution for Python developers looking to simplify application distribution. Its key advantages include:\n\n*   **Simplified Distribution:** Package your entire Python application, including the interpreter and all dependencies, into a single executable, eliminating the need for users to install Python or manage virtual environments.\n*   **Flexible Packaging Modes:** Choose between 'bundle' for maximum compatibility on a single platform, 'online' for smaller cross-platform packages with runtime downloads, or 'portable' for truly standalone, pure Python cross-platform executables.\n*   **Cross-Platform Support:** With 'online' and 'portable' modes, pyfuze enables your applications to run on macOS (ARM64 and AMD64), Linux (AMD64), and Windows (AMD64).\n*   **Leverages Modern Tools:** Built on `cosmopolitan` and `uv`, pyfuze benefits from efficient dependency resolution and robust executable creation.\n*   **Ease of Use:** A straightforward command-line interface makes packaging your projects quick and efficient.\n\n## Links\n\nExplore pyfuze further using these official resources:\n\n*   [GitHub Repository](https://github.com/TanixLu/pyfuze)\n*   [PyPI Page](https://pypi.org/project/pyfuze/)\n*   [Report Issues](https://github.com/TanixLu/pyfuze/issues)\n*   [Join Discord](https://discord.gg/GE9FyB5vtt)","metrics":{"detailViews":11,"githubClicks":12},"dates":{"published":null,"modified":"2026-02-08T08:01:17.000Z"}}