A microservice API to link vocabulary terms to items through their respective iri's.
Voc_api uses SPARQL endpoints to search for semantic vocabularies and ontologies.
Elements, things : anything, really, as long as it has an IRI.
For the moment, install & run with poetry
poetry install
poetry run api --debug
A PostgreSQL DB has to be available
docker run --name vocapi-postgres -v postgres-data:/var/lib/postgresql/data \
-p 5432:5432 \
-e POSTGRES_USER=vocapi -e POSTGRES_PASSWORD=vocapi \
-d postgres:14
With a proper schema), using above docker:
# Erases any existing data, run at your own risk
psql -Atx postgres://vocapi:vocapi@localhost:5432/vocapi \
-f ./ressources/schema.sql
Don't forget to set a dotenv file (see config file for details)
cat > .env <<- EOF
SPARQL_ENDPOINT=[http://example.com/endpoint/sparql]
PG_DSN=[postgres://vocapi:vocapi@localhost:5432/db]
EOF