Data model used by the bluesky ecosystem
Project description
# Event Model
This repository contains documents that specify the schema for an event-based
data model used at NSLS-II. Other projects in the organization use this model;
it is their common way of organizing event-based data.
See [this page of the NSLS-II
documentation](https://nsls-ii.github.io/architecture-overview.html) for an illustrated
overview of the model.
The documents are specified using jsonschema. See this
[excellent tutorial](http://spacetelescope.github.io/understanding-json-schema/)
for more on jsonschema.
## Conda Recipes
Install the most recent tagged build: `conda install event-model -c lightsource2-tag`
Install the most recent tagged build: `conda install event-model -c lightsource2-dev`
Find the tagged recipe [here](https://github.com/NSLS-II/lightsource2-recipes/tree/master/recipes-tag/event-model) and the dev recipe [here](https://github.com/NSLS-II/lightsource2-recipes/tree/master/recipes-dev/event-model)
## Usage
The schemas are packaged with a Python API. (In the future, they will probably
be packaged for other languages. Get in touch if you are interested in this.)
Because of its use of the new Enum type, this package requires Python 3.4+.
There are two variables in the public API, an Enum called ``DocumentNames`` and
a dictionary called ``schemas`` that is keyed on the values of
``DocumentNames``.
```python
In [1]: import event_model
In [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'}
```
Use it in conjunction with the
[jsonschema](https://pypi.python.org/pypi/jsonschema) package to validate
documents in Python.
This repository contains documents that specify the schema for an event-based
data model used at NSLS-II. Other projects in the organization use this model;
it is their common way of organizing event-based data.
See [this page of the NSLS-II
documentation](https://nsls-ii.github.io/architecture-overview.html) for an illustrated
overview of the model.
The documents are specified using jsonschema. See this
[excellent tutorial](http://spacetelescope.github.io/understanding-json-schema/)
for more on jsonschema.
## Conda Recipes
Install the most recent tagged build: `conda install event-model -c lightsource2-tag`
Install the most recent tagged build: `conda install event-model -c lightsource2-dev`
Find the tagged recipe [here](https://github.com/NSLS-II/lightsource2-recipes/tree/master/recipes-tag/event-model) and the dev recipe [here](https://github.com/NSLS-II/lightsource2-recipes/tree/master/recipes-dev/event-model)
## Usage
The schemas are packaged with a Python API. (In the future, they will probably
be packaged for other languages. Get in touch if you are interested in this.)
Because of its use of the new Enum type, this package requires Python 3.4+.
There are two variables in the public API, an Enum called ``DocumentNames`` and
a dictionary called ``schemas`` that is keyed on the values of
``DocumentNames``.
```python
In [1]: import event_model
In [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'}
```
Use it in conjunction with the
[jsonschema](https://pypi.python.org/pypi/jsonschema) package to validate
documents in Python.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
event-model-1.8.2.tar.gz
(42.7 kB
view details)
Built Distribution
File details
Details for the file event-model-1.8.2.tar.gz
.
File metadata
- Download URL: event-model-1.8.2.tar.gz
- Upload date:
- Size: 42.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e55162b6ae18e63aa06df65d5da6da317d50c90c04d2ddf382f8db6e7f3347ba |
|
MD5 | 03ae6a8a6d6c679b6efe7c17bd59b5e8 |
|
BLAKE2b-256 | a420c1c5163a1ac9392a91a7e93e122d42a5c6ceeec6172d0de09a686967c339 |
File details
Details for the file event_model-1.8.2-py3-none-any.whl
.
File metadata
- Download URL: event_model-1.8.2-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26beeff294cb2b42c9f6572ca9583686be0b938af2a228764e461b74f6af2ba1 |
|
MD5 | 1abe930c2f327de89c5d79814e2ca909 |
|
BLAKE2b-256 | e237e69e7f322227b4aad419d66583a67d767ab7411deeec2dad8647d1d35013 |