Skip to content

ZhongTing/config-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

config-store

A python module for env variable and config file management. Inspired from webpack configuration management, config-store support multi-stage configs merger. For information security, separation of sensitive settings are also provided.

Installation

pip install configstore

Usage

import configstore
configstore.connect($CONFIG_FOLDER)
print(configstore.get("foo", default_value="not found QQ"))
# >>> 'bar'

Config Setting

CONFIG_FOLDER
- secret
    - secret.default.json
    - secret.dev.json 
    - secret.pd.json
- config.default.json [requried]
- config.dev.json 
- config.pd.json 

Config Read Order

  1. ENV variable
  2. stage config
  3. default config
  4. default value

About

A python module for env variable and config file management

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages