Skip to main content

CLI tool to allow submitters to upload to and download from the EBI S3 buckets.

Project description

hca-util

This tool is intended to allow HCA wranglers and contributors to upload and download data to/from the HCA S3 bucket.

https://github.com/ebi-ait/hca-util

Prerequisites

Users need to have

  1. Basic command-line knowledge
  2. Python3.x installed on their machine
  3. Credentials to access data in the S3 bucket (access and secret keys)

Install and configure

  1. Get the tool from PyPi

     $ pip install hca-util
    
  2. Run the hca-util tool

     $ hca-util
     Type ? to list commands
     hca>
    
  3. Run config command specifying your credentials

     hca> config ACCESS_KEY SECRET_KEY
    

Step 2 opens an interactive prompt.

Step 3 adds a new hca-util profile to your local AWS configuration which the tool uses.

Use the tool to upload and download data

The following commands are currently possible.

command                         description
=======                         ===========
config ACCESS_KEY SECRET_KEY    Configure your machine with credentials

create [project_name] [-udx]    Create an upload directory for project (authorised user only)
                                If specified, project name needs to be between 1-36 alphanumeric characters with no space
                                If specified, allowed permissions include 'u', 'ud', 'ux' and 'udx'; otherwise default 'ux'
                                u - upload, d - download, x - delete

list                            List contents of bucket (authorised user only)
list DIR_NAME                   List contents of directory

select DIR_NAME                 Set active directory for upload and download
dir                             Show selected directory

upload F1 [f2] [f3] ...         Multi-files upload to selected directory
upload .                        Upload all files from current user directory

delete F1 [f2] [f3] ...         Delete specified file(s) from selected directory
delete .                        Delete all files from selected directory
delete                          Delete selected directory (authorised user only)

download F1 [f2] [f3] ...       Download specified file(s) from selected directory to local machine
download .                      Download all files from selected directory to local machine

exit (or quit)                  Exit the tool. Shorthand: x, q, or Ctrl-D

Type ? or help to list commands.

Type help <command> to display help info about a command.

Note only authorised users (for e.g. wranglers, devs) with their elevated access can create directory and list all directories.

For Developers

Run

python -m hca_util.__main__

Run tests

python -m tests.test_hca_util

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

hca-util-0.0.15.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

hca_util-0.0.15-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file hca-util-0.0.15.tar.gz.

File metadata

  • Download URL: hca-util-0.0.15.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.6.9

File hashes

Hashes for hca-util-0.0.15.tar.gz
Algorithm Hash digest
SHA256 e0d26c3973fbd35253b97f14ea20b01b361cfad17de71f26f3c22028c300c340
MD5 64aaeea5d434cc69808c6b54d4a06bdb
BLAKE2b-256 e632436fbd9afd675ab9a5507dd0f67c746d5d32fa418326a978803a2de9ae9b

See more details on using hashes here.

File details

Details for the file hca_util-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: hca_util-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.6.9

File hashes

Hashes for hca_util-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 62539ebcd9e168fffd9743690ffedfe7e11be4157dfa00a32fc93d5fc5477bad
MD5 45172f802761503353d6586206475182
BLAKE2b-256 ed2cc04bbce4caf30042a8fa83a33831f48184e648e0365ef8b369e15e035bd8

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