A simple tool for turning a multi-file, multi-dependency Python script into a single file.





GitHub Stars



Last Commit

3yrs ago







Apache v2.0



Super Zippy

Super Zippy takes a Python package and its pure Python dependencies and transforms them all into a single executable file.

Linux and Mac OS X are the only operating systems that are officially supported right now. It seems like Superzippy should work for any operating system though, so feel free to try it on your own (and let me know if you want to help testing!).


Say I'm trying to write a Python script that uses Clint <> to provide nice console output. I can create a project with a directory tree as below (this example is in the repo under examples/readme/ <>).

.. code-block::

The file establishes the Clint dependency and is very short. This file must exist because Super Zippy will use pip <>_ to install your package, and pip needs this file.

.. code-block:: python

from setuptools import setup, find_packages
    name = "tinyscript",
    packages = find_packages(),
    install_requires = ["Clint"]

The file is empty (see here <>_ for info).

Finally, the file has our actual script.

.. code-block:: python

from clint.textui import puts, colored
import sys

def foo():
    puts("I am a mighty foo function!"))

def bar():
    puts("Nice to meet you, I am bar."))

if __name__ == "__main__":
    puts("Running as a script!")

We can now use Super Zippy.

.. code-block:: bash

$ ls tinyscript/
$ superzippy . tinyscript.main:foo
$ ls tinyscript/
$ ./
I am a mighty foo function!
$ echo $?

Note that "I am a mighty foo function!" above is displayed in red if you actually run it.

If we'd like to have the bar() function be our entry point (rather than the foo() function above), we could run

.. code-block:: bash

$ superzippy . tinyscript.main:bar
$ ./
Nice to meet you, I am bar.
$ echo $?

There's a number of options you can give Super Zippy and you can get an up-to-date listing of them by running superzippy -h.


You can install Super Zippy from pip easily (see here for installing pip <>_). This will grab the latest stable release.

.. code-block:: bash

$ pip install superzippy

Alternatively, you can install the most recent version off of GitHub.

.. code-block:: bash

$ git clone
$ cd superzippy/
$ python install

If you are planning to do development on Super Zippy, you may want to install Super Zippy in editable mode <>_. You can do this by running python develop instead of python install.

You can of course also use Super Zippy on itself to make a Super Zip of Super Zippy. Though doing this automatically may be done in the future, it seems mostly unecessary at the moment to add this into our release process.

How it Works

Super Zippy's algorithm is fairly straightforward.

  1. Create a virtual environment using virtualenv <>. #. Install all the desired packages into the virtual environment using pip <>. #. Grab the site-packages directory out from the virtual environment (which is the directory that contains all installed packages) and put it in an empty temporary directory. #. Add a <>_ file to the temporary directory that executes the desired function. #. Zip the temporary directory up. #. Make the zip file executable by flipping the executable bit and adding #!/usr/bin/env python to the beginning of the zip file.

Adding a shebang to the beginning of the zip file doesn't affect our ability to decompress it because a zip file's "header" is located at the back of the file (see this wikipedia article <>_).

Who Made This?

My name is John Sullivan <> and I created this over a couple weekends with the assistance of Chris Manghane <>. After the initial release, Steven Myint <>_ graciously submitted several useful patches as well.

If you are interested in helping with the development, feel free to fork and dive in! If you'd just like to send me a message you can find my contact information on my portfolio at <>_.


Apache License v2.0 (see LICENSE <>_ for full text).

If you need a more permissive license please open up an issue in the tracker <>_ that describes your desired use case.

Rate & Review

Great Documentation0
Easy to Use0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Unwelcoming Community0