trame.app package
- trame.app.get_server(name: str | Server | None = None, create_if_missing: bool = True, client_type: Literal['vue2', 'vue3'] | None = None, **kwargs) Server | None
Return a server for serving trame applications.
If a name is given and such server is not available yet, it will be created otherwise the previously created instance will be returned.
- Parameters:
name (None | str | Server instance) – A server name identifier which can be useful when several servers are expected to be created. Most of the time, passing no arguments is what you are looking for. Also an actual Server instance can be provided so you can use it as a decorator function.
create_if_missing (bool) – By default if a server for a given name does not exist that method will create it.
client_type (None | "vue2" | "vue3") – If provided, it will set it on the server.
**kwargs –
any extra keyword args are passed as option to the server instance.
- Returns:
Return a unique Server instance per given name.
- Return type:
- trame.app.get_client(url: str | None = None, hot_reload: bool = False, **kwargs) Client
Return a client to a remote trame applications.
If a url is given and such client is not available yet, it will be created otherwise the previously created instance will be returned.
- Parameters:
- Returns:
Return a unique Client instance per given url. Each instance needs to call connect().
- Return type:
- class trame.app.TrameApp(server=None, client_type='vue3', ctx_name=None, **_)
Bases:
TrameComponent
Base trame class that has access to a trame server instance on which we provide simple accessor and method decoration capabilities.
- class trame.app.TrameComponent(server, ctx_name=None, **_)
Bases:
object
Base trame class that has access to a trame server instance on which we provide simple accessor and method decoration capabilities.
- property server
Return the associated trame server instance
- property state
Return the associated server state
- property ctrl
Return the associated server controller
- property ctx
Return the associated server context
Submodules
- trame.app.asynchronous module
- trame.app.core module
VirtualNode
Client
Server
Server.http_headers
Server.enable_module()
Server.js_call()
Server.change
Server.trigger
Server.trigger_name
Server.name
Server.root_server
Server.translator
Server.options
Server.client_type
Server.cli
Server.state
Server.context
Server.controller
Server.ui
Server.running
Server.network_completion
Server.ready
Server.get_server_state()
Server.add_protocol_to_configure()
Server.protocol
Server.protocol_call()
Server.force_state_push()
Server.start()
Server.stop()
Server.port
Server.server_options
get_server()
get_client()
- trame.app.demo module
- trame.app.dev module
- trame.app.file_upload module
- trame.app.jupyter module
- trame.app.klass module
- trame.app.mimetypes module
- trame.app.pv_demo module
- trame.app.singleton module
- trame.app.testing module