Server Manager

class streamlit_pyvista.server_managers.server_manager.ServerManagerBase(host='0.0.0.0', port=8080)[source]

Bases: ABC

This class is the base for any ServerManager implementation

__init__(host='0.0.0.0', port=8080)[source]
abstract init_connection()[source]

This function receive request of clients that require a trame server to display meshes. It’s in this class that we need by any means start a trame server and get its endpoints :returns: A response containing a json with all required endpoint for a MeshViewerComponent to work properly :rtype: Response

run_server()[source]

Start the flask server and the scheduler

abstract static get_launch_path()[source]

This function must be used to get the path to the file of the manager that will be launched :returns: the path to the file that launch the server :rtype: str

streamlit_pyvista.server_managers.server_manager.run_trame_viewer(server_port, file_path)[source]

Launch a Trame server using python subprocess

class streamlit_pyvista.server_managers.server_manager.ServerManager(host='0.0.0.0', port=8080)[source]

Bases: ServerManagerBase

Implementation of a ServerManagerBase to run trame viewer locally

__init__(host='0.0.0.0', port=8080)[source]
init_connection()[source]

This function receive request of clients that require a trame server to display meshes. It’s in this class that we need by any means start a trame server and get its endpoints :returns: A response containing a json with all required endpoint for a MeshViewerComponent to work properly :rtype: Response

static get_launch_path()[source]

This function must be used to get the path to the file of the manager that will be launched :returns: the path to the file that launch the server :rtype: str