Registry / serialization / zipp
library4.1.0pypypi✓ verified 24d ago

zipp is the official backport of the pathlib-compatible zipfile.Path object from the Python standard library. It provides a Traversable/pathlib-like interface for navigating and reading ZIP archives (zipp.Path), with new features introduced here first and later merged into CPython. Current version is 3.23.0, released June 2025, with a very active cadence of roughly one release per month maintained by Jason R. Coombs (jaraco).

pip install zipp
INSTALL
IMPORT
SIG · ZIPP
Z
zipp
serializationpythonv4.1.0
Install
1.7s avg
Import
28ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.030s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.026s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Path
from zipp import Path
import zipp; path = zipp.Path('archive.zip')

Create an in-memory ZIP, wrap it with zipp.Path, iterate entries, read file content, and glob for files — all using a pathlib-style API.

import io import zipfile import zipp # Build an in-memory zip data = io.BytesIO() with zipfile.ZipFile(data, 'w') as zf: zf.writestr('hello.txt', 'Hello, zipp!') zf.writestr('sub/world.txt', 'World!') zf.filename = 'example.zip' # Navigate with zipp.Path (pathlib-style) root = zipp.Path(data) for item in root.iterdir(): print(item.name, item.is_file()) # Read a nested file file_path = root / 'hello.txt' print(file_path.read_text()) # 'Hello, zipp!' # Glob support for txt in root.glob('**/*.txt'): print(txt)
Debug
Known issues
breakingzipp.Path.open() changed to text mode by default and dropped positional pwd and force_zip64 parameters.
fix
Pass mode='rb' explicitly for binary reads. Remove any positional pwd argument; keyword args still pass through to io.TextIOWrapper.
affects: <3.2
breakingPath.joinpath() dropped the 'add' keyword argument; it now only accepts arbitrary positional path segments.
fix
Replace joinpath(add='sub/path') with joinpath('sub/path') or the / operator (root / 'sub' / 'path').
affects: <3.6
breakingRequires Python >=3.9 as of recent releases. Older zipp releases supported Python 3.6/3.7/3.8 but those branches are no longer maintained.
fix
Pin to zipp<3.20 if you must support Python 3.8. For Python 3.7, pin to zipp<3.5.
affects: >=3.20
gotchaDirectory entries from iterdir() always end with a trailing slash in their string representation. Comparing path names with string equality will fail unless you strip the slash.
fix
Use path.name (strips the slash) rather than str(path) when comparing directory names.
affects: all
gotchaPassing a ZipFile object to zipp.Path mutates the ZipFile in place (converts it to a CompleteDirs subclass). The caller's reference is affected. This is by design to prevent double-close bugs.
fix
Do not rely on the original ZipFile object type after wrapping it in zipp.Path; use the zipp.Path interface exclusively for all navigation.
affects: >=3.3
gotchaPath.glob('**') previously did not match directories; since 3.20 it does. Code that relied on glob returning only files may now receive unexpected directory entries.
fix
Filter results with item.is_file() when you want only files: [p for p in root.glob('**/*.txt') if p.is_file()].
affects: >=3.20
gotchazipp is commonly pulled in as a transitive dependency (e.g. by importlib-metadata, pip, pytest). Pinning it too tightly in lock files can block upgrades of those tools.
fix
Declare a loose lower bound (zipp>=3.9) rather than an exact pin unless you have a specific compatibility reason.
affects: all
Upgrade
Version history
4.1.0latest on PyPI · released May 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
60 hits · last 30 days
node
52
OpenAI (training)
1
Resources
zipp — pip install zipp · libregistry