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.2a1.tar.gz (244.1 kB view details)

Uploaded Source

Built Distributions

unrar_cffi-0.2.2a1-cp39-cp39-win_amd64.whl (183.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

unrar_cffi-0.2.2a1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (196.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

unrar_cffi-0.2.2a1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (189.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

unrar_cffi-0.2.2a1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (194.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

unrar_cffi-0.2.2a1-cp38-cp38-win_amd64.whl (183.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

unrar_cffi-0.2.2a1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (196.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

unrar_cffi-0.2.2a1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (189.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

unrar_cffi-0.2.2a1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (194.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.5+ i686

unrar_cffi-0.2.2a1-cp37-cp37m-win_amd64.whl (183.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

unrar_cffi-0.2.2a1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (195.8 kB view details)

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

unrar_cffi-0.2.2a1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (189.2 kB view details)

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

unrar_cffi-0.2.2a1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl (194.1 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.5+ i686

unrar_cffi-0.2.2a1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (195.8 kB view details)

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

unrar_cffi-0.2.2a1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (189.2 kB view details)

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

unrar_cffi-0.2.2a1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl (194.1 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.5+ i686

unrar_cffi-0.2.2a1-cp36-cp36m-macosx_10_12_x86_64.whl (153.4 kB view details)

Uploaded CPython 3.6m macOS 10.12+ x86-64

unrar_cffi-0.2.2a1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (189.2 kB view details)

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

unrar_cffi-0.2.2a1-cp35-cp35m-manylinux_2_5_i686.manylinux1_i686.whl (194.0 kB view details)

Uploaded CPython 3.5m manylinux: glibc 2.5+ i686

File details

Details for the file unrar-cffi-0.2.2a1.tar.gz.

File metadata

  • Download URL: unrar-cffi-0.2.2a1.tar.gz
  • Upload date:
  • Size: 244.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.1 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.7

File hashes

Hashes for unrar-cffi-0.2.2a1.tar.gz
Algorithm Hash digest
SHA256 6e60c0e44138c3fd1e90f930bac3a8996554cbf88824ab3823957771d51255f2
MD5 bcc236f14efe64690169a8644be03669
BLAKE2b-256 ae311f5a972749fdc70f344a35e58103ee543dcb2f3e1e753e4e0a9e9477c115

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.2a1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 183.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.1 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for unrar_cffi-0.2.2a1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 878d9f386aef6a691f21bf1f62a1893ef1c119fbf316f4f8f75051391222c63b
MD5 44dc2af064d9316e3f73d8b8fe8c832b
BLAKE2b-256 fc250c4eaede6020afa80af414f3d5bb8236e0fa144c94fa4cf5d316d74f147f

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 53c78308a5e1ea881670dd289bdd1b69cf1a5be712a323e1d27b411f4f162a47
MD5 ea39530ed96ddf20f5b6180567d308f0
BLAKE2b-256 f18994cec1f249ec70d9e2aff264c9a95af7386fa7d96896c0a38c4aa659c996

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 062df9e61fd0ef1a96af4494eb5584073511b20319e022a1e59cf5f2cf1b1db7
MD5 d58704ad8c9f18c573a05f39e4789c1e
BLAKE2b-256 e62fb89e0eb21dbb29d602f26c17e7c7befa09c0ec8ba01ce3dbf83ae983c948

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 06da2d761cda0b88b514c57569efa559056388a1140aef05a46b64eca1232746
MD5 334da114bffd6a45e4ccf893dfec5283
BLAKE2b-256 35f2d369e187943b41c3ff1a5c4d0f6903337050e5602f4047ea9896b2ee8e0a

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.2a1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 183.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.1 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for unrar_cffi-0.2.2a1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c4b4fdf087aead2242977811c873a8fac581b250b64d15eb4e1f69da1e4624a2
MD5 1005b1b16ec4908b461a13d113ebfa4a
BLAKE2b-256 29db763ccce7aa0e8d1da4c73c10e0b2dd4aa7e928818ad81c6e15a344aaec6a

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a9479bc59fcbab0a8b20427d775a88c5cf7032ba33b27a289cccc35e930afbfd
MD5 bf000116a818d01ee4be384f3daa60bd
BLAKE2b-256 62cb4d0c5ea9d3bf21805529bea63753af76fb0f5e8b962ae5a8893e6e8ec75e

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c3b72a62d6f9c98ae75feb3359efcf8c51e58378c004ef636fabd175b716800b
MD5 4f4f2839682c12bdbdfbf365edca35b2
BLAKE2b-256 e518d21ffd3562449381eb26ac0d87445802c401777a40eee78829d35dfc65e6

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 90a8453133d1e7af739332c000a2d3457de5cc639f2ec6e812e16f0d203d2379
MD5 26f1c95684d1d931c475d58ccf1934b9
BLAKE2b-256 51e8b8399788d05600f8eed98dfb9dda83c50d2faae2551bc6c266787b2a9f74

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.2a1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 183.8 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.1 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.8

File hashes

Hashes for unrar_cffi-0.2.2a1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 11dee6f9a73b5906397673a89e4b96abd04b681d7445557e3377aed93985417e
MD5 97aaa3ee5127a138f9c5b63e5c72b6e8
BLAKE2b-256 7ce90e641015ad392ab86383e506c83c4403c3aef7c53739a2b11b691ca1150c

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 35123cdd6091e2c0004c741b988395e514a82c243b6825e3f376ad77a471d6cc
MD5 869f296183c2647e7bc50d0fe059c266
BLAKE2b-256 98661ef54c561a8de115a9ee5d49fa874e238aa28570ba932d9eaa1ef9d51124

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a3bc81769b5f2cc9768105ebcebb27c24efd93b1ff12724b31171fd33fc615b4
MD5 03c7d9eac79b6a7f26730fb14de49dbc
BLAKE2b-256 275a58e9d7f944daa72c37ab571a626ff14377ed1a12c6d585ca731118fa3469

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 484b4926cf9595d96ed3947d47dd48906b6c34f89ab2769676f4b8815f70c22c
MD5 1d95aec0c182512e698896da77234884
BLAKE2b-256 1c41a70d2d81d037fed58e4f3ac2116307cf5bcba52d0e98a2e34a25a23015d3

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ce8e190ae540a2c77863c1d25933616b204fa380204912d1f073d3a4c97d0d4b
MD5 03879782e07511d555a151f4b6884cc7
BLAKE2b-256 a3132ae79966e4b4b4af4036369fd3f1017bd3aef664b4d4f1f7978f7fb832b4

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9f5ff4b883a9cfc947f0d2a3ea35ad0b7fa6704763280781802dcada998198b9
MD5 8d68170b9ff533f22c8cff746e0140bb
BLAKE2b-256 de259fc7bc9d1ad08543eb64faee7dabe268583911b641ed22f9507037dfd41a

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 e68fc10e43b5e930205fa07ef8b956a2c26fc381c0fc234b23aef33aa5d226da
MD5 a057a063572448c426f0b12abe69ffa6
BLAKE2b-256 07608fd79c0f928a3e5f51d48dbc841354be7b01226a9d45c083d7818bcd7e6f

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp36-cp36m-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: unrar_cffi-0.2.2a1-cp36-cp36m-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 153.4 kB
  • Tags: CPython 3.6m, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.1 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.3

File hashes

Hashes for unrar_cffi-0.2.2a1-cp36-cp36m-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1f732952df0303897dddc285fd7ae7ddcb9faf2c869181a212e7009f3ee0d225
MD5 d156b95535c1c2d945903f8524025908
BLAKE2b-256 3431632dc215c88b2ffd6da2efd47bb440ae697378d9db1e63ac7c8144a61788

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ae236cf3f126ccfce256ad0ef4d04619bd5f7c60b4c951192694d65267f71dea
MD5 fb857e1ea0dd6bf249848fa1250ad3c4
BLAKE2b-256 60814fb9a5869fe87c6cf10404dc9568e862ffb5cbf6d378a1ca2fa083568925

See more details on using hashes here.

File details

Details for the file unrar_cffi-0.2.2a1-cp35-cp35m-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for unrar_cffi-0.2.2a1-cp35-cp35m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 81f298efa189cd91ac1b0d5fd46ef5777aac6fd231e61748dab98cf49322738d
MD5 60841e43e0286e927a495eed0f812411
BLAKE2b-256 c0b7f94227815612dfe87aa936288f9710566008239437bfe3db8a1a94daf001

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