zipapps | python code into a executable zip file
kandi X-RAY | zipapps Summary
kandi X-RAY | zipapps Summary
zipapps is a Python library. zipapps has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install zipapps' or download it from GitHub, PyPI.
.pyz to Python is like .jar to Java. They are both zip archive files which aggregate many packages and associated metadata and resources (text, images, etc.) into one file for distribution. Then what you only need is a Python Interpreter as the runtime environment. PS: The extension name .pyz could be any other suffixes even without ext names, so you can rename app.pyz to app.zip or app.py or others as you wish. Depends on PEP441, zipapp & zipimport.
.pyz to Python is like .jar to Java. They are both zip archive files which aggregate many packages and associated metadata and resources (text, images, etc.) into one file for distribution. Then what you only need is a Python Interpreter as the runtime environment. PS: The extension name .pyz could be any other suffixes even without ext names, so you can rename app.pyz to app.zip or app.py or others as you wish. Depends on PEP441, zipapp & zipimport.
Support
Quality
Security
License
Reuse
Support
zipapps has a low active ecosystem.
It has 42 star(s) with 3 fork(s). There are 3 watchers for this library.
There were 1 major release(s) in the last 6 months.
There are 0 open issues and 25 have been closed. On average issues are closed in 29 days. There are no pull requests.
It has a neutral sentiment in the developer community.
The latest version of zipapps is 2024.6.4
Quality
zipapps has 0 bugs and 0 code smells.
Security
zipapps has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
zipapps code analysis shows 0 unresolved vulnerabilities.
There are 0 security hotspots that need review.
License
zipapps is licensed under the MIT License. This license is Permissive.
Permissive licenses have the least restrictions, and you can use them in most projects.
Reuse
zipapps releases are available to install and integrate.
Deployable package is available in PyPI.
Build file is available. You can build the component from source.
Installation instructions, examples and code snippets are available.
It has 1189 lines of code, 27 functions and 7 files.
It has high code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA
kandi has reviewed zipapps and discovered the below as its top functions. This is intended to give you an instant insight into zipapps implemented functionality, and help decide if they suit your requirements.
- Create a Flask application
- Build the zip app
- Create the archive
- Check if the build file exists
- Run the installer
- Creates the virtualenv
- Return a time
- Freeze the requirements file
- Activate zipapps
- Test the freeze tool
- Runs the zip app
Get all kandi verified functions for this library.
zipapps Key Features
No Key Features are available at this moment for zipapps.
zipapps Examples and Code Snippets
No Code Snippets are available at this moment for zipapps.
Community Discussions
No Community Discussions are available at this moment for zipapps.Refer to stack overflow page for discussions.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install zipapps
pip install zipapps -U.
python3 -m zipapps -h.
-c to compress files, only for python3.7+.
-a xxx.py to add some files/folders into the zipped file.
-u=AUTO Recommended auto unzip the .pyd / .so files or -u=* to unzip all the files
-r requirements.txt install requirements with pip install
-o my_app.pyz output the zipped file as given path
-m app.__main__:main entry point
-p /usr/bin/python3 set the shebang line
-d Recommended lazy install mode, requirements will be installed with pip while first running zip file size will be very small, and the default unzip path is SELF/zipapps_cache/
--clear-zipapps-cache, -czc Clear the zipapps cache folder after running, but maybe failed for .pyd/.so files.
-h, --help show the simple doc
--includes, --add, -a The given paths will be copied to cache_path while packaging, which can be used while running. The path strings will be splited by ",". such as my_package_dir,my_module.py,my_config.json often used for libs not from pypi or some special config files the output arg of zipapps.create_app
--output, -o The path of the output file, defaults to app.pyz. the output arg of zipapps.create_app
--python, -p The path of the Python interpreter which will be set as the shebang line, defaults to None. with shebang /usr/bin/python3 you can run app with ./app.pyz directly, no need for python3 app.pyz the interpreter arg of zipapps.create_app
--main, -m The entry point function of the application, the valid format is: package.module:function package.module module:function package the main arg of zipapps.create_app WARNING: If the --main arg is set, python3 app.pyz will not be able to used as venv like python3 app.pyz xxx.py
--compress, -c Boolean value, compress files with the deflate method or not. the compressed arg of zipapps.create_app
--unzip, -u The names which need to be unzipped while running, splited by "," without ext, such as bottle,aiohttp, or the complete path like bin/bottle.py,temp.py. For .so/.pyd files(which can not be loaded by zipimport), or packages with operations of static files. if unzip is set to "*", then will unzip all files and folders. if unzip is set to AUTO, then will add the .pyd and .so files automatically. Can be overwrite with environment variable ZIPAPPS_UNZIP the unzip arg of zipapps.create_app
--unzip-exclude, -ue The opposite of --unzip / -u which will not be unzipped, should be used with --unzip / -u. Can be overwrite with environment variable ZIPAPPS_UNZIP_EXCLUDE
--unzip-path, -up
If unzip arg is not null, cache files will be unzipped to the given path while running. Defaults to zipapps_cache, support some internal variables as runtime args: TEMP/HOME/SELF as prefix, for example HOME/zipapps_cache TEMP means tempfile.gettempdir() HOME means Path.home() SELF means .pyz file path. And you can also overwrite it with environment variables: ZIPAPPS_CACHE or UNZIP_PATH
the unzip_path arg of zipapps.create_app
-cc, --pyc, --compile, --compiled
Compile .py to .pyc for fast import, but zipapp does not work unless you unzip it(so NOT very useful).
the compiled arg of zipapps.create_app
--cache-path, --source-dir, -cp The cache path of zipapps to store site-packages and includes files. If not set, will create and clean-up in TEMP dir automately. the cache_path arg of zipapps.create_app
--shell, -s Only while main is not set, used for shell=True in subprocess.run. very rarely used, because extra sub-process is not welcome the shell arg of zipapps.create_app
--main-shell, -ss Only for main is not null, call main with subprocess.Popen: python -c "import a.b;a.b.c()". This is used for psutil ImportError of DLL load. very rarely used too the main_shell arg of zipapps.create_app
--strict-python-path, -spp Boolean value. Ignore global PYTHONPATH, only use zipapps_cache and app.pyz. the ignore_system_python_path arg of zipapps.create_app
-b, --build-id The string to skip duplicate builds, it can be the paths of files/folders which splited by ",", then the modify time will be used as build_id. If build_id contains *, will use glob function to get paths. For example, you can set requirements.txt as your build_id by python3 -m zipapps -b requirements.txt -r requirements.txt when you use pyz as venv. very rarely used too too the build_id arg of zipapps.create_app
--zipapps, --env-paths Default --zipapps arg if it is not given while running. Support TEMP/HOME/SELF prefix.
--delay, -d, --lazy-pip, --lazy-install, --lazy-pip-install Install packages with pip while first running, which means requirements will not be install into pyz file.
--ensure-pip Add the ensurepip package to your pyz file, works for embed-python(windows) or other python versions without pip installed but lazy-install mode is enabled. [EXPERIMENTAL]
--layer-mode Layer mode for the serverless use case, __main__.py / ensure_zipapps.py / activate_zipapps.py files will not be set in this mode. --layer-mode-prefix Only work while --layer-mode is set, will move the files in the given prefix folder.
--clear-zipapps-cache, -czc Clear the zipapps cache folder after running, but maybe failed for .pyd/.so files.
all the other (or unknown) args will be used by pip install such as -r requirements.txt such as bottle aiohttp the pip_args arg of zipapps.create_app
python3 -m zipapps -h.
-c to compress files, only for python3.7+.
-a xxx.py to add some files/folders into the zipped file.
-u=AUTO Recommended auto unzip the .pyd / .so files or -u=* to unzip all the files
-r requirements.txt install requirements with pip install
-o my_app.pyz output the zipped file as given path
-m app.__main__:main entry point
-p /usr/bin/python3 set the shebang line
-d Recommended lazy install mode, requirements will be installed with pip while first running zip file size will be very small, and the default unzip path is SELF/zipapps_cache/
--clear-zipapps-cache, -czc Clear the zipapps cache folder after running, but maybe failed for .pyd/.so files.
-h, --help show the simple doc
--includes, --add, -a The given paths will be copied to cache_path while packaging, which can be used while running. The path strings will be splited by ",". such as my_package_dir,my_module.py,my_config.json often used for libs not from pypi or some special config files the output arg of zipapps.create_app
--output, -o The path of the output file, defaults to app.pyz. the output arg of zipapps.create_app
--python, -p The path of the Python interpreter which will be set as the shebang line, defaults to None. with shebang /usr/bin/python3 you can run app with ./app.pyz directly, no need for python3 app.pyz the interpreter arg of zipapps.create_app
--main, -m The entry point function of the application, the valid format is: package.module:function package.module module:function package the main arg of zipapps.create_app WARNING: If the --main arg is set, python3 app.pyz will not be able to used as venv like python3 app.pyz xxx.py
--compress, -c Boolean value, compress files with the deflate method or not. the compressed arg of zipapps.create_app
--unzip, -u The names which need to be unzipped while running, splited by "," without ext, such as bottle,aiohttp, or the complete path like bin/bottle.py,temp.py. For .so/.pyd files(which can not be loaded by zipimport), or packages with operations of static files. if unzip is set to "*", then will unzip all files and folders. if unzip is set to AUTO, then will add the .pyd and .so files automatically. Can be overwrite with environment variable ZIPAPPS_UNZIP the unzip arg of zipapps.create_app
--unzip-exclude, -ue The opposite of --unzip / -u which will not be unzipped, should be used with --unzip / -u. Can be overwrite with environment variable ZIPAPPS_UNZIP_EXCLUDE
--unzip-path, -up
If unzip arg is not null, cache files will be unzipped to the given path while running. Defaults to zipapps_cache, support some internal variables as runtime args: TEMP/HOME/SELF as prefix, for example HOME/zipapps_cache TEMP means tempfile.gettempdir() HOME means Path.home() SELF means .pyz file path. And you can also overwrite it with environment variables: ZIPAPPS_CACHE or UNZIP_PATH
the unzip_path arg of zipapps.create_app
-cc, --pyc, --compile, --compiled
Compile .py to .pyc for fast import, but zipapp does not work unless you unzip it(so NOT very useful).
the compiled arg of zipapps.create_app
--cache-path, --source-dir, -cp The cache path of zipapps to store site-packages and includes files. If not set, will create and clean-up in TEMP dir automately. the cache_path arg of zipapps.create_app
--shell, -s Only while main is not set, used for shell=True in subprocess.run. very rarely used, because extra sub-process is not welcome the shell arg of zipapps.create_app
--main-shell, -ss Only for main is not null, call main with subprocess.Popen: python -c "import a.b;a.b.c()". This is used for psutil ImportError of DLL load. very rarely used too the main_shell arg of zipapps.create_app
--strict-python-path, -spp Boolean value. Ignore global PYTHONPATH, only use zipapps_cache and app.pyz. the ignore_system_python_path arg of zipapps.create_app
-b, --build-id The string to skip duplicate builds, it can be the paths of files/folders which splited by ",", then the modify time will be used as build_id. If build_id contains *, will use glob function to get paths. For example, you can set requirements.txt as your build_id by python3 -m zipapps -b requirements.txt -r requirements.txt when you use pyz as venv. very rarely used too too the build_id arg of zipapps.create_app
--zipapps, --env-paths Default --zipapps arg if it is not given while running. Support TEMP/HOME/SELF prefix.
--delay, -d, --lazy-pip, --lazy-install, --lazy-pip-install Install packages with pip while first running, which means requirements will not be install into pyz file.
--ensure-pip Add the ensurepip package to your pyz file, works for embed-python(windows) or other python versions without pip installed but lazy-install mode is enabled. [EXPERIMENTAL]
--layer-mode Layer mode for the serverless use case, __main__.py / ensure_zipapps.py / activate_zipapps.py files will not be set in this mode. --layer-mode-prefix Only work while --layer-mode is set, will move the files in the given prefix folder.
--clear-zipapps-cache, -czc Clear the zipapps cache folder after running, but maybe failed for .pyd/.so files.
all the other (or unknown) args will be used by pip install such as -r requirements.txt such as bottle aiohttp the pip_args arg of zipapps.create_app
Support
For any new features, suggestions and bugs create an issue on GitHub.
If you have any questions check and ask questions on community page Stack Overflow .
Find more information at:
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page