Skip to main content

Very thin wrapper around zipapp that let's you package a python module and dependencies.

Project description

PyPI

zipit

Very thin wrapper around zipapp that let's you package a python module and dependencies.

Example

We'll use our demo "app" to showcase zipit.

First, let's take a look at what our app contains:

$ cd demo
$ ls app
__main__.py  requirements.txt

Our "app" contains two files:

  1. __main__.py: This is the entrypoint to our app.
  2. requirements.txt: This is a classic requirements file as consumed by pip.

Getting things set up

First we need to install the dependencies for our app. zipit doesn't much care how dependencies are installed. We just need to keep track of where they're installed.

Let's use pip:

mkdir deps
$ python3 -m pip install -r app/requirements.txt --target deps

zipit

Once the dependencies are installed, we can let zipit do it's work:

cd ..
$ python3 -m zipit demo/app -d demo/deps

This will produce .pyz file runable with python.

$ python3 app.pyz
Hello, World!

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 zipit, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size zipit-0.0.2-py3-none-any.whl (15.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size zipit-0.0.2.tar.gz (2.2 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 DigiCert DigiCert EV certificate StatusPage StatusPage Status page