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
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
Built Distribution
Close
Hashes for jetar-zip-0.0.4.linux-armv7l.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed96dd59c2b68f480c0f3e230c895b7772cf0fadd6ffb5b3d5da02aefc2530fa |
|
MD5 | 3e49056c9970b49ab2d830b734273cfc |
|
BLAKE2b-256 | 2e35c5275b11ba4ff39d9ac41b1f8cf9ec332dab221b94aa37070bed71bcdfdd |
Close
Hashes for jetar_zip-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41cdd4f25eb83a8f76578363e5a0cb421d980d17dc368c6c1f28a1727e213a09 |
|
MD5 | dfa2566cfcf89c12994a69e9f7aab1b9 |
|
BLAKE2b-256 | 74cf03702e4911903c7021856dc6c7f20d09874521c9efa8913788c659096af9 |