kedro.framework.session.session.get_current_session — Kedro 0.17.6 documentation

# kedro.framework.session.session.get_current_session

`kedro.framework.session.session.` `get_current_session`(silent=False)

  Fetch the active `KedroSession` instance.

  Parameters

    silent (`bool`) – Indicates to suppress the error if no active session was found.

  Raises

    RuntimeError – If no active session was found and silent is False.

  Return type

    `Optional`[`KedroSession`]

  Returns

    KedroSession instance.