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.0.tar.gz
(251.3 kB
view hashes)
Built Distributions
Close
Hashes for unrar_cffi-0.2.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71c0f21d0ad8b4156bddc1b41873002346bea0df78892ea892014f70d9626819 |
|
MD5 | b5b7842c2bb0febb2305f2b03aaf636b |
|
BLAKE2b-256 | 69a398a112b47976b8b50a7af4241e34c3b3f0a91d4a4160f3a02cdff1ad46cb |
Close
Hashes for unrar_cffi-0.2.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 157e919d26f58218c4b064a213ee6030ec3bf7b3966b6feb4b63531a0a5a8f8f |
|
MD5 | 2c2bc5a29d27d49c4bf07efb10ee9946 |
|
BLAKE2b-256 | 6ef6c438e813d4fab6ef4c33a613735d87d427d0583163c4daf5527ddd746843 |
Close
Hashes for unrar_cffi-0.2.0-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fc4fef5cb5b145f8647cc152cb5052a49a91b54908606fa06d14c58f582e9b7 |
|
MD5 | 96e5492afbabcd1600a588f870fa2a10 |
|
BLAKE2b-256 | 4697c3dc862e5fdb2f348514609a9c0a708532edcebf3847d266a6564a5f00c5 |
Close
Hashes for unrar_cffi-0.2.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbff5f32a7434d4fdaf5d3693304a1546220ead8b4c19e6a8ae14d36f720ac2f |
|
MD5 | 24bc147b91d46a278735a4b6aa5f0574 |
|
BLAKE2b-256 | 3c1344af0330662c255ee363a0f8bf8c1c38a0b90970eb0d53eb0449b48db967 |
Close
Hashes for unrar_cffi-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f83571b70a8b2cb6711f64db7c4dc33be499b7cdb057f097b5683673633af390 |
|
MD5 | 6861399ef6ac3eb6d93ff601b1b2a5f6 |
|
BLAKE2b-256 | d840e388b04bc8e50e75fa7f94ba14327900d16b6a2b0107a3a3899085c7e6fc |
Close
Hashes for unrar_cffi-0.2.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac5626a5895375a71e253b2bf497554eaea6e4f8f0b2a7cfe7fbb7e0c4dc8e3f |
|
MD5 | 21e865b0119554197f9ab7d9684b1d86 |
|
BLAKE2b-256 | 29dacf3f66bb4d414803bdf53094274f5dc300482e7c54844945cb806641f7f4 |
Close
Hashes for unrar_cffi-0.2.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 296fbd50815b9410290cbac0bbb3430b4b5140be5bc75f07a1b9e404df234ac9 |
|
MD5 | 215dfc4138791d9d49185753e90e9253 |
|
BLAKE2b-256 | 5dabe46f7aaa97d68ad6aa7e68fd53daa166c0930c672cd64a1f3c989842f4ba |
Close
Hashes for unrar_cffi-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edd673cfa5d9138fa5b19c31fbf2aa77f22d0251c7faacba9e88083477954fbb |
|
MD5 | 7c08623a40b01a80444c2e4464eeef2d |
|
BLAKE2b-256 | 7c69df0b70743a8b01b9c15376554820582e2d83595429a23facb9b9ce611ede |
Close
Hashes for unrar_cffi-0.2.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 141fad6942a6503c605d154785d015e7f54875d1786c3b1f572fa6fa577bac69 |
|
MD5 | b1048c1eebafb2abcc1d72476cf531be |
|
BLAKE2b-256 | 4c80308d685fdabe3f6505cc68150dfe90e282a04400f368fb340d2af10a2e20 |
Close
Hashes for unrar_cffi-0.2.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52edb4847b24ea9b694d1f8b423dfd44061dfbd4818def16b4f6ad26af56c978 |
|
MD5 | dd44fd4a9f0d193994d28602ccee1ce5 |
|
BLAKE2b-256 | f14c120cb2133ff2b59cbda0d5172ad882e1a48c69fb99f92c4d6ef3217b006b |
Close
Hashes for unrar_cffi-0.2.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b630dd60b25c501db16d37b03f4f8b7c516001eb7ec6f088903b7517f2f2541a |
|
MD5 | 2abe6264f0c583e5c332a9feacf44727 |
|
BLAKE2b-256 | 09a3c8294885661dc570cbe5547c9a7f6773300caf04cbed6301d5d3aab5c4d9 |
Close
Hashes for unrar_cffi-0.2.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31b44a7a0baa5b1bdfc5428af0df0f6ec3bf5d8e75bafb183becc395342bc33b |
|
MD5 | 7e5b7d5829e22f3ed76caed380901672 |
|
BLAKE2b-256 | 6804068fe71fd5c1a8da7cc3a031aecb6b1662822d3c5277e06e21723208ca6f |
Close
Hashes for unrar_cffi-0.2.0-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 558b0579cd5b9e4e990939679168ffcfa359c16cdd259d73ec09048a593660ae |
|
MD5 | 0bca460930b5f13a23c96d7fa5486f08 |
|
BLAKE2b-256 | 8d323b21f1fccc5dcc1417ef88af15900b5d0a870f418199a7a4c3e85a4c9897 |