slubfind
slubfind is a command-line tool and Python library for querying the library catalog of SLUB Dresden (Saxon State Library – Dresden State and University Library). It retrieves catalog records in multiple formats including SLUBApp 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. Use slubfind --help and slubfind <subcommand> --help for complete parameter and exit-code documentation.
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
Exclude facet data from query output:
slubfind query "manfred bonitz" --no-facets
Document
Fetch a single document by ID:
slubfind document 0-1132486122
With explicit not-found handling:
slubfind document 0-DOES-NOT-EXIST --strict-not-found
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 query, document, and scroll:
slubfind --show-url document 0-1132486122
slubfind --show-url query "manfred bonitz" --facet "format_de14=Book, E-Book"
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) - SLUBApp data (query, document)
json-ld - JSON-LD linked data (query, document)
json-solr-results - Solr results (query only)
raw-solr-response - raw Solr response (query only)
json-holding-status - access links, supplementary information, and references (document only)
json-holding-status-index - availability status, shelf location, and links (document 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
Query with raw Solr response:
slubfind query "manfred bonitz" --export-format raw-solr-response
Raw Server Output
Use --no-parser to skip response parsing and print the raw server output. This is useful for inspecting the exact response or piping to other tools:
slubfind query "manfred bonitz" --no-parser
slubfind document 0-1132486122 --no-parser --export-format json-holding-status
Environment Variable
Set SLUBFIND_URL to override the default base URL:
export SLUBFIND_URL=https://katalog.slub-dresden.de
slubfind query "manfred bonitz"
Testing
Run default tests (offline/unit):
pytest
Run integration tests against the live catalog:
pytest --override-ini addopts="" -m integration
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 access links, references (detail view)
slub_hs = slub_find.holding_status_document("0-1132486122")
# retrieve availability status and location (detail view)
slub_hsi = slub_find.holding_status_index_document("0-1132486122")
# retrieve raw Solr response
slub_raw = slub_find.raw_solr_search("manfred bonitz")
# retrieve Solr result documents only
slub_solr = slub_find.solr_results_search("manfred bonitz")
# retrieve Solr parameters for a query
slub_params = slub_find.solr_params("manfred bonitz")
# retrieve Solr request URL for a query
slub_req = slub_find.solr_request("manfred bonitz")
# retrieve TYPO3-find settings
slub_settings = slub_find.settings()
Metadata
Release files for slubfind 1.18.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 |
|---|---|---|---|---|
| slubfind-1.18.0.tar.gz | 39.1 kB | Without provenance | Details for slubfind-1.18.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slubfind-1.18.0-py3-none-any.whl | Python 3 | none | any | Details for slubfind-1.18.0-py3-none-any.whl |
Total release size: 65.7 kB
Release files / slubfind-1.18.0.tar.gz
| Download URL | slubfind-1.18.0.tar.gz |
|---|---|
| Size | 39.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33ee9351f335f75293428dc2290887e954880d6308e1e5f05116e80968a03bb7
|
|
BLAKE2b-256 checksum How to use checksums |
3df6677d9f2f60c6879a706740e227064b5681444d87f2b1bb78a5a4f7203322
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / slubfind-1.18.0-py3-none-any.whl
| Download URL | slubfind-1.18.0-py3-none-any.whl |
|---|---|
| Size | 26.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ae33ed26ca150069c148c342d4f91f03bf11041b84263113c3a8cde923a6c56
|
|
BLAKE2b-256 checksum How to use checksums |
67ca32dda1977b904b75836a2142d50ae075a45f837341ef934cc94b2a4d4d7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for slubfind 1.18.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.