Comb API Reference

In addition to logging data from a comb and exposing an HTTP API for getting data, Brush also provides a Python API for communicating with the Menlo XMLRPC server.

class brush.comb.DummyFrequencyComb[source]

Simulated frequency comb for testing purposes.

get_data()[source]

Return random data in order to simulate the presence of a Menlo XMLRPC server. Only a small subset of possible data keys are provided.

Returns:

data : dict

randomized data values

get_data_since(delta)[source]

Return random data from now - delta seconds ago.

class brush.comb.FrequencyComb(host, port=8123, user=None, password=None)[source]

Class for communicating with a Menlo frequency comb.

Parameters:

host : str

server hostname

port : int

server port

user : str or None

username for authentication

password : str or None

password for authentication

get_data(keys=[])[source]

Query the XMLRPC server for the most recent data.

Parameters:

keys : list

List of keys to get. If empty, fetch all data.

Returns:

result : dict

All collected data

get_data_since(delta, keys=[])[source]

Get data since delta seconds ago.

get_version()[source]

Return the version of the Menlo XMLRPC server software.

keys()[source]

Return available data keys.