Minimalistic configuration library with encryption and a tasty name
Project description
Confit2Canard 🦆
Minimalistic library to load settings from JSON and YAML files that also provides configuration encryption with AES-GCM.
The history of the confit de canard.
How to use
Configuration files written to a relative path:
# app.yml
title: How to cook?
# production/tokens.yml
api:
token: AZERTY1234
# production/secrets.yml
$Vault;UZXhoxTumLPE6zkT;kRg9bGtmKFn/BeFODX5+;zFgpPMrgxAaVQW6Wv5Q6Ow==
The script:
# main.py
from confit2canard import Config
passkey = "ThisIsSupposedToBeAKey0000000000"
configuration_files = ["app.yml",
"production/tokens.yml",
"production/secrets.yml"]
configuration = Config(configuration_files, passkey=passkey)
print(configurgation.title)
print(configurgation.find("api.token"))
The configuration files can be JSON or YAML.
Command line tool
The VAULT_PASSKEY environment variable must be set to write encrypted
configuration with a AES-GCM key:
VAULT_PASSKEY="ThisIsSupposedToBeAKey0000000000" python \
-m confit2canard production/secrets.yml
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file confit2canard-0.1.1.tar.gz.
File metadata
- Download URL: confit2canard-0.1.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.9.20 Linux/5.15.0-86-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc99113311bd62c9fc41827e85a790e39656b521b1eab9f1f9efc545766d784e
|
|
| MD5 |
aba7e0550012b60b9586b936e4ea1297
|
|
| BLAKE2b-256 |
6b09ecda26c7ce554fcd97779bdef0b096a2d2ae05b36c1f7a511337916b07d9
|
File details
Details for the file confit2canard-0.1.1-py3-none-any.whl.
File metadata
- Download URL: confit2canard-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.9.20 Linux/5.15.0-86-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48054e22acb447d5390d570ab7257aed5c1f48fed63d753a7be75ec6a2927967
|
|
| MD5 |
b514c80ac587d90d1f495419b2cdb414
|
|
| BLAKE2b-256 |
e313d92645e3419b490dfd66ccf406c005cfb8068cc3c6659e5e90de430c3aa3
|