appbundler
Zip and app, all it's dependencies, and any other data.
Installation
pip install appbundler
Usage
After installation you will be able to run:
appbundler /path/to/appbundler.toml
The appbundler.toml
config file must exist in the app's root directory.
Alternatively,
python -m appbundler -h
appbundler.toml
The appbundler.toml
contains app information such as the package/library
being installed, any additional 'supplemental' data to be brought into the
build.
Data examples:
- [data.example1]
- The whole
root
directory will be copied to the build directory and the directory structure will be preserved.
- The whole
- [data.example2]
- Any csv file in the
sub_directory
ofroot
will be copied to the build directory and the directory structure will be preserved.
- Any csv file in the
- [data.example3]
- All json files in entirety of the
root
directory will be recursively copied to the build directory. Also, due toflatten
all file will be copied to the root of the build directory.
- All json files in entirety of the
# Example appbundler configuration file.
package="myapp"
[data]
[data.example1]
root="/user/example1"
[data.example2]
root="/user/example2"
sub_directory="/sub"
pattern="*.csv"
[data.example3]
root="./example3"
pattern="*.json"
recursive=true
flatten=true
Basic flow
- App requirements will be installed via
requirements.txt
,setup.py
, orpyproject.toml
files. - Clean up the directories by removing
__pycache__
and.pyc
files. Reduce the zip file size as much as possible. - Handle all supplemental data.
- Zip the build directory.