Trame let you weave various components and technologies into a Web Application solely written in Python.

Related tags

Web Frameworks trame
Overview

Trame

Trame aims to be a framework for building interactive applications using a web front-end in plain Python. Such applications can be used locally as any desktop application but also be deployed in the cloud or on premise to access big and/or sensitive data.

Trame comes with lots of capabilities built-in by leveraging existing libraries or tools such as Vuetify, Altair, Vega, Deck, VTK, ParaView and more. Trame lets you create interactive data processing applications with rich visualizations without switching languages or technologies.

Trame lets you define your application in a very compact and intuitive way while letting you take over if you know better. Several available layouts let you build your application in no time.

Trame is the perfect companion to VTK or ParaView by offering various rendering and processing configurations. Trame lets you choose between server-side and client-side rendering along with hybrid approaches.

Please explore our gallery of examples for getting started.

Did you know that Trame is a French word with the following set of meanings:

  • set of thread that are interlaced with each other to form a fabric
  • the core of something that tigh things together (similar to a plot but more general)
  • something that guide you by providing the core part of what you are doing

With this Open Source project we aim to help data scientists and researchers to solve their complex problems. And if need be we will be more than happy to team-up with you to help solve your next big idea.

Comments
  • Connection lost page should attempt a retry

    Connection lost page should attempt a retry

    Is your feature request related to a problem? Please describe.

    The connection lost screen after killing/relaunching the server appears as though it is trying to reconnect with the spinning icon:

    2022-09-16 16 28 10

    But it actually does nothing (as far as I can tell). So I have to refresh the page.

    Describe the solution you'd like

    I'd like this to attempt to reconnect to my app and load when it's ready or not using this sort of misleading graphic

    opened by banesullivan 9
  • Add vue-router helper classes and example

    Add vue-router helper classes and example

    Simple demo to use the Vue-Router in Trame to create multi-page applications.

    I suggest two ways to add a new route. layout.add_route and layout.with_route. See the example.

    Any more/other suggestions?

    (Depends on this PR in py-web-vue: https://github.com/Kitware/py-web-vue/pull/11)

    released 
    opened by DavidBerger98 6
  • Can not forward events without a current renderer on the interactor

    Can not forward events without a current renderer on the interactor

    Describe the bug Hi, I found a bug, but it doesn't have to happen on every machine any times, Sometimes it works, sometimes throw this: Can not forward events without a current renderer on the interactor. I has test many times many way by variable of control, but still can not find a pattern. As I know, one colleagues of mine run the program in terminal, never throw this bug. But another colleague of mine need run the program by java thread, this bug happend by this way, but sometimes it works. So we try to run the program in the same machine in terminal, as my first colleagues, he never got this bug, but it still throw in our machine!

    I google this message, found this. fa7141a1db04347c33a97ac57b08c58

    But I can not imagine why getCurrentRenderer() dont work well. So, I came here, hoping for some possible leads, maybe can help.

    sorry for my english, I come from china. I hope I've described it correctly

    Code

    # just same as examples
    

    Screenshots e0e42c575f19fb9f465e1e3359bab77

    Platform: Windows 10

    Trame:

    • [*] Version 2.x

    Device:

    • [*] Desktop
    • [ ] Mobile

    OS:

    • [*] Windows

    Browsers Affected:

    • [*] Chrome
    opened by Brandon-Xu 5
  • Implement v-on and v-bind

    Implement v-on and v-bind

    v-on and v-bind were not mapped from python keys to vue keys, which made it not possible to implement and example like this:

    with vuetify.VMenu():
        with vuetify.Template(v_slot_activator="{ on, attrs }"):
            with vuetify.VBtn(icon=True, v_bind="attrs", v_on="on", v_on_click="test"):
                vuetify.VIcon("mdi-dots-vertical")
        with vuetify.VList(), vuetify.VListItem(
            v_for="(item, i) in menu_items",
            key="i",
            value=["item"],
        ):
            vuetify.VBtn(
                "{{ item }}",
                click=(print_item, "[item]"),
            )
    

    Note: The list of v_on_names does not cover all possibilities yet. Since you can chain most of the keywords in different ways, we should probably build the list programmatically. (e.g. v-on:click.self.stop.prevent etc.)

    released 
    opened by DavidBerger98 5
  • `from trame.widgets import vtk` is not user friendly and should not be in the examples

    `from trame.widgets import vtk` is not user friendly and should not be in the examples

    Is your feature request related to a problem? Please describe.

    The vtk widgets module should be named something else as only serious VTK power users import vtk-python the proper way like from vtkmodules.vtkRenderingCore import vtkRenderWindow.

    Most (like 99% of) users simply use import vtk and that's not going anywhere. Having from trame.widgets import vtk in the examples where you want users to also use VTK-python is setting new users up for failure as the two namespaces will conflict.

    Further, VTK is an overwhelming library for new users, so seeing from trame.widgets import vtk, they will likely think that vtk is the actual vtk where they can get classes like vtkPolyData (actually even I thought that when first trying trame).

    Describe the solution you'd like

    The vtk widgets module should be named something other than vtk, like vtk_widgets

    from trame.widgets import vtk should be something else, perhaps from trame.widgets import vtk_widgets

    Describe alternatives you've considered

    An alternative is to have all the examples use an alias: from trame.widgets import vtk as vtk_widgets

    Additional context

    I'm having to carefully modify this import statement in every trame app I create from the examples (I use the examples as templates which I expect most others do as well)

    opened by banesullivan 4
  • feat(docker): add Dockerfile for trame apps

    feat(docker): add Dockerfile for trame apps

    The trame apps will be able to mount a special "deploy" directory into the container and start a service for multiple clients to connect to and individually run the trame app.

    released 
    opened by psavery 4
  • How to delete the actor in the VtkLocalView?

    How to delete the actor in the VtkLocalView?

    image

    After excuting the click_test2() function, I can still see the actor in the browser. Refreshing the web page could erase the actor and browser Cache might be the reason. How to solve the problem?

    Thanks

    opened by 13917904019 3
  • VtkRemoteLocalView missing VtkRemoteView params

    VtkRemoteLocalView missing VtkRemoteView params

    Both VtkRemoteView and VtkLocalView have a "ref" parameter, but VtkRemoteLocalView does not.

    VtkRemoteLocalView is also missing the "interactive_quality" parameter from vtkRemoteView.

    bug 
    opened by DrewLazzeriKitware 3
  • Additional docker options

    Additional docker options

    The commit messages are pasted below:

    fix(docker): add additional build options

    This allows the user to separate out building the venv, launcher, and www.

    The default behavior is that all will build if they do not exist. If they do exist, then they will not be built.

    However, the user can now select some options via a TRAME_BUILD environment variable. If this string contains (single or any combination of) "venv", "launcher", or "www", then those respective parts will be re-built, even if they already exist.

    Additionally, a "no_www" can be specified in the TRAME_BUILD environment variable, which indicates to skip the www generation, even if it does not exist.

    fix(docker): add ability to replace USE_HOST

    If a TRAME_USE_HOST environment variable is defined, then this will replace USE_HOST in the final copy of the launcher json file.

    If TRAME_USE_HOST contains ://, then this will replace ws://USE_HOST instead.

    opened by psavery 2
  • Segmentation fault after WebSocket connection

    Segmentation fault after WebSocket connection

    Continuation of #145!

    I am currently trying to run trame/pv-visualizer on our JupyterLab instance using a JupyterServerProxy After starting the proxy, the webpage is loading properly for a few seconds. But after that, the UI can only be seen for a frame before the connection is lost.

    [I 2022-11-24 23:40:44.960 SingleUserNotebookApp handlers:446] Trying to establish websocket connection to ws://localhost:54753/ws
    [I 2022-11-24 23:40:44.963 SingleUserNotebookApp handlers:453] Websocket connection established to ws://localhost:54753/ws
    
    Loguru caught a signal: SIGSEGV
    Stack trace:
    85            0x4006ce _start + 46
    84      0x14dd31dbbcf3 __libc_start_main + 243
    83      0x14dd3363fc29 Py_BytesMain + 41
    82      0x14dd33660166 Py_RunMain + 326
    81      0x14dd3364cb0c PyRun_SimpleStringFlags + 60
    80      0x14dd335cd424 PyRun_StringFlags + 164
    79      0x14dd3364fc57 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x1b9c57) [0x14dd3364fc57]
    78      0x14dd33651974 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x1bb974) [0x14dd33651974]
    77      0x14dd335b129b PyEval_EvalCode + 27
    76      0x14dd335b12e3 PyEval_EvalCodeEx + 67
    75      0x14dd335b1341 _PyEval_EvalCodeWithName + 81
    74      0x14dd335b1534 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x11b534) [0x14dd335b1534]
    73      0x14dd335b4302 _PyEval_EvalFrameDefault + 7394
    72      0x14dd335c168d _PyFunction_Vectorcall + 221
    71      0x14dd335b1534 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x11b534) [0x14dd335b1534]
    70      0x14dd335b70fd _PyEval_EvalFrameDefault + 19165
    69      0x14dd335cb2aa PyVectorcall_Call + 170
    68      0x14dd335cac59 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x134c59) [0x14dd335cac59]
    67      0x14dd335c168d _PyFunction_Vectorcall + 221
    66      0x14dd335b1534 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x11b534) [0x14dd335b1534]
    65      0x14dd335b70fd _PyEval_EvalFrameDefault + 19165
    64      0x14dd335cb2aa PyVectorcall_Call + 170
    63      0x14dd335c168d _PyFunction_Vectorcall + 221
    62      0x14dd335b1534 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x11b534) [0x14dd335b1534]
    61      0x14dd335b70fd _PyEval_EvalFrameDefault + 19165
    60      0x14dd335cb2aa PyVectorcall_Call + 170
    59      0x14dd335c168d _PyFunction_Vectorcall + 221
    58      0x14dd335b1534 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x11b534) [0x14dd335b1534]
    57      0x14dd335b2b7f _PyEval_EvalFrameDefault + 1375
    56      0x14dd335c168d _PyFunction_Vectorcall + 221
    55      0x14dd335b1534 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x11b534) [0x14dd335b1534]
    54      0x14dd335b2d29 _PyEval_EvalFrameDefault + 1801
    53      0x14dd335c1923 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x12b923) [0x14dd335c1923]
    52      0x14dd335b2d29 _PyEval_EvalFrameDefault + 1801
    51      0x14dd335c1923 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x12b923) [0x14dd335c1923]
    50      0x14dd335b2d29 _PyEval_EvalFrameDefault + 1801
    49      0x14dd335c1923 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x12b923) [0x14dd335c1923]
    48      0x14dd335b2d29 _PyEval_EvalFrameDefault + 1801
    47      0x14dd335c1923 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x12b923) [0x14dd335c1923]
    46      0x14dd335b85b3 _PyEval_EvalFrameDefault + 24467
    45      0x14dd335ba75a /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x12475a) [0x14dd335ba75a]
    44      0x14dd336385c6 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x1a25c6) [0x14dd336385c6]
    43      0x14dd335bb8c3 _PyObject_MakeTpCall + 131
    42      0x14dd229ae378 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so(+0x8378) [0x14dd229ae378]
    41      0x14dd229ac8f4 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so(+0x68f4) [0x14dd229ac8f4]
    40      0x14dd335e6032 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x150032) [0x14dd335e6032]
    39      0x14dd335b4d6c _PyEval_EvalFrameDefault + 10060
    38      0x14dd335e6032 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x150032) [0x14dd335e6032]
    37      0x14dd335b4d6c _PyEval_EvalFrameDefault + 10060
    36      0x14dd335e6032 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x150032) [0x14dd335e6032]
    35      0x14dd335b4d6c _PyEval_EvalFrameDefault + 10060
    34      0x14dd335e6032 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x150032) [0x14dd335e6032]
    33      0x14dd335b70fd _PyEval_EvalFrameDefault + 19165
    32      0x14dd335c168d _PyFunction_Vectorcall + 221
    31      0x14dd335b1534 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x11b534) [0x14dd335b1534]
    30      0x14dd335b2d29 _PyEval_EvalFrameDefault + 1801
    29      0x14dd335c168d _PyFunction_Vectorcall + 221
    28      0x14dd335b1534 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x11b534) [0x14dd335b1534]
    27      0x14dd335b2d29 _PyEval_EvalFrameDefault + 1801
    26      0x14dd335c1923 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x12b923) [0x14dd335c1923]
    25      0x14dd335b48a4 _PyEval_EvalFrameDefault + 8836
    24      0x14dd335bb8c3 _PyObject_MakeTpCall + 131
    23      0x14dd335cc4a0 /p/software/juwels/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/lib/libpython3.9.so.1.0(+0x1364a0) [0x14dd335cc4a0]
    22      0x14dcd16fa3cd /p/usersoftware/swmanage/goebbert1/stage2022/ParaView/easybuild/juwels/software/ParaView/5.11.0-gpsmkl-2021b/lib64/python3.9/site-packages/paraview/modules/vtkPVClientWeb.so(+0x43cd) [0x14dcd16fa3cd]
    21      0x14dcd16ee191 vtkPVWebApplication::StillRenderToBuffer(vtkSMViewProxy*, unsigned long, int) + 17
    20      0x14dcd16eddc2 vtkPVWebApplication::StillRender(vtkSMViewProxy*, int) + 370
    19      0x14dd0050c011 vtkSMViewProxy::CaptureWindow(int, int) + 81
    18      0x14dd0050ba76 /p/usersoftware/swmanage/goebbert1/stage2022/ParaView/easybuild/juwels/software/ParaView/5.11.0-gpsmkl-2021b/lib/libvtkRemotingViews-pv5.11.so.1(+0x2eca76) [0x14dd0050ba76]
    17      0x14dd0050b675 /p/usersoftware/swmanage/goebbert1/stage2022/ParaView/easybuild/juwels/software/ParaView/5.11.0-gpsmkl-2021b/lib/libvtkRemotingViews-pv5.11.so.1(+0x2ec675) [0x14dd0050b675]
    16      0x14dd0050ae24 vtkSMViewProxy::CaptureWindowSingle(int, int) + 52
    15      0x14dd0050a7a2 vtkSMViewProxy::CaptureWindowInternal(int, int) + 770
    14      0x14dd0050a21a vtkSMViewProxy::StillRender() + 362
    13      0x14dd04e03764 vtkPVSessionBase::ExecuteStream(unsigned int, vtkClientServerStream const&, bool) + 52
    12      0x14dd04e0585b vtkPVSessionCore::ExecuteStreamInternal(vtkClientServerStream const&, bool) + 251
    11      0x14dd2237257d vtkClientServerInterpreter::ProcessStream(vtkClientServerStream const&) + 29
    10      0x14dd223720ed vtkClientServerInterpreter::ProcessOneMessage(vtkClientServerStream const&, int) + 221
    9       0x14dd22371fae vtkClientServerInterpreter::ProcessCommandInvoke(vtkClientServerStream const&, int) + 1214
    8       0x14dcfd8a3950 vtkPVRenderViewCommand(vtkClientServerInterpreter*, vtkObjectBase*, char const*, vtkClientServerStream const&, vtkClientServerStream&, void*) + 6608
    7       0x14dd0043c977 vtkPVRenderView::StillRender() + 103
    6       0x14dd00449fc5 vtkPVRenderView::Render(bool, bool) + 2373
    5       0x14dd0477b920 vtkXOpenGLRenderWindow::Render() + 32
    4       0x14dd046ceb99 vtkOpenGLRenderWindow::Render() + 169
    3       0x14dd0572ed68 vtkRenderWindow::Render() + 584
    2       0x14dd0436e779 vtkXRenderWindowInteractor::Initialize() + 217
    1       0x14dd07cf689b XSync + 11
    0       0x14dd32ad9ce0 /usr/lib64/libpthread.so.0(+0x12ce0) [0x14dd32ad9ce0]
    (  16.615s) [paraview        ]                       :0     FATL| Signal: SIGSEGV
    /p/home/jusers/windgassen1/juwels/Nek/proxy-venv/lib/python3.9/site-packages/jupyter_trame_proxy/share/launch_trame.sh: line 20: 16088 Segmentation fault      python -c "from pv_visualizer.app.main import main; main(port=$1)"
    2022-11-24 23:40:47,646 - SingleUserNotebookApp - ERROR - Uncaught exception GET /user/j.windgassen_at_fz-juelich.de/vf0a98375c2247efb8baa17a2ed3d3ce/trame/ws (79.232.197.221)
    HTTPServerRequest(protocol='https', host='jupyter-jsc.fz-juelich.de', method='GET', uri='/user/j.windgassen_at_fz-juelich.de/vf0a98375c2247efb8baa17a2ed3d3ce/trame/ws', version='HTTP/1.1', remote_ip='79.232.197.221')
    Traceback (most recent call last):
      File "/p/software/juwels/stages/2022/software/Jupyter/2022.3.4-gcccoremkl-11.2.0-2021.4.0/lib/python3.9/site-packages/tornado/websocket.py", line 1086, in write_message
        fut = self._write_frame(True, opcode, message, flags=flags)
      File "/p/software/juwels/stages/2022/software/Jupyter/2022.3.4-gcccoremkl-11.2.0-2021.4.0/lib/python3.9/site-packages/tornado/websocket.py", line 1061, in _write_frame
        return self.stream.write(frame)
      File "/p/software/juwels/stages/2022/software/Jupyter/2022.3.4-gcccoremkl-11.2.0-2021.4.0/lib/python3.9/site-packages/tornado/iostream.py", line 530, in write
        self._check_closed()
      File "/p/software/juwels/stages/2022/software/Jupyter/2022.3.4-gcccoremkl-11.2.0-2021.4.0/lib/python3.9/site-packages/tornado/iostream.py", line 1019, in _check_closed
        raise StreamClosedError(real_error=self.error)
    tornado.iostream.StreamClosedError: Stream is closed
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/p/software/juwels/stages/2022/software/Jupyter/2022.3.4-gcccoremkl-11.2.0-2021.4.0/lib/python3.9/site-packages/tornado/websocket.py", line 635, in _run_callback
        result = callback(*args, **kwargs)
      File "/p/software/juwels/stages/2022/software/Jupyter/2022.3.4-gcccoremkl-11.2.0-2021.4.0/lib/python3.9/site-packages/jupyter_server_proxy/handlers.py", line 160, in on_message
        self.ws.write_message(message, binary=isinstance(message, bytes))
      File "/p/software/juwels/stages/2022/software/Jupyter/2022.3.4-gcccoremkl-11.2.0-2021.4.0/lib/python3.9/site-packages/tornado/websocket.py", line 1500, in write_message
        return self.protocol.write_message(message, binary=binary)
      File "/p/software/juwels/stages/2022/software/Jupyter/2022.3.4-gcccoremkl-11.2.0-2021.4.0/lib/python3.9/site-packages/tornado/websocket.py", line 1088, in write_message
        raise WebSocketClosedError()
    tornado.websocket.WebSocketClosedError
    
    Screenshot 2022-11-24 at 23 50 47

    I tried digging around in the code for an afternoon and finding out, where it goes south, but couldn't find anything. I was previously using ParaView 5.9 and Python 3.8 (i modified the code a bit to run there) and blamed it on those versions, but we just installed ParaView 5.11 and this error still occurs there with Python 3.9

    opened by jwindgassen 2
  • "Exception: no view provided: -1" on trame 1.19.1

    Describe the bug

    On the latest version of trame (1.19.1), the VTK view does not work as on version 1.18.0. The viewer doesn't show up in the UI and I am getting an error from vtkmodules saying:

    ERROR:root:Exception raised
    ERROR:root:Exception('no view provided: -1')
    ERROR:root:Traceback (most recent call last):
      File ".../lib/python3.8/site-packages/wslink/backends/aiohttp/__init__.py", line 371, in onMessage
        results = await asyncio.coroutine(func)(*args, **kwargs)
      File "/usr/lib/python3.8/asyncio/coroutines.py", line 124, in coro
        res = func(*args, **kw)
      File ".../lib/python3.8/site-packages/vtkmodules/web/protocols.py", line 425, in imagePush
        sView = self.getView(options["view"])
      File ".../lib/python3.8/site-packages/vtkmodules/web/protocols.py", line 80, in getView
        raise Exception("no view provided: %s" % vid)
    Exception: no view provided: -1
    

    I think it may be because of this commit? https://github.com/Kitware/trame/commit/ad23c4d88884319c05391b7e195cd8bcc85f9738

    To Reproduce

    Minimal code to reproduce:

    import vtk
    from trame import change, state
    from trame.layouts import SinglePageWithDrawer
    from trame.html import vuetify
    from trame.html.vtk import VtkRemoteLocalView
    
    # -----------------------------------------------------------------------------
    # VTK pipeline
    # -----------------------------------------------------------------------------
    
    renderer = vtk.vtkRenderer()
    renderWindow = vtk.vtkRenderWindow()
    renderWindow.AddRenderer(renderer)
    
    renderWindowInteractor = vtk.vtkRenderWindowInteractor()
    renderWindowInteractor.SetRenderWindow(renderWindow)
    renderWindowInteractor.GetInteractorStyle().SetCurrentStyleToTrackballCamera()
    
    # -----------------------------------------------------------------------------
    # Callbacks
    # -----------------------------------------------------------------------------
    @change("viewMode")
    def update_view(viewMode, flush=True, **kwargs):
        html_view.update_image()
        if viewMode == "local":
            html_view.update_geometry()
            if flush:
                # can only flush once protocol is initialized (publish)
                state.flush("viewScene")
    
    # -----------------------------------------------------------------------------
    # GUI
    # -----------------------------------------------------------------------------
    
    html_view = VtkRemoteLocalView(renderWindow, namespace="view")
    
    def on_ready(**kwargs):
        update_view("local", flush=False)
        html_view.update()
        renderer.ResetCamera()
    
    layout = SinglePageWithDrawer("Trame App", on_ready=on_ready)
    
    with layout.content:
        vuetify.VContainer(
            fluid=True,
            classes="pa-0 fill-height",
            children=[html_view],
        )
    
    if __name__ == "__main__":
        layout.start()
    
    opened by DavidBerger98 2
  • Patch VTK's `serializeInstance` to change `print` statements to warnings

    Patch VTK's `serializeInstance` to change `print` statements to warnings

    serializeInstance in Web/Python/vtkmodules/web/render_window_serializer.py of VTK uses print statements to issue warnings. We should patch this in trame to use warnings so as to have better outputs than:

    Screen Shot 2022-12-14 at 11 07 33 AM

    Further, I'm wondering if we want to add a flag to suppress these warnings?

    opened by banesullivan 0
  • trame CLI

    trame CLI

    Trame should have a CLI for more easily running scripts and for documenting the available options when running. I highly recommend gaining inspiration from streamlit's CLI so that trame scripts do not have to have __main__ catch and can have better support and auto refresh when running.

    This would likely help with #119

    I don't think this would be a big ask as there is already args parsing happening.

    opened by banesullivan 1
  • Should

    Should "pip install trame" install less packages?

    As of now pip install trame installs the following packages:

    trame-client
    trame-components
    trame-deckgl
    trame-markdown
    trame-matplotlib
    trame-plotly
    trame-router
    trame-server
    trame-simput
    trame-vega
    trame-vtk
    trame-vuetify
    trame-rca
    

    Installing trame-client, trame-server makes totally sense as they are a fundamental requirement of trame, but maybe we can have the others in and extras_require. Especially trame-vtk is pretty hefty since it installs vtk with >300MB.

    I understand that for showing the tutorials and demos it is pretty nice to have "just do pip install trame and it works", but maybe having a "just do pip install trame[vtk] and it works" isn't that bad.

    opened by DavidBerger98 5
  • Will trame consider front-end and back-end separation in future development?

    Will trame consider front-end and back-end separation in future development?

    The trame backend is now developed in python, while the front-end vue code is defined together in a python project.

    For modern web development, flexibility and extensibility are necessary. In the case that vtk.js does not support all C++ functions and also does not support unstructured grid, separating trame front-end and back-end is the most convenient and perfect solution.

    So I'm looking forward to the version that trame separates code of client and server.

    opened by supriome 2
