MCPcopy Create free account
hub / github.com/alibaba/GraphScope / default_session

Function default_session

python/graphscope/client/session.py:1496–1512  ·  view source on GitHub ↗

Python's :code:`with` handler for defining a default session. This function provides a means of registering a session for handling and code that need a default session calls. The :code:`with` keyword to specify that code invocations within the scope of a block should be executed by

(session)

Source from the content-addressed store, hash-verified

1494
1495
1496def default_session(session):
1497 """Python's :code:`with` handler for defining a default session.
1498
1499 This function provides a means of registering a session for handling
1500 and code that need a default session calls.
1501
1502 The :code:`with` keyword to specify that code invocations within
1503 the scope of a block should be executed by a particular session.
1504
1505 Args:
1506 session: :class:`Session`
1507 The session to be installed as the default session.
1508
1509 Returns:
1510 A context manager for the default session.
1511 """
1512 return _default_session_stack.get_controller(session)
1513
1514
1515def has_default_session() -> bool:

Callers 4

dynamic_property_graphFunction · 0.90
dynamic_project_graphFunction · 0.90
as_defaultMethod · 0.85
load_fromMethod · 0.85

Calls 1

get_controllerMethod · 0.80

Tested by 2

dynamic_property_graphFunction · 0.72
dynamic_project_graphFunction · 0.72