Skip to main content

Introduction

Support for executing python zip files was added in Python2.6, and in Python3.6, emphasis was added through the zipapp module.

This module contains a buildout recipe and a command line utility to help package Python applications into a zipapp, complete with its setup.py dependencies.

One of the use-case for this module is for building complex Hadoop MapReduce job in Python that relies in many dependencies. The zipapp can be distributed easily to Hadoop nodes for execution, or packaged as a script for Hive’s TRANSFORM function

Command Line Tool

Installation

pip install koslab.recipe.zipapp

Usage

The following example packages Spotify’s Luigi daemon as a zipapp.

# Creates luigi zipapp as luigi.egg
zipapp build luigi -m luigi.cmdline:luigid -o luigi.egg

# Run luigid
python luigi.egg

Buildout Recipe

Configuration

This recipe depends on collective.recipe.omelette from Plone.

buildout.cfg:

[buildout]
parts =
    omelette
    zipapp

[omelette]
recipe = collective.recipe.omelette
eggs =
    # Eggs to be included into the zipapp
    MyApp

[zipapp]
recipe = koslab.recipe.zipapp
omelette-part = omelette
main-function = MyApp.main:main
output-file = MyApp.pyz

Output file will be created everytime buildout is run

Contributors

Note: place names and roles of the people who contribute to this package

in this file, one to a line, like so:

  • Joe Schmoe, Original Author

  • Bob Slob, contributed monkey patches

  • Jane Main, wrote flibberty module

Changelog

1.0 (2015-08-04)

  • Package created using templer [izhar]

  • Initial functioning recipe [izhar]

Release files for koslab.recipe.zipapp 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for koslab.recipe.zipapp 1.0
File Size Uploaded
koslab.recipe.zipapp-1.0.zip 21.0 kB Details

Release files / koslab.recipe.zipapp-1.0.zip

Download URL koslab.recipe.zipapp-1.0.zip
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
358464145b94fd7fd01445d909507c21aa1ef4b7781e1c1be5e814a64357ab70
BLAKE2b-256 checksum
How to use checksums
bbd12826bdfa844d619df9eadf4929f113242d7f89a9c6976e20b832a9c8dbbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page