📦 Easy Python to → Fast Executables
Project description
Pyaket
📦 Easy Python to → Fast Executables 📦Links • Installation • Examples • Documentation • Issues
GitHub • Contact • Changelog • License
[!IMPORTANT] This project is under active development. Basic functionality works, but some features are incomplete, documentation needs improvement, and more testing is required. Feedback is welcome 🙂
🔥 Description
📦 Pyaket is a tool that bundles and generates portable executables of your python projects for all platforms. No more convoluted installation steps, give users the convenience they want, with maximum compatibility and dev-centric ease of use compared to alternative solutions.
- Lightning fast installation that automatically manages python, virtual environments, and dependencies without user intervention that just works, bundle wheels or install from pypi.
- Max compatibility with how the project is run in the user's machine - pyaket does not reinvent the wheel or compile python with an intermediate, use tools that already exists #
- Cross compile from anywhere to most platforms and architectures, no docker or virtual machines required, portable immutable executables - see the table for details! #
- Intelligently detects partial installations, downloads, archive unpacks, and automatically takes appropriate action - making iterative development easy and resilient against users
- Standalone executables with no network calls at runtime that bundles all dependencies #
- Monorepo support in mind, decoupled dependencies and entry point specification
- Rolling releases where a single binary always runs latest pypi or git branch/tag #
- PyTorch installation at runtime, automatic backend detection (optional). #
⭐️ Examples
Simple to use
Compile a cowsay binary for the current platform and run it:
$ pyaket app --name cowsay --pypi "cowsay==6.1" run --module cowsay compile
Compiling libc v0.2.172
Compiling typenum v1.18.0
...
Finished `release` profile [optimized] target(s) in 9.88s
$ ./release/cowsay-linux-amd64-v0.0.0.bin -t "Hello, Pyaket!"
______________
| Hello, Pyaket! |
==============
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
Fast iterative development
with a warm build cache:
$ pyaket app -n cowsay -p "cowsay==6.1" run -m cowsay compile
Finished `release` profile [optimized] target(s) in 1.54s
Blazingly fast
after the first installation:
$ hyperfine "./release/cowsay-linux-amd64-v0.0.0.bin -t anyhow"
Time (mean ± σ): 23.3 ms ± 0.3 ms [User: 15.8 ms, System: 7.2 ms]
Range (min … max): 22.9 ms … 24.8 ms 100 runs
$ hyperfine "python -m cowsay -t anyhow"
Time (mean ± σ): 18.5 ms ± 0.1 ms [User: 14.2 ms, System: 4.1 ms]
Range (min … max): 18.2 ms … 19.0 ms 100 runs
Note: For the keen among you, the actual benchmark command was nice -20 taskset -c 2 hyperfine -w 50 -r 100 -N (...), executed on Python 3.13.3, mainline Linux kernel v6.14.4, R9 5900x ondemand governor stock, 2x3200 MT/s DDR4 CL16 2Rx8 as of May 2025
Cross compile
to most platforms and architectures easily:
# Windows executables compiled from linux, needs a mingw64 toolchain!
$ pyaket app -n cowsay -p "cowsay==6.1" run -m cowsay release -t windows compile
Finished `release` profile [optimized] target(s) in 8.11s
$ wine ./Release/cowsay-windows-amd64-v0.0.0.exe -t "Hello, Wine!"
____________
| Hello, Wine! |
============
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
# Intel Macbook @ ./release/cowsay-macos-amd64-v0.0.0.bin
$ pyaket ... release --target macos --arch amd64 compile
# Apple Silicon @ ./release/cowsay-macos-arm64-v0.0.0.bin
$ pyaket ... release --target macos --arch arm64 compile
Bundle wheels
and install them at runtime, perfect for monorepos:
$ uv build --all-packages --wheel
Successfully built dist/shared-1.0.0-py3-none-any.whl
Successfully built dist/project_a-1.0.0-py3-none-any.whl
Successfully built dist/project_b-1.0.0-py3-none-any.whl
# Both will share the same virtual environment 🤯
# ./release/{project_a,project_b}-linux-amd64-v0.0.0.bin
$ pyaket app -n project_a -w "dist/*.whl" run -m project_a compile
$ pyaket app -n project_b -w "dist/*.whl" run -m project_b compile
Install pytorch
at runtime, with automatic backend detection:
# ./release/app-linux-amd64-v0.0.0-auto.bin
$ pyaket ... torch -v 2.7.0 -b auto compile
# ./release/app-linux-amd64-v0.0.0-cu128.bin
$ pyaket ... torch -v 2.7.0 -b cu128 compile
More examples
For more examples, proper configuration and advanced features, check out the website page!
📦 Installation
For now, it is better to install pyaket directly from the source code for the latest features and fixes:
# Optional 'cross' feature for cross compilation support with cargo-zigbuild
python3 -m pip install git+https://github.com/BrokenSource/Pyaket[cross]
A PyPI and Rust Crate of the same name are also available, but might lag behind from git main.
For further setup, refer to the website installation page.
Python Package
Package: https://pypi.org/project/pyaket/
Either add to your project's dev-dependencies with the tool you use:
uv add pyaket --devpdm add pyaket --devpoetry add pyaket --dev
Or install in the current venv directly:
python3 -m pip install pyaketuv pip install pyaket
Or use it as a uv tool:
uvx pyaket app --name cowsay ... compile
Rust Crate
This is advanced usage, but also works:
$ export PYAKET_APP_NAME="cowsay"
$ export PYAKET_APP_PYPI="cowsay==6.1"
$ export PYAKET_ENTRY_MODULE="cowsay"
# Remove previous compilation
$ rm ./target/bin/pyaket
# Compile it from crates.io
$ cargo install pyaket --root ./target
Finished `release` profile [optimized] target(s) in 10.27s
Installing ./target/bin/pyaket
# Run your project, rename it to your choice!
$ ./target/bin/pyaket
♻️ Community
✅ Be featured here if you're using Pyaket in your projects!
🌵 Such an empty place here, for now..
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyaket-0.9.1-py3-none-any.whl.
File metadata
- Download URL: pyaket-0.9.1-py3-none-any.whl
- Upload date:
- Size: 122.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
569fa911db290d7beb5609a158ca7e484d9a36cd2083e200a4d68b55012ed576
|
|
| MD5 |
a4cdf5001414a2a9c132fcabdaba5230
|
|
| BLAKE2b-256 |
2b6c85139582b77b1ce83a73556868ebd75e8f141c52b9f413f511f42ad1e8eb
|