CLI tool for uploading data to the European COVID-19 data platform backed up by Embassy S3
Project description
covid-util
CLI tool for uploading and downloading files from the EMBL-EBI hosted Embassy cloud infrastructure
PyPi: https://pypi.org/project/covid-util/
Users
Prerequisites
Users need to have
- Basic command-line knowledge
- Python3.x installed on their machine
- Credentials to access data in the S3 bucket (access and secret keys)
Install
Get covid-util
from PyPi.
$ pip install covid-util
Usage
Display help
$ covid-util -h
usage: covid-util [-h] [--profile PROFILE]
{config,create,select,dir,clear,list,upload,download,delete}
In the above, optional arguments are between []
and choices between {}
.
The basic usage is as follows:
$ covid-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).
List of commands
help for a specific command:
$ covid-util <command> -h
Some commands or options/flags are restricted to authorised users (for e.g. wranglers, admin) only.
config
command
Configure AWS credentials
$ covid-util config ACCESS_KEY SECRET_KEY
positional arguments:
ACCESS_KEY AWS Access Key ID
SECRET_KEY AWS Secret Access Key
By default, this tool looks for and uses the profile name _covid-util_embassy, if it exists, or it can be set by the config
command.
Running a command with the --profile
argument uses the specified profile instead of the default covid-util profile.
create
command
Create an upload area (authorised users only)
$ covid-util create NAME [-p {u,ud,ux,udx}]
positional arguments:
NAME name for the new area
optional arguments:
-n name optional project name for new area
-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
Select or show the active upload area
$ covid-util select AREA
positional arguments:
AREA area uuid. If not present then selected area is shown
list
command
List contents of selected area
$ covid-util list [-b]
optional arguments:
-b list all areas in bucket **(authorised users only)**
upload
command
Upload files to the selected area
$ covid-util upload (-a | -f file [file ...]) [-o]
optional arguments:
-a upload all files from current user directory
-f file [file ...] upload specified file(s)
-o overwrite files with same names
download
command
Download files from the selected area
$ covid-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
$ covid-util delete (-a | -f file [file ...] | -d)
optional arguments:
-a delete all files from selected area
-f file [file ...] delete specified file(s) only
-d delete area and contents **(authorised users only)**
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
Built Distribution
File details
Details for the file covid-util-0.0.5.tar.gz
.
File metadata
- Download URL: covid-util-0.0.5.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f50509028d2bc54f8faea44ae043aec69e7f67f32b7b5ccaf3132445082236a4 |
|
MD5 | f93e258e8a7d8906bcd9c48f9be651b5 |
|
BLAKE2b-256 | fcb8ed8bff3fa27d06f9ced6b2a03bb0f58c3e6b8ab301298be768b6e93e7fe7 |
File details
Details for the file covid_util-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: covid_util-0.0.5-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 270aabbfae86ee34bcd5568f9172ded588516a56fbe1f1b40394f85465b7936e |
|
MD5 | 313cfa02a3ce53ec0a38801a4b69d273 |
|
BLAKE2b-256 | e71ec632aabb7428fcd1f1d8b0421b13e9d7348326e6aa62b0707c1daefaa41c |