StorageItem
StorageItem Objects
class StorageItem()
uuid
@property
def uuid() -> UUID
UUID: The unique identifier of the storage item.
parent_folder_uuid
@property
def parent_folder_uuid() -> UUID
UUID: The UUID of the parent folder.
parent_folder
def parent_folder() -> StorageFolder
Retrieve the parent folder of the storage item.
Returns:
StorageFolder
- The parent folder.
item_type
@property
def item_type() -> StorageItemType
StorageItemType: The type of the storage item.
name
@property
def name() -> str
str: The name of the storage item.
description
@property
def description() -> str
str: The description of the storage item.
client_metadata
@property
def client_metadata() -> Optional[Dict[str, Any]]
Optional[Dict[str, Any]]: The client metadata of the storage item.
created_at
@property
def created_at() -> datetime
datetime: The creation time of the storage item.
last_edited_at
@property
def last_edited_at() -> datetime
datetime: The last edited time of the storage item.
backed_data_units_count
@property
def backed_data_units_count() -> int
int: The number of backed data units.
storage_location
@property
def storage_location() -> StorageLocationName
StorageLocationName: The storage location name.
integration_hash
@property
def integration_hash() -> Optional[UUID]
Optional[UUID]: The integration hash.
url
@property
def url() -> Optional[str]
Optional[str]: The URL of the storage item.
file_size
@property
def file_size() -> Optional[int]
Optional[int]: The file size of the storage item.
mime_type
@property
def mime_type() -> Optional[str]
Optional[str]: The MIME type of the storage item.
duration
@property
def duration() -> Optional[float]
Optional[float]: The duration of the storage item.
fps
@property
def fps() -> Optional[float]
Optional[float]: The frames per second of the storage item.
height
@property
def height() -> Optional[int]
Optional[int]: The height of the storage item.
width
@property
def width() -> Optional[int]
Optional[int]: The width of the storage item.
dicom_instance_uid
@property
def dicom_instance_uid() -> Optional[str]
Optional[str]: The DICOM instance UID of the storage item.
dicom_study_uid
@property
def dicom_study_uid() -> Optional[str]
Optional[str]: The DICOM study UID of the storage item.
dicom_series_uid
@property
def dicom_series_uid() -> Optional[str]
Optional[str]: The DICOM series UID of the storage item.
frame_count
@property
def frame_count() -> Optional[int]
Optional[int]: The frame count of the storage item.
audio_sample_rate
@property
def audio_sample_rate() -> Optional[int]
Optional[int]: The number of samples taken per second (in Hz).
audio_bit_depth
@property
def audio_bit_depth() -> Optional[int]
Optional[int]: The number of bits used to record each audio sample.
audio_codec
@property
def audio_codec() -> Optional[str]
Optional[int]: The codec of the audio file (e.g., mp3 or flac).
audio_num_channels
@property
def audio_num_channels() -> Optional[int]
Optional[int]: The number of channels.
get_signed_url
def get_signed_url(refetch: bool = False) -> Optional[str]
Get a signed URL for downloading the item.
Returns None
if the item is a synthetic entity (e.g., image group or DICOM series).
Arguments:
refetch
- IfTrue
, forces fetching a new signed URL even if one is cached.
Returns:
Optional[str]
- Signed URL for downloading the item, orNone
if not supported.
Raises:
ValueError
- If the item type is DICOM series or image group (unsupported for signed URLs).
get_summary
def get_summary() -> StorageItemSummary
Retrieve a summary of the item, including linked datasets and other information.
Returns:
StorageItemSummary
- Object containing summary information about the item.
get_child_items
def get_child_items(get_signed_urls: bool = False) -> Iterable["StorageItem"]
Get child items of the item, such as frames of an image group or files of DICOM series.
Arguments:
get_signed_urls
- IfTrue
, include signed URLs for child items.
Returns:
Iterable[StorageItem]
- List of child items accessible to the user.
update
def update(name: Optional[str] = None,
description: Optional[str] = None,
client_metadata: Optional[Dict[str, Any]] = None,
bundle: Optional[Bundle] = None) -> None
Update modifiable properties of the item.
Arguments:
name
- New item name.description
- New item description.client_metadata
- New client metadata.bundle
- Optional bundle to use for bundling operations.
Returns:
None
Notes:
If no parameters are provided, the function does nothing.
If bundle
is provided, the operation is bundled into a single server call with other item updates
using the same bundle.
delete
def delete(remove_unused_frames=True) -> None
Delete the item from the storage.
Arguments:
remove_unused_frames
- IfTrue
(default), remove individual images or DICOM files not used elsewhere.
Returns:
None
move_to_folder
def move_to_folder(target_folder: Union[StorageFolder, UUID],
allow_mirror_dataset_changes: bool = False)
Move the item to another folder.
Arguments:
target_folder
- Target folder to move the item to. Can be aStorageFolder
object or a UUID.allow_mirror_dataset_changes
- IfTrue
, allows moving items linked to a mirror dataset. Default isFalse
, which prohibits such moves to prevent data loss.
Returns:
None
Notes:
This method updates the item’s parent folder and refetches item data after the move.
refetch_data
def refetch_data(get_signed_url: bool = False) -> None
Refetches data for the item, updating its attributes.
Arguments:
get_signed_url
- IfTrue
, refetches the signed URL for downloading the item.
Returns:
None
Was this page helpful?