files
File related data types.
RECORDING_UPLOAD_FORMATS = (FileFormat.EDF,)
module-attribute
¶
The formats a recording may be uploaded in; the server refuses any other at
registration. Served as ServerLimits.recording_formats, so a client filters
its file picker and validates against the server's list instead of a copy.
FileFormat
¶
Bases: str, Enum
Supported file formats.
from_file_name(fname)
classmethod
¶
Return the recording file type based on the file name.
If the file name does not have a recognized extension, raises ValueError.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fname
|
str | Path
|
The file name. |
required |
Returns:
| Type | Description |
|---|---|
FileFormat
|
The FileFormat. |
Examples:
FileUploadState
¶
Bases: str, Enum
State of a file upload.
FAILED = 'failed'
class-attribute
instance-attribute
¶
The file upload has failed.
REGISTERED = 'registered'
class-attribute
instance-attribute
¶
The file upload is registered but not yet started.
REJECTED = 'rejected'
class-attribute
instance-attribute
¶
The file upload has been rejected, e.g., because the file format or content is invalid.
UPLOADED = 'uploaded'
class-attribute
instance-attribute
¶
The file is accepted: uploaded, or registered where it is. Its ingest has not verified it yet, so no analysis runs on it.
VERIFIED = 'verified'
class-attribute
instance-attribute
¶
Its ingest read the stored file and found it the one registered: its analyses run.