Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 1.56 KB

File metadata and controls

68 lines (44 loc) · 1.56 KB

pyoai

https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13-blue

The oaipmh module is a Python implementation of the Open Archives Initiative Protocol for Metadata Harvesting (version 2) client and server.

Installation

pip install pyoai

Or with uv:

uv add pyoai

Requirements

Example

A simple OAI-PMH client:

from oaipmh.client import Client
from oaipmh.metadata import MetadataRegistry, oai_dc_reader

URL = 'http://uni.edu/ir/oaipmh'

registry = MetadataRegistry()
registry.registerReader('oai_dc', oai_dc_reader)
client = Client(URL, registry)

for record in client.listRecords(metadataPrefix='oai_dc'):
    print(record)

The pyoai package also contains a generic server implementation of the OAI-PMH protocol. It is used as the foundation of the MOAI Server Platform.

Development

uv sync --all-extras
uv run pytest