Bluesky生态系统使用的数据模型

event-model的Python项目详细描述


事件模型

此存储库包含指定基于事件的架构的文档 NSLS-II使用的数据模型。组织中的其他项目使用此模型; 这是他们组织基于事件的数据的常用方法。

请参见this page of the NSLS-II documentation以获取图解 模型概述。

使用jsonschema指定文档。看这个 excellent tutorial 关于jsonschema的更多信息。

康达配方

安装最新的标记生成:conda install event-model -c lightsource2-tag

安装最新的标记生成:conda install event-model -c lightsource2-dev

找到标记的配方here和开发配方here

用法

模式使用python api打包。(在未来,他们可能会 为其他语言打包。如果您对此感兴趣,请与我们联系。) 由于使用了新的枚举类型,此包需要Python3.4+。

公共api中有两个变量,一个名为DocumentNames的枚举和 一个名为schemas的字典,它的关键是 DocumentNames

In[1]:importevent_modelIn[2]:event_model.schemas[event_model.DocumentNames.event]Out[2]:{'additionalProperties':False,'description':'Document to record a quanta of collected data','properties':{'data':{'description':'The actual measument data','type':'object'},'descriptor':{'description':'UID to point back to Descriptor for this event stream','type':'string'},'seq_num':{'description':'Sequence number to identify the location of this Event in the Event stream','type':'integer'},'time':{'description':'The event time.  This maybe different than the timestamps on each of the data entries','type':'number'},'timestamps':{'description':'The timestamps of the individual measument data','type':'object'},'uid':{'description':'Globally unique identifier for this Event','type':'string'}},'required':['uid','data','timestamps','time','descriptor','seq_num'],'title':'event','type':'object'}

jsonschema要验证的包 python中的文档。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java从类对象访问静态变量   java无法在三星A5上使用Toast(2016年)   java处理阻止图像在选择其他图像时消失   java Install4j Linux应用程序   swing在jpanel form java上具有暂停/恢复按钮   java Log4J登录年份文件夹   java XmlPullParser资源管理   JavaGoogleCloudEndpoints方法总是导致NullPointerException,为什么?   java JSON到带有POJO和Enum的Spring控制器   java制作自定义名称生成器?   java仅在设备屏幕的特定部分显示google地图多段线   java图像没有重新绘制,只是相乘   java如何将格式化字符串转换为浮点?   java无法提前很长时间安排TimerTask   当引用函数::和时,java Intellij IDEA无法解析“和”函数接口方法   java结束了dowhile循环   java Spring路径变量绑定   log4j API中FileAppender中的java问题   java使用QMessageBox从选项列表中进行选择