RDFLib/sparqlwrapper — pull request #45 by nicholsn (2014-08-28 05:17:50+00:00)
Title: HTTP Digest Auth Support

This is to address an issue that was discussed at RDFLib/rdflib#343, where a SPARQLUpdateStore works with basic auth but not digest auth, which is what Virtuoso uses by default. RDFLib/sparqlwrapper#12 looks like a better longterm solution to authentication issues - this is just a quick fix.

- added wrapper.setHTTPAuth
- creating a urllib2 opener for digest

```
In [1]: import rdflib
In [2]: g = rdflib.ConjunctiveGraph('SPARQLUpdateStore')
In [3]: g.store.setCredentials('dba','dba')
In [4]: g.store.setHTTPAuth('DIGEST')
In [5]: sparql='http://localhost:8890/sparql'
In [6]: update='http://localhost:8890/sparql-auth'
In [7]: g.open((sparql,update))
In [8]: g.update("INSERT DATA { GRAPH { . } }")
```