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
subjectingraph.
- 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:
- Parameters:
model_cls (type[T])
graph (RdfGraph)
uri (str | NamedNode | BlankNode | Literal)
dispatch (bool)
validate_type (bool)
on_duplicate (Literal['ignore', 'warn', 'error', 'first'])
resolver (PredicateResolver | None)
registry (LiteralRegistry)
de_skolemize (bool | None)
include_reifications (bool)