databroker.Broker.process¶
- Broker.process(headers, func, fields=None, fill=False)[source]¶
Pass all the documents from one or more runs into a callback.
This output can be used as a drop-in replacement for the output of the bluesky Run Engine.
- Parameters
- headersHeader or iterable of Headers
header or headers to process documents from
- funccallable
function with the signature f(name, doc) where name is a string and doc is a dict
- fieldslist, optional
whitelist of field names of interest; if None, all are returned
- fillbool, optional
Whether externally-stored data should be filled in. Defaults to False.
See also
Examples
>>> def f(name, doc): ... # do something ... >>> h = db[-1] # most recent header >>> process(h, f)