py7zr
Pure python 7-zip library
Decision gist · record as of 2026-08-14
Yes. py7zr is actively maintained, has no known vulnerabilities, installs with low friction, and offers broad algorithm support. The LGPL-2.1-or-later license is permissive for most use cases as long as you distribute source. Install if you need 7z handling in Python; avoid only if your project cannot accept copyleft licensing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; standard lzma module support varies by Python implementation.
- Low friction: pure-Python wheel with no compiled dependencies.
- Active maintenance with recent releases; last commit 2026-07-17.
License · maintenance · safety
LGPL-2.1-or-later (copyleft) — LGPL-2.1-or-later (copyleft): you may use and modify freely, but derivative works and distributions must remain under the same license and include source.
last release 2026-06-19 (56 days) · last repo commit 2026-07-17 · 557 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 9,610,773 downloads/mo, #1,519 on PyPI
Alternatives
Verify before relying
import py7zr
with py7zr.SevenZipFile('sample.7z', mode='r') as archive:
archive.extractall(path='/tmp')
# Or compress:
with py7zr.SevenZipFile('target.7z', 'w') as archive:
archive.writeall('/path/to/base_dir', 'base')- Exact compatibility with original 7-zip on Windows and p7zip on Linux/macOS for all algorithms
- Performance characteristics compared to system 7z tools for large archives
- Symbolic link handling safety guarantees beyond the documented ValueError checks
What it is and what it does
py7zr is a pure-Python implementation of 7z archive handling, providing both a library API and command-line tools for compression, decompression, encryption, and decryption. It wraps Python's standard lzma module and adds support for additional algorithms (Brotli, ZStandard, PPMd) and encryption (7zAES) via third-party libraries. The package works on Linux, macOS, Windows, and ARM platforms.
You use it when you need to work with 7z archives from Python without external system dependencies. It supports password-protected archives, selective file extraction, multi-volume archives, and custom filter chains. The library provides both context-manager-based file operations and a shutil integration layer for archive registration.
Use it for
- Extract password-protected 7z archives in a Python application without calling external tools
- Create compressed archives with custom algorithms like Brotli or ZStandard for distribution
- Selectively extract files from large archives using regex patterns without full decompression
- Build multi-volume archives for storage or transfer across size-limited media
- Integrate 7z support into backup or data pipeline tools via the shutil interface
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
py7zr is actively maintained, has no known vulnerabilities, installs with low friction, and offers broad algorithm support. The LGPL-2.1-or-later license is permissive for most use cases as long as you distribute source. Install if you need 7z handling in Python; avoid only if your project cannot accept copyleft licensing.
Install
py7zr on PyPI
Before you install
Low friction: pure-Python wheel with no compiled dependencies. Active maintenance with recent releases; last commit 2026-07-17. Requires Python 3.10 or later.
Requires Python 3.10 or later; standard lzma module support varies by Python implementation.
License in practice
LGPL-2.1-or-later (copyleft): you may use and modify freely, but derivative works and distributions must remain under the same license and include source.
Quickstart
import py7zr
with py7zr.SevenZipFile('sample.7z', mode='r') as archive:
archive.extractall(path='/tmp')
# Or compress:
with py7zr.SevenZipFile('target.7z', 'w') as archive:
archive.writeall('/path/to/base_dir', 'base')
Verify before relying
- Exact compatibility with original 7-zip on Windows and p7zip on Linux/macOS for all algorithms
- Performance characteristics compared to system 7z tools for large archives
- Symbolic link handling safety guarantees beyond the documented ValueError checks
Package facts
| License | LGPL-2.1-or-later copyleft |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 10 packagestexttablepycryptodomexbrotlibrotlicffipsutilbackports.zstdpyppmdpybcjmultivolumefileinflate64 |
| Maintenance | Actively maintained 56 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 9,610,773 / month, #1,519 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules |
Evidence: py7zr-1.1.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “7z archive compression decompression”
- py7zrpy7zr is a pure-Python library for reading, writing, and managing 7z…
- patoolPatool is a command-line archive manager that can create, extract,…
- libarchive-clibarchive-c provides a Python interface to libarchive, a C library…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pyppmd · pyunpack · libarchive-c · extractcode · brotli · rarfile · tzst · pyzstd · zipfile-deflate64 · unrar