Skip to content

BrokenSource/Pyaket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

61 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pyaket

πŸ“¦ Easy Python to β†’ Fast Executables πŸ“¦



Links β€’ Installation β€’ Examples β€’ Documentation β€’ Issues
GitHub β€’ Contact β€’ Changelog β€’ License

πŸ”₯ 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
$ 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 -o dist
  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, Pyaket is only available when installing from source:

python3 -m pip install git+https://github.com/BrokenSource/Pyaket[cross]

In the future, you'll be able to install from pypi, or crates.io for pure rust usage.

♻️ Community

βœ… Be featured here if you're using Pyaket in your projects!

🌡 Such an empty place here, for now..

Releases

No releases published

Sponsor this project