Skip to main content

Internal server side implementation of trame

Project description

Test and Release

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 --upgrade 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

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_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 | RoadMap | Contact Us

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

Enjoying trame?

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

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-server-2.12.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

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

trame_server-2.12.0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file trame-server-2.12.0.tar.gz.

File metadata

  • Download URL: trame-server-2.12.0.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.5 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.13

File hashes

Hashes for trame-server-2.12.0.tar.gz
Algorithm Hash digest
SHA256 be11102283a71c2f128f039a9b155aa7049bc74e0c1d00262202ef61f789d280
MD5 abd5768645df4b3535b800db49cc8e0c
BLAKE2b-256 62361c4f83a0c63545e485c88d9b84055d7902d50e8811affaef4f4ef8160f1c

See more details on using hashes here.

File details

Details for the file trame_server-2.12.0-py3-none-any.whl.

File metadata

  • Download URL: trame_server-2.12.0-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.5 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.13

File hashes

Hashes for trame_server-2.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6979d909db00cf6e6ee860a0a12cea8be7993040642a7929a510d94bdab23a6c
MD5 d58a1983d939047790f5761e7d666947
BLAKE2b-256 4e38053db5ebc7bc8f8be5b78cb7a599c5b2066e2eb29a509e53c5baa98e17b7

See more details on using hashes here.

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