Skip to main content

Omeka S Tools

</code></pre>
<pre><code>The dotenv extension is already loaded. To reload it, use:
  %reload_ext dotenv
import omeka_s_tools2
from omeka_s_tools2 import api
from omeka_s_tools2.api import *

Install

pip install omeka-s-tools

How to use

See the documentation for full details of the Omeka API Client.

from omeka_s_tools2.api import OmekaAPIClient

omeka = OmekaAPIClient('http://timsherratt.org/collections/api')
ImportError: cannot import name 'OmekaAPIClient' from 'omeka_s_tools2.api' (/Users/nakamura/git/kim/omeka_s_tools4/omeka_s_tools2/api.py)
from omeka_s_tools2.api import *

omeka = OmekaAPIClient('http://timsherratt.org/collections/api')
NameError: name 'OmekaAPIClient' is not defined
items = omeka.get_resources('items')
items['total_results']
140
items['results'][0]
{'@context': 'http://timsherratt.org/collections/api-context',
 '@id': 'http://timsherratt.org/collections/api/items/677',
 '@type': ['o:Item', 'schema:Newspaper'],
 'o:id': 677,
 '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': 'Manilla Express (NSW : 1899 - 1954)',
 'thumbnail_display_urls': {'large': 'http://timsherratt.org/collections/files/large/aa1fb4063116fc889418ce6dc20af3cb7e7bd0db.jpg',
  'medium': 'http://timsherratt.org/collections/files/medium/aa1fb4063116fc889418ce6dc20af3cb7e7bd0db.jpg',
  'square': 'http://timsherratt.org/collections/files/square/aa1fb4063116fc889418ce6dc20af3cb7e7bd0db.jpg'},
 'o:created': {'@value': '2022-01-20T06:37:50+00:00',
  '@type': 'http://www.w3.org/2001/XMLSchema#dateTime'},
 'o:modified': {'@value': '2022-01-20T06:37:50+00:00',
  '@type': 'http://www.w3.org/2001/XMLSchema#dateTime'},
 'o:media': [{'@id': 'http://timsherratt.org/collections/api/media/882',
   'o:id': 882},
  {'@id': 'http://timsherratt.org/collections/api/media/897', 'o:id': 897},
  {'@id': 'http://timsherratt.org/collections/api/media/929', 'o:id': 929},
  {'@id': 'http://timsherratt.org/collections/api/media/994', 'o:id': 994},
  {'@id': 'http://timsherratt.org/collections/api/media/995', 'o:id': 995},
  {'@id': 'http://timsherratt.org/collections/api/media/996', 'o:id': 996},
  {'@id': 'http://timsherratt.org/collections/api/media/997', 'o:id': 997}],
 'o:item_set': [],
 'o:site': [],
 'schema:name': [{'type': 'literal',
   'property_id': 1116,
   'property_label': 'name',
   'is_public': True,
   '@value': 'Manilla Express (NSW : 1899 - 1954)'}],
 'schema:url': [{'type': 'uri',
   'property_id': 393,
   'property_label': 'url',
   'is_public': True,
   '@id': 'http://nla.gov.au/nla.news-title1006'}],
 'schema:identifier': [{'type': 'literal',
   'property_id': 190,
   'property_label': 'identifier',
   'is_public': True,
   '@value': '1006'}],
 '@reverse': []}

See the documentation for more examples.


Created by Tim Sherratt (@nakamura196) for the GLAM Workbench.

Metadata

Release files for omeka-s-tools2 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omeka-s-tools2 0.0.1
File Size Uploaded
omeka_s_tools2-0.0.1.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for omeka-s-tools2 0.0.1
File Interpreter ABI Platform
omeka_s_tools2-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.7 kB

Release files / omeka_s_tools2-0.0.1.tar.gz

Download URL omeka_s_tools2-0.0.1.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d57ed085bf7f9bbf8c31a07c40030fe76fc8816a26204496bda303c8be6c47d8
BLAKE2b-256 checksum
How to use checksums
faf14964040e05567a0be6d949b65437c5846f047df04c7c75fd2f07098e4900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.13

Release files / omeka_s_tools2-0.0.1-py3-none-any.whl

Download URL omeka_s_tools2-0.0.1-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ea0e094d6e46f1b51e63b3c58105426cb4109dbe0ca1d1678e42c1f123b16b6
BLAKE2b-256 checksum
How to use checksums
f270cb0858dc5f8cf6799f1821e4a5ce7ffc112c9b02345e6f36a3092a52cfb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.13

Release history Release notifications | RSS feed

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page