pyrlang.notebook¶
Notebook calls: a process that keeps the results of calls made from
Erlang (py.erl) for use in later calls.
- pyrlang.notebook.call(name, msg_len=2)¶
specific decorator function
Handle the decorator where we expect a tuple of a specific size and the first item being an atom with specific name
- class pyrlang.notebook.Notebook(options)¶
Bases:
GenServerImplements a flow for performing remote calculations from Erlang on Python node, while storing the results on Python side until they are ready. Each call result is stored in notebook history and a value index is returned to the caller. This index can be used as an argument in subsequent calls.
- history_ids_: List[Any]¶
Log of recent value ids in their creation order. Values, which were deleted because of history size limit, are also deleted here.
- value_id_¶
Next id to be used as result index.
- history_limit_¶
History dict will be trimmed when its length is greater than this limit to save memory. Attempt to refer to a trimmed value will create value_not_found exception, also propagated to Erlang side.
- async nb_call(**kwargs)¶
- async nb_batch(**kwargs)¶
- async nb_retrieve(**kwargs)¶
- async handle_exit_call(**kwargs)¶
- pyrlang.notebook.new_context(options)¶
Create a new remote-call notebook context. Node_name argument will be automatically prepended to args by Rex.