Metadata-Version: 2.1
Name: dds-cli
Version: 2.2.0
Summary: A command line tool to manage data and projects in the SciLifeLab Data Delivery System.
Home-page: https://github.com/ScilifelabDataCentre/dds_cli
Author: SciLifeLab Data Centre
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: boto3 (==1.24.73)
Requires-Dist: botocore (==1.27.73)
Requires-Dist: click (==8.1.3)
Requires-Dist: click-pathlib (==2020.3.13.0)
Requires-Dist: cryptography (==38.0.1)
Requires-Dist: immutabledict (==2.2.1)
Requires-Dist: jwcrypto (==1.4)
Requires-Dist: prettytable (==3.4.1)
Requires-Dist: prompt-toolkit (==3.0.31)
Requires-Dist: PyNaCl (==1.5.0)
Requires-Dist: pytz (==2022.2.1)
Requires-Dist: PyYAML (==6.0)
Requires-Dist: questionary (==1.10.0)
Requires-Dist: requests (==2.28.1)
Requires-Dist: rich (==12.5.1)
Requires-Dist: rich-click (==1.5.2)
Requires-Dist: simplejson (==3.17.6)
Requires-Dist: tzlocal (==4.2)
Requires-Dist: zstandard (==0.18.0)

# Data Delivery System CLI

![Release](https://img.shields.io/github/v/release/SciLifeLabDataCentre/dds_cli)
[![install with PyPI](https://img.shields.io/badge/install%20with-PyPI-blue.svg?logo=pypi)](https://pypi.org/project/dds-cli/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

![Linting](https://github.com/ScilifelabDataCentre/dds_cli/actions/workflows/python-black.yml/badge.svg)
![CodeQL](https://github.com/ScilifelabDataCentre/dds_cli/actions/workflows/codeql-analysis.yml/badge.svg)
[![codecov](https://codecov.io/gh/ScilifelabDataCentre/dds_cli/branch/dev/graph/badge.svg?token=zsrDpNqs6v)](https://codecov.io/gh/ScilifelabDataCentre/dds_cli)
![Tests](https://github.com/ScilifelabDataCentre/dds_cli/actions/workflows/python-app.yml/badge.svg)

**A command line tool `dds` to manage data and projects in the SciLifeLab Data Delivery System.**

The Data Delivery System (DDS) is a cloud-based system for all SciLifeLab platforms where data generated throughout each project can be delivered to the research groups in a fast, secure and simple way. The CLI makes requests to the API (see badge below for link) in order to use the API functionality.

[![Documentation](https://img.shields.io/badge/-Documentation-222222?logo=github-pages)](https://scilifelabdatacentre.github.io/dds_cli/)
[![Technical Overview](https://img.shields.io/badge/-Technical%20Overview-informational?logo=github)](https://github.com/ScilifelabDataCentre/dds_web/blob/master/doc/Technical-Overview.pdf)
[![Architecture Decision Record](https://img.shields.io/badge/-ADR-000000?logo=github)](https://github.com/ScilifelabDataCentre/dds_web/wiki/Architecture-Decision-Record,-ADR)
[![Troubleshooting](https://img.shields.io/badge/-Troubleshooting%20Guide-red?logo=github)](https://github.com/ScilifelabDataCentre/dds_web/blob/master/doc/Troubleshooting.pdf)
[![Backend](https://img.shields.io/badge/-Web/API-yellow?logo=github)](https://github.com/ScilifelabDataCentre/dds_web)

---

## Table of contents

- [Installation](#installation)
- [Overview of commands](#overview-of-commands)

## Installation

### Python Package Index

The `dds-cli` package can be installed from [PyPI](https://pypi.python.org/pypi/dds_cli/) using pip as follows:

```bash
pip install dds-cli
```

After installing, run `dds` and verify that the output looks like this:

```bash
$ dds
     ︵
 ︵ (  )   ︵
(  ) ) (  (  )   SciLifeLab Data Delivery System
 ︶  (  ) ) (    https://delivery.scilifelab.se/
      ︶ (  )    CLI Version 1.1.0
          ︶

 Usage: dds [OPTIONS] COMMAND [ARGS]...

 SciLifeLab Data Delivery System (DDS) command line interface.
 Access token is saved in a .dds_cli_token file in the home directory.
 The token is valid for 7 days. Make sure your token is valid long enough for the delivery to
 finish. To avoid that a delivery fails because of an expired token, we recommend reauthenticating
 yourself before each delivery ('dds data put' / 'get').

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --verbose     -v               Print verbose output to the console.                              │
│ --log-file    -l   <filename>  Save a log to a file.                                             │
│ --no-prompt                    Run without any interactive features.                             │
│ --token-path  -tp  TEXT        The path where the authentication token will be stored. For a     │
│                                normal use-case, this should not be needed.                       │
│ --version                      Display the version of this software.                             │
│ --help                         List the options of any DDS subcommand and its default settings.  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ auth        Group command for creating and managing authenticated sessions.                      │
│ data        Group command for uploading, downloading and managing project data.                  │
│ ls          List the projects you have access to or the project contents.                        │
│ motd        Group command for managing Message of the Day within DDS.                            │
│ project     Group command for creating and managing projects within the DDS.                     │
│ unit        Group command for managing units.                                                    │
│ user        Group command for managing user accounts, including your own.                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
```

### Executables

Executables are available for Windows, MacOS and Linux. These allow you to run the CLI without needing to install it (and the pip / Python requirements) yourself. Download them from the (bottom of the) latest release page: [Latest Release](https://github.com/ScilifelabDataCentre/dds_cli/releases/latest/)

### Development version

If you would like the latest development version of tools, the command is:

```bash
pip install --upgrade --force-reinstall git+https://github.com/ScilifelabDataCentre/dds_cli.git@dev
```

If you intend to make edits to the code, first make a fork of the repository and then clone it locally.
Go to the cloned directory and install with pip (also installs development requirements):

```bash
pip install --upgrade -r requirements-dev.txt -e .
```

## Overview of commands

Once installed you can use the command `dds` in a terminal session. This has the following subcommands:

- `auth`: Create and manage authenticated sessions.
- `user`: Create and manage user accounts, including your own.
- `project`: Create and manage projects.
- `data`: Upload, download and manage project data.
- `ls`: List projects and project contents.
- `motd`: List and manage important messages displayed to the users ("Message of the Day")
- `unit`: Manage units using the DDS
