Skip to main content

Encrypt sensitive data. Emulates much of the functionality of Ansible Vaults but for Python.

Project description

pyvaulter

A very simple Python module that can be used to encrypt sensitive data. Emulates much of the functionality of Ansible Vaults but for Python.

Basic Usage (Creating/Editing Encrypted Files)

All encrypted files are placed in the current working directory.

pyvaulter [--help] <edit|create|view|encrypt> <file_name>

pyvaulter create <file_name>: Create and encrypt a new file

pyvaulter edit <file_name>: Edit an encrypted file that has been encrypted by pyvaulter

pyvaulter view <file_name>: View an encrypted file a file that has been encrypted by pyvaulter

pyvaulter encrypt <file_name>: Encrypt an existing, unencrypted file (path). This is intended to encrypt a copy of an already-existing file on your system. It will not encrypt the original file, but rather create a copy of it.

Basic Usage (In a script)

You can use pyvaulter in your script or application to decrypt the contents of files at runtime. So, in practice the workflow looks like this:

  1. Encrypt an existing file, or create a new encrypted file with pyvault
  2. In your script or application, decrypt the file like so:
from pyvaulter import decrypt
from getpass import getpass

# You could also just pass in the decryption password using an environment variable, that way you're not prompted to
# type it each time, but for the sake of simplicity, you can also do it this way.
secure_password = getpass('Enter decryption password')

# Decrypt the file, returning the contents as a string
my_secret_file_content = decrypt(file_path='/path/to/encrypted/file', decryption_password=secure_password)

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

pyvaulter-0.2.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

pyvaulter-0.2.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file pyvaulter-0.2.0.tar.gz.

File metadata

  • Download URL: pyvaulter-0.2.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyvaulter-0.2.0.tar.gz
Algorithm Hash digest
SHA256 007d3b07d043469b7f0bd32cfc98cb9a9ec1bfad9a3c3488fae57924f18f45f1
MD5 97d1cd484504366ba6e3628d9b6569d8
BLAKE2b-256 8aab64e63848ad95962cf766767946c24b1db90702db9e29380273c3750fa3b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvaulter-0.2.0.tar.gz:

Publisher: python-publish.yml on kwilt/pyvaulter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyvaulter-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyvaulter-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyvaulter-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7581f56f90b9362b0e807ba66efaf24c88a03ca45959f1f37726c3bf649475b
MD5 c5d39dd1306b12e213077451b77c35cc
BLAKE2b-256 69354c2d531188ff830ee004847d03f1a1696f8b6dc2c1d68cc9be9d1bcb7614

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvaulter-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on kwilt/pyvaulter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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