syslabappsdk


Namesyslabappsdk JSON
Version 0.1.2 PyPI version JSON
download
home_page
SummarySDK for data interaction and function calls between Python APP and Syslab platform
upload_time2023-12-07 02:02:07
maintainer
docs_urlNone
author
requires_python<4,>=3.7
licenseThe MIT License (MIT) Copyright (c) 2023 Suzhou-Tongyuan (support@tongyuan.cc) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords syslab syslabappsdk syslabapp tongyuan
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SyslabAppSdk

[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg)]()



SyslabAppSdk is an SDK that is responsible for communication interaction with the Python App and [Syslab](https://www.tongyuan.cc/product/MWorksSyslab). 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

```bash
pip install -U syslabappsdk
```



## Usage

### Get variable list

``` Python
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<br>variable list - successed           |

### Get variable value

``` Python
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<br>variable value string - successed   |

### Send script to Syslab for execution

``` Python
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<br/>show_code_in_repl: whether to display the code in Syslab REPL<br/>show_result_in_repl: whether to display the result in Syslab REPL |
| Return      | False - failed to get<br>result of running code - successed  |

### Close named pipe

``` Python
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                                                         |

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "syslabappsdk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<4,>=3.7",
    "maintainer_email": "",
    "keywords": "syslab,syslabappsdk,syslabapp,tongyuan",
    "author": "",
    "author_email": "Suzhou-tongyuan <support@tongyuan.cc>",
    "download_url": "",
    "platform": null,
    "description": "# SyslabAppSdk\r\n\r\n[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg)]()\r\n\r\n\r\n\r\nSyslabAppSdk is an SDK that is responsible for communication interaction with the Python App and [Syslab](https://www.tongyuan.cc/product/MWorksSyslab). It mainly provides the following interface for the development of APP:\r\n\r\n- Get variable list\r\n- Get variable value\r\n- Send script to Syslab for execution\r\n- Close named pipe\r\n\r\n\r\n\r\n## Installation\r\n\r\n```bash\r\npip install -U syslabappsdk\r\n```\r\n\r\n\r\n\r\n## Usage\r\n\r\n### Get variable list\r\n\r\n``` Python\r\ndef mw_get_variables(show_modules: bool) -> (list | Literal[False])\r\n```\r\n\r\n| Description | Detail                                                       |\r\n| ----------- | ------------------------------------------------------------ |\r\n| Feature     | get a list of Syslab workspace variables                     |\r\n| Parameter   | show_modules: whether to display a list of modules, usually False |\r\n| Return      | False - failed to get<br>variable list - successed           |\r\n\r\n### Get variable value\r\n\r\n``` Python\r\ndef mw_get_value(var_name: str) -> (str | Literal[False])\r\n```\r\n\r\n| Description | Detail                                                       |\r\n| ----------- | ------------------------------------------------------------ |\r\n| Feature     | get Syslab workspace variable value                          |\r\n| Parameter   | var_name: variable name, which can be a child variable such as a.b |\r\n| Return      | False - failed to get<br>variable value string - successed   |\r\n\r\n### Send script to Syslab for execution\r\n\r\n``` Python\r\ndef mw_run_script(code: str,\r\n                  show_code_in_repl: bool,\r\n                  show_result_in_repl: bool) -> (str | Literal[False])\r\n```\r\n\r\n| Description | Detail                                                       |\r\n| ----------- | ------------------------------------------------------------ |\r\n| Feature     | execute the Julia script code in the Syslab workspace        |\r\n| Parameter   | code: Julia script to run<br/>show_code_in_repl: whether to display the code in Syslab REPL<br/>show_result_in_repl: whether to display the result in Syslab REPL |\r\n| Return      | False - failed to get<br>result of running code - successed  |\r\n\r\n### Close named pipe\r\n\r\n``` Python\r\ndef close_pipe() -> None\r\n```\r\n\r\n| Description | Detail                                                       |\r\n| ----------- | ------------------------------------------------------------ |\r\n| Feature     | Send a request to close the named pipe and call before closing the program |\r\n| Parameter   | none                                                         |\r\n| Return      | none                                                         |\r\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT) Copyright (c) 2023 Suzhou-Tongyuan (support@tongyuan.cc)  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "SDK for data interaction and function calls between Python APP and Syslab platform",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [
        "syslab",
        "syslabappsdk",
        "syslabapp",
        "tongyuan"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf9b7dd3bbc706ea0895aea8d9a59e013cdb554d5574e7cd01073860d3e60a54",
                "md5": "d950818d563c5307ef5d7a113f2eb4bb",
                "sha256": "f5282c0555aa3f5076e198ece3eab72e5fcf608db8a44240b7aebd92e6acf7c0"
            },
            "downloads": -1,
            "filename": "syslabappsdk-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d950818d563c5307ef5d7a113f2eb4bb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.7",
            "size": 7946,
            "upload_time": "2023-12-07T02:02:07",
            "upload_time_iso_8601": "2023-12-07T02:02:07.891311Z",
            "url": "https://files.pythonhosted.org/packages/bf/9b/7dd3bbc706ea0895aea8d9a59e013cdb554d5574e7cd01073860d3e60a54/syslabappsdk-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-07 02:02:07",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "syslabappsdk"
}
        
Elapsed time: 0.15565s