analysis
Pydantic models for the analysis response from the AnalysisController --> API.
AnalysisIdMixin
pydantic-model
¶
AnalysisListResponse
pydantic-model
¶
Bases: PaginatedResponse
A page of analyses, of a project or of a recording.
Fields:
-
total(NonNegativeInt) -
offset(NonNegativeInt) -
limit(PositiveInt) -
analyses(list[AnalysisOut])
AnalysisLogs
pydantic-model
¶
AnalysisOut
pydantic-model
¶
Bases: AnalysisIdMixin, AnalysisStatusMixin, AnalysisTimingMixin
Analysis information available to user.
Combines identification, timing, context annotations, and cost fields into a single flat response model.
Fields:
-
enqueue_time(datetime) -
start_time(datetime | None) -
end_time(datetime | None) -
status(AnalysisStatus) -
status_message(str | None) -
failure_code(ErrorCode | None) -
id(UUID) -
owner_id(UUID | None) -
analysis_types(list[AnalysisType]) -
analysis_config_name(AnalysisConfigNameStr) -
analysis_config_id(str) -
parameter_hash(str | None) -
study_name(NameString | None) -
study_id(UUID | None) -
project_name(NameString | None) -
project_id(UUID | None) -
recording_id(UUID | None) -
recording_file_name(str | None) -
channels(list[ChannelName] | None) -
parameters(list[tuple[str, str | int | float | bool]]) -
research_parameters(list[str] | None) -
analysis_hours(NonNegativeFloat) -
cost(NonNegativeFloat) -
cost_currency(Currency) -
deleted(bool)
analysis_config_id
pydantic-field
¶
ID of the analysis configuration used for the analysis.
analysis_config_name
pydantic-field
¶
Name of the analysis configuration used for the analysis.
analysis_hours = 0
pydantic-field
¶
Number of hours of recording analysed.
analysis_types
pydantic-field
¶
List of analysis types the analysis performed.
channels = None
pydantic-field
¶
Channels used in the analysis. None if all available channels were used.
cost = 0
pydantic-field
¶
Cost of the analysis.
cost_currency = Currency.CREDITS
pydantic-field
¶
The currency of the cost.
deleted = False
pydantic-field
¶
Flag indicating if the analysis has been deleted
owner_id = None
pydantic-field
¶
The member who added it. Only they, or the project's owner, may change or remove it; it passes to the project's owner when they leave the organization.
parameter_hash = None
pydantic-field
¶
SHA-1 hash of the analysis parameters (config ID + parameters + dependencies + channels).
parameters
pydantic-field
¶
Parameters used in the analysis.
project_id = None
pydantic-field
¶
ID of the project the analysis belongs to. None if deleted.
project_name = None
pydantic-field
¶
Name of the project the analysis belongs to. None if deleted.
recording_file_name = None
pydantic-field
¶
Name of the recording file the analysis was performed on. None if deleted.
recording_id = None
pydantic-field
¶
ID of the recording the analysis was performed on. None if deleted.
research_parameters = None
pydantic-field
¶
Parameters (by API name) whose value lay outside the analysis configuration's validated regime. A non-empty list marks this analysis as run in research mode: fully supported, but its outputs are exploratory because the analysis was not characterised at those values. Empty when every parameter was within the regime (or no regime is declared). None when not derived — the value could not be resolved against the configuration.
study_id = None
pydantic-field
¶
ID of the study the analysis belongs to. None if deleted.
study_name = None
pydantic-field
¶
Name of the study the analysis belongs to. None if deleted.
AnalysisResponse
pydantic-model
¶
Bases: AnalysisIdMixin, AnalysisStatusMixin
Internal response that can include logs/events/exit_code.
Fields:
-
status(AnalysisStatus) -
status_message(str | None) -
failure_code(ErrorCode | None) -
id(UUID) -
logs(AnalysisLogs | None) -
exit_code(int | None) -
events(EventsPayload | None)
events = None
pydantic-field
¶
Result of the analysis if successful. Can be a list of Events, a URL to download, or the literal 'default-storage' indicating backend storage.
exit_code = None
pydantic-field
¶
Exit code of the analysis process if it was run
logs = None
pydantic-field
¶
Logs of the analysis if it was run.
AnalysisStatusMixin
pydantic-model
¶
Bases: BaseModel
Mixin for analysis status fields.
Fields:
-
status(AnalysisStatus) -
status_message(str | None) -
failure_code(ErrorCode | None)
failure_code = None
pydantic-field
¶
Machine-readable cause when the analysis FAILED (one of the analysis_* error codes), for grouping failures without parsing the status message. None for non-failed analyses and for failures recorded before this field existed.
status
pydantic-field
¶
Status of the analysis
status_message = None
pydantic-field
¶
Status message of the analysis
AnalysisTimingMixin
pydantic-model
¶
Bases: BaseModel
Mixin for analysis timing fields.
Fields:
-
enqueue_time(datetime) -
start_time(datetime | None) -
end_time(datetime | None)
end_time = None
pydantic-field
¶
Time the analysis ended (completed, canceled or failed)
enqueue_time
pydantic-field
¶
Time the analysis was enqueued
processing_duration_sec
property
¶
Duration of the analysis in seconds.
queue_duration_sec
property
¶
Duration of the analysis in seconds.
start_time = None
pydantic-field
¶
Time the analysis started
AnnotatedAnalysisEvents
pydantic-model
¶
Bases: BaseModel
Events with associated analysis metadata for API download.
Fields:
-
events(list[Event]) -
analysis(AnalysisOut)