{"id":6059,"library":"pyminizip","title":"Pyminizip","description":"Pyminizip is a Python wrapper for the minizip library, designed specifically to create password-encrypted ZIP files. It also provides functionality to uncompress these password-protected archives. The current version is 0.2.6. The project appears to be in maintenance mode with infrequent updates, as its last release was in December 2021.","status":"maintenance","version":"0.2.6","language":"en","source_language":"en","source_url":"https://github.com/smihica/pyminizip","tags":["zip","compression","encryption","password","archive","minizip"],"install":[{"cmd":"pip install pyminizip","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"symbol":"pyminizip","correct":"import pyminizip"}],"quickstart":{"code":"import pyminizip\nimport os\n\n# Create dummy files for demonstration\nwith open(\"file1.txt\", \"w\") as f:\n    f.write(\"This is file one.\")\n\nzip_filename = \"my_archive.zip\"\npassword = \"supersecretpassword\"\nextract_dir = \"extracted_files\"\n\n# 1. Compress a single file with password\npyminizip.compress(\n    \"file1.txt\",\n    None, # Prefix path (None to use relative path)\n    zip_filename,\n    password,\n    5 # Compression level (0 for default, 1-9 for speed/compression balance)\n)\nprint(f\"'{zip_filename}' created with password protection from 'file1.txt'.\")\n\n# 2. Extract the password-protected zip\nos.makedirs(extract_dir, exist_ok=True)\npyminizip.uncompress(\n    zip_filename,\n    password,\n    extract_dir,\n    0 # Not specifying 'withoutpath'\n)\nprint(f\"'{zip_filename}' uncompressed to '{extract_dir}'.\")\n\n# Clean up dummy files and directories\nos.remove(\"file1.txt\")\nos.remove(zip_filename)\nos.remove(os.path.join(extract_dir, \"file1.txt\"))\nos.rmdir(extract_dir)\n\nprint(\"Cleanup complete.\")","lang":"python","description":"This quickstart demonstrates how to compress a single file into a password-protected ZIP archive and then uncompress it using `pyminizip`."},"warnings":[{"fix":"Install 'Microsoft C++ Build Tools' from Visual Studio's website or via the Visual Studio Installer if on Windows.","message":"On Windows, `pyminizip` often requires Microsoft Visual C++ 14.0 or greater (i.e., MSVC build tools) to compile during installation, as it is a C extension wrapper. Installation via `pip` may fail without these tools installed.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Be aware of the project's maintenance status. Consider auditing the codebase for security vulnerabilities or contributing fixes if critical issues arise.","message":"The project is explicitly marked as 'Inactive' in terms of maintenance, with no new versions released in the past 12 months (as of February 2026, last release was Dec 2021) and limited community activity. This indicates a potential lack of ongoing development, security updates, or bug fixes.","severity":"gotcha","affected_versions":"0.2.6 and possibly earlier"},{"fix":"Avoid using non-ASCII characters in file paths for compression or decompression with `pyminizip`, especially on Windows.","message":"Users have reported issues with non-ASCII characters (e.g., Chinese filenames) in file paths leading to errors, especially on Windows platforms, due to encoding challenges in the underlying C library wrapper.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure that the `pyminizip` package is built or installed in an environment with a GLIBC version compatible with your deployment target. Building from source in the target environment or using a compatible base image in containers might resolve this.","message":"On Linux environments, `pyminizip` may encounter `ImportError` due to 'GLIBC_2.33' (or similar) not found errors. This typically indicates a mismatch between the GLIBC version used to compile the library and the GLIBC version available on the target system, common in containerized or diverse Linux environments.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use with caution in production environments, and thoroughly test for stability. Be prepared for potential breaking changes or unexpected behavior.","message":"Despite reaching version 0.2.6, the PyPI classifiers for `pyminizip` indicate its development status as '3 - Alpha'. This suggests the maintainer considers the project to be in an early, experimental stage, implying potential instability or API changes without strict adherence to semantic versioning.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z","problems":[]}