Skip to main content

Minimalistic configuration library with encryption and a tasty name

Project description

CircleCI Codacy Badge

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

confit2canard-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

confit2canard-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file confit2canard-0.1.0.tar.gz.

File metadata

  • Download URL: confit2canard-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 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

Hashes for confit2canard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c33a36128c34ba827e0116f3c2f8134c80094d59326886b05bff66e83a7e0d6e
MD5 74bdd7ce15aed9260415c8930f4a3fbd
BLAKE2b-256 b6a5b502995d3463be746b0328414ffc2ef9567b648cd5506f9b1842560d2efd

See more details on using hashes here.

File details

Details for the file confit2canard-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: confit2canard-0.1.0-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

Hashes for confit2canard-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a6aabf420b3f617806751e0fdf961bfd55ff81baaa279f35c73a83747b0cf53
MD5 d9867084d384470c033538ea5f15c8b9
BLAKE2b-256 fb87c3d3cc45411310f27dabe3616df031395e910467d13c9932e3d96bb327d5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page