Skip to content

Kurrawong/Prez

 
 

Repository files navigation

Prez

Prez is a Linked Data API framework tool that delivers read-only access to Knowledge Graph data according to particular domain profiles.

Prez comes in two main profile flavours:

  • VocPrez - for vocabularies, based on the SKOS data model
  • SpacePrez - for spatial data, based on OGC API specification and the GeoSPARQL data model

Prez is pretty straight-forward to install and operate and while being high-performance, using modern FastAPI Python web framework.

Prez is quite simple and expects "high quality" data to work well. By requiring that you create high quality for it, Prez ensures your value is retained in your data and not in a black box application: you remain in control!

Features

  • Linked Data delivery of any RDF graph content
    • human (HTML) & machine (RDF) formats
    • configurable alternative profiles available
  • structured according to standardised APIs
  • highly customisable UI
    • Prez can always be made to look just the way you want it to
  • data-driven
    • all of Prez' content delivery is driven by data configurations which you are in control of

A demo installation of a combined Voc and Space Prez is online at https://prez.surroundaustralia.com.

Installing

Local operation

Prez is 'just' a Python web framework API, so you can copy this repository to a local file location, install dependencies, configure its data back-end and run.

Install Python dependencies using Poetry (optional), which you can install here (recommended), or by running:

pip install poetry 

Then run poetry install in the root directory, Prez/.

Otherwise install using pip as per regular Python applications:

pip install -r requirements.txt 

Containers

You can run Prez as a Docker container:

docker pull surroundaustralia/prez

Configuration

Each instance of Prez can be a VocPrez, a SpacePrez or both, all in one. Each will need to be configured: Prez needs to know where to get its data from. These repositories contain example configurantions and scritps for building configurations:

Running

To get started without any configuration, run python3 app.py in the Prez/prez/ directory.

Data

Each kind of Prez, VocPrez or SpacePrez, requires that data is reads conforms to a particular data specification:

Those specifications - data profiles - provide validators to allow you to check whether your data matches expectations before you point Prez at it!

Application Structure

The standard process for an entity endpoint is as follows:

  1. An endpoint within a router is accessed (in routers/)
  2. Endpoint calls SPARQL service to POST a SPARQL query (in services/)
  3. The resulting RDFlib Graph is ingested by a model object (in models/)
  4. A renderer object is created which uses the model object (in renderers/)
  5. The endpoint returns the renderer's render() function
    • The response can be a renderered template (in templates/)

Dev Dependencies

  • SASS
    • Run the SASS watcher from the sass/ folder like so:
      • If using dart-sass: sass --no-source-map --watch main.scss ../css/index.css
      • If using node-sass: sass --source-map=none --watch main.scss ../css/index.css

License

Prez was originally developerd by SURROUND Australia Pty Letd, building on top of previous tools such as the original VocPrez. In that form, it is licensed under the BSD-3-Clause License. See the original Prez LICENSE file for details.

This version of Prez and the contents of this repository are also available under the BSD-3-Clause License. See this repository's LICENSE file for details.

Contact & Support

Prez is commercially supported by:

Kurrawong AI
https://kurrawong.net
info@kurrawong.net

If you just want more information:

Nicholas J. Car
Kurrawong AI
nick@kurrawong.net

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 67.1%
  • HTML 19.3%
  • CSS 6.2%
  • SCSS 4.5%
  • JavaScript 2.8%
  • Dockerfile 0.1%