Skip to main content

German National library api

Project description

LibDNB

LibDNB PyPI - Status badge PRs welcome

This project is heavily inspired by calibre-dnb

About

I needed a way to fetch basic book metadata from the German National Libraries "API", I found calibre-dnb, but it is not suitable for my usage case, so I modified it. You can visit the portal here: portal.dnb.de.

Get started

Obtain Token

You need to apply for an API-Key at schnittstellen-service@dnb.de in order to get access to the catalogue. This library uses the SRU-API, you need a SRU Access Token.

Installation

pip install libdnb

Usage

Code Example:

import libdnb

dnbclient = libdnb.LibDNB("Your-SRU-Access-Token-Here")
result = dnbclient.lookup("9783346111098") # ISDN, Title, or any other metadata to search for here
if result: # Result might be None if nothing was found
    print(result["title"])

Fields

Key Datatype
title String
authors String
author_sort List
languages List
pubdate datetime.datetime
publisher_location String
publisher_name String
subtitle String
tags List
comments String
isbn String
urn String
idn String
ddc String

Note that some fields might be empty, you have to figure out on which fields you want to rely upon.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libdnb-0.0.1.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

libdnb-0.0.1-py3-none-any.whl (18.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page