Skip to main content

Read RAR file from python -- cffi edition

Project description

Build Status

unrar-cffi -- Work with RAR files.

Description

unrar-cffi is a python extension that exposes unrar library functionality through a zipfile-like interface.

Features

The package implements the following RarFile functions:

  • namelist()
  • infolist()
  • getinfo()
  • read()
  • open()
  • testrar()
  • rarfile.is_rar_file()

Usage

  1. Install with PIP:

    pip install unrar-cffi

  2. Use from code:

    from unrar.cffi import rarfile

    rar = rarfile.RarFile('sample.rar')

    assert rar.testrar() == None

    for filename in rar.namelist():
        info = rar.getinfo(filename)
        print("Reading {}, {}, {} bytes ({} bytes compressed)".format(info.filename, info.date_time, info.file_size, info.compress_size))
        data = rar.read(filename)
        print("\t{}...\n".format(data[:100]))

Build

Requirements

Linux:

  • gcc compiler suite (build-essential packages should be enough)
  • docker (only for buildmanylinux)

Windows:

  • VS2017 Build Tools (PLATFORM_TOOLSET=v141)
  • Visual C++ compiler suite

Compile and test

  1. ./build.sh init
  2. ./build.sh build
  3. ./build.sh test

If you have docker installed, you can build all the manylinux wheels:

  1. ./build.sh within [manylinux docker image] buildmanylinux
  2. ./build.sh within [manylinux docker image] testmanylinux

By deafult the image quay.io/pypa/manylinux2010_x86_64 will be used. Use $DOCKER_IMAGE and $PLAT variables to customize the build.

Project details


Download files

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

Source Distribution

unrar-cffi-0.2.0.tar.gz (251.3 kB view details)

Uploaded Source

Built Distributions

