ZIP Import¶
Accessed via client.zip.
pycomad.client.ZipClient
¶
Methods for the /zip/upload batch-import endpoint.
upload
¶
Batch-import a ZIP archive.
Creates a category tree that mirrors the archive's directory structure
(root category named <stem>-<YYYYMMDD-HHMMSS>), then uploads every
file as an asset linked to its directory's category.
macOS artifacts (__MACOSX/, .DS_Store, ._*) are silently
skipped. The ZIP file itself is never stored as an asset.
Requires a Professional subscription or higher on the server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
FileArg
|
ZIP file to import — a path string, :class: |
required |
creator
|
Optional[str]
|
Author / creator name applied to all extracted assets. |
None
|
Returns:
| Type | Description |
|---|---|
ZipUploadResult
|
class: |
ZipUploadResult
|
and assets created, plus any per-entry errors. |
Raises:
| Type | Description |
|---|---|
ComadAuthError
|
If not authenticated or the user lacks Professional access (403). |
ComadValidationError
|
On a 400 response. |