An API to get MARC (Machine-Readable Cataloging) data in many formats (MARC ISO, MARCXML, mnemonic MARC, JSON) from ILS like Pergamum.
If you use an instance of Pergamum version 10 or you want to use a JavaScript tool that uses API, see the Get Pergamum Marc Records tool.
docker pull vitorsilverio/libraryapi:main
docker run -d --name libraryapi -p 8000:80 vitorsilverio/libraryapi:main
pip
and uvicorn
commands with python3.12 -m
if you have more than one Python interpreter.pip install --user pipenv
export SETUPTOOLS_USE_DISTUTILS=stdlib
pipenv install --deploy
pipenv shell
uvicorn app.main:app --port 80
append --reload
if you are developing and change the portCheck the endpoints in documentation page at http://**deploy-ip**:**port**/docs
See a working demo instance:
Using query params:
Using headers:
curl "https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967" \
-H "Server: https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php" \
-H "Accept: application/marc"
curl "https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967" \
-H "Server: https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php" \
-H "Accept: application/xml"
curl "https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967" \
-H "Server: https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php" \
-H "Accept: text/plain"
curl "https://libraryapi.sites.ufsc.br/api/v2/pergamum/64967" \
-H "Server: https://pergamumweb.udesc.br/pergamum/web_service/servidor_ws.php" \
-H "Accept: application/json"
Please read Contibution.md to know how to contribute code or buy me a ☕