/pysecretsettings

A python library to access settings and secrets.

Primary LanguagePythonMIT LicenseMIT

pysecretsettings README

A python library to access settings and secrets.

This module offers a unified API for storing parameters and/or secrets in INI or YAML files, with optional field encryption.

Storage backends:

  • YAML/ INI file with un-encrypted settings
  • YAML/INI file with encrypted settings

To have the values encrypted you can use AES Encryption and Decryption Online Tool(Calculator)

Reasonable encryption defaults:

  • Cipher Mode: CBC
  • Key size (bits): 128 - will require a 16 char secret.
  • Initialization vector: none
  • Text format: base64

Usage scenarios

Access to the secrets may be done by:

  • a human;
  • software executed locally, possibly with no Internet access;
  • by github actions, e.g. encrypted secrets, also consider github repo secrets via gh secret.

Sample use

See the doc folder.

TODO

More backends to consider in the future: