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.1

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.1
File Size Uploaded Provenance Actions
vupysolr-0.3.1.tar.gz 21.0 kB Without provenance Details for vupysolr-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 42.4 kB

Release files / vupysolr-0.3.1.tar.gz

Download URL vupysolr-0.3.1.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
014b3e054716f2c0e2a3508f94ad9e10fd122db2356644fc94545c8708c72303
BLAKE2b-256 checksum
How to use checksums
8ec86b33c3e63290f83957c2c22872f8254e847c717749da47c41f6f38a819cd
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.1-py3-none-any.whl

Download URL vupysolr-0.3.1-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
236161324a0ae6d43a43388c4c69bc82fdce1bda1a78d564ac8edf8ec6caa6da
BLAKE2b-256 checksum
How to use checksums
35cb6603f8b999a4e7c7f4c8494e00be169dd0c50f52b3bdbb4ab32c5e782008
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.1

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