AMClient is an Archivematica API client library and Python package for making it easier to talk to Archivematica from your Python scripts. AMClient also acts as a command line application which can easily be combined with shell-scripts to perform the same functions as a Python script might.
AMClient brings together the majority of the functionality of the two primary Archivematica components:
Basic usage:
amclient.py <subcommand> [optional arguments] <positional argument(s)>E.g.:
amclient.py close-completed-transfers \
--am-user-name test 234deffdf89d887a7023546e6bc0031167cedf6To see a list of all commands and how they are used, then run amclient.py
without any arguments.
To understand how to use an individual subcommand, simply run:
amclient.py <subcommand>, the output will describe the input parameters for
that command:
E.g.:
usage: amclient extract-file [-h] [--ss-user-name USERNAME] [--ss-url URL]
[--directory DIR]
[--saveas-filename SAVEASFILENAME]
ss_api_key package_uuid relative_pathCalling the module from Python:
E.g.:
from amclient import AMClient
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()
# ...json is output here...For information about contributing to this project please see the AMClient CONTRIBUTING.md