由人工可编辑的yaml文件支持的基本python数据结构
yaml_backed_structs的Python项目详细描述
由人工可编辑的yaml文件支持的基本python数据结构
说明
为python程序提供了一种非常简单的存储少量信息的方法。 这对于程序配置和类似的配置很有用
其优点是支持数据结构的文件是可读的,并且 可以使用您喜爱的文本编辑器进行编辑。
fromyaml_backed_structsimportPersistentDict,PersistentSetpdict=PersistentDict('my-path.yml')pdict['a']=1# this will automatically be savedpdict['b']=[]pdict['b'].append(2)# this will not be saved automaticallypdict.save()# but we can save it like this
安装
pip install yaml_backed_structs python setup.py install
许可证
麻省理工学院