Trame, a framework to build applications in plain Python
Project description
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
With trame, create stunning, interactive web applications compactly and intuitively.
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
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_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_exited : Trame is exiting its event loop
on_server_reload : If callback registered it is used for reloading server side modules
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.
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
Built Distribution
File details
Details for the file trame-3.6.4.tar.gz
.
File metadata
- Download URL: trame-3.6.4.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.11.1 readme-renderer/44.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.2.2 tqdm/4.66.5 importlib-metadata/8.4.0 keyring/25.3.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81e03db030c69fde22bb11ddadc8af4b1218d7ddc53ad6dee4ebb223151a6c3c |
|
MD5 | 63e8d32f54f4d3f64dde38df2c9ecce4 |
|
BLAKE2b-256 | 9c0b556d8cf9322c7b6d42c6fa75ea5f7c69562254dba5536237f7e0417a41ae |
File details
Details for the file trame-3.6.4-py3-none-any.whl
.
File metadata
- Download URL: trame-3.6.4-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.11.1 readme-renderer/44.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.2.2 tqdm/4.66.5 importlib-metadata/8.4.0 keyring/25.3.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b29a571e3f830b06062e462f754a6e9700aab148c11b8dbed2d4bd99e6f514bd |
|
MD5 | 21e49c0b711003bd21087c72f4722f1e |
|
BLAKE2b-256 | acd055ee4ff868c0709e1a09ce15bccfca3fe1f995e616729039e87667640368 |