databroker.Header.events

Header.events(self, stream_name='primary', fields=None, fill=False)[source]

Load all Event documents from one event stream.

This is a generator the yields Event documents.

Parameters
stream_namestr, optional

Get events from only “event stream” with this name.

Default is ‘primary’

fieldsList[str], optional

whitelist of field names of interest; if None, all are returned

Default is None

fillbool or Iterable[str], optional

Which fields to fill. If True, fill all possible fields.

Each event will have the data filled for the intersection of it’s external keys and the fields requested filled.

Default is False

Yields
docdict

Examples

Loop through the Event documents from a run. This is ‘lazy’, meaning that only one Event at a time is loaded into memory.

>>> h = db[-1]
>>> for event in h.events():
...    # do something

List the Events documents from a run, loading them all into memory at once.

>>> events = list(h.events())