Releases: kbrbe/request-isni
Version 0.1.0
Python scripts to perform ISNI requests via a provided AtomPub API and report the outcome in CSV files.
ISNI is the ISO 27729:2012 standard name identifier that uniquely identifies public entities who contributed to creative works.
As an ISNI registration agency, the Royal Library of Belgium (KBR) can request ISNI identifiers from the ISNI central database.
The scripts of this repository are used to perform such requests against the ISNI AtomPub API: each request is one XML file containing the local KBR identifier of a public entity, the response XML files are stored, and a CSV report is generated showing the outcome of the performed requests, for example the newly assigned ISNI identifiers.
Usage
Create and activate a Python virtual environment
# Create a new Python virtual environment
python3 -m venv py-request-isni-env
# Activate the virtual environment
source py-request-isni-env/bin/activate
# Install dependencies
pip -r requirements.txt
Given that you have correctly formatted ISNI request XML files in the folder my-requests
, you can call the script in the following way to obtain response XML files in the folder my-responses
and a report at overview.csv
.
python request_isni.py \
--url https://isni-m.oclc.org:/ATOM/isni?
--input-folder my-requests \
--response-folder my-responses \
--output-file overview.csv
Please note, that you should be an ISNI member to use this API. If your IP is not whitelisted you will receive HTTP error messages.
Instead of providing the URL via commandline parameter, you can also create a .env
file with the following content: ISNI_ATOM_URL=https://isni-m.oclc.org:/ATOM/isni?
.