triplemodel.io.cbd

Concise bounded description (CBD) helpers.

triplemodel.io.cbd.cbd_graph(graph, subject, *, target_graph=None, include_reifications=True)[source]

Return the concise bounded description of subject in graph.

Return type:

RdfGraph

Parameters:
  • graph (RdfGraph)

  • subject (str | NamedNode | BlankNode | Literal)

  • target_graph (RdfGraph | None)

  • include_reifications (bool)

triplemodel.io.cbd.cbd_model(model_cls, graph, uri, *, dispatch=False, validate_type=True, on_duplicate='warn', resolver=None, registry=<triplemodel.terms.registry.LiteralRegistry object>, de_skolemize=None, include_reifications=True)[source]

Load a model instance from the CBD subgraph around uri.

Return type:

TypeVar(T, bound= BaseModel)

Parameters: