unrar
Wrapper for UnRAR library, ctypes-based.
What it is and what it does
unrar is a ctypes-based wrapper around the UnRAR library that lets you work with RAR archive files from Python. It provides a file-like interface to list archive contents, extract files, test archive integrity, and read file data directly without full extraction. The package has no Python runtime dependencies—it relies entirely on the system's UnRAR library, which you must install separately.
The package is in beta status and has been abandoned since 2019, with its last release in September of that year. While it carries no known security vulnerabilities, the lack of maintenance means it may not work reliably with modern Python versions or recent UnRAR releases. The GPL-3 copyleft license also restricts use in proprietary projects.
Use it for:
- Extract files from RAR archives in a Python application without shelling out to external commands.
- List and inspect the contents of RAR archives programmatically to validate or audit archive structure.
- Read individual files from a RAR archive into memory without extracting the entire archive to disk.
- Test RAR archive integrity and detect corruption before attempting extraction.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python access to RAR archive files through ctypes bindings to the UnRAR library, allowing you to list, extract, and read contents of RAR archives.
No—this package is abandoned and GPL-3 copyleft licensed. Unless you are working on an open-source project with a specific legacy dependency on this exact wrapper, you should seek a maintained alternative. The lack of updates since 2019 creates compatibility risk with modern Python and UnRAR versions, and the copyleft license blocks use in proprietary software.
Install
unrar on PyPI
pip
pip install unraruv
uv add unrarpoetry
poetry add unrarInstalling unrar
Before you install
Installation is straightforward via pip, but the package requires the UnRAR library to be installed separately on your system—either compiled from source or downloaded pre-built. The package has been abandoned since 2019 with no recent maintenance.
License in practice
Licensed under GPL-3 (copyleft), which means any code that links to or distributes this package must also be open-source under a compatible license. This is a significant constraint for proprietary or closed-source projects.
Quickstart
pip install unrar
from unrar import rarfile
rar = rarfile.RarFile('sample.rar')
files = rar.namelist()
rar.extractall()
The UnRAR library must be installed separately on your system and discoverable by the system library loader, or you must set the UNRAR_LIB_PATH environment variable to point to the library.
Verify before relying
- Whether the package works reliably with modern Python versions beyond 3.7, given the classifiers list only goes to 3.7 and the project is abandoned.
- Current compatibility with recent UnRAR library versions (last tested with 5.2.6 in 2019).
- Whether alternative maintained packages now exist for RAR archive handling in Python.
Package facts
| License | GPL-3 (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,532 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 81,566/month — #14,217 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: unrar-0.4-py3-none-any.whl
Keywords: unrar, ctypes, rar
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
rarfileReads RAR archive files (RAR3 and RAR5 formats)…
permissive · top 5,000 on PyPI
pyunpackUnpacks archive files in Python with support…
permissive · top 15,000 on PyPI
libarchive-clibarchive-c provides a Python interface to…
permissive · top 15,000 on PyPI
extractcodeExtracts a wide range of archive formats (tar,…
permissive · top 15,000 on PyPI
arParses and reads ar archive files (.a),…
permissive · top 15,000 on PyPI
cwrapcwrap is a Python wrapper around C code that…
copyleft · top 15,000 on PyPI
py7zrpy7zr is a pure-Python library for reading,…
copyleft · top 5,000 on PyPI
arpyArpy reads and extracts files from ar archives…
permissive · top 15,000 on PyPI
rpmfileInspect and extract files from RPM archive…
permissive · top 5,000 on PyPI
patoolPatool is a command-line archive manager that…
copyleft · top 5,000 on PyPI