Skip to content

Swirrl/cddo-dm-api

Repository files navigation

CDDO Data Marketplace API

This repository will contain a barebones implementation of the API used for the MVP of the CDDO Data Marketplace project.

Prerequisites

just (required)

We just just for running project-specific commands (see the justfile).

Install using brew install just if you're on macOS, otherwise there are more instructions here.

Poetry (required)

For python version and dependency management.

Installation instructions are here.

docker (optional)

For running the local Fuseki SPARQL server.

Installation instructions for macOS here.

yq (optional)

A "lightweight and portable command-line YAML processor".

We're using FastAPI to generate the OpenAPI spec in JSON format, and yq to convert it to yaml format.

Installation instructions are here (hopefully just brew install yq).

Usage

Initial setup

  • Install the prerequisites listed above.
  • Install the python dependencies: poetry install.
  • Install the pre-commit hooks if you're planning on contributing to this repository: just setup-hooks

API

Start the API with just run.

The OpenAPI/Swagger documentation will be served at: http://localhost:8000/docs

SPARQL server (Fuseki)

⚠️ Currently the API does not serve any data, so there's not really any need to start up fuseki. ⚠️

Running just start-fuseki will start up Fuseki with the data in fuseki/data pre-loaded in the database.

The Fuseki web UI will be served at http://localhost:3030, the username is admin and the password is printed in the Docker container logs which can be accessed by: docker compose logs fuseki

Use just stop-fuseki to stop the Fuseki container again.

About

WIP CDDO Data Marketplace API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published