Skip to main content

Command line client for interaction with DANDI archive elements

Project description

DANDI Client

Tests codecov.io GitHub release PyPI version fury.io Documentation Status

The DANDI Python client allows you to:

  • Download Dandisets and individual subject folders or files
  • Validate data to locally conform to standards
  • Organize your data locally before upload
  • Upload Dandisets
  • Interact with the DANDI archive's web API from Python
  • Delete data in the DANDI archive
  • Perform other auxiliary operations with data or the DANDI archive

Note: This project is under heavy development. See the issues log or Work-in-Progress (WiP).

Installation

DANDI Client releases are available from PyPI and conda-forge. Install them in your Python (native, virtualenv, or conda) environment via

pip install dandi

or

conda install -c conda-forge dandi

CLI Tool

This package provides a command line utility with a basic interface to help you prepare and upload your data to, or obtain data from, the DANDI archive:

$> dandi
Usage: dandi [OPTIONS] COMMAND [ARGS]...

  A client to support interactions with DANDI archive
  (http://dandiarchive.org).

  To see help for a specific command, run

      dandi COMMAND --help

  e.g. dandi upload --help

Options:
  --version
 -l, --log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
                                  Log level (case insensitive).  May be
                                  specified as an integer.  [default: INFO]
  --pdb                           Fall into pdb if errors out
  --help                          Show this message and exit.

Commands:
  delete            Delete dandisets and assets from the server.
  digest            Calculate file digests
  download          Download a file or entire folder from DANDI.
  instances         List known Dandi Archive instances that the CLI can...
  ls                List .nwb files and dandisets metadata.
  move              Move or rename assets in a local Dandiset and/or on...
  organize          (Re)organize files according to the metadata.
  service-scripts   Various utility operations
  shell-completion  Emit shell script for enabling command completion.
  upload            Upload Dandiset files to DANDI Archive.
  validate          Validate files for NWB and DANDI compliance.
  validate-bids     Validate BIDS paths.

Each of the commands has a set of options to alter its behavior. Run dandi COMMAND --help to get more information:

$> dandi ls --help
Usage: dandi ls [OPTIONS] PATH|URL

  List .nwb files and dandisets metadata.

  The arguments may be either resource identifiers or paths to local
  files/directories.

  Accepted resource identifier patterns:
   - DANDI:<dandiset id>[/<version>]
   - https://dandiarchive.org/...
   - https://identifiers.org/DANDI:<dandiset id>[/<version id>] (<version id> cannot be 'draft')
   - https://<server>[/api]/[#/]dandiset/<dandiset id>[/<version>][/files[?location=<path>]]
   - https://*dandiarchive-org.netflify.app/...
   - https://<server>[/api]/dandisets/<dandiset id>[/versions[/<version>]]
   - https://<server>[/api]/assets/<asset id>[/download]
   - https://<server>[/api]/dandisets/<dandiset id>/versions/<version>/assets/<asset id>[/download]
   - https://<server>[/api]/dandisets/<dandiset id>/versions/<version>/assets/?path=<path>
   - dandi://<instance name>/<dandiset id>[@<version>][/<path>]
   - https://<server>/...

Options:
  -F, --fields TEXT               Comma-separated list of fields to display.
                                  An empty value to trigger a list of
                                  available fields to be printed out
  -f, --format [auto|pyout|json|json_pp|json_lines|yaml]
                                  Choose the format/frontend for output. If
                                  'auto', 'pyout' will be used in case of
                                  multiple files, and 'yaml' for a single
                                  file.
  -r, --recursive                 Recurse into content of
                                  dandisets/directories. Only .nwb files will
                                  be considered.
  -J, --jobs INTEGER              Number of parallel download jobs.  [default:
                                  6]
  --metadata [api|all|assets]
  --schema VERSION                Convert metadata to new schema version
  --help                          Show this message and exit.

Third-party Components

dandi/tests/skip.py -- from https://github.com/ReproNim/reproman, as of v0.2.1-40-gf4f026d Copyright (c) 2016-2020 ReproMan Team

Resources

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dandi-0.48.1.tar.gz (228.7 kB view details)

Uploaded Source

Built Distribution

dandi-0.48.1-py3-none-any.whl (225.0 kB view details)

Uploaded Python 3

File details

Details for the file dandi-0.48.1.tar.gz.

File metadata

  • Download URL: dandi-0.48.1.tar.gz
  • Upload date:
  • Size: 228.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.15

File hashes

Hashes for dandi-0.48.1.tar.gz
Algorithm Hash digest
SHA256 fdc762be1e6fcb821a3d2da44dea4edee8a275bf396d587e2af60803480892c0
MD5 9c733366fe96340b565bf4c9411be40c
BLAKE2b-256 117264a71a33a39b93e2358b23cb0a23724c8c7a2024a3360b476c9842063be0

See more details on using hashes here.

Provenance

File details

Details for the file dandi-0.48.1-py3-none-any.whl.

File metadata

  • Download URL: dandi-0.48.1-py3-none-any.whl
  • Upload date:
  • Size: 225.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.15

File hashes

Hashes for dandi-0.48.1-py3-none-any.whl
Algorithm Hash digest
SHA256 46b69f7d49a93d421a50e8c20e2116ca05df66206db82ac5c00911a88a1d2818
MD5 4a350580ab3b90cf72a1f8ff13142754
BLAKE2b-256 404e4e3930c06945683fefee5a3d1cc82213bdc7b9860bc03e97c01202a39564

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page