vcrypto - Secure Secrets Management in Python
vcrypto is a simple and effective utility for securely storing passwords and secrets in Python. It leverages Fernet encryption from the cryptography module instead of reinventing the wheel.
🔒 Why vcrypto?
Managing secrets in Python, especially in collaborative projects, can be cumbersome. Our approach simplifies it:
👉 One master private password (ignored in Git)
👉 A structured dictionary file with encrypted secrets
👉 Easily shareable - only the master password needs to be exchanged once
👉 Version-controlled secrets - since only encrypted values are stored
This package makes it easy to store and retrieve encrypted secrets in JSON or YAML formats.
📌 Features
- 🔐 AES-128 Encryption (Fernet) for secure storage.
- 📂 JSON/YAML Support for structured secret storage.
- 🛠️ Environment Variable Support for flexible key management.
- 🔑 Simple API for saving and retrieving secrets.
📝 Installation
Install via pip:
pip install vcrypto
🚀 Quickstart
1️⃣ Initialize vcrypto
Before using vcrypto, initialize it with:
from vcrypto import init_vcrypto
init_vcrypto(secrets_file="secrets.yaml", environ_var_name="MY_ENV_VAR")
This ensures vcrypto knows where to store secrets and how to retrieve the master password.
2️⃣ Store and Retrieve Secrets
Save a Secret
from vcrypto import save_secret
save_secret("SECRET_TOKEN", "super_secret_value")
Retrieve a Secret
from vcrypto import read_secret
token = read_secret("SECRET_TOKEN")
print(token) # Output: super_secret_value
⚙️ Customization
The init_vcrypto function allows customization:
| Parameter | Description |
|---|---|
secrets_file |
Path to the encrypted secrets file (JSON/YAML) |
filename_master_password |
Path to the master password file (optional, defaults to master.password) |
environ_var_name |
Name of an environment variable to retrieve the master password |
Example:
init_vcrypto(secrets_file="config/secrets.yaml", filename_master_password="config/master.password")
This setup stores both the master.password and secrets.yaml in the config/ folder.
🛠️ Development
This project uses uv for dependency management.
Install dependencies
pip install uv
uv venv
uv install
💜 License
This project is licensed under the MIT License.
👤 Author
Metadata
Release files for vcrypto 4.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vcrypto-4.3.3.tar.gz | 9.4 kB | Without provenance | Details for vcrypto-4.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vcrypto-4.3.3-py3-none-any.whl | Python 3 | none | any | Details for vcrypto-4.3.3-py3-none-any.whl |
Total release size: 16.8 kB
Release files / vcrypto-4.3.3.tar.gz
| Download URL | vcrypto-4.3.3.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9694c764e16af87d26fe3e06e4379f64e6e17d70bc20027c495b2cad4ee45541
|
|
BLAKE2b-256 checksum How to use checksums |
332f4572150e8816ac8fe855851664fbec9b8c374e5893a938822a72c4dcdf01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vcrypto-4.3.3-py3-none-any.whl
| Download URL | vcrypto-4.3.3-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b8d2972ae58aa84f00a904fa2f712a729ef5ce69704478e9d614ed36578cad8
|
|
BLAKE2b-256 checksum How to use checksums |
327c1067a0c05332b426c2cb13e40dd127dd30af1a06841aa398b394d8f36dcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for vcrypto 4.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.