Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Python
  3. shiv

shiv

BSD-2-ClausePython1.0.8

A command-line utility for building self-contained Python zipapps with all dependencies included, following PEP 441.

GitHubGitHub
1.9k stars112 forks0 contributors

What is shiv?

shiv is a command-line utility that builds self-contained Python zip applications (.pyz files) with all their dependencies included. It implements PEP 441 for zipapp creation while solving the dependency packaging problem, allowing developers to distribute Python applications as single executable files.

Target Audience

Python developers and DevOps engineers who need to distribute Python applications as portable, self-contained executables without complex installation procedures.

Value Proposition

Developers choose shiv because it provides a simple, standards-compliant way to package Python applications with dependencies into single executable files, making distribution significantly easier than traditional packaging methods.

Overview

shiv is a command line utility for building fully self contained Python zipapps as outlined in PEP 441, but with all their dependencies included.

Use Cases

Best For

  • Creating portable Python command-line tools as single executable files
  • Distributing Python applications without requiring users to manage dependencies
  • Building self-contained Python utilities for easy deployment across systems
  • Packaging Python libraries with their dependencies for simplified installation
  • Creating interactive Python environments with pre-loaded libraries
  • Simplifying Python application distribution in CI/CD pipelines

Not Ideal For

  • Projects requiring cross-platform compatibility for applications with C extensions
  • Environments with strict file system policies that prohibit persistent extraction to user directories
  • Applications where minimal startup time is critical due to extraction overhead on first run
  • Teams needing to distribute applications for multiple Python versions without rebuilding

Pros & Cons

Pros

Self-contained Executables

Bundles all Python dependencies into a single .pyz file, enabling distribution as a single executable without external dependency management.

PEP 441 Compliance

Implements the official Python zip application specification, ensuring compatibility with Python's built-in tools while extending it for dependencies.

Simple CLI Interface

Uses a pip-like command syntax, making it intuitive for developers familiar with Python packaging to create executables with minimal commands.

Interactive Executables

Can create pyz files that launch into interactive Python consoles with pre-loaded libraries, useful for debugging or exploratory work.

Fast Distribution Focus

Prioritizes ease and speed in application distribution, as highlighted in the README, by reducing packaging complexity.

Cons

Cross-Platform Limitations

As admitted in the gotchas, zipapps with C extensions may not work across different architectures, limiting portability for many real-world packages.

Extraction Clutter

Defaults to extracting to ~/.shiv without automatic cleanup, which can accumulate files and require manual management, as noted in the documentation.

Python Version Dependency

Requires Python >= 3.8, excluding use in environments with older Python versions and adding constraints for legacy systems.

Static Packaging

Creates static executables that must be rebuilt for updates, unlike dynamic package managers that allow in-place upgrades or version switching.

Frequently Asked Questions

Quick Stats

Stars1,942
Forks112
Contributors0
Open Issues50
Last commit18 days ago
CreatedSince 2018

Tags

#packaging#command-line-tool#dependency-management#python#distribution

Built With

P
Python

Included in

Python290.8k
Auto-fetched 1 day ago

Related Projects

pyarmorpyarmor

A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

Stars5,103
Forks356
Last commit7 days ago
cx-Freezecx-Freeze

Creates standalone executables from Python scripts with the same performance as the original script. It is cross-platform and should work on any platform that Python runs on.

Stars1,550
Forks241
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub