shiny.Session#

class shiny.Session(app, id, conn, debug=False)#

A class representing a user session.

Methods

close([code])

Close the session.

download([id, filename, media_type, encoding])

Decorator to register a function to handle a download.

dynamic_route(name, handler)

Register a function to call when a dynamically generated, session-specific, route is requested.

make_scope(id)

rtype

Session

on_ended(fn)

Registers a function to be called after the client has disconnected.

on_flush(fn[, once])

Register a function to call before the next reactive flush.

on_flushed(fn[, once])

Register a function to call after the next reactive flush.

root_scope()

rtype

Session

send_custom_message(type, message)

Send a message to the client.

send_input_message(id, message)

Send an input message to the session.

Attributes

ns

app

id

http_conn

input

output

user

groups