Package SPARQLWrapper :: Module Wrapper
[hide private]
[frames] | no frames]

Module Wrapper

source code


See Also: SPARQL Specification

Author: Ivan Herman, Sergio Fernández, Carlos Tejo Alonso

Organization: World Wide Web Consortium, Salzburg Research and Foundation CTIC.

License: W3C® SOFTWARE NOTICE AND LICENSE

Requires: RDFLib package.

Classes [hide private]
  SPARQLWrapper
Wrapper around an online access to a SPARQL Web entry point.
  QueryResult
Wrapper around an a query result.
Variables [hide private]
  JSON = 'json'
to be used to set the return format to JSON
  JSONLD = 'json-ld'
  XML = 'xml'
to be used to set the return format to XML (SPARQL XML format or RDF/XML, depending on the query type).
  TURTLE = 'turtle'
to be used to set the return format to Turtle
  N3 = 'n3'
to be used to set the return format to N3 (for most of the SPARQL services this is equivalent to Turtle)
  RDF = 'rdf'
to be used to set the return RDF Graph
  _allowedFormats = ['json', 'xml', 'turtle', 'n3', 'rdf']
  POST = 'POST'
to be used to set HTTP POST
  GET = 'GET'
to be used to set HTTP GET.
  _allowedRequests = ['POST', 'GET']
  BASIC = 'BASIC'
  DIGEST = 'DIGEST'
  _allowedAuth = ['BASIC', 'DIGEST']
  SELECT = 'SELECT'
to be used to set the query type to SELECT.
  CONSTRUCT = 'CONSTRUCT'
to be used to set the query type to CONSTRUCT.
  ASK = 'ASK'
to be used to set the query type to ASK.
  DESCRIBE = 'DESCRIBE'
to be used to set the query type to DESCRIBE.
  INSERT = 'INSERT'
  DELETE = 'DELETE'
  CREATE = 'CREATE'
  CLEAR = 'CLEAR'
  DROP = 'DROP'
  LOAD = 'LOAD'
  COPY = 'COPY'
  MOVE = 'MOVE'
  ADD = 'ADD'
  _allowedQueryTypes = ['SELECT', 'CONSTRUCT', 'ASK', 'DESCRIBE'...
  URLENCODED = 'urlencoded'
  POSTDIRECTLY = 'postdirectly'
  _REQUEST_METHODS = ['urlencoded', 'postdirectly']
  _SPARQL_DEFAULT = ['application/sparql-results+xml', 'applicat...
  _SPARQL_XML = ['application/sparql-results+xml']
  _SPARQL_JSON = ['application/sparql-results+json', 'text/javas...
  _RDF_XML = ['application/rdf+xml']
  _RDF_N3 = ['text/rdf+n3', 'application/n-triples', 'applicatio...
  _RDF_JSONLD = ['application/x-json+ld', 'application/ld+json']
  _ALL = ['*/*']
  _SPARQL_POSSIBLE = ['application/sparql-results+xml', 'applica...
  _SPARQL_PARAMS = ['query']
  _RDF_POSSIBLE = ['application/rdf+xml', 'text/rdf+n3', 'applic...
  _returnFormatSetting = ['format', 'output', 'results']
  __package__ = 'SPARQLWrapper'
Variables Details [hide private]

XML

to be used to set the return format to XML (SPARQL XML format or RDF/XML, depending on the query type). This is the default.
Value:
'xml'

GET

to be used to set HTTP GET. This is the default.
Value:
'GET'

SELECT

to be used to set the query type to SELECT. This is, usually, determined automatically.
Value:
'SELECT'

CONSTRUCT

to be used to set the query type to CONSTRUCT. This is, usually, determined automatically.
Value:
'CONSTRUCT'

ASK

to be used to set the query type to ASK. This is, usually, determined automatically.
Value:
'ASK'

DESCRIBE

to be used to set the query type to DESCRIBE. This is, usually, determined automatically.
Value:
'DESCRIBE'

_allowedQueryTypes

Value:
['SELECT',
 'CONSTRUCT',
 'ASK',
 'DESCRIBE',
 'INSERT',
 'DELETE',
 'CREATE',
 'CLEAR',
...

_SPARQL_DEFAULT

Value:
['application/sparql-results+xml', 'application/rdf+xml', '*/*']

_SPARQL_JSON

Value:
['application/sparql-results+json',
 'text/javascript',
 'application/json']

_RDF_N3

Value:
['text/rdf+n3',
 'application/n-triples',
 'application/turtle',
 'application/n3',
 'text/n3',
 'text/turtle']

_SPARQL_POSSIBLE

Value:
['application/sparql-results+xml',
 'application/sparql-results+json',
 'text/javascript',
 'application/json',
 'application/rdf+xml',
 'text/rdf+n3',
 'application/n-triples',
 'application/turtle',
...

_RDF_POSSIBLE

Value:
['application/rdf+xml',
 'text/rdf+n3',
 'application/n-triples',
 'application/turtle',
 'application/n3',
 'text/n3',
 'text/turtle']