Skip to main content

trame-remote-control

A trame extension to allow outside programs to send instructions to a trame app.

trame-remote-control attaches a REST-API endpoint, which can be used by outside programs to send instrctions, called actions to the program. This can, e.g., be used to initialite a Connection between a trame app and a ParaView Server.

Supported Actions

The API endpoint will by default initialized on the /api path, which can be changed be setting the REMOTE_CONTROL_ENDPOINT environment variable to a different location.

To trigger an action, send a POST request to the API path. The body must contain a JSON, which specifies the action to trigger and might contain the parameters for that action. See the list below for the supported actions and their required parameters:

{
  "action": "connect",
  "url": "localhost",
  "port": 11111
}
Action Name Parameters Description
connect url: string, port: optional int = 11111 Connect a trame-vtk app to a ParaView Serverrunning on <url>:<port>
diconnect Disconnect from a previously connected ParaView Server
open_catalyst Open a Catalyst connection

Installing

To install this extension, execute pip install trame-remote-control

For a Development install, clone the repository and execute pip install -e .

Usage

After you installed the extension, import the module via trame. To initialize the API endpoint, execute the initialize method. If you, optionally, want to create the UI Elements to trigger action from within the application, you can execute create_panel:

from trame.app import get_server
from trame.ui.vuetify import SinglePageLayout
from trame.widgets import vuetify, remote_control

def main():
    server = get_server()
    
    ... # Other initialization
    
    remote_control.initialize(server)

    # Create UI
    with SinglePageLayout(server):
        ...

        with vuetify.VCol():
            remote_control.create_panel(server)

ToDos

  • Allow developers to specify which Actions are initialized
  • Add ping route to retrieve if application has finished loading and which Actions are available
  • Create more Actions

Metadata

Release files for trame-remote-control 0.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-remote-control 0.1.1
File Size Uploaded Provenance Actions
trame_remote_control-0.1.1.tar.gz 8.0 kB Without provenance Details for trame_remote_control-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for trame-remote-control 0.1.1
File Interpreter ABI Platform Actions
trame_remote_control-0.1.1-py3-none-any.whl Python 3 none any Details for trame_remote_control-0.1.1-py3-none-any.whl

Total release size: 17.3 kB

Release files / trame_remote_control-0.1.1.tar.gz

Download URL trame_remote_control-0.1.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1834789ec15ab7964badaa3a13f8dd29c1e96a7f66f5569538d72a30237d96d2
BLAKE2b-256 checksum
How to use checksums
3a800b4b904c4cfdf631ccf47a16da44b4800d0eeac52276307cf0805cc03bd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / trame_remote_control-0.1.1-py3-none-any.whl

Download URL trame_remote_control-0.1.1-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7083a290fcc50aa2d4fdc7de73dcd574e976d6c72f185b199da628339bf209b
BLAKE2b-256 checksum
How to use checksums
b3895e4a5e9c5f34581edcd766184dd71f024113047e61ecb5a24670ca794a2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Security for trame-remote-control 0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

0.1.1 This release

2 release files No 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