query data exports from the SLUB catalog
Project description
slubfind is a command-line tool and Python library for querying the SLUB catalog — the public catalog of SLUB Dresden (Saxon State and University Library). It retrieves catalog records in multiple formats including structured app data, JSON-LD linked data, Solr responses, and holding/availability information.
Under the hood, slubfind builds on txpyfind, a generic client for TYPO3-find catalog frontends.
Installation
… via PyPI
pip install slubfind
… or from GitHub source
pip install git+https://github.com/slub/slubfind.git
Command-Line Usage
After installation, the slubfind command is available (also via python -m slubfind). The base URL defaults to https://katalog.slub-dresden.de.
Query
Execute a search query:
slubfind query "manfred bonitz"
With a facet filter and pagination:
slubfind query "manfred bonitz" --facet "format_de14=Book, E-Book" --page 1 --count 10
Document
Fetch a single document by ID:
slubfind document 0-1132486122
Scroll
Fetch all results for a query:
slubfind scroll "manfred bonitz" --batch 10
Stream results as JSONL (one JSON object per line), useful for piping:
slubfind scroll "manfred bonitz" --stream | jq .id
Settings
Show TYPO3-find settings:
slubfind settings
Solr Parameters
Show Solr parameters for a query:
slubfind solr-params "manfred bonitz"
Solr Request
Show Solr request URL for a query:
slubfind solr-request "manfred bonitz"
From URL
Use --from-url to query using a SLUB catalog URL instead of individual parameters. This works with query, scroll, solr-params, and solr-request:
slubfind query --from-url "https://katalog.slub-dresden.de/?tx_find_find%5Bq%5D%5Bdefault%5D=manfred+bonitz"
slubfind solr-params --from-url "https://katalog.slub-dresden.de/?tx_find_find%5Bq%5D%5Bdefault%5D=manfred+bonitz"
Show Request URL
Use --show-url to print the request URL instead of fetching the response. This works with all subcommands:
slubfind --show-url query "manfred bonitz" --facet "format_de14=Book, E-Book"
slubfind --show-url document 0-1132486122
slubfind --show-url scroll "manfred bonitz" --batch 10
Export Format
Use --export-format to select the output format. The default is app.
Available formats and their supported subcommands:
app (default) — structured app format (query, document)
json-ld — JSON-LD linked data (query, document)
json-holding-status — full-text access and reference links (document only)
json-holding-status-index — resource and related links (document only)
json-solr-results — Solr results (query only)
raw-solr-response — raw Solr response (query only)
The scroll subcommand always uses raw-solr-response internally. The formats json-all, json-solr-params, and json-solr-request are used internally by the settings, solr-params, and solr-request subcommands.
Fetch a document in JSON-LD format:
slubfind document 0-1132486122 --export-format json-ld
Search in JSON-LD format:
slubfind query "manfred bonitz" --export-format json-ld
Fetch holding status for a document:
slubfind document 0-320589099 --export-format json-holding-status
Fetch indexed holding status for a document:
slubfind document 0-1809383722 --export-format json-holding-status-index
Query with Solr results format:
slubfind query "manfred bonitz" --export-format json-solr-results
Query with raw Solr response:
slubfind query "manfred bonitz" --export-format raw-solr-response
Environment Variable
Set SLUBFIND_URL to override the default base URL:
export SLUBFIND_URL=https://katalog.slub-dresden.de
slubfind query "manfred bonitz"
Python Usage Example
from slubfind.client import SlubFind
# create SlubFind instance
slub_find = SlubFind()
# retrieve JSON data (query view, app format)
slub_q = slub_find.app_search("manfred bonitz")
# retrieve JSON data (detail view, app format)
slub_doc = slub_find.app_document("0-1132486122")
# retrieve JSON-LD data (detail view)
slub_jsonld = slub_find.jsonld_document("0-1132486122")
# retrieve JSON-LD data (query view)
slub_jsonld_q = slub_find.jsonld_search("manfred bonitz")
# retrieve holding status (detail view)
slub_hs = slub_find.holding_status_document("0-1132486122")
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slubfind-1.14.0.tar.gz.
File metadata
- Download URL: slubfind-1.14.0.tar.gz
- Upload date:
- Size: 34.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a56fff275e753e48add95513a86e2c0f728bed88e90393a4225a02fb342dfbfc
|
|
| MD5 |
7fb483554958270af70ef827d4a18f76
|
|
| BLAKE2b-256 |
f323444b5f6a41c5c7dcd3bd72e9702cf30f3fd0df24c3202ace26a8997c1571
|
File details
Details for the file slubfind-1.14.0-py3-none-any.whl.
File metadata
- Download URL: slubfind-1.14.0-py3-none-any.whl
- Upload date:
- Size: 24.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e05db7a127dc014234235f1eba2cb1dee2d0f541b19cc0385d917365a22cfbeb
|
|
| MD5 |
df90b98e464431da0d2c1720e9fdada8
|
|
| BLAKE2b-256 |
a1da2da39baca67ce65f83840ea8777fbc5b0b7834b58ab47645df11d68d31d8
|