vuer#

class vuer.Vuer#

A Vuer is a document that can be rendered in a browser.

name = 'vuer'#
uri = 'ws://localhost:8012'#
domain = 'https://vuer.ai'#
port = 8012#
free_port = True#
static_root = '.'#
queue_len = 100#
cors = 'https://vuer.ai,https://dash.ml,http://localhost:8000,http://127.0.0.1:8000,*'#
queries = {}#
device = 'cuda'#
WEBSOCKET_MAX_SIZE = 268435456#
host = 'localhost'#
class vuer.VuerSession#
async grab_render(ttl=2.0, **kwargs) ClientEvent#

Grab a render from the client.

Parameters:
  • quality – The quality of the render. 0.0 - 1.0

  • subsample – The subsample of the render.

  • ttl – The time to live for the handler. If the handler is not called within the time it gets removed from the handler list.

Return type:

ClientEvent

property set: At#

Used exclusively to set the scene.

the @SET operator is responsible for setting the root node of the scene.

Examples:

proxy @ Set(Scene(children=[…]))

or

app.set @ Scene(children=[…])

property update: At#

Used to update existing elements. NOOP if an element does not exist.

Supports passing in a list of elements. (Thank God I implemented this… so handy! - Ge)

Example Usage:

app.update @ [element1, element2, ...]
property add: At#

Used to add elements to a specific parent.

Requires a parentKey, or treats the Scene root node as the default parent.

Example Usage:

app.add(element1, element2, ..., to=parentKey.)

or using the Scene root node as the default parent:

app.add @ element1
property upsert: At#

Upsert elements to a specific parent.

Requires a parentKey, or treats the Scene root node as the default parent.

Example Usage:

app.upsert(element1, element2, ..., to=parentKey.)

or using the Scene root node as the default parent:

app.upsert @ element1
property remove: At#

Remove elements by keys.

Example Usage:

app.remove @ ["key1", "key2", ...]

or a single key:

app.remove @ "key1"
popleft()#
pop()#
clear()#

clears all client messages

stream()#