activity_session_dao
Activity session data access object (DAO)
Attributes
Classes
ActivitySessionDao
Bases: BaseDao
Activity session data access object (DAO)
Attributes
Functions
get_activity_session_ref
get_activity_session_ref(
activity_session_pkid: str,
filter_deleted: bool = True,
filter_disabled: bool = True,
) -> Optional[ActivitySession]
Retrieve the reference to an activity session based on the provided activity_session_pkid.
Parameters:
-
activity_session_pkid
(str
) –The primary key of the activity session.
-
filter_deleted
(bool
, default:True
) –Whether to filter out deleted activity sessions. Defaults to True.
-
filter_disabled
(bool
, default:True
) –Whether to filter out disabled activity sessions. Defaults to True.
Returns:
-
ActivitySession
(Optional[ActivitySession]
) –The reference to the activity session if found, otherwise None.
get_in_namespace
get_in_namespace(
*,
namespace_key: str,
resource_key: str,
include_deleted: bool = True,
include_disabled: bool = True
) -> ActivitySession | None
Retrieve an ActivitySession
in a specified namespace by its primary key ID or name.
Parameters:
-
namespace_key
(str
) –The primary key ID of the namespace.
-
resource_key
(str
) –The primary key ID or name of the activity session.
-
filter_deleted
(bool
) –Whether to filter out deleted activity sessions. Defaults to True.
-
filter_disabled
(bool
) –Whether to filter out disabled activity sessions. Defaults to True.
Returns:
-
ActivitySession | None
–ActivitySession | None: The matching
ActivitySession
orNone
if not found.