A YAML based, pluggable configuration library inspired by Aeson
Miniscule is a library for flexible YAML-based configuration files, inspired by Clojure’s Aero.
Create a file
config.yaml with the following contents:
server: host: !or [!env HOST, localhost] port: !or [!env PORT, 8000] debug: !env DEBUG database: name: my_database user: my_user password: !env DB_PASSWORD secret: !aws/sm secret
Then, in Python:
from miniscule import read_config config = read_config('config.yaml')
config holds a dictionary with the structure of the
config.yaml file, in which the tagged fields have been replaced.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.