libarchive-c
Python interface to libarchive
Decision gist · record as of 2026-08-14
Yes. libarchive-c is a solid, permissively licensed wrapper with no runtime Python dependencies, low install friction, and broad archive format support. It's aging but actively maintained and carries no known vulnerabilities. Install it if you need multi-format archive handling and are comfortable with the system libarchive dependency.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires libarchive system library to be installed and accessible; on macOS with obsolete versions, set LIBARCHIVE environment variable to point to a recent installation.
- Installation is straightforward with no runtime dependencies beyond the system libarchive library.
- The package is aging (last release 449 days ago) but remains actively maintained with recent commits; compatibility is tested against Python 3.12 and 3.13.
License · maintenance · safety
CC0 (permissive) — Released under CC0 Public Domain Dedication, placing it in the permissive category with no restrictions on use, modification, or redistribution.
last release 2025-05-22 (449 days) · last repo commit 2025-05-22 · 84 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 396,790 downloads/mo, #6,968 on PyPI
Alternatives
Verify before relying
pip install libarchive-c
import libarchive
# Extract an archive
os.chdir('/path/to/target')
libarchive.extract_file('test.zip')
# Read an archive
with libarchive.file_reader('test.tar.gz') as archive:
for entry in archive:
print(entry.pathname)- Whether performance is acceptable for very large archives or high-throughput scenarios
- Completeness of support for all libarchive features and edge cases in the Python wrapper
What it is and what it does
libarchive-c is a thin ctypes wrapper around the libarchive C library, exposing archive operations to Python without requiring compiled extensions. It lets you extract, read, and create archives in multiple formats—tar, zip, 7z, bz2, gz—by calling Python functions that delegate to the underlying C library.
The package is designed for straightforward archive manipulation: extract files to disk, iterate over archive contents and read blocks, or build new archives from files and in-memory data. It supports reading from files, file descriptors, memory buffers, or custom callbacks, and writing to similar destinations. You can control extraction security flags, preserve or resolve symbolic links, and specify metadata codecs for non-UTF-8 filenames.
Use it for
- Extract multi-format archives (zip, tar, 7z) in a single codebase without format-specific libraries
- Read archive contents without extracting to disk, iterating over entries and blocks for streaming processing
- Create tar or zip archives programmatically with custom metadata, permissions, and timestamps
- Handle archives in memory buffers or from file descriptors rather than files on disk
- Process large archives with progress tracking using the bytes_read attribute
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
libarchive-c is a solid, permissively licensed wrapper with no runtime Python dependencies, low install friction, and broad archive format support. It's aging but actively maintained and carries no known vulnerabilities. Install it if you need multi-format archive handling and are comfortable with the system libarchive dependency.
Install
libarchive-c on PyPI
Before you install
Installation is straightforward with no runtime dependencies beyond the system libarchive library. The package is aging (last release 449 days ago) but remains actively maintained with recent commits; compatibility is tested against Python 3.12 and 3.13.
Requires libarchive system library to be installed and accessible; on macOS with obsolete versions, set LIBARCHIVE environment variable to point to a recent installation.
License in practice
Released under CC0 Public Domain Dedication, placing it in the permissive category with no restrictions on use, modification, or redistribution.
Quickstart
pip install libarchive-c
import libarchive
# Extract an archive
os.chdir('/path/to/target')
libarchive.extract_file('test.zip')
# Read an archive
with libarchive.file_reader('test.tar.gz') as archive:
for entry in archive:
print(entry.pathname)
Verify before relying
- Whether performance is acceptable for very large archives or high-throughput scenarios
- Completeness of support for all libarchive features and edge cases in the Python wrapper
Package facts
| License | CC0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 449 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 396,790 / month, #6,968 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: libarchive_c-5.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 › “tar zip 7z reader writer”
- libarchive-clibarchive-c provides a Python interface to libarchive, a C library…
- pyunpackUnpacks archive files in Python with support for multiple formats…
- extractcodeExtracts a wide range of archive formats (tar, zip, 7z, rpm, deb,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also extractcode · py7zr · pyunpack · rarfile · ar · extractcode-libarchive · unrar · tzst · arpy · harfile