Models
Models
SQLModels for DB and validation
Batch
Bases: SQLModel
Source code in chowda/models.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
|
unstarted_guids()
Returns the set of GUIDs that are not currently running
Source code in chowda/models.py
218 219 220 221 222 |
|
MMIF
Bases: SQLModel
MMIF model
Attributes:
Name | Type | Description |
---|---|---|
id |
Optional[int]
|
Primary key |
created_at |
Optional[datetime]
|
Creation timestamp |
media_file_id |
Optional[str]
|
GUID |
media_file |
Optional[MediaFile]
|
MediaFile |
metaflow_run_id |
Optional[str]
|
MetaflowRun ID |
metaflow_run |
Optional[MetaflowRun]
|
MetaflowRun |
batch_output |
Optional[Batch]
|
Batch that generated this MMIF |
batch_inputs |
List[Batch]
|
Batch that uses this as an input |
mmif_location |
Optional[str]
|
S3 URL of the mmif |
Source code in chowda/models.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
|
MediaFile
Bases: SQLModel
Media file model
Attributes:
Name | Type | Description |
---|---|---|
guid |
Optional[str]
|
MediaFile GUID |
assets |
List[SonyCiAsset]
|
List of SonyCiAssets |
collections |
List[Collection]
|
List of Collections |
batches |
List[Batch]
|
List of Batches |
metaflow_runs |
List[MetaflowRun]
|
List of MetaflowRuns |
mmifs |
List[MMIF]
|
List of MMIFs |
Source code in chowda/models.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
|
MediaType
Bases: Enum
Media type enum Type of Media: video or audio. This is not the same as the format of the media file.
FIXME:
Enum class attributes are the values that are stored in the database. The value of the class attribute is the value returned by SonyCi (for validation) But starlette-admin + SQLAlchemy send the value to the db, not the name. Therefore, we need to Capatalize the name to make it match the db value.
Source code in chowda/models.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
User
Bases: SQLModel
User model
Attributes:
Name | Type | Description |
---|---|---|
id |
Optional[int]
|
Primary key |
email |
EmailStr
|
User email |
first_name |
str
|
User first name |
last_name |
str
|
User last name |
Source code in chowda/models.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|