Metadata¶
Accessed via client.metadata.
pycomad.client.MetadataClient
¶
Methods for the asset metadata (EXIF/IPTC/XMP) sub-resource.
get
¶
Return extracted EXIF, IPTC, and XMP metadata for an asset.
Metadata is extracted automatically on upload; call :meth:refresh
to re-extract after replacing the file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asset_id
|
Union[UUID, str]
|
UUID of the asset. |
required |
Returns:
| Type | Description |
|---|---|
AssetMetadata
|
class: |
Raises:
| Type | Description |
|---|---|
ComadNotFoundError
|
If the asset or its metadata does not exist. |
ComadAuthError
|
If not authenticated. |
refresh
¶
Re-extract metadata from the asset's file.
File values override any manually set fields in the assets table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asset_id
|
Union[UUID, str]
|
UUID of the asset. |
required |
Returns:
| Type | Description |
|---|---|
AssetMetadata
|
The refreshed :class: |
Raises:
| Type | Description |
|---|---|
ComadNotFoundError
|
If the asset does not exist or has no file. |
ComadAuthError
|
If not authenticated. |