skillfed

unrar

Wrapper for UnRAR library, ctypes-based.

unrar v0.4 81.6K downloads/30d#14,217 on PyPI79
Copyleft license GPL-3 Abandoned released

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 unrar

uv

uv add unrar

poetry

poetry add unrar

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7

Tags

rar archive extraction pythonread rar files pythonunrar library wrapperrar file listingextract rar archivesrar decompression python
archive-handlingabandoned

More Utilities packages