Skip to main content

Load environment variables from age-encrypted files

Project description

agenv

A simple Python package for securely loading environment variables from age encrypted file.

Installation

pip install agenv

[!NOTE] age must be installed separately, as there is no native Python implementation of age.

Usage

from agenv import load_age_env

load_age_env(".env.age")  # Decrypts and loads environment variables

Identity Key Selection Order

agenv determines the age identity key in the following order:

  1. The identity parameter provided to load_age_env()
  2. The AGE_SECRET_KEY environment variable
  3. The AGE_SECRET_KEY_FILE environment variable (path to key file)
  4. The default key file: ~/.age/key

If no valid identity is found, decryption will fail.

License

MIT

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

agenv-0.2.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

agenv-0.2.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file agenv-0.2.1.tar.gz.

File metadata

  • Download URL: agenv-0.2.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for agenv-0.2.1.tar.gz
Algorithm Hash digest
SHA256 56440e153cac574ef35668775dad78561f454ce4614ddb4520d976c3d9985d52
MD5 0f3464eab54c9471596b631a0c2c3652
BLAKE2b-256 d4a784db038026d9d5ccac19f2e5c90e00b6a23163c6071254eb00cfb24d60bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for agenv-0.2.1.tar.gz:

Publisher: python-publish.yml on zachcheung/agenv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agenv-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: agenv-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for agenv-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 698af9f9d92483f85d08ba5da3408de87788a8064b11d174ee8f1d345983c2ab
MD5 56d22af9ffcb068c0f2690f3a7901693
BLAKE2b-256 05869da8d6496fcd61731c8736af450d04f7e9017e2a11c1e2ca9dd6c3dd3658

See more details on using hashes here.

Provenance

The following attestation bundles were made for agenv-0.2.1-py3-none-any.whl:

Publisher: python-publish.yml on zachcheung/agenv

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