Metadata-Version: 2.1
Name: oaipmh-scythe
Version: 0.10.0
Summary: A Scythe for harvesting OAI-PMH repositories.
Project-URL: Changelog, https://github.com/afuetterer/oaipmh-scythe/blob/main/CHANGELOG.md
Project-URL: Documentation, https://afuetterer.github.io/oaipmh-scythe
Project-URL: Issues, https://github.com/afuetterer/oaipmh-scythe/issues
Project-URL: Repository, https://github.com/afuetterer/oaipmh-scythe.git
Author: Heinz-Alexander Fütterer
License-Expression: BSD-3-Clause
License-File: AUTHORS.md
License-File: LICENSE
Keywords: metadata,oai-pmh,oai-pmh-client
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Text Processing :: Markup :: XML
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.25
Requires-Dist: lxml>=5.1
Provides-Extra: dev
Requires-Dist: oaipmh-scythe[lint]; extra == 'dev'
Requires-Dist: oaipmh-scythe[test]; extra == 'dev'
Requires-Dist: pipdeptree~=2.13; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-include-markdown-plugin~=6.0; extra == 'docs'
Requires-Dist: mkdocs-material~=9.5; extra == 'docs'
Requires-Dist: mkdocstrings[python]~=0.24; extra == 'docs'
Requires-Dist: mkdocs~=1.5; extra == 'docs'
Provides-Extra: lint
Requires-Dist: pre-commit~=3.6; extra == 'lint'
Provides-Extra: test
Requires-Dist: pytest-cov~=4.1; extra == 'test'
Requires-Dist: pytest-mock~=3.12; extra == 'test'
Requires-Dist: pytest-randomly~=3.15; extra == 'test'
Requires-Dist: pytest-recording~=0.13; extra == 'test'
Requires-Dist: pytest-xdist~=3.5; extra == 'test'
Requires-Dist: pytest~=7.4; extra == 'test'
Requires-Dist: respx~=0.20; extra == 'test'
Description-Content-Type: text/markdown

# oaipmh-scythe: A Scythe for harvesting OAI-PMH repositories.

