python项目的配置管理器
py-config的Python项目详细描述
配置类
- 基于bash env变量管理项目变量的类
- 建议与.export文件一起使用Jon Morehouse Scripts
示例用法
from config import Config # load variables from env Config.load_from_list(["PATH", "PWD", "ENV"]) # load an exports file of the following format # ENV=PRODUCTION # MODULE=TEST Config.load_from_path(".test.exports") # load yaml/json file Config.load_from_path("config.json") Config.load_from_path("config.yml") # access config print Config.PATH