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
- --zarr FILTER¶
Only download the entries of Zarr assets that match the given filter. The filter is either the predefined name
metadata, which selects the Zarr metadata files (.zarray,.zattrs,.zgroup,.zmetadata, andzarr.json), orTYPE:PATTERN, whereTYPEis one of:glob—PATTERNis a glob matched against the entry’s path within the Zarr, with**matching across directories (e.g.,glob:0/**/*)path—PATTERNis a path within the Zarr; the entry at that path and all entries under it are downloadedregex—PATTERNis a regular expression searched for in the entry’s path within the Zarr
Can be specified multiple times, in which case an entry is downloaded if it matches any of the filters.