Skip to content

Commit 5351655

Browse files
mpasternakclaude
andcommitted
Remove legacy files and modernize README
Deleted: - .hgignore, .hgtags (Mercurial remnants, repo is on git) - buildout.cfg (zc.buildout config; replaced by uv) - Makefile (referenced `python setup.py sdist upload`; had bogus path from another project; superseded by uv) - INSTALL.txt (outdated: mentioned Python 2.3, `python setup.py install`, and codespeak lxml URL) README.rst: - Fixed Python 2 `print record` -> `print(record)` - Updated CI badge to new workflow URL (mpasternak/pyoai) - Added Python version support badge (3.10-3.13) - Added modern installation instructions (pip, uv) - Added development quickstart (uv sync, uv run pytest) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f2989d9 commit 5351655

6 files changed

Lines changed: 54 additions & 114 deletions

File tree

.hgignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.hgtags

Lines changed: 0 additions & 21 deletions
This file was deleted.

INSTALL.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 25 deletions
This file was deleted.

README.rst

Lines changed: 54 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,68 @@
11
======
2-
OAIPMH
2+
pyoai
33
======
44

55
.. image:: https://img.shields.io/pypi/v/pyoai.svg
6-
:target: https://pypi.python.org/pypi/pyoai
6+
:target: https://pypi.python.org/pypi/pyoai
77

8-
.. image:: https://github.com/infrae/pyoai/workflows/Run%20tests/badge.svg
9-
:target: https://github.com/infrae/pyoai/actions?query=workflow%3A%22Run+tests%22
10-
11-
The oaipmh module is a Python implementation of an "Open Archives
12-
Initiative Protocol for Metadata Harvesting" (version 2) client and
13-
server. The protocol is described here:
8+
.. image:: https://github.com/mpasternak/pyoai/actions/workflows/run_tests.yml/badge.svg
9+
:target: https://github.com/mpasternak/pyoai/actions/workflows/run_tests.yml
1410

15-
http://www.openarchives.org/OAI/openarchivesprotocol.html
11+
.. image:: https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13-blue
12+
:target: https://www.python.org/
1613

17-
Below is a simple implementation of an OAIPMH client:
14+
The ``oaipmh`` module is a Python implementation of the
15+
`Open Archives Initiative Protocol for Metadata Harvesting`_ (version 2)
16+
client and server.
1817

19-
>>> from oaipmh.client import Client
20-
>>> from oaipmh.metadata import MetadataRegistry, oai_dc_reader
18+
.. _Open Archives Initiative Protocol for Metadata Harvesting: http://www.openarchives.org/OAI/openarchivesprotocol.html
2119

22-
>>> URL = 'http://uni.edu/ir/oaipmh'
20+
Installation
21+
============
2322

24-
>>> registry = MetadataRegistry()
25-
>>> registry.registerReader('oai_dc', oai_dc_reader)
26-
>>> client = Client(URL, registry)
23+
.. code-block:: bash
2724
28-
>>> for record in client.listRecords(metadataPrefix='oai_dc'):
29-
>>> print record
25+
pip install pyoai
3026
27+
Or with `uv`_::
3128

32-
The pyoai package also contains a generic server implementation of the
33-
OAIPMH protocol, this is used as the foundation of the `MOAI Server Platform`_
29+
uv add pyoai
3430

35-
.. _MOAI Server Platform: http://pypi.python.org/pypi/MOAI
31+
.. _uv: https://docs.astral.sh/uv/
32+
33+
Requirements
34+
============
35+
36+
* Python 3.10+
37+
* `lxml <https://lxml.de/>`_
38+
39+
Example
40+
=======
41+
42+
A simple OAI-PMH client:
43+
44+
.. code-block:: python
45+
46+
from oaipmh.client import Client
47+
from oaipmh.metadata import MetadataRegistry, oai_dc_reader
48+
49+
URL = 'http://uni.edu/ir/oaipmh'
50+
51+
registry = MetadataRegistry()
52+
registry.registerReader('oai_dc', oai_dc_reader)
53+
client = Client(URL, registry)
54+
55+
for record in client.listRecords(metadataPrefix='oai_dc'):
56+
print(record)
57+
58+
The pyoai package also contains a generic server implementation of the
59+
OAI-PMH protocol. It is used as the foundation of the
60+
`MOAI Server Platform <http://pypi.python.org/pypi/MOAI>`_.
61+
62+
Development
63+
===========
64+
65+
.. code-block:: bash
66+
67+
uv sync --all-extras
68+
uv run pytest

buildout.cfg

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)