Decrypt encrypted .env files and load environment variables securely.
Project description
damv1dotenvsecretdec
Overview
damv1dotenvsecretdec is a Python package designed to securely decrypt encrypted environment files and load environment variables into your application. This allows you to manage sensitive configuration settings safely.
Features
- Decrypt encrypted environment files (e.g., .envsecret).
- Securely load environment variables without storing plain-text secrets.
- Currently supports OpenSSL AES-256 decryption.
Installation
pip install damv1dotenvsecretdec
Usage
from damv1dotenvsecretdec import Load
Usage (OpenSSL Method)
This section demonstrates how to use the OpenSSL-based decryption method.
from damv1dotenvsecretdec import OpenSSL
# Load encrypted .envsecret file
env_vars = OpenSSL.load_encrypted_dotenvsecret("path/to/.envsecret", "your-password", iteration=1000)
# Access environment variables
if env_vars:
print(env_vars.get("SECRET_KEY"))
Encrypting a .envsecret file (for OpenSSL Method)
To create an encrypted .envsecret file using OpenSSL:
openssl enc -aes-256-cbc -pbkdf2 -iter 100 -salt -in .env -out .envsecret -k "your-password"
This will encrypt the .envsecret file into .envsecret.enc.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 damv1dotenvsecretdec-0.1.0-py3-none-any.whl.
File metadata
- Download URL: damv1dotenvsecretdec-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c6d0074654a380f4ded2fe546840bf4c66280a05fb2bd620f78475e182d9433
|
|
| MD5 |
47c9c2eea948217bccc03abc4ae31bef
|
|
| BLAKE2b-256 |
dedbb94e7c8f896d4bd7521e2a6a2296eabc0bbc8510e77bc050f6e3c7d538ea
|