Python library for the AtoM archival description and access platform API
Project description
pyAtoM
Python Library for the AtoM Archival Description Platform API
This library provides a Python class for working with the AtoM Archival Description Rest API
https://accesstomemory.org/en/docs/2.8/dev-manual/api/api-intro/
The Library provides APIs for the following:
- Get a record by its Slug
- Get a record by its identifier
- Search for records
- Download a digital object attached to a record
- List taxonomy terms
License
The package is available as open source under the terms of the Apache License 2.0
Installation
pyAtoM is available from the Python Package Index (PyPI)
https://pypi.org/project/pyAtoM/
To install pyAtoM, simply run this simple command in your terminal of choice:
$ pip install pyAtoM
Examples
Finding records by Slug
from pyAtoM import *
client = AccessToMemory(username="demo@example.com", password="demo", server="demo.accesstomemory.org")
slug: str = "my-slug"
item: dict = client.get(slug)
Searching for all Records
from pyAtoM import *
client = AccessToMemory(username="demo@example.com", password="demo", server="demo.accesstomemory.org")
for result in client.search():
print(result)
Searching for Records with Query terms
from pyAtoM import *
client = AccessToMemory(username="demo@example.com", password="demo", server="demo.accesstomemory.org")
queries: list = []
queries.append(Query(query_value="horses", query_field=QueryField.title))
queries.append(Query(query_value='Sudbury', query_operator=QueryOperator.or_terms, query_field=QueryField.all))
for result in client.search(query_terms=queries):
print(result)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyatom-0.4.0.tar.gz.
File metadata
- Download URL: pyatom-0.4.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0a3c70a87bfa5f7b96eae3ce918a8c5e99411b4216a0a9ad3e171e87d74c9e1
|
|
| MD5 |
86f2a5b8b77f43dc20cbf7ec92badb45
|
|
| BLAKE2b-256 |
381c61ee1274db9a201c30e74addaa65bf0610c3280ae07b2dba6beb18796dcc
|
File details
Details for the file pyAtoM-0.4.0-py3-none-any.whl.
File metadata
- Download URL: pyAtoM-0.4.0-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16494ff3bbde35a8a593e025dd4184904d2d9ed7d4a40ba2b7e01f33cbb39aa5
|
|
| MD5 |
f6f42ffff791060a5342b4885c8f07f7
|
|
| BLAKE2b-256 |
2bfbbe43029d5aa2c0c708fe6809b3c55aa15b439ba2a4cdf763c2e6244a468b
|