Registry / storage / cabarchive

cabarchive

JSON →
library0.2.5pypypi✓ verified 88d ago

A pure-python library for creating and extracting Microsoft cabinet (CAB) files. Current version 0.2.5, released sporadically.

pip install cabarchive
INSTALL
IMPORT
SIG · CABARCHIVE
C
cabarchive
storagepythonv0.2.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

CabArchive
✓ from cabarchive import CabArchive
✗ import CabArchive
CabArchive is a class, not a module.

Basic example of creating and reading CAB files.

from cabarchive import CabArchive # Create a CAB file with CabArchive() as archive: archive.add_bytes('hello.txt', b'Hello, world!') archive.write('example.cab') # Extract a CAB file archive = CabArchive('example.cab') print(archive.namelist()) print(archive.read('hello.txt'))
Debug
Known issues
gotchaThe library does not support streaming reads/writes; entire archive is held in memory.
fix
Ensure archives fit in available memory.
affects: all
deprecatedThe 'CabArchive.add_file' method is deprecated; use 'add_bytes' instead.
fix
Replace add_file() with add_bytes() and read the file using open().
affects: >=0.2.0
gotchaWriting an archive with no entries will produce an invalid CAB file.
fix
Always add at least one file to the archive before calling write().
affects: all
Errors
Common errors & fixes
AttributeError: module 'cabarchive' has no attribute 'CabArchive'
Using 'import cabarchive' instead of 'from cabarchive import CabArchive'.
fix
Use: from cabarchive import CabArchive
PermissionError: [Errno 13] Permission denied: 'example.cab'
Opening an existing CAB file for reading without having write permissions in the directory.
fix
Check file permissions or use a different path.
cabarchive.CabArchiveError: Cannot create CAB archive without any files added
Calling write() on an empty CabArchive context.
fix
Add at least one file via add_bytes() or add() before write().
Upgrade
Version history
0.2.5latest on PyPI · released Feb 10, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
49 hits · last 30 days
node
42
OpenAI (training)
1
Resources
cabarchive — pip install cabarchive · libregistry