Skip to content

emerald_utils v0.1.0

Choose a tag to compare

@cdbunch72 cdbunch72 released this 15 Mar 21:02

Overview

This release publishes the first public version of emerald_utils, a small, dependency-light utility library providing:

  • AES‑GCM encryption helpers and PBKDF2 key derivation
  • $A256GCM$keyid$base64 encrypted‑field format
  • Transparent SQLAlchemy EncryptedString TypeDecorator with lazy decryption
  • Experimental secret resolver for Pydantic (env:, file:, secret:, sqlexp:)
  • Minimal SQL experimental backend (sqlexp) for storing encrypted secrets

The stable components (crypto, encrypted fields, SQLAlchemy integration) are intended for long‑term use.
The experimental components are intentionally minimal and not part of the future vault/meta‑manager.


Included Artifacts

This release includes:

  • Source distribution (emerald_utils‑<version>.tar.gz) — installable via pip install <url>
  • Wheel (emerald_utils‑<version>-py3-none-any.whl) — for faster installs

Both artifacts are standards‑compliant and can be installed directly from this release.


Installation

Install directly from this GitHub release:

pip install https://github.com/<yourname>/emerald_utils/releases/download/v0.1.0/emerald_utils-0.1.0.tar.gz

Or install from a cloned checkout:

pip install .

Highlights

Cryptography

  • AES‑256‑GCM encryption/decryption
  • PBKDF2‑HMAC‑SHA256 key derivation
  • URL‑safe base64 helpers

Encrypted Fields

  • $A256GCM$keyid$base64 format
  • KeyContext for DK + keyid
  • encrypt_string() / decrypt_string()

SQLAlchemy Integration

  • EncryptedString TypeDecorator
  • Lazy decryption via LazySecret
  • Prevents double‑encryption
  • Central set_keyctx() initialization

Experimental Secret Resolver

Supports:

  • env:
  • file:
  • secret: (systemd + container orchestrators)
  • sqlexp:
  • Encrypted values

Experimental SQL Backend (sqlexp)

  • Simple key/value table
  • Stores encrypted values
  • Intended for bootstrap use only

License

This project is licensed under the Mozilla Public License 2.0 (MPL‑2.0).
You may use this library in proprietary applications, but modifications to this library itself must remain MPL‑licensed.