--- id: rarfile version: "4.5" license: ISC license_treatment: permissive maintenance: active --- # rarfile — RAR archive reader for Python License: permissive · Maintenance: active · Downloads: 6.0M/mo ## What it is and what it does rarfile is a Python module that reads RAR archive files following the interface style of the standard zipfile library. It handles both RAR3 and RAR5 formats, multi-volume archives, password-protected files, and Unicode filenames. Archive parsing and non-compressed file access are implemented in pure Python, while compressed file extraction delegates to an external tool such as unrar, 7zip, unar, or bsdtar. The module is designed for developers who need to programmatically work with RAR archives in Python. It requires an external decompression tool to be installed on the system for extracting compressed content, but provides a straightforward API for reading archive metadata and accessing file contents without requiring additional Python dependencies. Use it for: - Extract files from RAR archives in a Python application without calling command-line tools directly. - Read metadata and list contents of multi-volume RAR archives. - Access password-protected RAR files programmatically with password support. - Process RAR archives with Unicode filenames across different operating systems. - Migrate legacy code that works with zip files to also handle RAR format archives. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads RAR archive files (RAR3 and RAR5 formats) in pure Python, with support for multi-volume archives, password protection, and Unicode filenames, delegating decompression to external tools like unrar or 7zip. Yes. rarfile is actively maintained, has no Python dependencies, carries a permissive ISC license, and fills a clear need for RAR archive support in Python. The requirement for an external decompression tool is a known and documented constraint, not a deficiency. Suitable for production use when the external tool dependency is acceptable. ## Install pip install rarfile uv add rarfile poetry add rarfile ## Installing rarfile Before you install: Low install friction with no runtime dependencies. Actively maintained as of 2026-08-13 with recent releases. Requires Python 3.10 or later and an external decompression tool (unrar, 7zip, unar, or bsdtar) to extract compressed files. License in practice: Licensed under ISC (permissive), allowing commercial and private use with minimal restrictions. No copyleft obligations. Quickstart: pip install rarfile import rarfile with rarfile.RarFile('archive.rar') as rf: rf.extractall() An external decompression tool (unrar, 7zip, unar, or bsdtar) must be installed on the system; archive parsing and non-compressed file reading work in pure Python, but compressed files require the external tool. Verify before relying: - Whether the package's external tool detection is automatic or requires manual configuration. - Performance characteristics when handling large multi-volume archives. - Specific Python 3.10+ compatibility details beyond the stated requirement. ## Package facts - License: ISC (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 6.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags rar archive reader python, extract rar files, read rar archives, rar3 rar5 support, password protected rar, multi-volume rar extraction, rar file parser, archive-format, file-handling [View on SkillFed](https://skillfed.io/packages/rarfile) · [View on PyPI](https://pypi.org/project/rarfile/)