Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Build zipapp single file Python applications easily

Project description

Introduction

Build zipapp single file Python applications easily.

Usage

Standalone application

zapp ~/bin/myapp myapp.cli:main 'myapp==1.2.3' 'mylib==3.2.1'

python3 -m zapp ~/bin/myapp myapp.cli:main 'myapp==1.2.3' 'mylib==3.2.1'

zapp toolmaker.pyz toolmaker.cli:main toolmaker
zapp pipdeptree.pyz pipdeptree:main pipdeptree
zapp ~/bin/httpie httpie.__main__:main httpie

# Without requirements
zapp zipfile.pyz zipfile:main

Library

import zapp

zapp.core.build_zapp(
    [
        'myapp==1.2.3',
        'mylib==3.2.1',
    ],
    'myapp.cli:main',
    'myapp.pyz',
)

Setuptools command

python3 setup.py bdist_zapp --entry-point myapp.cli:main

Details

Similar applications

Hacking

This project makes extensive use of tox, pytest, and GNU Make.

Development environment

Use following command to create a Python virtual environment with all necessary dependencies:

tox --recreate -e develop

This creates a Python virtual environment in the .tox/develop directory. It can be activated with the following command:

. .tox/develop/bin/activate

Run test suite

In a Python virtual environment run the following command:

make review

Outside of a Python virtual environment run the following command:

tox --recreate

Build and package

In a Python virtual environment run the following command:

make package

Outside of a Python virtual environment run the following command:

tox --recreate -e package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for zapp, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size zapp-0.0.4-py3-none-any.whl (9.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size zapp-0.0.4.tar.gz (8.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page