一个简单的toml配置文件读取器。
tomler的Python项目详细描述
使用toml语法的配置文件的简单读取器。
用法
首先,按以下步骤导入模块
from tomler import Config
之后,您可以第一次调用配置文件,如下所示
config = Config('<path to the configuration file>', [True | False])
第二个参数是可选的。它激活(或停用)热 每次访问值时重新加载配置文件。
类config实现单例模式。
值的访问方式与字典类似,具体如下
val = config["key_1/key_2/.../key_N"]