Giter Club home page Giter Club logo

zdbpydra's Introduction

zdbpydra

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 PyPI

pip install 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 information on using the ZDB JSON interface. For details regarding the LD schema, see the local context file.

Information on the PICA-based ZDB-Format can be found in the corresponding cataloguing documentation or in the PICA+/PICA3 concordance (both in german).

Usage 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)

zdbpydra's People

Contributors

herreio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.