def
func:py
py(opts: null)
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:latest
ghcr.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 areWARN
,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.