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:
- Encrypt an existing file, or create a new encrypted file with pyvaulter
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyvaulter-0.3.1.tar.gz.
File metadata
- Download URL: pyvaulter-0.3.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fa9ef8593b92a18dade00e3a494f512dc20fc69a9e5b3fea9e9df538a0d4db9
|
|
| MD5 |
0fd920fe2221c385930d047c3ae200a0
|
|
| BLAKE2b-256 |
0697a99452ba266adeb4f20a0268689c89830bc9650e64827ad111abcc8fb354
|
Provenance
The following attestation bundles were made for pyvaulter-0.3.1.tar.gz:
Publisher:
python-publish.yml on kwilt/pyvaulter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyvaulter-0.3.1.tar.gz -
Subject digest:
3fa9ef8593b92a18dade00e3a494f512dc20fc69a9e5b3fea9e9df538a0d4db9 - Sigstore transparency entry: 268736462
- Sigstore integration time:
-
Permalink:
kwilt/pyvaulter@5050670b580c9ec804ec53f92063fa1371b8fc55 -
Branch / Tag:
refs/tags/0.3.1 - Owner: https://github.com/kwilt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5050670b580c9ec804ec53f92063fa1371b8fc55 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyvaulter-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pyvaulter-0.3.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81d99003710cbbd2a4eda9135e1c577be6aa4f29217ea9c853a416c5a6dbcc18
|
|
| MD5 |
0463f06808257a8da3656e922268bca8
|
|
| BLAKE2b-256 |
3ec94af34b1f28b2fc63bed208e17d4256ffcf94750c447d6893fcd4502b5779
|
Provenance
The following attestation bundles were made for pyvaulter-0.3.1-py3-none-any.whl:
Publisher:
python-publish.yml on kwilt/pyvaulter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyvaulter-0.3.1-py3-none-any.whl -
Subject digest:
81d99003710cbbd2a4eda9135e1c577be6aa4f29217ea9c853a416c5a6dbcc18 - Sigstore transparency entry: 268736464
- Sigstore integration time:
-
Permalink:
kwilt/pyvaulter@5050670b580c9ec804ec53f92063fa1371b8fc55 -
Branch / Tag:
refs/tags/0.3.1 - Owner: https://github.com/kwilt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5050670b580c9ec804ec53f92063fa1371b8fc55 -
Trigger Event:
release
-
Statement type: