Skip to main content

FCS SRU Server



fcs-sru-server @ PyPI Documentation Status

  • Based on Java implementation
    git commit: 0091fca0a4add134c478beed422dd1399a5364e3
  • Differences:
    • a bit more pythonic (naming, interfaces, enums etc.)
    • no auth stuff yet
    • WIP output buffering, server framework might not allow this, so no streaming and everything is in memory until sent
    • server framework choice (wsgi, asgi), for now werkzeug
    • TODO: refactoring to allow async variants for streaming responses (large resources), e.g. with starlette

Summary

This package implements the server-side part of the SRU/CQL protocol (SRU/S) and conforms to SRU version 1.1 and 1.2. SRU version 2.0 is mostly implemented but might be missing some more obscure features. The library will handle most of the protocol related tasks for you and you'll only need to implement a few classes to connect you search engine. However, the library will not save you from doing your SRU/CQL homework (i.e. you'll need to have at least some understanding of the protocol and adhere to the protocol semantics). Furthermore, you need to have at least some basic understanding of Python web application development (wsgi in particular) to use this library.

More Information about SRU/CQL: http://www.loc.gov/standards/sru/

The implementation is designed to make very minimal assumptions about the environment it's deployed in. For interfacing with your search engine, you need to implement the SRUSearchEngine interface. At minimum, you'll need to implement at least the search() method. Please check the Python API documentation for further details about this interface. The SRUServer implements the SRU protocol and uses your supplied search engine implementation to talk to your search engine. The SRUServer is configured using a SRUServerConfig instance. The SRUServerConfig reads an XML document, which contains the (static) server configuration. It must conform to the sru-server-config.xsd schema in the src/clarin/sru/xml/ directory.

Installation

# from github/source
python3 -m pip install 'fcs-sru-server @ git+https://github.com/Querela/fcs-sru-server-python.git'

# (locally) built package
python3 -m pip install dist/fcs_sru_server-<version>-py2.py3-none-any.whl
# or
python3 -m pip install dist/fcs-sru-server-<version>.tar.gz

# for local development
python3 -m pip install -e .

In setup.cfg:

[options]
install_requires =
    fcs-sru-server @ git+https://github.com/Querela/fcs-sru-server-python.git

Build source/binary distribution

python3 -m pip install build
python3 -m build

Development

  • Uses pytest (with coverage, clarity and randomly plugins).
python3 -m pip install -e .[test]

pytest

Run style checks:

# general style checks
python3 -m pip install -e .[style]

black --check .
flake8 . --show-source --statistics
isort --check --diff .
mypy .

# building the package and check metadata
python3 -m pip install -e .[build]

python3 -m build
twine check --strict dist/*

# build documentation and check links ...
python3 -m pip install -e .[docs]

sphinx-build -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs

Build documentation

python3 -m pip install -r ./docs/requirements.txt
# or 
python3 -m pip install -e .[docs]

sphinx-build -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs

See also

Metadata

Release files for fcs-sru-server 1.1.3

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

Source distribution (sdist)

Source distribution for fcs-sru-server 1.1.3
File Size Uploaded Provenance Actions
fcs-sru-server-1.1.3.tar.gz 51.7 kB Without provenance Details for fcs-sru-server-1.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fcs-sru-server 1.1.3
File Interpreter ABI Platform Actions
fcs_sru_server-1.1.3-py2.py3-none-any.whl Python 2, Python 3 none any Details for fcs_sru_server-1.1.3-py2.py3-none-any.whl

Total release size: 100.7 kB

Release files / fcs-sru-server-1.1.3.tar.gz

Download URL fcs-sru-server-1.1.3.tar.gz
Size 51.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d5cdcc0a28cfbbd9c7a42ad4439d5eec71fb7591a1664bcde6364463646a7062
BLAKE2b-256 checksum
How to use checksums
2ac5ceac9404b3965143dd35d12e03b589dc1bd43dc93d3594d0b5bb377a7dbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / fcs_sru_server-1.1.3-py2.py3-none-any.whl

Download URL fcs_sru_server-1.1.3-py2.py3-none-any.whl
Size 49.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8a6d0056448d0b0f01a768c08b294fcef70cfb3b7893a7e806ff324087a9aea1
BLAKE2b-256 checksum
How to use checksums
6150117654afe59401bd087da13baac2f36c5edfa6c27f0686f6a48ae5a5f0c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for fcs-sru-server 1.1.3

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.

Release history Release notifications | RSS feed

This release

1.1.3 This release

2 release files No provenance

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