Skip to main content

SDK for data interaction and function calls between Python APP and Syslab platform

Project description

SyslabAppSdk

License

SyslabAppSdk is an SDK that is responsible for communication interaction with the Python App and Syslab. It mainly provides the following interface for the development of APP:

  • Get variable list
  • Get variable value
  • Send script to Syslab for execution
  • Close named pipe

Installation

pip install -U syslabappsdk

Usage

Get variable list

def mw_get_variables(show_modules: bool) -> (list | Literal[False])
Description Detail
Feature get a list of Syslab workspace variables
Parameter show_modules: whether to display a list of modules, usually False
Return False - failed to get
variable list - successed

Get variable value

def mw_get_value(var_name: str) -> (str | Literal[False])
Description Detail
Feature get Syslab workspace variable value
Parameter var_name: variable name, which can be a child variable such as a.b
Return False - failed to get
variable value string - successed

Send script to Syslab for execution

def mw_run_script(code: str,
                  show_code_in_repl: bool,
                  show_result_in_repl: bool) -> (str | Literal[False])
Description Detail
Feature execute the Julia script code in the Syslab workspace
Parameter code: Julia script to run
show_code_in_repl: whether to display the code in Syslab REPL
show_result_in_repl: whether to display the result in Syslab REPL
Return False - failed to get
result of running code - successed

Close named pipe

def close_pipe() -> None
Description Detail
Feature Send a request to close the named pipe and call before closing the program
Parameter none
Return none

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

syslabappsdk-0.1.2-py3-none-any.whl (7.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page