Skip to main content

trame-server: server implementation of trame pypi_download

Test and Release Code Coverage

trame-server is the server implementation of trame. This Python library provide the server implementation of the shared state and controller along with the definition of the web server. The web server aims to be flexible so it can be use within a Jupyter environment or as a standalone desktop application.

This package is not supposed to be used by itself but rather should come as a dependency of trame. For any specificity, please refer to the trame documentation.

Installing

trame-server can be installed with pip:

pip install trame-server

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.

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)

  • TRAME_DESKTOP_DEBUG : If defined it will allow user to inspect the web content in desktop mode

  • TRAME_SERVER : If set to true, this will prevent browser from opening by default

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_exited : Trame is exiting its event loop

  • on_error : JS error forwarded (msg:str) on the python

  • on_exception : Server exception occurred when interacting with the UI, in a @state.change listener (sync or async) or in a controller task (ctrl.add_task). The exception instance is provided as arg.

  • on_server_reload : If callback registered it can be use to hot_reload methods like the UI.

License

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

Community

Trame | Discussions | Issues | Contact Us

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

Enjoying trame?

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

Development

Install the library in dev mode

# Create venv and install all dependencies
uv sync --all-extras --dev

# Activate environment
source .venv/bin/activate

# Install commit analysis
pre-commit install
pre-commit install --hook-type commit-msg

# Run pre-commit checks
pre-commit run --all-files

Metadata

Release files for trame-server 4.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trame-server 4.1.1
File Size Uploaded Provenance Actions
trame_server-4.1.1.tar.gz 41.2 kB With provenance Details for trame_server-4.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for trame-server 4.1.1
File Interpreter ABI Platform Actions
trame_server-4.1.1-py3-none-any.whl Python 3 none any Details for trame_server-4.1.1-py3-none-any.whl

Total release size: 89.1 kB

Release files / trame_server-4.1.1.tar.gz

Download URL trame_server-4.1.1.tar.gz
Size 41.2 kB
Tags Source
SHA-256 checksum
How to use checksums
98c41f7097e62ed5203741c89ec868e2b605b9596e35be326fa865bec2e21751
BLAKE2b-256 checksum
How to use checksums
b478924ff086e0abab27dc302a54c320ca80c3868536b5ad38276e5387e92496
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / trame_server-4.1.1-py3-none-any.whl

Download URL trame_server-4.1.1-py3-none-any.whl
Size 47.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21daae6d5ac2808d49f485987ed7e449db8b8e6d0f3bae8f91b9556443cc9b96
BLAKE2b-256 checksum
How to use checksums
14a740c16fa4489f46e55ae7a7a4ec7675c667ed662d24f5252fb798d4e9455c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for trame-server 4.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for trame_server-4.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page