Open random-user0 opened 1 year ago
You can list all attributes available in the session
object with the following code lines:
for property, value in vars(session).items():
print(property, ":", value)
There're only 2 None attributes in it: user
and groups
, then you can initialize user
as a dictionary for session variables:
session.user = {"varName": varValue}
It isn't documented in py-shiny 's Doc and API, neither in examples too, hope that it'll be well documeneted in the future.
Great callout, I added this to the documentation site. Thanks for raising (and solving!) this issue.
Great! Glad to hear that. :)
Hello, in regards to the session.user
and related functions, are those features also available when an app is published on shinyapps.io? Could that be captured in the documentation as well?
For reference, here are the docs related to posting on Posit Connect: https://docs.posit.co/connect/user/shiny-python/#user-meta-data
Comparing the Session documentation for R Shiny and Python Shiny shows a lack of parity between the available features, with my specific interest being the userData functionality. What are the plans for the Python Shiny Session object to match R Shiny's functionality?