titus.producer.expression.fcn

titus.producer.expression.fcn(params, ret, expr, subs=None, cells=None, pools=None, options=None, **kwds)[source]

Convert Python code into a PFA function (not a whole PFA document).

Parameters:
  • params (Pythonized JSON) – PFA function params, form is [{"argName1": argType1}, {"argName2": argType2}, ...] where the argTypes are Avro type schemas
  • ret (Pythonized JSON) – PFA function ret, form is Avro type schema
  • subs (dict from substitution strings to their values) – Python identifiers to expand to given PFA structures
  • cells (list of strings) – Python identifiers to assume are PFA cell names
  • pools (list of strings) – Python identifiers to assume are PFA pool names
  • options (dict from option names to their values) – options for interpreting the Python and producing PFA, such as lineNumbers and wantArray
  • kwds (dict from substitution strings to their values) – added to subs (a more convenient way to pass them)
Return type:

Pythonized JSON

Returns:

the resulting PFA function