databroker.Broker.get_documents

Broker.get_documents(headers, stream_name=<class 'databroker.utils.ALL'>, fields=None, fill=False, handler_registry=None)[source]

Get all documents from one or more runs.

Parameters
headersHeader or iterable of Headers

The headers to fetch the events for

stream_namestr, optional

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

Default is ALL which yields documents for all streams.

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

handler_registrydict, optional

mapping asset pecs (strings) to handlers (callable classes)

Yields
namestr

The name of the kind of document

docdict

The payload, may be RunStart, RunStop, EventDescriptor, or Event.

Raises
ValueError if any key in fields is not in at least one descriptor
pre header.