Skip to main content

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

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 Records

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

pyatom-0.2.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyAtoM-0.2.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file pyatom-0.2.0.tar.gz.

File metadata

  • Download URL: pyatom-0.2.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pyatom-0.2.0.tar.gz
Algorithm Hash digest
SHA256 833f05f4e0c4fc903e49d3a493c3d1b3c5975c75d783ce64e63acbf3d2810039
MD5 73e2aefc904b57d0b89a8c181858fcfa
BLAKE2b-256 60a273b277ae58f08571a781fa78676d1857cbc8c5c93de43ce6072cd5290c45

See more details on using hashes here.

File details

Details for the file pyAtoM-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyAtoM-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pyAtoM-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a396faaed7a33dfd19c15dcc8b4367a931bdb77bf3ddac1a508f49cd4c4a79ff
MD5 47510e34e41481859c30d63f193fb90e
BLAKE2b-256 2114ec4bce47c9ebb618f91de7383177bcc284d36602342906b5a498f0ba59c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page