Skip to main content

Trame, a framework to build applications in plain Python

Project description

Test and Release Download stats

trame - a web framework that weaves together open source components into customized visual analytics easily.

trame is French for

  • the core that ties things together

  • a guide providing the essence of a task

Welcome to trame and 3D visualization

With trame, create stunning, interactive web applications compactly and intuitively.

image_1 image_2 image_3

3D Visualization

With best-in-class VTK and ParaView platforms at its core, trame provides complete control of 3D visualizations and data movements. Developers benefit from a write-once environment while trame simply exposes both local and remote rendering through a single method.

Rich Features

trame leverages existing libraries and tools such as Vuetify, Altair, Vega, deck.gl, VTK, ParaView, and more, to create vivid content for visual analytics applications.

Problem Focused

By relying simply on Python, trame focuses on one’s data and associated analysis and visualizations while hiding the complications of web app development.

Desktop to cloud

The resulting trame applications can act as local desktop applications or remote cloud applications both accessed through a browser.

Installing

trame can be installed with pip:

pip install --upgrade trame

Usage

The Trame Tutorial is the place to go to learn how to use the library and start building your own application.

The API Reference documentation provides API-level documentation.

License

trame is made available under the Apache License, Version 2.0. For more details, see LICENSE

Community

Trame | Discussions | Issues | RoadMap | Contact Us

https://zenodo.org/badge/410108340.svg

Enjoying trame?

Share your experience with a testimonial or with a brand approval.

Optional dependencies

When installing trame using pip (pip install trame) you will get the core infrastructure for any trame application to work but more advanced usage may require additional dependencies. The list below captures what may need to add depending on your usage:

  • pywebview : Needed for desktop usage (–app)

  • jupyterlab : Needed to run inside jupyter-lab

  • notebook : Needed to run inside jupyter-notebook

  • requests : Needed when using remote assets such as GDrive files

Environments variables

  • TRAME_LOG_NETWORK : Path to log file for capturing network exchange. (default: None)

  • TRAME_WS_MAX_MSG_SIZE : Maximum size in bytes of any ws message. (default: 10MB)

  • TRAME_WS_HEART_BEAT : Time in second before assuming the server is non-responsive. (default: 30s)

Life cycle callbacks

Life cycle events are directly managed on the application controller and are prefixed with on_*.

  • on_server_start : Executed at server.start() call while passing the server as argument.

  • on_server_bind : WSLinkServer is getting bound to trame so you can attach your own routes. Its instance will be passed as argument to callback.

  • on_server_ready : All protocols initialized and available for client to connect

  • on_client_connected : Connection established to server

  • on_client_exited : Linked to browser “beforeunload” event

  • on_server_start : Trame is starting its event loop

  • on_server_exited : Trame is exiting its event loop

  • on_server_reload : If callback registered it is used for reloading server side modules

  • on_error : A JavaScript error has occurred in the client, can be used to do something on the server when this occurs

  • on_exception : Server exception occurred when interacting with the UI. The exception instance is provided as arg.

Reserved state entries

The shared state allow us to synchronize the server with the client. Rather than creating another mechanism to handle similar needs throughout the application we purposely reuse that state internally. To prevent any conflict with any user we are prefixing our internal variable with trame__*. In general those state values should not be use or changed by the user except for the one listed below:

Read/Write:
  • trame__favicon: Update it to replace the displayed favicon in your browser. The content needs to be an image encoded url.

  • trame__title: Update it to replace your page title (tab name / window name).

Read-only:
  • trame__busy: Provide information if we have pending requests waiting for the server to respond.

  • tts: Template Time Stamp to regenerate sub elements when a template gets updated. Usually used as :key=”tts” to force some component rebuild.

Professional Support

  • Training: Learn how to confidently use trame from the expert developers at Kitware.

  • Support: Our experts can assist your team as you build your web application and establish in-house expertise.

  • Custom Development: Leverage Kitware’s 25+ years of experience to quickly build your web application.

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

trame-3.13.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trame-3.13.0-py3-none-any.whl (31.0 kB view details)

Uploaded Python 3

File details

Details for the file trame-3.13.0.tar.gz.

File metadata

  • Download URL: trame-3.13.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for trame-3.13.0.tar.gz
Algorithm Hash digest
SHA256 477cd1457c1e5952d79484d1f7038498300792e51f2b17cae52dfdfa56ac9627
MD5 433ec59b81021135a20f2cb0811ee034
BLAKE2b-256 d02477a371acab0eb402f6849ccbb5fa5b3be49298397bf5709070f83470244f

See more details on using hashes here.

Provenance

The following attestation bundles were made for trame-3.13.0.tar.gz:

Publisher: test_and_release.yml on Kitware/trame

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trame-3.13.0-py3-none-any.whl.

File metadata

  • Download URL: trame-3.13.0-py3-none-any.whl
  • Upload date:
  • Size: 31.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for trame-3.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8681a7abf80830f81db44109c6d6bd5e4e13b73c0e5a5bf51947465c8a68cdf
MD5 7e640e4dbd59a539101b6ec8b45ad767
BLAKE2b-256 506e846a65d387fce5dfc7c4458aafe35d2c92de4268080928987d4ad00849b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for trame-3.13.0-py3-none-any.whl:

Publisher: test_and_release.yml on Kitware/trame

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page