Skip to content

Instantly share code, notes, and snippets.

@rancas
Created May 7, 2013 15:02
Show Gist options
  • Save rancas/5533298 to your computer and use it in GitHub Desktop.
Save rancas/5533298 to your computer and use it in GitHub Desktop.
A practical example to show how you can connect to a Virtuoso quad-store with python and rdflib.
from rdflib.graph import ConjunctiveGraph as Graph
from rdflib.store import Store
from rdflib.plugin import get as plugin
from rdflib.term import URIRef
Virtuoso = plugin("Virtuoso", Store)
store = Virtuoso("DSN=VOS;UID=dba;PWD=dba;WideAsUTF16=Y")
default_graph_uri = "http://www.w3.org/People/Berners-Lee/card"
graph = Graph(store,identifier = URIRef(default_graph_uri))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment