Registry / serialization / unrar
library0.4pypypi✓ verified 81d ago

Python bindings for the UnRAR library using ctypes. Provides read-only access to RAR archives with extraction and listing capabilities. Current version 0.4 (stalled). Released on PyPI but no active development. The package wraps the UnRAR DLL/shared library from RARLab.

pip install unrar
INSTALL
IMPORT
SIG · UNRAR
U
unrar
serializationpythonv0.4
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

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

VERSION
from unrar import VERSION
from unrar import rarfile

List contents of a RAR file using RarFile as a context manager.

import os from unrar import rarfile rar_path = 'example.rar' if not os.path.exists(rar_path): print('Place a RAR file named example.rar in the current directory.') else: with rarfile.RarFile(rar_path) as rf: for info in rf.infolist(): print(info.filename)
Debug
Known issues
gotchaUnRAR shared library must be installed separately. The Python package does not include the native library.
fix
Install unrar-free (Linux: apt-get install unrar, macOS: brew install unrar). On Windows, place unrar.dll in PATH.
affects: all
gotchaThe package is unmaintained (last release 2013). May have compatibility issues with newer Python versions or platforms.
fix
Consider alternatives like patool or rarfile (pure Python).
affects: 0.4
gotchaRarFile does not support writing. It is read-only.
fix
Use a different library for creating RAR archives (e.g., patool with external unrar).
affects: all
gotchaThe unrar module must be importable; sometimes missing because of PYTHONPATH or install issues.
fix
Ensure pip install unrar succeeded and the package is in sys.path.
affects: all
Upgrade
Version history
0.4latest on PyPI · released Sep 8, 2019
Audit
Dependencies
UnRAR shared library (unrar.dll on Windows, libunrar.so on Linux, libunrar.dylib on macOS)requiredRequired at runtime to open and extract archives. Not bundled with the Python package.
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources