Trame-server is the internal server-side implementation of the Trame web framework. It provides the core server logic for managing shared state, controllers, and the web server itself. While it can run in various environments like Jupyter or as a standalone desktop application, it's primarily designed to be a dependency of the higher-level `trame` package rather than being used directly by end-users. It is under active development.
pip install --upgrade trame-serverVerified import paths — ran on the pinned version, not inferred.
This basic example demonstrates how to set up a Trame server, define a reactive state variable ('count'), create a simple UI with a slider and a button using `trame-vuetify`, and bind UI elements to the server's state and controller. It explicitly sets `client_type='vue3'` for V3 compatibility, which is the default for current Trame versions.
Explicitly set `server.client_type = "vue2"` when obtaining the server instance via `trame.app.get_server()` if your application is still based on Vue2. New applications should target Vue3.
Install required widget packages explicitly, e.g., `pip install trame-vuetify trame-vtk trame-plotly`. Then import them from `trame.widgets` (e.g., `from trame.widgets import vuetify`).
Remove imports and usage of `trame.app.jupyter`. Refer to the `trame` documentation for updated Jupyter integration patterns, which typically involve layouts like `JupyterLayout`.
Always interact with the Trame server through the `trame` meta-package, typically by calling `from trame.app import get_server()` to obtain a properly configured server instance.