A python package/script bundler
Project description
effectual
/ɪˈfek.tʃu.əl/ meaning effective and successful
Why?
Sometimes you want a single portable python file without having to make a platform specific executable or a dependency-less .pyz! Basically me trying to make Vite for python (badly) :(
When not to use this
- The python package requires access to specific files like CustomTkinter and Pillow
- Incredibly version specific code, for example something that won't run on a slightly different python version or operating system
Setup
First make sure you have uv installed and updated:
uv self update
Furthermore if you haven't already created a project run:
uv init
Then to install effectual run:
uv add effectual --dev
Finally add the following lines to your pyproject.toml and configure to your hearts desire
[tool.effectual]
sourceDirectory = "./src/"
outputDirectory = "./dist/"
outputFileName = "bundle.pyz"
minification = true
compressionLevel = 5
Note you must have a __main__.py entrypoint for this to work
Template
If you want a simple minimal setup process then just use the effectual-template
Bundling
Development
To bundle in dev mode use:
uv run efec dev
This is like what esBuild does for vite
Production
To build a distributable .pyz file run:
uv run efec dist
This is like what what Rollup does for vite
To be added
- Treeshaking
- Rewriting some time critical parts in Rust 🚀🦀
- Cross platform compatibility (multiple output bundles)
- Bundle python version shebang and bytecode compilation
- Plugin and loader system (like rollup and webpack)
Contributions
All contributions are welcome, I'm not the best in the world at project management but if you think you can add or improve anything please send over a pull request
Building the project from source
Requirements
To build the project from source you need two tools:
Process
-
CD to your effectual directory and run:
task setup
-
Then to build an distributable tar.gz and wheel:
task build
Project details
Release history Release notifications | RSS feed
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
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 effectual-0.8.1.tar.gz.
File metadata
- Download URL: effectual-0.8.1.tar.gz
- Upload date:
- Size: 57.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d4e1d72bab257d9804f251da084959bcc0293bd4102e4cbbc068af2bd93585b
|
|
| MD5 |
fc39944dffd5fe5fcc9c6b6e619c5e21
|
|
| BLAKE2b-256 |
dd15d2dcfa9e8bc69ea0c7bd7742eedb318bed115748a2d52d041b91985acdd0
|
File details
Details for the file effectual-0.8.1-py3-none-any.whl.
File metadata
- Download URL: effectual-0.8.1-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cfb37cc2e2d08db3d9450ed04c0c530a5744ab3ede810dce70da8e479d11d5d
|
|
| MD5 |
998816868869d6d0f9d0f33fbc4d9c57
|
|
| BLAKE2b-256 |
9262284b85a167fd6dafe684a9a4ba5dad21d6c0dd367968a306961c01dc8e3c
|