Archivematica API client library.
Project description
# amclient
The transfers/amclient.py script is a module and CLI that provides
functionality for interacting with the various Archivematica APIs.
Basic usage:
`amclient.py <subcommand> [optional arguments] <positional argument(s)>`
E.g.:
```bash
amclient.py close-completed-transfers \
--am-user-name test 234deffdf89d887a7023546e6bc0031167cedf6
```
To 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.:
```bash
usage: amclient extract-file [-h] [--ss-user-name USERNAME] [--ss-url URL]
[--directory DIR]
[--saveas-filename SAVEASFILENAME]
ss_api_key package_uuid relative_path
```
Calling the module from Python:
E.g.:
```python
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 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...
```
The transfers/amclient.py script is a module and CLI that provides
functionality for interacting with the various Archivematica APIs.
Basic usage:
`amclient.py <subcommand> [optional arguments] <positional argument(s)>`
E.g.:
```bash
amclient.py close-completed-transfers \
--am-user-name test 234deffdf89d887a7023546e6bc0031167cedf6
```
To 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.:
```bash
usage: amclient extract-file [-h] [--ss-user-name USERNAME] [--ss-url URL]
[--directory DIR]
[--saveas-filename SAVEASFILENAME]
ss_api_key package_uuid relative_path
```
Calling the module from Python:
E.g.:
```python
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 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...
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
amclient-1.0.0rc2.tar.gz
(12.6 kB
view hashes)
Built Distribution
Close
Hashes for amclient-1.0.0rc2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d08f887f278ad92e924450ffdc669c1544f62233973de3afad6a0cf79b12cd4 |
|
MD5 | 7513d306f4b20a56b50bebbd57ee1a88 |
|
BLAKE2b-256 | 669ecddea6c04b4934b8ade7773098bd76e9e541726e0e36135ffe0b235e124f |