unrar_cffi-0.2.0-cp38-cp38-manylinux2010_x86_64.whl (195.9 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

unrar_cffi-0.2.0-cp38-cp38-manylinux1_x86_64.whl (189.6 kB view details)

Uploaded CPython 3.8

unrar_cffi-0.2.0-cp38-cp38-manylinux1_i686.whl (194.4 kB view details)

Uploaded CPython 3.8

unrar_cffi-0.2.0-cp37-cp37m-win_amd64.whl (183.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

unrar_cffi-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl (195.3 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

unrar_cffi-0.2.0-cp37-cp37m-manylinux1_x86_64.whl (189.2 kB view details)

Uploaded CPython 3.7m

unrar_cffi-0.2.0-cp37-cp37m-manylinux1_i686.whl (194.0 kB view details)

Uploaded CPython 3.7m

unrar_cffi-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl (195.3 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

unrar_cffi-0.2.0-cp36-cp36m-manylinux1_x86_64.whl (189.2 kB view details)

Uploaded CPython 3.6m

unrar_cffi-0.2.0-cp36-cp36m-manylinux1_i686.whl (194.0 kB view details)

Uploaded CPython 3.6m

unrar_cffi-0.2.0-cp35-cp35m-manylinux2010_x86_64.whl (195.7 kB view details)

Uploaded CPython 3.5m manylinux: glibc 2.12+ x86-64

unrar_cffi-0.2.0-cp35-cp35m-manylinux1_x86_64.whl (189.2 kB view details)

Uploaded CPython 3.5m

unrar_cffi-0.2.0-cp35-cp35m-manylinux1_i686.whl (194.0 kB view details)

Uploaded CPython 3.5m

File details

Details for the file unrar-cffi-0.2.0.tar.gz.

File metadata

  • Download URL: unrar-cffi-0.2.0.tar.gz
  • Upload date:
  • Size: 251.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar-cffi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1bf646219b45b0cb95bd15346858920cdc92daa4eb26354a39f205cc33b3a5e8
MD5 fe3029e1ea53b2371ac0e2a81b468987
BLAKE2b-256 2927dc8bf9777a601521a95d1fad9dd12d32e9dce6c220fd0dd9af0b84be1602

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 195.9 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 71c0f21d0ad8b4156bddc1b41873002346bea0df78892ea892014f70d9626819
MD5 b5b7842c2bb0febb2305f2b03aaf636b
BLAKE2b-256 69a398a112b47976b8b50a7af4241e34c3b3f0a91d4a4160f3a02cdff1ad46cb

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 189.6 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 157e919d26f58218c4b064a213ee6030ec3bf7b3966b6feb4b63531a0a5a8f8f
MD5 2c2bc5a29d27d49c4bf07efb10ee9946
BLAKE2b-256 6ef6c438e813d4fab6ef4c33a613735d87d427d0583163c4daf5527ddd746843

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp38-cp38-manylinux1_i686.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 194.4 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 5fc4fef5cb5b145f8647cc152cb5052a49a91b54908606fa06d14c58f582e9b7
MD5 96e5492afbabcd1600a588f870fa2a10
BLAKE2b-256 4697c3dc862e5fdb2f348514609a9c0a708532edcebf3847d266a6564a5f00c5

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 183.7 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.8

File hashes

Hashes for unrar_cffi-0.2.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 dbff5f32a7434d4fdaf5d3693304a1546220ead8b4c19e6a8ae14d36f720ac2f
MD5 24bc147b91d46a278735a4b6aa5f0574
BLAKE2b-256 3c1344af0330662c255ee363a0f8bf8c1c38a0b90970eb0d53eb0449b48db967

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 195.3 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f83571b70a8b2cb6711f64db7c4dc33be499b7cdb057f097b5683673633af390
MD5 6861399ef6ac3eb6d93ff601b1b2a5f6
BLAKE2b-256 d840e388b04bc8e50e75fa7f94ba14327900d16b6a2b0107a3a3899085c7e6fc

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 189.2 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ac5626a5895375a71e253b2bf497554eaea6e4f8f0b2a7cfe7fbb7e0c4dc8e3f
MD5 21e865b0119554197f9ab7d9684b1d86
BLAKE2b-256 29dacf3f66bb4d414803bdf53094274f5dc300482e7c54844945cb806641f7f4

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 194.0 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 296fbd50815b9410290cbac0bbb3430b4b5140be5bc75f07a1b9e404df234ac9
MD5 215dfc4138791d9d49185753e90e9253
BLAKE2b-256 5dabe46f7aaa97d68ad6aa7e68fd53daa166c0930c672cd64a1f3c989842f4ba

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 195.3 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 edd673cfa5d9138fa5b19c31fbf2aa77f22d0251c7faacba9e88083477954fbb
MD5 7c08623a40b01a80444c2e4464eeef2d
BLAKE2b-256 7c69df0b70743a8b01b9c15376554820582e2d83595429a23facb9b9ce611ede

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 189.2 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 141fad6942a6503c605d154785d015e7f54875d1786c3b1f572fa6fa577bac69
MD5 b1048c1eebafb2abcc1d72476cf531be
BLAKE2b-256 4c80308d685fdabe3f6505cc68150dfe90e282a04400f368fb340d2af10a2e20

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 194.0 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 52edb4847b24ea9b694d1f8b423dfd44061dfbd4818def16b4f6ad26af56c978
MD5 dd44fd4a9f0d193994d28602ccee1ce5
BLAKE2b-256 f14c120cb2133ff2b59cbda0d5172ad882e1a48c69fb99f92c4d6ef3217b006b

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 195.7 kB
  • Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b630dd60b25c501db16d37b03f4f8b7c516001eb7ec6f088903b7517f2f2541a
MD5 2abe6264f0c583e5c332a9feacf44727
BLAKE2b-256 09a3c8294885661dc570cbe5547c9a7f6773300caf04cbed6301d5d3aab5c4d9

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 189.2 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 31b44a7a0baa5b1bdfc5428af0df0f6ec3bf5d8e75bafb183becc395342bc33b
MD5 7e5b7d5829e22f3ed76caed380901672
BLAKE2b-256 6804068fe71fd5c1a8da7cc3a031aecb6b1662822d3c5277e06e21723208ca6f

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.0-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: unrar_cffi-0.2.0-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 194.0 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.7

File hashes

Hashes for unrar_cffi-0.2.0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 558b0579cd5b9e4e990939679168ffcfa359c16cdd259d73ec09048a593660ae
MD5 0bca460930b5f13a23c96d7fa5486f08
BLAKE2b-256 8d323b21f1fccc5dcc1417ef88af15900b5d0a870f418199a7a4c3e85a4c9897

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page