Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Wrapper for UnRAR library, ctypes-based.

Project description

Work with RAR archive files through unrar library using ctypes.


Install UnRAR library

You can download UnRAR library sources (and/or binaries) from:

and compile (you may need to rename the makefile that you want to use according to your OS) and install it from there:

$ make lib

$ make install-lib

For Windows you can also download the already compiled library (

If you prefer not to install the library, you should make it “findable” by adding the library file to a directory where libraries are searched (or change required environment variable).

As an alternative, you can also set an UNRAR_LIB_PATH variable in your environment pointing to the library path and python-unrar will try to load the UnRAR library from there.

Install python-unrar

To install python-unrar:

$ pip install unrar


  • Added open/read methods to RarFile, extracting data into memory.
  • Added support for callbacks on unrar events.
  • Added Python 3 support and fixed some unicode issues.


>>> from unrar import rarfile
>>> rar = rarfile.RarFile('sample.rar')
>>> rar.namelist()
>>> rar.printdir()
File Name                                             Modified             Size
test_file.txt                                  2013-04-14 08:20:28           17
>>> rar.testrar()
>>> info = rar.infolist()[0]
>>> info.filename
>>> info.file_size
>>> info.date_time
(2013L, 4L, 14L, 8L, 20L, 28L)
'This is for test.'
>>> rar.extractall()

Project details

Release history Release notifications

This version
History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
unrar-0.3.tar.gz (33.9 kB) Copy SHA256 hash SHA256 Source None Feb 17, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page