File: __init__.py

package info (click to toggle)
python-trame-client 3.10.4-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 3,128 kB
  • sloc: python: 9,583; javascript: 3,897; sh: 9; makefile: 6
file content (17 lines) | stat: -rw-r--r-- 455 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
def setup(server, **kargs):
    client_type = "vue2"
    if hasattr(server, "client_type"):
        client_type = server.client_type

    if client_type == "vue2":
        from . import vue2

        server.enable_module(vue2)
    elif client_type == "vue3":
        from . import vue3

        server.enable_module(vue3)
    else:
        raise TypeError(
            f"Trying to initialize trame_client with unknown client_type={client_type}"
        )