Application Interface
app.application.interfaces.application_interfaceInterface contract for session repository / session access.
See Also
Application— provides the concrete application operationsApplicationAdapter— adapts the concrete application to this contract
Layer: Application. Context: Defines protocol boundaries consumed by application orchestration.
UIApplicationInterface
Bases: Protocol
Abstraction boundary for accessing and managing sessions.
Services and managers depend on this interface rather than directly
importing the concrete Application class, keeping the application layer
decoupled from the top-level façade.
The concrete Application class satisfies this interface structurally
(structural subtyping via Protocol) — no explicit inheritance needed.
The AppApplicationAdapter provides an explicit wrapper when
explicit type evidence is preferred.
Layer: Application. Context: Coordinates use-case behavior through domain services and application contracts.
active_session: Session | None
property
Retrieve the currently active Session instance, or None if no session is active.
| RETURNS | DESCRIPTION |
|---|---|
Session | None
|
The active session, or |
active_session_id: SessionId | None
property
Return the SessionId of the currently active session, or None.
| RETURNS | DESCRIPTION |
|---|---|
SessionId | None
|
The active session identifier, or |
all_s_ids: Iterable[SessionId]
property
Iterate over all SessionId instances currently managed by the application.
| RETURNS | DESCRIPTION |
|---|---|
Iterable[SessionId]
|
Identifiers for sessions currently managed by the application. |
get_layer_box_by_key(s_id: SessionId, layer_name: VideoDataLayer, key: str) -> BBoxViewModel | None
Fetch a single bounding detection by its unique key from layer_name.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session containing the box.
TYPE:
|
layer_name
|
Data layer in which to search.
TYPE:
|
key
|
Unique box key to match.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
BBoxViewModel | None
|
Matching box view model, or |
get_selected_detection_model_name(s_id: SessionId) -> str
Retrieve the name of the currently selected detection model for s_id.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose configured model name is returned.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
Name of the selected detection model. |
get_session_by_id(s_id: SessionId) -> Session
get_tab_frame_boxes_for_session_id(s_id: SessionId, tab: VideoDataLayerGroup) -> FrameBoxesViewModel
Retrieve all bounding boxes for the current frame in the specified tab layer.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose current frame is queried.
TYPE:
|
tab
|
Detection or tracking tab selecting its editable box layer.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
FrameBoxesViewModel
|
Frame-box view model for the selected tab and current frame. |
is_at_last_frame(s_id: SessionId) -> bool
Check if the playback position for s_id is at the final frame.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose playback position is checked.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
|
is_session_playing(s_id: SessionId) -> bool
Check if the Session identified by s_id is currently playing.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose playback state is inspected.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
|
open_videos(paths: Iterable[str]) -> list[str]
Create new Session instances from video files at the given paths.
| PARAMETER | DESCRIPTION |
|---|---|
paths
|
Video file paths to open.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[str]
|
Paths of videos opened successfully; already-open paths are excluded. |
session_has_buffered_frame(s_id: SessionId) -> bool
Check if a pre-decoded frame is available in the buffer for s_id.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose decode buffer is inspected.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
|
session_has_running_detection_worker(s_id: SessionId) -> bool
Check if a DetectionWorker is actively running for s_id.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose detection worker state is queried.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
|
session_has_running_tracking_worker(s_id: SessionId) -> bool
Check if a TrackingWorker is actively running for s_id.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose tracking worker state is queried.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
|
session_is_ready_for_export(s_id: SessionId) -> bool
Check if the session s_id has valid tracking data and is ready to export.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose tracking data is checked for export.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
|