ZDB Hydra API Client
Project description
Under Development
zdbpydra is a Python package and command line utility that allows to access JSON-LD data (with PICA+ data embedded) from the German Union Catalogue of Serials (ZDB) via its Hydra-based API (beta).
Installation
… via SSH
pip install -e git+ssh://git@github.com/herreio/zdbpydra.git#egg=zdbpydra
… or via HTTPS
pip install -e git+https://github.com/herreio/zdbpydra.git#egg=zdbpydra
Usage Examples
Command Line
# fetch metadata of serial title
zdbpydra --id "2736054-4"
# fetch metadata of serial title (pica only)
zdbpydra --id "2736054-4" --pica
# query metadata of serial titles (cql-based)
zdbpydra --query "psg=ZDB-1-CPO"
# print help message
zdbpydra --help
Help Message
usage: zdbpydra [-h] [--id ID] [--query QUERY] [--scroll [SCROLL]] [--stream [STREAM]] [--pica [PICA]] [--pretty [PRETTY]] Fetch JSON-LD data (with PICA+ data embedded) from the German Union Catalogue of Serials (ZDB) optional arguments: -h, --help show this help message and exit --id ID id of serial title (default: None) --query QUERY cql-based search query (default: None) --scroll [SCROLL] scroll result set (default: False) --stream [STREAM] stream result set (default: False) --pica [PICA] fetch pica data only (default: False) --pretty [PRETTY] pretty print output (default: False)
Interpreter
import zdbpydra
# fetch metadata of serial title
serial = zdbpydra.title("2736054-4")
# fetch metadata of serial title (pica only)
serial_pica = zdbpydra.title("2736054-4", pica=True)
# fetch result page for given query
result_page = zdbpydra.search("psg=ZDB-1-CPO")
# fetch all result pages for given query
result_page_set = zdbpydra.scroll("psg=ZDB-1-CPO")
# iterate serial titles found for given query
for serial in zdbpydra.stream("psg=ZDB-1-CPO"):
print(serial.title)
Background
See Hydra: Hypermedia-Driven Web APIs by Markus Lanthaler for more information on Hydra APIs in general.
Have a look at the API documentation and CQL documentation (both in german) for more informations on using the ZDB JSON interface. For details regarding the LD schema, see the local context file.
Informations on the PICA-based ZDB-Format can be found in the corresponding cataloguing documentation or in the PICA+/PICA3 concordance (both in german).
Terms
ZDB metadata
All metadata in the German Union Catalogue of Serials is available free of charge for general use under the Creative Commons Zero 1.0 (CC0 1.0) license. Most of the holding data in the ZDB is also freely available. A corresponding tag is incorporated into the data record itself. (Source)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zdbpydra-0.1.1.tar.gz
.
File metadata
- Download URL: zdbpydra-0.1.1.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.5.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8baa69ff3c9fc94bbb2bee8e864bd02faeaaa5d066e5f671c48b6b03d4ca6109 |
|
MD5 | 475af92b1947dcc06d90f3d0a3703d07 |
|
BLAKE2b-256 | 1e3c8f2f3a5413171443865fb06777143814c25b27e6b923c30afd628537f6c3 |
File details
Details for the file zdbpydra-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: zdbpydra-0.1.1-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.5.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 783563b2234df510c8643ec80d7bbd01182e3004fbbe06cac7c3749009adf7f6 |
|
MD5 | 825298fb281661766cfb81f5c691a2b6 |
|
BLAKE2b-256 | be99408f90cab63b0125ac29615ff55e7d0409e039f5c5b8ca88937afaa9fd6f |