djangordf.loaders¶
Read-only loaders for external SKOS vocabularies. Pull GND, AAT, Wikidata, or any other RDF dump into the configured triple store under a dedicated external graph.
Read-only loaders for external SKOS vocabularies.
The generic load_skos() accepts an HTTP/HTTPS URL, a filesystem
path, or an in-memory rdflib.Graph, parses it into a graph, and
writes the triples into the configured triple store under a dedicated
“external” named graph. Format detection falls back through an
explicit format= argument, the HTTP Content-Type, and the URL
extension.
The optional load_external_concept() is a thin wrapper that
issues an HTTP GET with content-negotiation headers, intended for
dereferencing a single SKOS / GND / AAT / Wikidata IRI.
- djangordf.loaders.load_skos(source, *, backend=None, graph=None, format=None)[source]¶
Load triples from
sourceinto the configured backend.sourcemay be a filesystem path, an HTTP/HTTPS URL, or an in-memoryrdflib.Graphinstance. Returns the number of triples written. Triples are inserted into the configured external graph (settings.DJANGORDF_EXTERNAL_GRAPH, defaulturn:djangordf:external) unlessgraph=overrides it. The write goes throughbackend.addso backend-specific bulk handling applies.
- djangordf.loaders.load_external_concept(iri, *, backend=None, graph=None)[source]¶
Dereference a single concept IRI over HTTP and load the response into the backend. Thin wrapper around
load_skos()that always speaks HTTP content negotiation.