Skip to main content

A minizip wrapper - To create a password encrypted zip file in python.

Project description

To create a password encrypted zip file in python.
And the zip file is able to extract in WINDOWS.

This is a simple Minizip wrapper of python.
(http://www.winimage.com/zLibDll/minizip.html)

This software uses zlib.
License: zlib/libpng License.

install zlib

linux:
$ sudo apt-get install zlib
mac:
$ sudo port install zlib

install pyminizip

$ pip install pyminizip

----------------------------------------------------------------------------

Provides three functions.
==============================

pyminizip.compress("/srcfile/path.txt", "file_path_prefix", "/distfile/path.zip", "password", int(compress_level))

Args:
1. src file path (string)
2. src file prefix path (string) or None (path to prepend to file)
3. dst file path (string)
4. password (string) or None (to create no-password zip)
5. compress_level(int) between 1 to 9, 1 (more fast) <---> 9 (more compress) or 0 (default)

Return value:
- always returns None

pyminizip.compress_multiple([u'pyminizip.so', 'file2.txt'], [u'/path_for_file1', u'/path_for_file2'], "file.zip", "1233", 4, progress)
Args:
1. src file LIST path (list)
2. src file LIST prefix path (list) or []
3. dst file path (string)
4. password (string) or None (to create no-password zip)
5. compress_level(int) between 1 to 9, 1 (more fast) <---> 9 (more compress)
6. optional function to be called during processing which takes one argument, the count of how many files have been compressed

Return value:
- always returns None

pyminizip.uncompress("/srcfile/path.zip", "password", "/dirtoextract", int(withoutpath))
1. src file path (string)
2. password (string) or None (to unzip encrypted archives)
3. dir path to extract files or None (to extract in a specific dir or cwd)
4. withoutpath (exclude path of extracted)

Return value:
- always returns None


==============================


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

pyminizip-0.2.4.tar.gz (258.7 kB view details)

Uploaded Source

Built Distribution

pyminizip-0.2.4-cp27-cp27m-macosx_10_14_x86_64.whl (72.5 kB view details)

Uploaded CPython 2.7m macOS 10.14+ x86-64

File details

Details for the file pyminizip-0.2.4.tar.gz.

File metadata

  • Download URL: pyminizip-0.2.4.tar.gz
  • Upload date:
  • Size: 258.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/2.7.15

File hashes

Hashes for pyminizip-0.2.4.tar.gz
Algorithm Hash digest
SHA256 347be4c47d7390fc3265a3ce774fd036d0c85cf1efc9bd1ba5a3b3d28e89b255
MD5 67555627e8360c72b0685fdf32a28ff3
BLAKE2b-256 a2ba00a44b218667e2fef5addf692ae6980eb85ededf5ff9b0d94694a5380bc9

See more details on using hashes here.

File details

Details for the file pyminizip-0.2.4-cp27-cp27m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: pyminizip-0.2.4-cp27-cp27m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 72.5 kB
  • Tags: CPython 2.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/2.7.15

File hashes

Hashes for pyminizip-0.2.4-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b001a5d0383fad73646b2d9db891f42e025c17f43d82ba1d7b75cae7c1ff4360
MD5 4cbb1ce1b9f5f932654dd6807dee724e
BLAKE2b-256 8c33d806c409a3641b0844c59f208ce7b8970a71a14290db9cfa1949355a07d0

See more details on using hashes here.

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