Releases(v2.2.5)
Owner
Kitware, Inc.
Kitware develops software for web visualization, data storage, build system generation, infovis, media analysis, biomedical inquiry, cloud computing and more.
Kitware, Inc.
Pyrin is an application framework built on top of Flask micro-framework to make life easier for developers who want to develop an enterprise application using Flask

Pyrin A rich, fast, performant and easy to use application framework to build apps using Flask on top of it. Pyrin is an application framework built o

Mohamad Nobakht 10 Jan 25, 2022
Chisel is a light-weight Python WSGI application framework built for creating well-documented, schema-validated JSON web APIs

chisel Chisel is a light-weight Python WSGI application framework built for creating well-documented, schema-validated JSON web APIs. Here are its fea

Craig Hobbs 2 Dec 2, 2021
Asita is a web application framework for python based on express-js framework.

Asita is a web application framework for python. It is designed to be easy to use and be more easy for javascript users to use python frameworks because it is based on express-js framework.

Mattéo 4 Nov 16, 2021
Asita is a web application framework for python.

What is Asita ? Asita is a web application framework for python. It is designed to be easy to use and be more easy for javascript users to use python

Mattéo 4 Nov 16, 2021
A public API written in Python using the Flask web framework to determine the direction of a road sign using AI

python-public-API This repository is a public API for solving the problem of the final of the AIIJC competition. The task is to create an AI for the c

