A module for requesting and parsing SRU data from BIBSYS.
from bibsys.sru import control
# Build SRU request
bib_query = control.make_url(zone="bibsys", query=f"Tommy Tee")
# Make SRU request
bib_query_resp = control.search(bib_query)
# Create SRU response objects
bib = control.parse(bib_query_resp, zone="bibsys", printOut="yes")
The SRU client will return an SRU object that can be called to get various information about the search result.
Returns the number of records found.
Is either TRUE (no errors encountered) or FALSE (some errors encountered)
Returns any errors encountered.
Returns XML representation of SRU response.
Returns a dictionary of the SRU response.
Returns a list of dictionarys that is structured.