Skip to main content

CLI tool for uploading data to Morphic AWS S3 bucket

Project description

morphic-util

CLI tool for uploading data to the Morphic AWS S3 buckets.

Users

Prerequisites

Users need to have

  1. Basic command-line knowledge
  2. Python3.x installed on their machine
  3. AWS Cognito username and password

Install

The morphic-util tool is available to install from PyPi.

$ pip install morphic-util

Usage

Display help and list of commands.

$ morphic-util -h
usage: morphic-util [-h] [--version] [--profile PROFILE] {config,create,select,list,upload,download,delete} ...

morphic-util

optional arguments:
  -h, --help            show this help message and exit
  --version, -v         show program's version number and exit

command:
  {config,create,select,list,upload,download,delete}
    config              configure AWS credentials
    create              create an upload area (authorised users only)
    select              select or show the active upload area
    list                list contents of the area
    upload              upload files to the area
    download            download files from the area
    delete              delete files from the area

In the above, optional arguments are between [] and choices between {}.

The basic usage is as follows:

$ morphic-util cmd ARG1 ARG2 -o1 -o2

Use the tool by specifying a command (cmd - see list below) to run, any mandatory (positional) arguments (e.g. ARG1 and ARG2 - see positional args for each command), and any optional arguments (e.g. -o1 and o2 - see options for each command).

Commands

Help with specific command:

$ morphic-util <cmd> -h

Some commands or options/flags are restricted to authorised users (admin) only.

config command

Configure AWS credentials

$ morphic-util config username password

positional arguments:
  username         AWS Cognito username
  password         AWS Cognito password

The tool uses the profile name hca-util in local AWS config files.

create command

Create an upload area/ project folder (authorised users only)

$ morphic-util create NAME DPC [-p {u,ud,ux,udx}]

positional arguments:
  NAME               name for the new area/ project folder
  DPC                center name of the submitter

optional arguments:
  -p {u,ud,ux,udx}   allowed actions (permissions) on new area. u for
                     upload, x for delete and d for download. Default is ux

select command

Show or select the active upload area/ project folder

$ morphic-util select AREA

positional arguments:
  AREA                area name/ folder name. 

If AREA is not specified, the selected area is shown.

list command

List contents of selected area

$ morphic-util list [-b]

optional arguments:
  -b                 list all areas in bucket **(authorised users only)**

upload command

Upload files to the selected area

$ morphic-util upload PATH [PATH ...] [-o]

positional arguments:
  PATH               valid file or directory

optional arguments:
  -o                  overwrite files with same names

download command

Download files from the selected area (authorised users only)

$ morphic-util download (-a | -f file [file ...])

optional arguments:
  -a                  download all files from selected area
  -f file [file ...]  download specified file(s) only

delete command

Delete files from the selected area

$ morphic-util delete [-a | -d] [PATH [PATH ...]]

positional arguments:
  PATH               path to file or directory to delete

optional arguments:
  -a                 delete all files from the area
  -d                 delete upload area and contents (authorised users only)

Developers

Download dependencies

pip install -r requirements.txt

Run tests

nosetests

Project details


Download files

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

Source Distribution

morphic-util-0.0.8.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

morphic_util-0.0.8-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file morphic-util-0.0.8.tar.gz.

File metadata

  • Download URL: morphic-util-0.0.8.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for morphic-util-0.0.8.tar.gz
Algorithm Hash digest
SHA256 8c13c91ab2d254cf724ad5acc54ef9f51264ddd1902f7c2b953675b2595be2a0
MD5 5a7cdd447a0bd46a9f271fbbf5612dd5
BLAKE2b-256 9d360c77d8a25baf7b27c9cf9e2ce41c12309ec33a90e548cc525f98e8a03d9e

See more details on using hashes here.

File details

Details for the file morphic_util-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: morphic_util-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for morphic_util-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 bceb803c94599eae03106203ad9b0f0b5cff2e9f80ecffd84602357a28ae8b05
MD5 ea636c7ecdbd1228b21669d5b3d81d4a
BLAKE2b-256 7aeb57a7cf1c62e32497bd694b452f7edb4eee3f66ec81b95dc42c0a4597648f

See more details on using hashes here.

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