Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.15 KB

File metadata and controls

54 lines (38 loc) · 1.15 KB

MaRDI FastAPI FDO Prototype

Minimal FastAPI service that exposes FAIR Digital Object payloads for existing MaRDI QIDs. It queries the current MediaWiki/Knowledge-Graph backend, wraps the result into a lightweight JSON-LD structure, and serves it under /fdo/{qid}.

Preparation

python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
python -m venv .venv
.\venv\Scripts\activate.ps1
pip install -r requirements.txt

Run the server

Standalone server

uvicorn app.mardi_fdo_server:app --reload --port 8000 

Docker

The project can be run using Docker for easy deployment and development.

  1. Build the image:

    docker build -f docker/Dockerfile -t mardi-fdo-server .
  2. Run the container:

    docker run -p 8000:8000 mardi-fdo-server

Request an entity

curl http://localhost:8000/fdo/Q123456

Deployment Notes

  • Run the container/pod alongside the existing MaRDI stack
  • Expose it - e.g. via Traefik
  • The service is read-only - it only queries the MediaWiki/SPARQL backends