存档API客户端库。
amclient的Python项目详细描述
AMCLIENT
transfers/amclient.py脚本是一个模块和cli,它提供 与各种archivematicaapi交互的功能。
基本用法:
amclient.py <subcommand> [optional arguments] <positional argument(s)>
例如:
amclient.py close-completed-transfers \ --am-user-name test 234deffdf89d887a7023546e6bc0031167cedf6
要查看所有命令及其使用方式的列表,请运行amclient.py
没有任何争论。
要了解如何使用单个子命令,只需运行:
amclient.py <subcommand>
,输出将描述
那个命令:
例如:
usage: amclient extract-file [-h][--ss-user-name USERNAME][--ss-url URL][--directory DIR][--saveas-filename SAVEASFILENAME] ss_api_key package_uuid relative_path
从python调用模块:
例如:
Python3.6.7(default,Oct222018,11:32:17)[GCC8.2.0]onlinuxType"help","copyright","credits"or"license"formoreinformation.>>>fromamclientimportAMClient>>>am=AMClient()>>>am.ss_url="http://127.0.0.1:62081">>>am.ss_user_name="test">>>am.ss_api_key="test">>>am.list_storage_locations()...jsonisoutputhere...