ekglib

kgiri

Utilities for constructing and working with IRIs and related concepts in executable knowledge graphs.

These helpers are used throughout ekglib to keep knowledge graph identifiers consistent and well-structured.

Main Functions

IRI Generation

Namespace Management

IRI Replacement

CLI Integration

Usage

from ekglib.kgiri import kgiri_with, kgiri_random, set_kgiri_base

# Set the base IRI (typically via environment variable EKG_KGIRI_BASE)
set_kgiri_base("https://kg.your-company.kom/")

# Generate IRIs
iri1 = kgiri_with("person/12345")
iri2 = kgiri_random()  # Uses UUID