用于将数据上传到Morphic AWS S3存储桶的CLI工具
项目描述
morphic-util
用于将数据上传到Morphic AWS S3存储桶的CLI工具。
用户
先决条件
用户需要具备
- 基本的命令行知识
- 机器上安装了Python3.x
- AWS Cognito用户名和密码
安装
可以从PyPi安装morphic-util工具。
$ pip install morphic-util
用法
显示帮助和命令列表。
$ 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
在上面的例子中,可选参数位于[]
内,而选择位于{}
内。
基本用法如下
$ morphic-util cmd ARG1 ARG2 -o1 -o2
通过指定一个命令(cmd
- 请参阅下面的列表)来运行,任何必需的(位置)参数(例如 ARG1
和 ARG2
- 请参阅每个命令的位置参数),以及任何可选参数(例如 -o1
和 o2
- 请参阅每个命令的选项)。
命令
特定命令的帮助
$ morphic-util <cmd> -h
一些命令或选项/标志仅限于授权用户(管理员)。
config
命令
配置AWS凭证
$ morphic-util config username password
positional arguments:
username AWS Cognito username
password AWS Cognito password
工具使用本地AWS配置文件中的配置文件名hca-util。
create
命令
创建上传区域/项目文件夹(仅限授权用户)
$ 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
命令
显示或选择活动上传区域/项目文件夹
$ morphic-util select AREA
positional arguments:
AREA area name/ folder name.
如果未指定AREA,则显示所选区域。
list
命令
列出所选区域的目录内容
$ morphic-util list [-b]
optional arguments:
-b list all areas in bucket **(authorised users only)**
upload
命令
将文件上传到所选区域
$ morphic-util upload PATH [PATH ...] [-o]
positional arguments:
PATH valid file or directory
optional arguments:
-o overwrite files with same names
download
命令
从选定区域下载文件 (仅限授权用户)
$ 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
命令
从选定区域删除文件
$ 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)
开发者
下载依赖项
pip install -r requirements.txt
运行测试
nosetests
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。
源分布
morphic-util-0.0.9.tar.gz (27.8 kB 查看哈希值)
构建分布
morphic_util-0.0.9-py3-none-any.whl (34.6 kB 查看哈希值)
关闭
morphic-util-0.0.9.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 548f151723477b2d088afc4a54d103c48257670dbf714ce97a9b30516d8e9a77 |
|
MD5 | 72768a56ae6e3f7101702026522c8a75 |
|
BLAKE2b-256 | 07e5a4b845730bbf0580509e13582d18c40a2198f68599832dd0a18ae3b36a52 |
关闭
morphic_util-0.0.9-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 9a1d7ca698cd151d69ee1496b00f39a131da8629e528c58c339e124be03ac2ce |
|
MD5 | 05d790232e0a9c5b3b9d91bb41d9951c |
|
BLAKE2b-256 | 429c50970dabe0e31442c5a5508ad647c03f7d5eca8a65764d9aee8a78f7e427 |