MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / get_current_session

Method get_current_session

pywebio/session/threadbased.py:312–317  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

310
311 @classmethod
312 def get_current_session(cls) -> "ScriptModeSession":
313 if cls.instance is None:
314 raise SessionNotFoundException("Can't find current session. It might be a bug.")
315 if cls.instance.closed():
316 raise SessionClosedException()
317 return cls.instance
318
319 @classmethod
320 def get_current_task_id(cls):

Callers 1

get_current_task_idMethod · 0.45

Calls 3

closedMethod · 0.65

Tested by

no test coverage detected