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:

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:

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.11.tar.gz (6.4 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.11-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydlock-1.2.0.11.tar.gz
  • Upload date:
  • Size: 6.4 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.11.tar.gz
Algorithm Hash digest
SHA256 3b879e0d60b491409ed87f6bf111f9795b9df55c9d4349beb5bb1cfbde55b55c
MD5 de6ca0ac4ae1fad2d6e98d7f649fb85f
BLAKE2b-256 37cf03c34dc979b321a7e9892a3f8c36f4dbe7ccc7eebf4a1118327026b9b640

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydlock-1.2.0.11-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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 33e08e501ae08c79c2a17f8d1dde724b6458298753cea55681cf3c38fe4ad6a3
MD5 b0386ee0017004c464e41f33cfcf65b6
BLAKE2b-256 a71318b9196303cd8ae615e9a5ce2d9776ca641e565f14c4c921d397ee8c5529

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