dandi.upload

Upload assets to DANDI Archive.

This module handles uploading NWB files and other assets to DANDI Archive instances. Features include: - Validation of files before upload - Progress tracking with resume capability - Metadata extraction and assignment - BIDS validation integration - Concurrent uploads with thread pool

Functions

check_replace_asset(local_asset, ...)

error_file(msg)

skip_file(msg)

upload([paths, existing, validation, ...])

Classes

UploadExisting(value)

An enumeration.

UploadValidation(value)

An enumeration.

Uploaded

class dandi.upload.UploadExisting(value)[source]

An enumeration.

ERROR = 'error'
FORCE = 'force'
OVERWRITE = 'overwrite'
REFRESH = 'refresh'
SKIP = 'skip'
class dandi.upload.UploadValidation(value)[source]

An enumeration.

IGNORE = 'ignore'
REQUIRE = 'require'
SKIP = 'skip'
class dandi.upload.Uploaded[source]
errors: list[str]
size: int
dandi.upload.check_replace_asset(local_asset: LocalAsset, remote_asset: RemoteAsset, existing: UploadExisting, local_etag: Digest | None) tuple[bool, dict[str, str]][source]
dandi.upload.error_file(msg: Any) dict[str, str][source]
dandi.upload.skip_file(msg: Any) dict[str, str][source]
dandi.upload.upload(paths: Sequence[str | Path] | None = None, existing: UploadExisting = UploadExisting.REFRESH, validation: UploadValidation = UploadValidation.REQUIRE, dandi_instance: str | DandiInstance = 'dandi', allow_any_path: bool = False, upload_dandiset_metadata: bool = False, devel_debug: bool = False, jobs: int | None = None, jobs_per_file: int | None = None, sync: bool | SyncMode | None = False, validation_log_path: str | Path | None = None) None[source]