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.1.tar.gz
(244.2 kB
view hashes)
Built Distributions
Close
Hashes for unrar_cffi-0.2.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c49fdb73887c30d86edc6e1060dd268fca7bf1590347b1a04fd539fd565aac1 |
|
MD5 | f9a16d29fd26227a2f8392c060716af7 |
|
BLAKE2b-256 | f5e41f3d02d8a40a927a05bc09149de52b2b6eb0c0c24d4b94121e7fed9aafcf |
Close
Hashes for unrar_cffi-0.2.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4fb03d2e684c8f064989c1db70fc06c0994d049cf8a9c3debcabcad2c9bccd0 |
|
MD5 | 5d03379bff15e4a907ecd4f5a2298807 |
|
BLAKE2b-256 | 3834a7c8aaa53668db407f1feeb73c7d12ce9ae992c32d66886d0d6779afbcff |
Close
Hashes for unrar_cffi-0.2.1-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9afef4b78636723da1b75cbce1faca7fb5e2c901c1b251c8344800a94b5d161 |
|
MD5 | c4c76fd93be9f7830fdc003af45b03bd |
|
BLAKE2b-256 | 22f59ef7cd08629f00e1e1d390293135328b2806086686880341e3b889270710 |
Close
Hashes for unrar_cffi-0.2.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70ba66aabe39428b9a1b7e4368268abf7bf0ea478f690f1af0f0d188ca8d9d5d |
|
MD5 | 953fb36e71b7ec884034e3056036f733 |
|
BLAKE2b-256 | 9367e5815d23f7d8bd11f875287c31e69eefd8c6adca0b6f34c20c785cb1f31e |
Close
Hashes for unrar_cffi-0.2.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18e80d9ecd9c37530a503c54b47bf5d4f493164342120939898c8a83ea76a6a8 |
|
MD5 | 7500e713b885fdc68c89ebcbdb445936 |
|
BLAKE2b-256 | 21e89352d4de751591b7d1b8616181db135f2166bd0341a5a7659b827467d364 |
Close
Hashes for unrar_cffi-0.2.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14e935f0135ce60721c9b046249bba186b2d014df2f31aeaa0022f77326956ad |
|
MD5 | 60e8098ff288fd927a43dc1bd84e45a3 |
|
BLAKE2b-256 | 260d8fd0a07e68888fb4d4f84581ac3696b78bba2150dc3e53b1cfa4e2f4d77d |
Close
Hashes for unrar_cffi-0.2.1-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e9b40caabe2192742eb08d923b91739ce8629c0cf7d84bdfeb7cfa52dd0f4ec |
|
MD5 | f0eca9afd8b13a51b1e52020d06e57bb |
|
BLAKE2b-256 | 7777138c7daa8a97e61f212e0436f20b7380550f7166fd4ee0d8c9df30606ae8 |
Close
Hashes for unrar_cffi-0.2.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abcf0562e050c98069fdbe82bd9951ba46cf1108509cc7322bb04f6db97c4fae |
|
MD5 | fb4c3bc323bbe20bda4379e2cd6c19d5 |
|
BLAKE2b-256 | 1ac2d47e253a30e9b3ea95dd5026545b4030c34383cd4ab1cf0b9de0c2c3afd2 |
Close
Hashes for unrar_cffi-0.2.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1843feedfb52b28e1fda4259f4064731b8e4704ff8f834eee2d83cab9cb7b3d |
|
MD5 | 01e94f3fdc488b99e0173e75aa04d9c9 |
|
BLAKE2b-256 | d9b19de5d6168c7d79a029c8b80d8e3728758fd4c619bc4253561b469e701fde |
Close
Hashes for unrar_cffi-0.2.1-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d119ffe105918e8faf774cbf926efd847b3657b574165f79ecdeaa0e165a2564 |
|
MD5 | 61bcd5c1fbcf3e180e97e383dc8aa0a1 |
|
BLAKE2b-256 | bdb1309edbe09024d631c1cf98967abbea6e25e84bdd8ca52f1c9c62a0a77f8a |
Close
Hashes for unrar_cffi-0.2.1-cp36-cp36m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bc5777a5f1195483afcbe0348ae2d6268d76b422a7591843167c4da97f73665 |
|
MD5 | f0eb3834dc815bea42879f79a77133e4 |
|
BLAKE2b-256 | 39d4432e8b3b2f83b7e01f13e9461d27c2908820fd4d59a7939d61cac3573ee7 |
Close
Hashes for unrar_cffi-0.2.1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a49621fd72a35cf7b526d3bf0e92e18e39ae6a9bf4b4f203bc2e5679bab20fd |
|
MD5 | 7d9d4e1362548646a3faae7eb13950ec |
|
BLAKE2b-256 | 5a1d4b286276b0098110190de949c6c3de1413da1e8fd791a5308c9206cfc41d |
Close
Hashes for unrar_cffi-0.2.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0b272e9c0feac4eb26e87be712cac98594dd858fb1956b358122e5acf2c9f7e |
|
MD5 | 1991af5c04eb5caed2cf1546c4586460 |
|
BLAKE2b-256 | c1f6fa0da38357b86d300ba741c3ed8550997f07b4155a8abe2da0f4c0834bd3 |
Close
Hashes for unrar_cffi-0.2.1-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93c772c9a91e311cbeefe648079d54bcb90242f14b841b9da59421ba15f4cd00 |
|
MD5 | a9fa1956dfab6617a5412b0489f3c3d2 |
|
BLAKE2b-256 | 1fcd88e9c67ea468137e520bd001df4db8926a3283472b0bde230f512c573223 |