dandi download

dandi [<global options>] download [<options>] <url> ...

Download one or more Dandisets, assets, or folders of assets from DANDI.

See Resource Identifiers for allowed URL formats.

Options

--download [dandiset.yaml,assets,all]

Comma-separated list of elements to download [default: all]

-e, --existing [error|skip|overwrite|overwrite-different|refresh]

How to handle paths that already exist locally [default: error]

For error, if the local file exists, display an error and skip downloading that asset.

For skip, if the local file exists, skip downloading that asset.

For overwrite, if the local file exists, overwrite that asset.

For overwrite-different, if the local file’s hash is the same as on the server, the asset is skipped; otherwise, it is redownloaded.

For refresh, if the local file’s size and mtime are the same as on the server, the asset is skipped; otherwise, it is redownloaded.

-f, --format [pyout|debug]

Choose the format/frontend for output [default: pyout]

-i, --dandi-instance <instance>

DANDI instance (either a base URL or a known instance name) to download from [default: dandi]

-J, --jobs N[:M]

Number of parallel download jobs and, optionally, number of upload subjobs per Zarr asset job [default: 6:4]

-o, --output-dir <dir>

Directory to download to (must exist). Files will be downloaded with paths relative to that directory. [default: current working directory]

--path-type [exact|glob]

Whether to interpret asset paths in URLs as exact matches or glob patterns

--preserve-tree

When downloading only part of a Dandiset, also download dandiset.yaml (unless downloading an asset URL that does not include a Dandiset ID) and do not strip leading directories from asset paths. Implies --download all.

--sync

Delete local assets that do not exist on the server after downloading