Skip to main content

query data exports from the SLUB catalog

Project description

With slubfind you can query data exports from the SLUB catalog in Python.

This package is based on txpyfind, which enables access to data exports from TYPO3-find.

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 in app format:

slubfind query "manfred bonitz"

With a facet filter and pagination:

slubfind query "python" --facet "format_de14=Book, E-Book" --page 1 --count 10

Document

Fetch a single document by ID in app format:

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"

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 "python" --facet "format_de14=Book, E-Book"
slubfind --show-url document "0-1132486122"
slubfind --show-url scroll "python" --batch 10

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")

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

slubfind-1.3.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slubfind-1.3.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file slubfind-1.3.0.tar.gz.

File metadata

  • Download URL: slubfind-1.3.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for slubfind-1.3.0.tar.gz
Algorithm Hash digest
SHA256 6211106659b10b6cae9c8c22fff14a32572ad39fbf93765ba24d1a84bc5afe9d
MD5 41fef36927f7d1902190d7e0c31f80a9
BLAKE2b-256 52ae1bc38fd4d639c4b5571433736f3dd24a238a46466ca7e77e60c83c89be1f

See more details on using hashes here.

File details

Details for the file slubfind-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: slubfind-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for slubfind-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d0ccc85fe5d7634e3347a96cad6e3c965214af679af8dbd7ad587c8c82f264c7
MD5 771e92c0d4ee7ed62964c051793f19ae
BLAKE2b-256 e4a328a31ed2a9c5b7e7d96e10bfedd9f4f27594eddc1cbb9af01acd0a66d720

See more details on using hashes here.

Supported by

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