Welcome to oaipmh-scythe, an updated and modernized version of the original [sickle](https://github.com/mloesch/sickle),
now with additional features and ongoing maintenance.

| __CI__ | [![pre-commit.ci status][pre-commit-ci-badge]][pre-commit-ci-status] [![ci][ci-badge]][ci-workflow] [![coverage][coverage-badge]][ci-workflow] |
| :--- | :--- |
| __Docs__ | [![docs][docs-badge]][docs-workflow] |
| __Meta__ | [![OpenSSF Scorecard][scorecard-badge]][scorecard-url] [![hatch][hatch-badge]][hatch] [![ruff][ruff-badge]][ruff] [![mypy][mypy-badge]][mypy] [![License][license-badge]][license] |

oaipmh-scythe is a lightweight [OAI-PMH](http://www.openarchives.org/OAI/openarchivesprotocol.html)
client library written in Python. It has been designed for conveniently retrieving data from OAI interfaces the Pythonic way:

```python
from oaipmh_scythe import Scythe
with Scythe("https://zenodo.org/oai2d") as scythe:
    records = scythe.list_records()
    next(records)
# <Record oai:zenodo.org:4574771>
```

## Features

- Easy harvesting of OAI-compliant interfaces
- Support for all six OAI verbs
- Convenient object representations of OAI items (records, headers, sets, \...)
- Automatic de-serialization of Dublin Core-encoded metadata payloads to Python dictionaries
- Option for ignoring deleted items

## Requirements

[Python](https://www.python.org/downloads/) >= 3.10

oaipmh-scythe is built with:

- [httpx](https://github.com/encode/httpx) for issuing HTTP requests
- [lxml](https://github.com/lxml/lxml) for parsing XML responses

## Installation

```console
python -m pip install oaipmh-scythe
```

## Documentation

The [documentation][docs-url] is made with [Material for MkDocs](https://github.com/squidfunk/mkdocs-material) and is hosted by [GitHub Pages](https://docs.github.com/en/pages).

## Similar Projects

There are a couple of similar projects available on [PyPI](https://pypi.org/search/?q=oai-pmh) and GitHub, e.g. via
the topics [oai-pmh](https://github.com/topics/oai-pmh) and [oai-pmh-client](https://github.com/topics/oai-pmh-client). Among them are these implementations in Python:

| Project | Description | Last commit |
| --- | --- |  --- |
| [sickle](https://github.com/mloesch/sickle) | oaipmh-scythe is a fork of sickle | ![last-commit](https://img.shields.io/github/last-commit/mloesch/sickle) |
| [pyoai](https://github.com/infrae/pyoai) | sickle was inspired by pyoai | ![last-commit](https://img.shields.io/github/last-commit/infrae/pyoai) |
| [pyoaiharvester](https://github.com/vphill/pyoaiharvester) | oai-pmh harvester CLI | ![last-commit](https://img.shields.io/github/last-commit/vphill/pyoaiharvester) |
| [ddblabs-ometha](https://github.com/Deutsche-Digitale-Bibliothek/ddblabs-ometha) | oai-pmh harvester with CLI and TUI | ![last-commit](https://img.shields.io/github/last-commit/Deutsche-Digitale-Bibliothek/ddblabs-ometha) |
| [oai-harvest](https://github.com/bloomonkey/oai-harvest) | uses pyoai internally | ![last-commit](https://img.shields.io/github/last-commit/bloomonkey/oai-harvest) |
| [oai-pmh-harvester](https://github.com/MITLibraries/oai-pmh-harvester) | uses sickle internally | ![last-commit](https://img.shields.io/github/last-commit/MITLibraries/oai-pmh-harvester) |

There are also similar projects available in [Java](https://github.com/topics/oai-pmh-client?l=java) and [PHP](https://github.com/topics/oai-pmh-client?l=php).

## Acknowledgments

This is a fork of [sickle](https://github.com/mloesch/sickle) which was originally written by Mathias Loesch.

## License

oaipmh-scythe is distributed under the terms of the [BSD license](https://spdx.org/licenses/BSD-3-Clause.html).

<!-- Markdown links -->
<!-- dynamic -->
[ci-workflow]: https://github.com/afuetterer/oaipmh-scythe/actions/workflows/main.yml
[ci-badge]: https://github.com/afuetterer/oaipmh-scythe/actions/workflows/main.yml/badge.svg
[coverage-badge]: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/afuetterer/fcb87d45f4d7defdfeffa65eb1d65f63/raw/coverage-badge.json
[pre-commit-ci-status]: https://results.pre-commit.ci/latest/github/afuetterer/oaipmh-scythe/main
[pre-commit-ci-badge]: https://results.pre-commit.ci/badge/github/afuetterer/oaipmh-scythe/main.svg
[docs-url]: https://afuetterer.github.io/oaipmh-scythe
[docs-workflow]: https://github.com/afuetterer/oaipmh-scythe/actions/workflows/docs.yml
[docs-badge]: https://github.com/afuetterer/oaipmh-scythe/actions/workflows/docs.yml/badge.svg
[scorecard-url]: https://securityscorecards.dev/viewer/?uri=github.com/afuetterer/oaipmh-scythe
[scorecard-badge]: https://api.securityscorecards.dev/projects/github.com/afuetterer/oaipmh-scythe/badge
<!-- static -->
[license]: https://spdx.org/licenses/BSD-3-Clause.html
[license-badge]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg
[hatch]: https://github.com/pypa/hatch
[hatch-badge]: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg
[ruff]: https://github.com/charliermarsh/ruff
[ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
[mypy]: https://mypy-lang.org
[mypy-badge]: https://img.shields.io/badge/types-mypy-blue.svg
[test-pypi]: https://test.pypi.org/
[pip]: https://pip.pypa.io/
