Skip to main content

vupysolr

vupysolr allows to access Solr stored VuFind records. For more information on VuFind, see https://vufind.org.

Installation

pip install vupysolr

Usage Examples

Command Line

$ vupysolr --id 123456789
usage: vupysolr [-h] [--url URL] [--core CORE] [--id ID] [--marc [MARC]]
                [--decode [DECODE]] [--pretty [PRETTY]] [--search [SEARCH]]

optional arguments:
  -h, --help         show this help message and exit
  --url URL          URL of VuFind Solr server (default:
                     http://localhost:8983/solr)
  --core CORE        Name of VuFind Solr core (default: biblio)
  --id ID            ID of record to fetch (default: None)
  --marc [MARC]      Get MARC data only (default: False)
  --decode [DECODE]  Decode MARC data (default: False)
  --pretty [PRETTY]  Pretty print output (default: False)
  --search [SEARCH]  Fetch record via search instead of real-time get
                     (default: False)

Interpreter

import vupysolr

Create VuFind Solr index client

url = "https://vufind.example.com/solr"
core = "collection"
index = vupysolr.index(url, core=core, marc=True)

Retrieve VuFind Solr document from index

doc_id = "123456789"
doc = index.get(doc_id)

Retrieve multiple VuFind Solr documents from index

doc_ids = ["123456789", "987654321"]
docs = index.get_many(doc_ids)
# dictionary of documents by id, missing ids are omitted
doc = docs.get("123456789")

Documents are fetched via the real-time get handler (/get) of Solr. To fetch them via search (/select) instead, create the client with realtime=False.

index = vupysolr.index(url, core=core, marc=True, realtime=False)

Inspect fields of VuFind Solr document

# print document title
print(doc.title)
# print timestamp of last indexation
print(doc.last_indexed)
# print timestamp of latest transaction (MARC)
print(doc.marc_latest_transaction)

Metadata

Release files for vupysolr 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vupysolr 0.3.0
File Size Uploaded Provenance Actions
vupysolr-0.3.0.tar.gz 20.8 kB Without provenance Details for vupysolr-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vupysolr 0.3.0
File Interpreter ABI Platform Actions
vupysolr-0.3.0-py3-none-any.whl Python 3 none any Details for vupysolr-0.3.0-py3-none-any.whl

Total release size: 42.0 kB

Release files / vupysolr-0.3.0.tar.gz

Download URL vupysolr-0.3.0.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f6b2c4f3e1e6348965e54150551b58f5be3edc372e5be2e1892417a8b4c8d795
BLAKE2b-256 checksum
How to use checksums
3790a563041c93fef14fac8e44bafd4bdf995bcde94b3d162c0efd6b1b21b031
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / vupysolr-0.3.0-py3-none-any.whl

Download URL vupysolr-0.3.0-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a15a4c91ae27c04434a453282080c6f1593c929e65bd28087360b9d1e10f524
BLAKE2b-256 checksum
How to use checksums
73f19482b364704f631c90b8f86530e3b5c00727ca97fd1b62708e698cf7d629
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for vupysolr 0.3.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page