{"id":6273,"library":"trame","title":"Trame","description":"Trame is an easy-to-use, Python-based framework that lets you create web applications with interactive scientific visualization. It simplifies web development by managing UI layout, state, events, and widgets entirely in Python, abstracting away the need for HTML, CSS, or JavaScript. Trame applications can run locally, remotely, in the cloud, in Jupyter, or on HPC. The library maintains an active release cadence, with version 3.12.0 being the latest stable release.","status":"active","version":"3.12.0","language":"en","source_language":"en","source_url":"https://github.com/Kitware/trame","tags":["web-framework","gui","scientific-visualization","dashboard","python-gui","vtk","paraview","data-visualization"],"install":[{"cmd":"pip install trame","lang":"bash","label":"Install core Trame library"}],"dependencies":[{"reason":"Provides Vuetify UI components for building rich user interfaces.","package":"trame-vuetify","optional":true},{"reason":"Enables 3D visualization capabilities using VTK (Visualization Toolkit).","package":"trame-vtk","optional":true},{"reason":"Required for packaging Trame applications as desktop apps with the '--app' flag.","package":"pywebview","optional":true},{"reason":"Needed to run Trame applications directly within JupyterLab environments.","package":"jupyterlab","optional":true},{"reason":"Needed to run Trame applications directly within classic Jupyter Notebook environments.","package":"notebook","optional":true},{"reason":"Required when Trame applications need to interact with remote assets, such as GDrive files.","package":"requests","optional":true}],"imports":[{"symbol":"get_server","correct":"from trame.app import get_server"},{"note":"For Trame v3+, the default client is Vue3, so import from `vuetify3`. Older Vue2-based layouts or widgets will cause issues.","wrong":"from trame.ui.vuetify import SinglePageLayout","symbol":"SinglePageLayout","correct":"from trame.ui.vuetify3 import SinglePageLayout"},{"note":"Trame v3 defaults to Vue3 widgets. Use `vuetify3` for new projects. Older `vuetify` (Vue2) widgets may still be used if `server.client_type` is explicitly set to 'vue2'.","wrong":"from trame.widgets import vuetify as v2","symbol":"v3","correct":"from trame.widgets import vuetify3 as v3"}],"quickstart":{"code":"from trame.app import get_server\nfrom trame.ui.vuetify3 import SinglePageLayout\nfrom trame.widgets import vuetify3 as v3\n\nserver = get_server(client_type=\"vue3\") # Explicitly set for clarity in v3+ apps\nserver.state.name = \"Trame\"\n\nwith SinglePageLayout(server) as layout:\n    layout.title.set_text(\"Hello Trame\")\n    with layout.content:\n        with v3.VContainer(classes=\"fill-height\", fluid=True):\n            with v3.VRow(classes=\"fill-height\", align=\"center\", justify=\"center\"):\n                with v3.VCol(cols=12, sm=6, md=4):\n                    v3.VCard(\n                        v3.VCardTitle(classes=\"headline\", children=[\"Welcome to \", ('name', 'Trame App')]),\n                        v3.VCardText(\"This is a simple Trame application running in Vue3!\"),\n                        v3.VCardActions(\n                            v3.VSpacer(),\n                            v3.VBtn('Click me!', click='server.state.name = \"Updated Trame\"'),\n                            v3.VSpacer(),\n                        )\n                    )\n\nif __name__ == '__main__':\n    server.start()","lang":"python","description":"This quickstart code initializes a Trame server, sets a reactive state variable, and defines a simple single-page layout using Vuetify3 widgets. It creates a card with a title that updates when a button is clicked, demonstrating basic interactivity. The application runs locally and opens in a web browser upon execution."},"warnings":[{"fix":"For existing v2 apps, add `server.client_type = \"vue2\"` after `get_server()`. For new v3 apps, use `vuetify3` imports (e.g., `from trame.ui.vuetify3 import SinglePageLayout`, `from trame.widgets import vuetify3 as v3`).","message":"Trame v3 changed the default client type from Vue2 to Vue3 in January 2024. Existing applications built with Trame v2 that relied on Vue2 components will need to explicitly set `server.client_type = \"vue2\"` or migrate to Vue3 components.","severity":"breaking","affected_versions":"3.0.0+"},{"fix":"Install optional dependencies explicitly: `pip install trame-vuetify trame-vtk`.","message":"In Trame v3, 'trame-vuetify' and 'trame-vtk' are no longer bundled by default with the core `trame` package. They must be installed separately if you intend to use Vuetify UI components or VTK visualizations.","severity":"breaking","affected_versions":"3.0.0+"},{"fix":"Avoid using `trame.app.jupyter` and `trame.app.dev`. Rely on direct Jupyter integration provided by current layouts.","message":"The `trame.app.jupyter` package has been removed in Trame v3 as Jupyter integration is now directly part of the layouts. The `trame.app.dev` package is also considered deprecated and generally not needed for 99.99% of users.","severity":"deprecated","affected_versions":"3.0.0+"},{"fix":"If arguments overlap, use the `--trame-args` flag to pass specific arguments to the Trame server, e.g., `python your_app.py --my-custom-arg 123 --trame-args --port 8081`.","message":"When combining Trame with custom command-line argument parsers (e.g., `argparse`), ensure that your arguments do not overlap with Trame's built-in server arguments.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult the documentation for `trame-vuetify3` and other specific widget libraries to understand any API differences when migrating or developing for Vue3.","message":"API changes in underlying front-end libraries (like Vuetify from v2 to v3) can affect Trame widgets, even if Trame itself aims for API compatibility.","severity":"gotcha","affected_versions":"3.0.0+"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}