Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

damv1dotenvsecretdec-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file damv1dotenvsecretdec-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for damv1dotenvsecretdec-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c6d0074654a380f4ded2fe546840bf4c66280a05fb2bd620f78475e182d9433
MD5 47c9c2eea948217bccc03abc4ae31bef
BLAKE2b-256 dedbb94e7c8f896d4bd7521e2a6a2296eabc0bbc8510e77bc050f6e3c7d538ea

See more details on using hashes here.

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