Funcs
Funcs : Funcs
Create a new PySession instance
Set the timeout for pyEval()
Initialize the python session by calling the given func to do any one-time setup of the python session
Define a variable to be available to python code running in the session
Execute the given python code in the session and return the python session
Evalue the given python statement in the session, and return the result
(opts: Dict?) => PySession <admin>
Create a new PySession instance. Options:
image: name of the Docker image to run. By default, the lib will try to run the following images in this order:ghcr.io/haxall/hxpy:<ver>(where ver = current library Haxall version)ghcr.io/haxall/hxpy:latestghcr.io/haxall/hxpy:main
network: the name of the Docker network you want the container to join.logLevel: log level of the hxpy python process in Docker. Valid values are 'WARN', 'INFO', 'DEBUG', (default='WARN')
The default timeout for pyEval() is 5min. Use pyTimeout() to change this timeout.
Sessions created in the context of a task are persistent, meaning they will not be closed until the task is killed.
(py: PySession, val: Number?) => PySession <admin>
Set the timeout for pyEval().
(py: PySession, fn: Func) => PySession <admin>
Initialize the python session by calling the given func to do any one-time
setup of the python session. If pyInit() has already been called on this
session, then the callback is not invoked.
Typically, this func is used in the context of a task since the python session in a task is persistent. This allows to do any one-time pyExec() or pyDefine() when the task is first creatd.
(py: PySession, name: Str, val: Obj?) => PySession <admin>
Define a variable to be available to python code running in the session.
(py: PySession, code: Str) => PySession <admin>
Execute the given python code in the session and return the python session.
Note: python exec() does not return a value, so use pyEval() if you need
the result of running a python statement. This method is primarily useful
for declaring functions that you want available when using pyEval().
(py: PySession, stmt: Str) => Obj? <admin>
Evalue the given python statement in the session, and return the result. The session will be closed unless it is running in a task.