Welcome to nlbsg’s documentation!
Python wrapper for the NLB Open Web Services.
Currently supports the Catalogue Service.
Installation
pip install nlbsg
Usage example
Creating a client:
from nlbsg import Client from nlbsg.catalogue import STAGING_URL API_KEY = 'secret_api_key' client = Client(STAGING_URL, API_KEY)
Searching the catalogue:
>>> from nlbsg import MediaCode
>>> results = client.search('lord of the rings', author='tolkien', media_code=MediaCode.BOOKS, limit=3)
>>> for title in results.titles:
... print(f'Title: {title.title_name}\nISBN: {title.isbn}\nPublished: {title.publish_year}\n')
...
Title: Beren and Lúthien / by J.R.R. Tolkien ; edited by Christopher Tolkien ; with illustrations by Alan Lee.
ISBN: 1328915336 (paperback)
Published: 2018
Title: Beren and l℗♭©ʻthien [electronic resource]. J. R. R Tolkien.
ISBN: 9780008214210 (electronic bk)
Published: 2017
Title: The fall of arthur [electronic resource]. J. R. R Tolkien.
ISBN: 9780007489954 (electronic bk)
Published: 2013
Getting title details:
>>> details = client.get_title_details(isbn='1328915336') >>> details.title_detail.summary "The epic tale of Beren and Lúthien became an essential element in the evolution of The Silmarillion, the myths and legends of J.R.R. Tolkien's First Age of the World. Always key to the story is the fate that shadowed their love: Beren was a mortal man, Lúthien an immortal Elf. Her father, a great Elvish lord, imposed on Beren an impossible task before he might wed Lúthien: to rob the greatest of all evil beings, Melkor, of a Silmaril.Painstakingly restored from Tolkien's manuscripts and presented for the first time as a continuous and standalone story, Beren and Lúthien reunites fans of The Hobbit and The Lord of the Rings with Elves and Men, along with the rich landscape and creatures unique to Tolkien's Middle-earth. Christopher Tolkien tells the story in his father's own words by giving its original form as well as prose and verse passages from later texts that illustrate the narrative as it changed. -- from back cover."
Getting title availability:
>>> availability = client.get_availability_info(isbn='1328915336')
>>> for item in availability.items:
... print(f'Branch: {item.branch_name}\nStatus: {item.status_desc}\n')
...
Branch: Ang Mo Kio Public Library
Status: Not On Loan
Branch: Bukit Batok Public Library
Status: On Loan
Branch: Bedok Public Library
Status: On Loan
Branch: Bishan Public Library
Status: Not On Loan
Branch: Bukit Panjang Public Library
Status: Not On Loan
Branch: Choa Chu Kang Public Library
Status: On Loan
Branch: Central Public Library
Status: Not On Loan
Branch: Clementi Public Library
Status: On Loan
Branch: Cheng San Public Library
Status: On Loan
Branch: Geylang East Public Library
Status: Not On Loan
Metadata
Release files for nlbsg 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nlbsg-0.5.0.tar.gz | 9.1 kB | Without provenance | Details for nlbsg-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nlbsg-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for nlbsg-0.5.0-py3-none-any.whl |
Total release size: 21.2 kB
Release files / nlbsg-0.5.0.tar.gz
| Download URL | nlbsg-0.5.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9fa245ed22cbcd564742149d5c627b8cf617cf4def8168f1ad8ce7e1d881ab9
|
|
BLAKE2b-256 checksum How to use checksums |
48e2868df8a9ca8dd60667f29d8c87199cd2d699d119a15410ab8bc91367c0a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / nlbsg-0.5.0-py3-none-any.whl
| Download URL | nlbsg-0.5.0-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7034de6fd2d40e769165d2e32c6dbb76fd6f50ceb84839e32a1d675549728272
|
|
BLAKE2b-256 checksum How to use checksums |
fc9c2c87738cead61aba3b13a16daea506cf5df701c46ea0e566ba7ae05924fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for nlbsg 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.