pyoxigraph 0.4.9¶
Pyoxigraph is a Python graph database library implementing the SPARQL standard.
It is built on top of Oxigraph using PyO3.
It also provides a set of utility functions for reading, writing, and processing RDF files in Turtle, TriG, N-Triples, N-Quads and RDF/XML.
Pyoxigraph is distributed on Pypi and on conda-forge.
There is also a small library providing a rdflib store using pyoxigraph: oxrdflib.
Oxigraph and pyoxigraph source code are on GitHub.
Installation¶
Pyoxigraph is distributed on Pypi.
To install it, run the usual pip install pyoxigraph
Example¶
Insert the triple <http://example/> <http://schema.org/name> "example"
and print the name of <http://example/>
in SPARQL:
from pyoxigraph import *
store = Store()
ex = NamedNode('http://example/')
schema_name = NamedNode('http://schema.org/name')
store.add(Quad(ex, schema_name, Literal('example')))
for binding in store.query('SELECT ?name WHERE { <http://example/> <http://schema.org/name> ?name }'):
print(binding['name'].value)
Table of contents¶
- RDF Model
- RDF Parsing and Serialization
- RDF Store
Store
Store.add()
Store.add_graph()
Store.backup()
Store.bulk_extend()
Store.bulk_load()
Store.clear()
Store.clear_graph()
Store.contains_named_graph()
Store.dump()
Store.extend()
Store.flush()
Store.load()
Store.named_graphs()
Store.optimize()
Store.quads_for_pattern()
Store.query()
Store.read_only()
Store.remove()
Store.remove_graph()
Store.update()
- SPARQL utility objects
- Migration Guide
Help¶
Feel free to use GitHub discussions or the Gitter chat to ask questions or talk about Oxigraph. Bug reports are also very welcome.
If you need advanced support or are willing to pay to get some extra features, feel free to reach out to Tpt.