Repository navigation
π pycabfile v1.0.0 - Initial Release
We're excited to announce the first stable release of pycabfile, a Python library for handling Microsoft Cabinet files with a zipfile-compatible interface!
β¨ Key Features
- π zipfile-compatible API - Drop-in replacement for Python's zipfile module when working with CAB files
- π¦ Create and extract CAB files - Full support for reading and writing Microsoft Cabinet files
- π Pure Python implementation - No external dependencies required
- π Python 3.10+ support - Compatible with modern Python versions
- π Unicode filename support - Handle international filenames correctly
- π§ Context manager support - Use with
withstatements for automatic resource management
π Quick Start
Installation
pip install pycabfileBasic Usage
from pycabfile import CabFile
# Create a CAB file
with CabFile('example.cab', 'w') as cab:
cab.write('document.txt')
cab.writestr('readme.txt', 'Hello World!')
# Read a CAB file
with CabFile('example.cab', 'r') as cab:
files = cab.namelist()
content = cab.read('readme.txt')
cab.extractall('output/')π What's Included
- Core Library (
pycabfile/) - Main implementation with zipfile-compatible interface - Comprehensive Tests - Full test suite ensuring reliability
- Documentation - Complete README with examples and API reference
- Example Code - Practical usage examples
π§ API Compatibility
This library provides the same interface as Python's zipfile.ZipFile:
| zipfile | pycabfile |
|---|---|
ZipFile('file.zip', 'w') |
CabFile('file.cab', 'w') |
zf.write('file.txt') |
cf.write('file.txt') |
zf.read('name') |
cf.read('name') |
zf.extractall() |
cf.extractall() |
π― Use Cases
Perfect for:
- Working with legacy CAB archives
- Cross-platform CAB file handling
- Integration with existing zipfile-based code
- Automated CAB file processing
π Technical Specifications
- Python Version: 3.10+
- Dependencies: None (pure Python)
- CAB Format: Microsoft Cabinet File Format compatible
- File Size: Supports standard CAB file limitations
- Compression: CAB_STORED and CAB_COMPRESSED modes
π€ Contributing
We welcome contributions! Please see our repository for:
- Bug reports and feature requests
- Code contributions
- Documentation improvements
- Test cases
π License
MIT License - see LICENSE file for details.
π Acknowledgments
Thanks to the Python community for the inspiration from the zipfile module design.
Full Changelog: Initial release - no previous versions to compare
Download: Available on PyPI: pip install pycabfile