pn.state object makes various global state available and provides methods to manage that state.
The access token issued by the OAuth provider to authorize requests to its APIs.
A boolean value to indicate whether a callback is being actively processed.
A global cache which can be used to share data between different processes.
HTTP request cookies for the current session.
When running a server session this property holds the current bokeh Document.
In a server context this provides read and write access to the URL:
hash: hash in window.location e.g. ‘#interact’
pathname: pathname in window.location e.g. ‘/user_guide/Interact.html’
search: search in window.location e.g. ‘?color=blue’
reload: Reloads the page when the location is updated.
href(readonly): The full url, e.g. ‘https://localhost:80?color=blue#interact’
hostname(readonly): hostname in window.location e.g. ‘panel.holoviz.org’
protocol(readonly): protocol in window.location e.g. ‘http:’ or ‘https:’
port(readonly): port in window.location e.g. ‘80’
HTTP request headers for the current session.
The refresh token issued by the OAuth provider to authorize requests to its APIs (if available these are usually longer lived than the
:Whether we are currently inside a script or notebook that is being served using
When running a server session this return the request arguments.
A dictionary tracking information about server sessions:
total(int): The total number of sessions that have been opened
live(int): The current number of live sessions
sessions(dict(str, dict)): A dictionary of session information:
started: Timestamp when the session was started
rendered: Timestamp when the session was rendered
ended: Timestamp when the session was ended
user_agent: User-Agent header of client that opened the session
Caches the current webdriver to speed up export of bokeh models to PNGs.
Schedules a periodic callback to be run at an interval set by the period
Allows caching data across sessions by memoizing on the provided key and keyword arguments to the provided function.
Cancel a scheduled task by name.
Executes both synchronous and asynchronous callbacks appropriately depending on the context the application is running in.
Stops all running server sessions.
Allows defining a callback which is run when a server is fully loaded
Schedule a callback periodically at a specific time (click here for more details)
Sync an indicator with a boolean value parameter to the busy property on state