pyzipper


Namepyzipper JSON
Version 0.3.6 PyPI version JSON
download
home_pagehttps://github.com/danifus/pyzipper
SummaryAES encryption for zipfile.
upload_time2022-07-31 09:58:34
maintainer
docs_urlNone
authorDaniel Hillier
requires_python>=3.4
licenseMIT
keywords zip aes encrypt decrypt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            
.. image:: https://img.shields.io/pypi/v/pyzipper.svg
        :target: https://pypi.org/project/pyzipper/
        :alt: Current Version on PyPi

.. image:: https://img.shields.io/pypi/pyversions/pyzipper.svg
        :target: https://pypi.org/project/pyzipper/
        :alt: Supported Python Versions


pyzipper
========

A replacement for Python's ``zipfile`` that can read and write AES encrypted
zip files. Forked from Python 3.7's ``zipfile`` module, it features the same
``zipfile`` API from that time (most notably, lacking support for
``pathlib``-compatible wrappers that were introduced in Python 3.8).

Installation
------------

.. code-block:: bash

   pip install pyzipper


Usage
-----

.. code-block:: python

   import pyzipper

   secret_password = b'lost art of keeping a secret'

   with pyzipper.AESZipFile('new_test.zip',
                            'w',
                            compression=pyzipper.ZIP_LZMA,
                            encryption=pyzipper.WZ_AES) as zf:
       zf.setpassword(secret_password)
       zf.writestr('test.txt', "What ever you do, don't tell anyone!")

   with pyzipper.AESZipFile('new_test.zip') as zf:
       zf.setpassword(secret_password)
       my_secrets = zf.read('test.txt')


AES Strength
------------

The strength of the AES encryption can be configure to be 128, 192 or 256 bits.
By default it is 256 bits. Use the ``setencryption()`` method to specify the
encryption kwargs:

.. code-block:: python

   import pyzipper

   secret_password = b'lost art of keeping a secret'

   with pyzipper.AESZipFile('new_test.zip',
                            'w',
                            compression=pyzipper.ZIP_LZMA) as zf:
       zf.setpassword(secret_password)
       zf.setencryption(pyzipper.WZ_AES, nbits=128)
       zf.writestr('test.txt', "What ever you do, don't tell anyone!")

   with pyzipper.AESZipFile('new_test.zip') as zf:
       zf.setpassword(secret_password)
       my_secrets = zf.read('test.txt')

Documentation
-------------

Official Python ZipFile documentation is available here: https://docs.python.org/3/library/zipfile.html

Credits
-------

The docs skeleton was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/danifus/pyzipper",
    "name": "pyzipper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.4",
    "maintainer_email": "",
    "keywords": "zip aes encrypt decrypt",
    "author": "Daniel Hillier",
    "author_email": "daniel.hillier@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ac/97/2f03c67b40e531b30f0e1357476b4db989097a92cd30c6d2389cfa12db49/pyzipper-0.3.6.tar.gz",
    "platform": null,
    "description": "\n.. image:: https://img.shields.io/pypi/v/pyzipper.svg\n        :target: https://pypi.org/project/pyzipper/\n        :alt: Current Version on PyPi\n\n.. image:: https://img.shields.io/pypi/pyversions/pyzipper.svg\n        :target: https://pypi.org/project/pyzipper/\n        :alt: Supported Python Versions\n\n\npyzipper\n========\n\nA replacement for Python's ``zipfile`` that can read and write AES encrypted\nzip files. Forked from Python 3.7's ``zipfile`` module, it features the same\n``zipfile`` API from that time (most notably, lacking support for\n``pathlib``-compatible wrappers that were introduced in Python 3.8).\n\nInstallation\n------------\n\n.. code-block:: bash\n\n   pip install pyzipper\n\n\nUsage\n-----\n\n.. code-block:: python\n\n   import pyzipper\n\n   secret_password = b'lost art of keeping a secret'\n\n   with pyzipper.AESZipFile('new_test.zip',\n                            'w',\n                            compression=pyzipper.ZIP_LZMA,\n                            encryption=pyzipper.WZ_AES) as zf:\n       zf.setpassword(secret_password)\n       zf.writestr('test.txt', \"What ever you do, don't tell anyone!\")\n\n   with pyzipper.AESZipFile('new_test.zip') as zf:\n       zf.setpassword(secret_password)\n       my_secrets = zf.read('test.txt')\n\n\nAES Strength\n------------\n\nThe strength of the AES encryption can be configure to be 128, 192 or 256 bits.\nBy default it is 256 bits. Use the ``setencryption()`` method to specify the\nencryption kwargs:\n\n.. code-block:: python\n\n   import pyzipper\n\n   secret_password = b'lost art of keeping a secret'\n\n   with pyzipper.AESZipFile('new_test.zip',\n                            'w',\n                            compression=pyzipper.ZIP_LZMA) as zf:\n       zf.setpassword(secret_password)\n       zf.setencryption(pyzipper.WZ_AES, nbits=128)\n       zf.writestr('test.txt', \"What ever you do, don't tell anyone!\")\n\n   with pyzipper.AESZipFile('new_test.zip') as zf:\n       zf.setpassword(secret_password)\n       my_secrets = zf.read('test.txt')\n\nDocumentation\n-------------\n\nOfficial Python ZipFile documentation is available here: https://docs.python.org/3/library/zipfile.html\n\nCredits\n-------\n\nThe docs skeleton was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "AES encryption for zipfile.",
    "version": "0.3.6",
    "split_keywords": [
        "zip",
        "aes",
        "encrypt",
        "decrypt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2db89d5d7cf4d96db8efa39f232fb152e87231fdaa5072229e6517f77a18d9c7",
                "md5": "39e5c2e716404a742f4cefd1e1edba84",
                "sha256": "6d097f465bfa47796b1494e12ea65d1478107d38e13bc56f6e58eedc4f6c1a87"
            },
            "downloads": -1,
            "filename": "pyzipper-0.3.6-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "39e5c2e716404a742f4cefd1e1edba84",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.4",
            "size": 67652,
            "upload_time": "2022-07-31T09:58:31",
            "upload_time_iso_8601": "2022-07-31T09:58:31.945244Z",
            "url": "https://files.pythonhosted.org/packages/2d/b8/9d5d7cf4d96db8efa39f232fb152e87231fdaa5072229e6517f77a18d9c7/pyzipper-0.3.6-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac972f03c67b40e531b30f0e1357476b4db989097a92cd30c6d2389cfa12db49",
                "md5": "9e2c5425b93dd789ecf3264cadc0f12d",
                "sha256": "0adca90a00c36a93fbe49bfa8c5add452bfe4ef85a1b8e3638739dd1c7b26bfc"
            },
            "downloads": -1,
            "filename": "pyzipper-0.3.6.tar.gz",
            "has_sig": false,
            "md5_digest": "9e2c5425b93dd789ecf3264cadc0f12d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.4",
            "size": 31377,
            "upload_time": "2022-07-31T09:58:34",
            "upload_time_iso_8601": "2022-07-31T09:58:34.854404Z",
            "url": "https://files.pythonhosted.org/packages/ac/97/2f03c67b40e531b30f0e1357476b4db989097a92cd30c6d2389cfa12db49/pyzipper-0.3.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-07-31 09:58:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "danifus",
    "github_project": "pyzipper",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "appveyor": true,
    "tox": true,
    "lcname": "pyzipper"
}
        
Elapsed time: 0.04593s