A command line client for MDRS (Multiomics Data Repository System)
Go to file
2024-02-09 18:22:13 +09:00
.vscode changed API endpoint from v2 to v3. 2023-12-12 20:05:46 +09:00
mdrsclient add -u and -p option to login commnand. 2024-02-09 18:22:13 +09:00
.cspell.json fixed bug to resolve local files for recursive file upload. 2023-12-20 19:42:06 +09:00
.editorconfig introduced poetry and update vscode related environments. 2023-10-04 11:29:08 +09:00
.env.default add namespace MDRS_CLIENT to customizable enviroment variables. 2023-05-11 19:01:07 +09:00
.gitignore first commit 2023-05-01 20:00:32 +09:00
LICENSE.txt update version to 1.1.1. 2023-07-26 17:59:35 +09:00
pyproject.toml add -u and -p option to login commnand. 2024-02-09 18:22:13 +09:00
README.md add -u and -p option to login commnand. 2024-02-09 18:22:13 +09:00

mdrs-client-python

The mdrs-client-python is python library and a command-line client for up- and downloading files to and from MDRS based repository.

Installing

poetry install

Example Usage

config create

Create remote host configuration

mdrs config create neurodata https://neurodata.riken.jp/api

login

Login to remote host

mdrs login neurodata:
Username: (enter your login name)
Password: (enter your password)

mdrs login -u USERNAME -p PASSWORD neurodata:

logout

Logout from remote host

mdrs logout neurodata:

whoami

Print current user name

mdrs whoami neurodata:

labs

List all laboratories

mdrs labs neurodata:

ls

List the folder contents

mdrs ls neurodata:/NIU/Repository/
mdrs ls -p PW_OPEN_PASSWORD neurodata:/NIU/Repository/PW_Open/
mdrs ls -r neurodata:/NIU/Repository/Dataset1/
mdrs ls -J -r neurodata:/NIU/Repository/Dataset1/

mkdir

Create a new folder

mdrs mkdir neurodata:/NIU/Repository/TEST

upload

Upload the file or directory

mdrs upload ./sample.dat neurodata:/NIU/Repository/TEST/
mdrs upload -r ./dataset neurodata:/NIU/Repository/TEST/

download

Download the file or folder

mdrs download neurodata:/NIU/Repository/TEST/sample.dat ./
mdrs download -r neurodata:/NIU/Repository/TEST/dataset/ ./
mdrs download -p PW_OPEN_PASSWORD neurodata:/NIU/Repository/PW_Open/Readme.dat ./

mv

Move or rename the file or folder

mdrs mv neurodata:/NIU/Repository/TEST/sample.dat neurodata:/NIU/Repository/TEST2/sample2.dat
mdrs mv neurodata:/NIU/Repository/TEST/dataset neurodata:/NIU/Repository/TEST2/

cp

Copy the file and folder

mdrs cp neurodata:/NIU/Repository/TEST/sample.dat neurodata:/NIU/Repository/TEST2/sample2.dat
mdrs cp -r neurodata:/NIU/Repository/TEST/dataset neurodata:/NIU/Repository/TEST2/

rm

Remove the file or folder

mdrs rm neurodata:/NIU/Repository/TEST2/sample2.dat
mdrs rm -r neurodata:/NIU/Repository/TEST2/dataset

chacl

Change the folder access level

mdrs chacl private neurodata:/NIU/Repository/Private
mdrs chacl cbs_open -r neurodata:/NIU/Repository/CBS_Open
mdrs chacl pw_open -r -p FOLDER_PASSWORD neurodata:/NIU/Repository/PW_Open

metadata

Get a folder metadata

mdrs metadata neurodata:/NIU/Repository/TEST/
mdrs metadata -p PW_OPEN_PASSWORD neurodata:/NIU/Repository/PW_Open/

file-metadata

Get the file metadata

mdrs file-metadata neurodata:/NIU/Repository/TEST/dataset/sample.dat
mdrs file-metadata -p PW_OPEN_PASSWORD neurodata:/NIU/Repository/PW_Open/Readme.txt

help

Show the help message and exit

mdrs -h