RDF to Solr document converter microservice
See solrizer.web
Requires Python 3.12
git clone git@github.com:umd-lib/solrizer.git
cd solrizer
python -m venv --prompt "solrizer-py$(cat .python-version)" .venv
source .venv/bin/activateCurrently (2025-05-06), Solrizer requires a patched version of the python-edtf module to correctly handle certain Level 2 EDTF date ranges, and it should be installed before the other dependencies.
pip install git+https://github.com/peichman-umd/python-edtf.git@68f0b36deee03a355e6bec9f255d718f0d9f032b
pip install -e '.[dev,test]'The Dockerfile includes this patch as well.
Create a .env file with the following contents:
FLASK_DEBUG=1
SOLRIZER_FCREPO_ENDPOINT={URL of fcrepo instance}
SOLRIZER_FCREPO_JWT_SECRET={shared secret for generating auth tokens}
SOLRIZER_IIIF_IDENTIFIER_PREFIX=fcrepo:
SOLRIZER_IIIF_MANIFESTS_URL_PATTERN={URI template for IIIF manifests}
SOLRIZER_IIIF_THUMBNAIL_URL_PATTERN={URI template for IIIF thumbnail images}
SOLRIZER_INDEXERS_FILE=indexers.yml
SOLRIZER_INDEXER_SETTINGS_FILE=indexer-settings.yml
SOLRIZER_HANDLE_PROXY_PREFIX={URL of handle proxy server}
SOLRIZER_SOLR_QUERY_ENDPOINT={URL of Solr query service}
In the IIIF URI templates, use {+id} as the placeholder for the IIIF
identifier.
flask --app solrizer.web runThe application will be available at http://localhost:5000
pytestWith coverage information:
pytest --cov src --cov-report term-missing testspdoc solrizerAPI documentation generated by pdoc will be available at http://localhost:8080/.
To serve the documentation on an alternate port:
pdoc -p 8888 solrizerNow the documentation will be at http://localhost:8888/.
Build the image:
docker build -t docker.lib.umd.edu/solrizer .Run, using the .env file set up earlier:
docker run --rm -it -p 5000:5000 --env-file .env docker.lib.umd.edu/solrizerSee the LICENSE file for license rights and limitations (Apache 2.0).