Client module for connecting to Volume Segmantics User Inteface
Project description
Volume Segmantics User Interface Client
This package allows a python script to connect to the volume segmantics server and update the server's information about a corresponding process.
The task id must match the name of a process definition in the connected server. The provided methods are:
- set_task_id (id : str)
- This should correspond to the name of this process on the server.
- connect (HOST : str = 'localhost', PORT : str = '8000')
- Initiates a socketio session with the server.
- edit_element (element_uid : str, value : Any)
- Target a specific display component and update its data.
- notify (txt : str, type : str)
- send a toast to the client
- types:
- success
- error
- info
- warning
- changing the type only changes the toast colour and icon
- set_logging_target (key: str)
- Define the component key of the task element that logs should be forwarded to.
A log component can be configured to display all messages sent to a logger using
# (if you want to get the default logger)
logger = logging.getLogger()
# add the vsui handler to your logger
handler = vsui_client.RequestHandler()
Now all logging messages will be forwarded to the specified component in the web client.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vsui_client-0.1.2.3.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for vsui_client-0.1.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67924312a911b88b756705e14ac28d540f816e928e0b4a74442827355f8e87c3 |
|
MD5 | d59303aa7728df8845e50d3c5d9d0d31 |
|
BLAKE2b-256 | 82656c26b5cf5d6aeddd21b984cd13ebb53dbf01e5a00fd1d1925b5d6146ccd9 |