Lev 1 Nov 8, 2021
The comprehensive WSGI web application library.

Werkzeug werkzeug German noun: "tool". Etymology: werk ("work"), zeug ("stuff") Werkzeug is a comprehensive WSGI web application library. It began as

The Pallets Projects 6.2k Jan 1, 2023
Dockerized web application on Starlite, SQLAlchemy1.4, PostgreSQL

Production-ready dockerized async REST API on Starlite with SQLAlchemy and PostgreSQL

Artur Shiriev 10 Jan 3, 2023
web.py is a web framework for python that is as simple as it is powerful.

web.py is a web framework for Python that is as simple as it is powerful. Visit http://webpy.org/ for more information. The latest stable release 0.62

null 5.8k Dec 30, 2022
You can use the mvc pattern in your flask application using this extension.

You can use the mvc pattern in your flask application using this extension. Installation Run the follow command to install mvc_flask: $ pip install mv

Marcus Pereira 37 Dec 17, 2022
Distribution Analyser is a Web App that allows you to interactively explore continuous distributions from SciPy and fit distribution(s) to your data.

Distribution Analyser Distribution Analyser is a Web App that allows you to interactively explore continuous distributions from SciPy and fit distribu

Robert Dzudzar 46 Nov 8, 2022
Daniel Vaz Gaspar 4k Jan 8, 2023
The Modern And Developer Centric Python Web Framework. Be sure to read the documentation and join the Slack channel questions: http://slack.masoniteproject.com

