Registry / web-framework / trame-server

trame-server

JSON →
library3.12.5pypypiunverified

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-server
INSTALL
IMPORT
SIG · TRAME-SERVER
T
trame-server
web-frameworkpythonv3.12.5
Install
4.3s avg
Import
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.12.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 29.7MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 4.3s · import 0.000s · 32MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_server
from trame.app import get_server
from trame_server.core import Server
The `Server` class from `trame_server.core` should not be instantiated directly. `trame.app.get_server()` is the recommended factory function as it properly initializes the server with state and controller, and integrates it within the broader `trame` application context.

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.

from trame.app import get_server from trame.ui.vuetify import SinglePageLayout from trame.widgets import vuetify # 1. Get a server instance server = get_server(client_type="vue3") # Explicitly set client_type for V3 compatibility # 2. Add application logic to the state and controller state, ctrl = server.state, server.controller state.count = 0 @state.change('count') def update_title(count, **kwargs): ctrl.trame.title(f'Count is {count}') @ctrl.add('reset_count') def reset(): state.count = 0 # 3. Create the UI with SinglePageLayout(server) as layout: layout.title.set_text("Trame Counter") with layout.content: with vuetify.VContainer(fluid=True): with vuetify.VRow(classes="fill-height", align="center", justify="center"): with vuetify.VCol(cols=4): vuetify.VSlider( label="Count", min=0, max=100, step=1, v_model=("count", 0) # Bind to state.count ) vuetify.VBtn("Reset", click=ctrl.reset_count) # 4. Start the server if __name__ == "__main__": server.start()
Debug
Known issues
breakingTrame v3 (which `trame-server` is part of) changed the default client framework from Vue2 to Vue3 around January 2024. Existing Trame applications built with Vue2 may break or behave unexpectedly.
fix
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.
affects: >=3.0.0
breakingTrame v3 no longer bundles all widgets as implicit dependencies. Core widgets like `trame.widgets.html` and `trame.widgets.client` remain, but other common widget sets (e.g., Vuetify, VTK, Plotly) must now be explicitly installed.
fix
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`).
affects: >=3.0.0
deprecatedThe `trame.app.jupyter` package has been removed in Trame v3. Its functionalities for Jupyter integration are now directly handled by the layout components.
fix
Remove imports and usage of `trame.app.jupyter`. Refer to the `trame` documentation for updated Jupyter integration patterns, which typically involve layouts like `JupyterLayout`.
affects: >=3.0.0
gotcha`trame-server` is an internal implementation package. Direct usage and instantiation of its core components (e.g., `trame_server.core.Server`) are generally discouraged.
fix
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.
affects: All versions
Upgrade
Version history
3.12.5latest on PyPI · released Jun 10, 2026
Audit
Dependencies
aiohttprequiredAsynchronous HTTP client/server framework for its web server functionalities.
trame-clientrequiredMay be used for shared utilities or API definitions between server and client components.
wslinkrequiredWebsocket protocol for client-server communication.
trameoptionalWhile trame-server is a dependency of trame, most users interact with trame-server indirectly through the trame meta-package, which orchestrates the full application stack.
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
trame-server — pip install trame-server · libregistry