Acquire.ObjectStore._function module

class Function(function=None, **kwargs)[source]

Bases: object

This is the base class of functions that can be stored to the ObjectStore for later execution

static from_data(data, args_from_data=None)[source]

Return the function from the JSON-deserialised dictionary

Parameters:
  • data (dict) – Dict to create function from
  • args_to_data (default=None) – Arguments to pass
Returns:

Function created from data

Return type:

function

to_data(args_to_data=None)[source]

Return a JSON-serialisable dictionary describing this function

Parameters:args_to_data (default=None) – Arguments to pass
Returns:JSON serialisable dict version of this function
Return type:dict