Skip to main content

A zip/tar file saver for cache

Project description

jezip-tar

A package for save zip/tar file in memory buffer(not write in file)

Usage:

from jezt import ZipFile MyZip = ZipFile()  
# The Type of the ZipFile:  
# MyZip = ZipFile(ZipFile.BZIP) BZIP, LZMA, DELATED, STORED(default DEFLATED)  
MyZip.add('fn1', 'bytes or str') MyZip.get('fn1')  
# 'bytes or str' MyZip.addf('myfile.txt')  
MyZip.get('myfile.txt') # The content of the file  
# Save the zip file  
import io  
bf = io.BytesIO() # Also can be io.FileIO(filename, 'wb')  
MyZip.flush(bf)  
# if there's no IO given, return a BytesIO object  
bf.getvalue()  # The content of the file The TarFile is the same  

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

jetar-zip-0.0.4.linux-armv7l.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

jetar_zip-0.0.4-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

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