Utilities¶
kurra.utils
¶
Utilities used by the other modules.
load_graph(source: Union[GraphInput, list[GraphInput], tuple[GraphInput, ...]], *additional_graph_paths_or_str: GraphInput, recursive: bool = False) -> Graph
¶
Presents an RDFLib Graph from one or more existing Graphs, pickle-cached RDF files, RDF files or directories, remote RDF URLs, or RDF data strings.
Multiple inputs may be supplied as positional arguments or as a list or tuple.
Missing filesystem paths raise FileNotFoundError.
Source code in kurra/utils.py
render_sparql_result(r: dict | str | Graph, rf: RenderFormat = RenderFormat.markdown) -> str
¶
Renders a SPARQL result in a given render format
Source code in kurra/utils.py
get_system_graph(system_graph_source: str | Path | Dataset | Graph = None, http_client: httpx.Client | None = None)
¶
Returns a System Graph, graph and can accept many source options
Source code in kurra/utils.py
make_system_specific_sparql_endpoint(sparql_endpoint: str, q: str = None, statement: SparqlStatementType = None, gsp_query_type: GspType = None) -> str
¶
Alters a given SPARQL Endpoint to meet specific system requirements.
e.g. GraphDB using /statements at the end of the base SPARQL Endpoint for updates