跳转到主要内容

CLI工具,用于将数据上传到由Embassy S3支持的欧洲COVID-19数据平台

项目描述

covid-util

CLI工具,用于从EMBL-EBI托管的Embassy云基础设施上传和下载文件

PyPi: https://pypi.ac.cn/project/covid-util/

用户

先决条件

用户需要具备

  1. 基本的命令行知识
  2. 机器上已安装Python3.x
  3. 访问S3存储桶数据的凭证(访问密钥和秘密密钥)

安装

从PyPi获取covid-util

$ pip install covid-util

用法

显示帮助

$ covid-util -h
usage: covid-util [-h] [--profile PROFILE]
                   {config,create,select,dir,clear,list,upload,download,delete}

在上面的示例中,可选参数位于[]内,而选择项位于{}内。

基本用法如下

$ covid-util cmd ARG1 ARG2 -o1 -o2

通过指定命令(例如cmd - 见下文列表)来使用工具,包括任何必需(位置)参数(例如ARG1ARG2 - 见每个命令的位置参数),以及任何可选参数(例如-o1o2 - 见每个命令的选项)。

命令列表

特定命令的帮助信息

$ covid-util <command> -h

某些命令或选项/标志仅限于授权用户(例如wranglers,admin)。

config命令

配置AWS凭证

$ covid-util config ACCESS_KEY SECRET_KEY

positional arguments:
  ACCESS_KEY         AWS Access Key ID
  SECRET_KEY         AWS Secret Access Key

默认情况下,此工具会查找并使用名为_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)**

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分发

covid-util-0.0.8.tar.gz (18.6 kB 查看哈希)

上传时间

构建分发

covid_util-0.0.8-py3-none-any.whl (24.2 kB 查看哈希)

上传时间 Python 3

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面