CLI工具,用于将数据上传到大使馆S3备份的欧洲COVID19数据平台
covid-util的Python项目详细描述
covid利用率
用于从EMBL-EBI托管的大使馆云基础设施上载和下载文件的CLI工具
PyPi:https://pypi.org/project/covid-util/
用户
先决条件
用户需要
- 基本命令行知识
- 他们的机器上安装了Python3.x
- 访问S3存储桶中数据的凭据(访问和密钥)
安装
从PyPi获取covid-util
。在
$ pip install covid-util
使用
显示帮助
^{pr2}$在上面,可选参数在[]
之间,选择在{
基本用法如下:
$ covid-util cmd ARG1 ARG2 -o1 -o2
通过指定命令(cmd
-参见下面的列表)来使用该工具,指定任何必需的(位置的)参数(例如ARG1
和{-o1
和o2
-请参见每个命令的选项)。在
命令列表
特定命令的帮助:
$ covid-util <command> -h
某些命令或选项/标志仅限于授权用户(例如牧马人、管理员)。在
config
命令
配置AWS凭据
$ covid-util config ACCESS_KEY SECRET_KEY positional arguments: ACCESS_KEY AWS Access Key ID SECRET_KEY AWS Secret Access Key
默认情况下,此工具查找并使用概要文件名\u covid-util_embassy(如果存在),或者可以通过config
命令设置它。在
运行带有--profile
参数的命令将使用指定的配置文件,而不是默认的covid util配置文件。在
create
命令
创建上传区域(仅限授权用户)
$ 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
命令
选择或显示活动上载区域
$ covid-util select AREA positional arguments: AREA area uuid. If not present then selected area is shown
list
命令
列出所选区域的内容
$ covid-util list [-b] optional arguments: -b list all areas in bucket **(authorised users only)**
upload
命令
将文件上载到选定区域
$ 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
命令
从所选区域下载文件
$ 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
命令
从所选区域删除文件
$ 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)**
- 项目
标签: