Skip to main content
  Author: Sujay RS
  Email: sujayy1983@gmail.com

Encrypted configurations

Encrypt and decrypt a sensitive yaml or json configuration file with ease.

Encrypt/Decrypt YAML or JSON configurations

This module encrypts sensitive yaml/json configurations and decrypts data as needed by the application/script. It offers the following two modes to handle encryption/decryption keys.

Modes - Managing symmetric keys

  1. Default mode: Library generates encryption keys and maintains it for decryption/distribution.

  2. User owns responsibility of managing his/her encrypted key in a secure vault solution and feeds the key to ths library as required.

Install this package

pip install enconfigs

Tested on

  1. Ubuntu 22.04 with python 3.11
  2. MacOS Sonoma 14.5 with python 3.11

Create sample scripts to test functionality

>>> from enconfigs.secureconfigs import SecureConfig
>>> inputdata={'key1': 'value1', 'key2': ['val2', 2]}  ## Input a json data
>>> secureobj = SecureConfig("/tmp/encryptedfile.yml") ## Target location of file where encrypted data must be stored.
True                                                   ## Indicates data was encrypted and stored successfully
>>> secureobj.update_encrypted_data(inputdata)         ## Directly provide config data that must be securely stored
>>> secureobj.decrypt_read_file()                      ## When application needs to read secure data then must call decrypt_read_file() method
{'key1': 'value1', 'key2': ['val2', 2]}

Note: Similar to the above string or list maybe an input for encryption 

Future plan

  • Easy key rotation and thus auto reencryption of data.
  • Offer options to choose an asymmetric encryption algorithm.
  • Test more complex data types.
  • Test on more OS platforms.
  • Test with more python versions.
  • Actively support bugs.

Metadata

Release files for enconfigs 0.0.102

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for enconfigs 0.0.102
File Size Uploaded Provenance Actions
enconfigs-0.0.102.tar.gz 6.0 kB Without provenance Details for enconfigs-0.0.102.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for enconfigs 0.0.102
File Interpreter ABI Platform Actions
enconfigs-0.0.102-py3-none-any.whl Python 3 none any Details for enconfigs-0.0.102-py3-none-any.whl

Total release size: 13.7 kB

Release files / enconfigs-0.0.102.tar.gz

Download URL enconfigs-0.0.102.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5ee827b1e3ebf4970eb09c89b285707dda36fe4992740bee24db24cf8280f090
BLAKE2b-256 checksum
How to use checksums
f5cb3d6ca2e085eca8f7d659b1621b83877a999c6d17a44e0b85c12813abb9f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / enconfigs-0.0.102-py3-none-any.whl

Download URL enconfigs-0.0.102-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f162149150b4881c43470e18876997522de9671c685124c2264913ea241da105
BLAKE2b-256 checksum
How to use checksums
9436bb319f46830a83bbcec0734c3b03dc0acb088244d667f3d73edfe39cd525
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Security for enconfigs 0.0.102

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.102 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page