奏鸣曲数据格式
sonata的Python项目详细描述
#py sonata
sonata数据格式的python库
它将处理清单变量,合并到配置的其他部分的链接(simulation.json,circuit.json)并在python字典中返回一个完整的json。
``python
from config import from_json
cfg=from_json('path/to/config.json')
print(cfg['run']['tstart'])
````
注意:
*您还可以传入一个[jsonschema ivalidator对象](http://python json schema.readthedocs.io/en/latest/validate/jsonschema.ivalidator),它将检查json文件是否遵循架构。aibs bmtk使用我们自己的自定义验证器,如果需要的话,我可以将代码添加到这个repo中。
sonata数据格式的python库
它将处理清单变量,合并到配置的其他部分的链接(simulation.json,circuit.json)并在python字典中返回一个完整的json。
``python
from config import from_json
cfg=from_json('path/to/config.json')
print(cfg['run']['tstart'])
````
注意:
*您还可以传入一个[jsonschema ivalidator对象](http://python json schema.readthedocs.io/en/latest/validate/jsonschema.ivalidator),它将检查json文件是否遵循架构。aibs bmtk使用我们自己的自定义验证器,如果需要的话,我可以将代码添加到这个repo中。