pyoxigraph 0.3.22#

PyPI conda-forge PyPI - Implementation PyPI - Python Version PyPI - License

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#

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.