--- id: stream-zip version: "0.0.84" license: unclear license_treatment: permissive maintenance: active --- # stream-zip — Python function to construct a ZIP archive with stream processing - without having to store the entire ZIP in memory or disk License: permissive · Maintenance: active · Downloads: 604.4K/mo ## What it is and what it does stream-zip is a Python library for generating ZIP archives incrementally without buffering the entire file in memory or on disk. Instead of constructing a complete ZIP in advance, it yields compressed chunks as they are ready, making it ideal for web servers that need to start sending compressed data before all source files have been read. It supports both the legacy Zip32 format and the modern Zip64 format for files larger than 4 GiB, and can encrypt archives with AES-256 passwords following the WinZip AE-2 specification. The library handles symbolic links, directories (including empty ones), file permissions, and extended timestamps. It depends only on pycryptodome for encryption operations and is designed for memory-constrained environments where traditional ZIP libraries would require staging the entire archive. The package is actively maintained, has no known vulnerabilities, and provides both synchronous and asynchronous (thread-based) interfaces. Use it for: - Generate downloadable ZIP files in web applications without buffering the entire archive to disk or memory. - Stream large Zip64 archives (>4 GiB) from a server to clients in real-time as data becomes available. - Create password-protected, AES-256-encrypted ZIP files on-demand for secure file distribution. - Build ZIP archives containing symbolic links and directory structures in resource-constrained environments. - Implement on-demand compression pipelines where source data is fetched incrementally and streamed directly into the ZIP. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Constructs ZIP archives on-the-fly without storing the entire file in memory or disk, supporting both Zip32 and Zip64 formats, password protection with AES-256 encryption, and streaming output. Yes. stream-zip is actively maintained, has no security vulnerabilities, low install friction (single pure-Python dependency), and solves a genuine problem for streaming ZIP generation in memory-constrained or real-time scenarios. The permissive MIT license poses no restrictions. Install it if you need to generate ZIPs on-the-fly in a web server or similar streaming context. ## Install pip install stream-zip uv add stream-zip poetry add stream-zip ## Installing stream-zip Before you install: Low install friction: pure Python wheel with a single runtime dependency (pycryptodome). Active maintenance with recent commits; last release 191 days ago suggests stable, infrequent updates rather than abandonment. License in practice: MIT license (permissive) means you can use, modify, and distribute stream-zip freely in commercial and private projects with minimal restrictions. Quickstart: pip install stream-zip from stream_zip import stream_zip for chunk in stream_zip(files): # yield or write chunk to response Requires Python 3.6.7 or later; pycryptodome is required at runtime for encryption features. Verify before relying: - Whether the async interface (which uses threads) is suitable for high-concurrency web servers or if there are known performance bottlenecks. - Compatibility with specific ZIP clients when using extended timestamps or symbolic links in generated archives. - Memory overhead characteristics when streaming very large files (multi-gigabyte Zip64 archives). ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 604.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags stream zip file generation, memory-efficient zip creation, on-demand zip archive, zip64 streaming, web server zip download, encrypted zip streaming, zip without disk buffering, streaming, encryption, zip64 [View on SkillFed](https://skillfed.io/packages/stream-zip) · [View on PyPI](https://pypi.org/project/stream-zip/)