NOTE: Masonite 2.3 is no longer compatible with the masonite-cli tool. Please uninstall that by running pip uninstall masonite-cli. If you do not unin

Masonite 1.9k Jan 4, 2023
Bionic is Python Framework for crafting beautiful, fast user experiences for web and is free and open source

Bionic is fast. It's powered core python without any extra dependencies. Bionic offers stateful hot reload, allowing you to make changes to your code and see the results instantly without restarting your app or losing its state.

 ⚓ 0 Mar 5, 2022
Endpoints is a lightweight REST api framework written in python and used in multiple production systems that handle millions of requests daily.

Endpoints Quickest API builder in the West! Endpoints is a lightweight REST api framework written in python and used in multiple production systems th

Jay Marcyes 30 Mar 5, 2022
A python application to log QSOs directly to QRZ.com from the command line

qrzlogger This script is a QRZ.com command line QSO logger. It does the following: asks the user for a call sign displays available call sign info pul

Michael Clemens 15 Jul 16, 2021
Loan qualifier app - Loan Qualifier Application Built With Python

Loan Qualifier Application This program is designed to automate the discovery pr

Phil Hills 1 Jan 4, 2022
Fast, asynchronous and elegant Python web framework.

Warning: This project is being completely re-written. If you're curious about the progress, reach me on Slack. Vibora is a fast, asynchronous and eleg

vibora.io 5.7k Jan 8, 2023
Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.

Tornado Web Server Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. By using non-blocking ne

null 20.9k Jan 1, 2023
bottle.py is a fast and simple micro-framework for python web-applications.

Bottle: Python Web Framework Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module a

Bottle Micro Web Framework 7.8k Dec 31, 2022