Read RAR file from python -- cffi edition
Project description
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
-
Install with PIP:
pip install unrar-cffi
-
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
./build.sh init
./build.sh build
./build.sh test
If you have docker installed, you can build all the manylinux wheels:
./build.sh within [manylinux docker image] buildmanylinux
./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
Release history Release notifications | RSS feed
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.1a1.tar.gz
(244.3 kB
view hashes)
Built Distributions
Close
Hashes for unrar_cffi-0.2.1a1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b46c754212a1a60f4c1b3d87b77598c4927cf0f49ee7a83fb47e3da85d505822 |
|
MD5 | 48b2056c715dd9ba7bf37a918419092c |
|
BLAKE2b-256 | e7bac269791e4a3ed9045be03cb6c55b454a7270a0f35804acbb0c1a1b25da8d |
Close
Hashes for unrar_cffi-0.2.1a1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3397bf9cbd8c2d329ab951ec9fe74d0e87e541812d47bcfc6b4e1956d678af00 |
|
MD5 | 505669ab5629a55a34c4bddd5a09cf89 |
|
BLAKE2b-256 | e9adf3101fe041fe6873ee1991bf669b36adbd59037056d918d25ddc36f1685d |
Close
Hashes for unrar_cffi-0.2.1a1-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6b63c124085600d54b4cdcad45353a0a97781790e53653efab6e5a2da4fab25 |
|
MD5 | 7c0bf8e9c7db5773d8930e33db0c5b49 |
|
BLAKE2b-256 | c0314eb8de165c7fc4f1e0d206efed6b07f12c1face119af3f2689cca40fa458 |
Close
Hashes for unrar_cffi-0.2.1a1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc5b4f27fca5d2c0a61f8d7cfec49ad88382300d28a92c368fd1ca2da3ec71c5 |
|
MD5 | 60354e4153644b98a65979cb2258d029 |
|
BLAKE2b-256 | feadb7d1aba2ab0af6613b04abeaa3f7a608734706d022f0b2ff5d1c0119f109 |
Close
Hashes for unrar_cffi-0.2.1a1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 927fe689c6b0acdf53c21d3412fac30e55542afc5354caf0fd4f0c02ecda2b02 |
|
MD5 | 8652ae44bf0fa0146aeb1fac4ee118bd |
|
BLAKE2b-256 | f1a6779c4add0e28bba4915763a78b41fd9b77f68c0170e1e9b1677bee790d47 |
Close
Hashes for unrar_cffi-0.2.1a1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed7e4178e77b3864fc58d6699a181e8f7c81dd22d574caa881df417e672adef8 |
|
MD5 | e6df3ff0cb9375c924f7186f6b0ed31e |
|
BLAKE2b-256 | 14bad68cb3da54b4fc35fe6648731eaf6492f7ad2144e64b72bfb529dbffcea2 |
Close
Hashes for unrar_cffi-0.2.1a1-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39ca858f47b48d3c0458622ef1fb64c25bea6501654c9bc5744dffda0c18799b |
|
MD5 | 0bb7a3ca3bc5862244260a64481e5160 |
|
BLAKE2b-256 | 2118f18454bd63846a1a4fa3d602475cf1d8202db8f3ebdb9f11a77308fb6a25 |
Close
Hashes for unrar_cffi-0.2.1a1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2dbb1b869924d6c209f7bb1ea16fd71fc43b256f691f320e2074a04ea240676 |
|
MD5 | ae6c375814421942c4cdf07cf7653379 |
|
BLAKE2b-256 | 477d0eff4399cbde2b20ce981bf3ac67db2a89401091d9f0427068938f8b356c |
Close
Hashes for unrar_cffi-0.2.1a1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2c688473c12634ec91831941e41b8bf3674c893f4a94b5fb46577d1a750c02e |
|
MD5 | a09cc59c5549d80b2603984fbb41758a |
|
BLAKE2b-256 | 434399f2107a5ea7a9b3b550e75c306b9590394a8ae05873299dcb3a6adcb360 |
Close
Hashes for unrar_cffi-0.2.1a1-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6dfb29c27ca3fe83f2ee0178be841c67495370abb39c542bca34634eb5ff84c |
|
MD5 | 3d5a284eebda06bc8fb34e6bcce872a3 |
|
BLAKE2b-256 | 5f227cbd273f6aa25081e1fe96020e57be35654ee3205fe0c061553c08e1dac6 |
Close
Hashes for unrar_cffi-0.2.1a1-cp36-cp36m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60117cc16638286eae07685fbf45cafe8c359335a8d7ce8419fb2d187534fcec |
|
MD5 | 372d99538d05fa68c17c6f66772ce98f |
|
BLAKE2b-256 | c358f53eb288e5c88b6b3fce40d7f74e0d71ce42f91beec63f3bdf2c9d59e8a1 |
Close
Hashes for unrar_cffi-0.2.1a1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 798ace2bda1353ee3334a45fe8cce52d3cfac2c736674e1d1d93f91f9fda592a |
|
MD5 | dace10139f77ec66e01efb54d1e91fc0 |
|
BLAKE2b-256 | feb4f9e0897daec61f5fdb3886ab1944f937d5d38ca21506e5d9933f39fb4c21 |
Close
Hashes for unrar_cffi-0.2.1a1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21e91032139a3f23d242075a240a00e652a876bf2d4a7db66ecf9557d832f7c6 |
|
MD5 | 4d6270d5963768243b321f90efd15c07 |
|
BLAKE2b-256 | 51873349fa1f06382e73fa1278bc63f7a5030c9c92c71d1dad2c262235507fa5 |
Close
Hashes for unrar_cffi-0.2.1a1-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29b65d6d24443ca72cf1f04587e9c35cdac7809a3900a8b776619741393ce0c6 |
|
MD5 | b7c2a32a51da1bfdde0adf7f6b0b2fc7 |
|
BLAKE2b-256 | 88cc66500bec29b4f657421c95fd23fc51e8f13c7cc1f5a7378a4fe8627fed4f |