Tools for working with Omeka S API
Project description
Omeka S Tools
Tools for working with data in an instance of Omeka S
Install
pip install omeka-s-tools
How to use
See the documentation for full details of the Omeka API Client.
from omeka_s_tools.api import OmekaAPIClient
omeka = OmekaAPIClient('http://timsherratt.org/collections/api')
items = omeka.get_resources('items')
items['total_results']
49
items['results'][0]
{'@context': 'http://timsherratt.org/collections/api-context',
'@id': 'http://timsherratt.org/collections/api/items/671',
'@type': ['o:Item', 'schema:Newspaper'],
'o:id': 671,
'o:is_public': True,
'o:owner': {'@id': 'http://timsherratt.org/collections/api/users/1',
'o:id': 1},
'o:resource_class': {'@id': 'http://timsherratt.org/collections/api/resource_classes/161',
'o:id': 161},
'o:resource_template': {'@id': 'http://timsherratt.org/collections/api/resource_templates/5',
'o:id': 5},
'o:thumbnail': None,
'o:title': "Newcastle Morning Herald and Miners' Advocate (NSW : 1876 - 1954)",
'thumbnail_display_urls': {'large': None, 'medium': None, 'square': None},
'o:created': {'@value': '2022-01-20T06:36:11+00:00',
'@type': 'http://www.w3.org/2001/XMLSchema#dateTime'},
'o:modified': {'@value': '2022-01-20T06:36:11+00:00',
'@type': 'http://www.w3.org/2001/XMLSchema#dateTime'},
'o:media': [],
'o:item_set': [],
'o:site': [],
'schema:name': [{'type': 'literal',
'property_id': 1116,
'property_label': 'name',
'is_public': True,
'@value': "Newcastle Morning Herald and Miners' Advocate (NSW : 1876 - 1954)"}],
'schema:url': [{'type': 'uri',
'property_id': 393,
'property_label': 'url',
'is_public': True,
'@id': 'http://nla.gov.au/nla.news-title356'}],
'schema:identifier': [{'type': 'literal',
'property_id': 190,
'property_label': 'identifier',
'is_public': True,
'@value': '356'}]}
See the documentation for more examples.
Created by Tim Sherratt (@wragge) for the GLAM Workbench.
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
omeka_s_tools-0.3.0.tar.gz
(14.0 kB
view hashes)
Built Distribution
Close
Hashes for omeka_s_tools-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45eff85725f11376dd5c056c918c6a1681629d6f621c25753d83f8a633b87fe2 |
|
MD5 | 7b5a1e9a99dcb7e0419a9188f01b6d9f |
|
BLAKE2b-256 | 65b88958c785ae955f35e6b0bf011cc1b06f876e25563d8483fd32180b1948fd |