Skip to main content

A package for encrypting files with a password.

Project description

Description

pydlock is a simple Python package for encrypting and decrypting files. It can be used either as a package imported into other Python modules or as a command line script.

Installation

pydlock is available on the Python Package Index (PyPI) at https://pypi.org/project/pydlock. To install pydlock, simply use the Python pip installer:

pip install pydlock

Usage

From the command line

To access the help method of the script:

user@computer:~$ python -m pydlock -h
usage: __main__.py [-h] [--arguments ARGUMENTS] [--encoding ENCODING]
                   {lock,unlock,python,run} file

positional arguments:
    {lock,unlock,python,run}
    file

optional arguments:
    -h, --help            show this help message and exit
    --arguments ARGUMENTS
    --encoding ENCODING

To encrypt a file, use python -m pydlock lock [file]:

user@computer:~$ cat secret.txt
Shh! It's a secret!

user@computer:~$ python -m pydlock lock secret.txt
Enter password:
Re-enter password:

user@computer:~$ cat secret.txt
gAAAAABeqx971nHtXHi4dJYw8A_m_1mRYT8V2Sy4XPLqdg0t4mp9ooN-aTU1fuPQwEpwnuFiAfbJ6oPaN9IB1gzFT5-Tb4gFXQMw5uQUXDYV2Pvso6E5lXQ=

To decrypt a file, use python -m pydlock unlock [file]:

user@computer:~$ python -m pydlock unlock secret.txt
Enter password:

user@computer:~$ cat secret.txt
Shh! It's a secret!

In other Python modules

import pydlock

filename = "secret.txt"

with open(filename, "w+") as file:

    print("Shh! It's a secret!", file = file)

pydlock.lock(filename)

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

pydlock-1.2.0.13.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydlock-1.2.0.13-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file pydlock-1.2.0.13.tar.gz.

File metadata

  • Download URL: pydlock-1.2.0.13.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for pydlock-1.2.0.13.tar.gz
Algorithm Hash digest
SHA256 a6bcc336465a0aba149a42dcb2f9ffebd51f45e3bf9e8a998021e1fd9bc79de3
MD5 b152a25da91bc3495e0dd6f79b665f25
BLAKE2b-256 3e29157ddce1d6604474232d9e210ccd13155222c4df735f6b30c9f9f9863170

See more details on using hashes here.

File details

Details for the file pydlock-1.2.0.13-py3-none-any.whl.

File metadata

  • Download URL: pydlock-1.2.0.13-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for pydlock-1.2.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 d47a1503180810fa0e3e080269779f2a4e16a7e3475459432815ec7c2a261667
MD5 33d70ccd91b5c5b14f0f796cff72bb62
BLAKE2b-256 2fdeec4d7bf56877a03b72d40ed190767583f725bd3b498671b53ea85c9f6c96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page