Skip to main content

Multi-format archive library based on libarchive

Project description

Archi

Build Status

Multi-format archive library based on libarchive . Forked from pyarchive

Usage

import archi

with open("test.tgz", "rb") as f:
    archive = archi.Archive(f)
for file in archive:
    print(file.filename)
    print(file.read())

Keep in mind that you can't store Entrys, they're freed as soon as the loop moves on to the next or ends. So this won't do:

archi = archi.Archive('file.zip')
files = [f for f in archi]
files[0].filename # Address boundary error !

Changelog

v0.2.0

  • Add support for libarchive's ARCHIVE_FAILED error
  • use PyMem_Malloc & PyMem_Free instead of alloca

v0.1.1

  • Fix binary wheels for macOS

TODO

Project details


Download files

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

Files for archi, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size archi-0.2.0-cp35-cp35m-macosx_10_6_intel.whl (449.9 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp35-cp35m-manylinux2010_i686.whl (1.0 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp35-cp35m-manylinux2010_x86_64.whl (990.1 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp36-cp36m-macosx_10_6_intel.whl (452.3 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp36-cp36m-manylinux2010_i686.whl (1.0 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl (989.9 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp37-cp37m-macosx_10_6_intel.whl (450.6 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp37-cp37m-manylinux2010_i686.whl (1.0 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl (990.9 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl (418.3 kB) File type Wheel Python version cp38 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp38-cp38-manylinux2010_i686.whl (1.0 MB) File type Wheel Python version cp38 Upload date Hashes View hashes
Filename, size archi-0.2.0-cp38-cp38-manylinux2010_x86_64.whl (1.0 MB) File type Wheel Python version cp38 Upload date Hashes View hashes
Filename, size archi-0.2.0.tar.gz (52.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page