events(stream_name='primary', fields=None, fill=False)¶
Load all Event documents from one event stream.
This is a generator the yields Event documents.
- 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
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())