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.

Requires Linux: Uses vim for editing, and less for viewing

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 pyvaulter
  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.3.2.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.3.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyvaulter-0.3.2.tar.gz
Algorithm Hash digest
SHA256 c1235277fff3ca5516be45691c8031e98e7dd68c921d5216fb2c7566d10c18f5
MD5 77e58aac7f2aba844e482195bcec738f
BLAKE2b-256 1456f659270c2c83b33e6908756122fc53975692a1f1da8e4cf5e20cedeb75cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvaulter-0.3.2.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.3.2-py3-none-any.whl.

File metadata

  • Download URL: pyvaulter-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyvaulter-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 58becf9e50d42469b4d2937e2d7e66a3a1d1db5dbfd7ebdfb60d7e22d50e1e1e
MD5 e88ad54c93b8a25a1d279568b2963211
BLAKE2b-256 fe49cc03a865d2913b1f411cbe5c34b1747927bcdeacb217b4536427297abbab

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvaulter-0.3.2-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