Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Getting started

Requirements

Installation

pip install oc-lode

# with the web service (`lode serve`)
pip install "oc-lode[server]"

Which install do I need?

The base install is enough for the CLI and for using LODE as a library: lode build and the lode.reader / lode.viewer modules. It installs rdflib, jinja2, requests, minify-html and pyyaml.

The web service and the REST API (lode serve, lode.api) need the [server] extra, which adds fastapi, uvicorn, gunicorn and python-multipart.

You want to...Install
Build static docs with lode buildpip install oc-lode
Run lode serve or import lode.apipip install "oc-lode[server]"

First run

Start the web server (requires the [server] extra):

lode serve --port 8000

Open http://localhost:8000 in your browser, paste an ontology URL and click Extract.

Or generate a static site from a local file:

lode build --file my_ontology.ttl --read-as owl --out ./site

Development install

git clone https://github.com/opencitations/lode.git
cd lode
uv sync --all-extras --dev
uv run python main.py