Distribute Python apps to Windows machines without freezing them.
Project description
Frigobar
Distribute Python apps to Windows machines without freezing them.
Basic usage
frigobar my_app.py
This will create a frigobar
folder, with a my_app.bat
file in it. Run it to run your app. And since you already opened it, grab a beer!
Installation
pip install frigobar
Options
> frigobar --help
usage: frigobar [-h] [-r REQUIREMENTS_FILE] [-p PYTHON_VERSION] [--copy-directory] script-path [target-directory]
Distribute Python apps to Windows machines without freezing them. The resulting distribution will be put in a folder that
can be copied to any Windows machine. Users should run "<script_name>.bat" to run the script. All the dependencies,
including an embeddable version of Python, will be downloaded on the first run.
positional arguments:
script-path Path to the script to distribute.
target-directory Folder where the distribution will be put. Defaults to 'frigobar'.
options:
-h, --help show this help message and exit
-r REQUIREMENTS_FILE, --requirements-file REQUIREMENTS_FILE
Path to a requirements file that lists the dependencies of the script.
-p PYTHON_VERSION, --python-version PYTHON_VERSION, --python PYTHON_VERSION
Python version, in X.Y.Z format, that the distribution should use.The version must be available as
an embeddable package on https://www.python.org/downloads/windows/. Defaults to 3.11.4.
--copy-directory Copy the contents of the script directory to the distribution.
Rationale
A common technique to distribute Python apps is to "freeze" them using tools like PyInstaller or cx_Freeze. These freezers create a standalone executable that contains your app and all its dependencies. This is a workable solution, but it has two main drawbacks:
- The resulting frozen app is often huge. It's not uncommon to see a simple app taking MBs of space.
- Because dependence resolution is hard, the frozen app may contain more or less dependencies than it needs. Less dependencies lead to dread "working-app-that-stop-working-when-you-freeze-it" situations. Unnecessary dependencies lead to bloated apps.
Frigobar avoids those problems by postponing the download of the Python interpreter and all the app's dependencies to the first time the user runs the app, making the app the smallest it can be. Frigobar also doesn't try to be smart about dependencies and will only download the ones explicitly listed in a requirements.txt
file. This a closer experience to what a developer does when he runs the app in his own machine, which hopefully will lead to less surprises to users.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file frigobar-2.tar.gz
.
File metadata
- Download URL: frigobar-2.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba50c5887a8ba83a031469e2ad0ad86a6dde2042f9882c3028012022981a985d |
|
MD5 | 667506c941ca2bfed810d4a0c58a56ea |
|
BLAKE2b-256 | fdd9652806428bf682a3c8634f447c691d0dd5d16c0428cc20e628fe498388e5 |
File details
Details for the file frigobar-2-py2.py3-none-any.whl
.
File metadata
- Download URL: frigobar-2-py2.py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a4c0f89fc4a948963ae972d77f6fa704c24e63675762ef1f1279612b6f3586f |
|
MD5 | 2a50197c1a9d908be16a90748d315284 |
|
BLAKE2b-256 | fea471ea68c77b2fcbc818f3a4a8124e8f301edf31db57b81075f0cd615ff479 |