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'
to be used to set the return format to 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
  RDFXML = 'rdf+xml'
to be used to set the return format to RDF/XML explicitly.
  CSV = 'csv'
to be used to set the return format to CSV
  TSV = 'tsv'
to be used to set the return format to TSV
  _allowedFormats = ['json', 'xml', 'turtle', 'n3', 'rdf', 'rdf+...
  POST = 'POST'
to be used to set HTTP POST
  GET = 'GET'
to be used to set HTTP GET.
  _allowedRequests = ['POST', 'GET']
  BASIC = 'BASIC'
BASIC HTTP Authentication method
  DIGEST = 'DIGEST'
DIGEST HTTP Authentication method
  _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'
to be used to set the query type to INSERT.
  DELETE = 'DELETE'
to be used to set the query type to DELETE.
  CREATE = 'CREATE'
to be used to set the query type to CREATE.
  CLEAR = 'CLEAR'
to be used to set the query type to CLEAR.
  DROP = 'DROP'
to be used to set the query type to DROP.
  LOAD = 'LOAD'
to be used to set the query type to LOAD.
  COPY = 'COPY'
to be used to set the query type to COPY.
  MOVE = 'MOVE'
to be used to set the query type to MOVE.
  ADD = 'ADD'
to be used to set the query type to 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', 'applicatio...
  _RDF_XML = ['application/rdf+xml']
  _RDF_N3 = ['text/rdf+n3', 'application/n-triples', 'applicatio...
  _RDF_JSONLD = ['application/x-json+ld', 'application/ld+json']
  _CSV = ['text/csv']
  _TSV = ['text/tab-separated-values']
  _XML = ['application/xml']
  _ALL = ['*/*']
  _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'

_allowedFormats

Value:
['json', 'xml', 'turtle', 'n3', 'rdf', 'rdf+xml', 'csv', 'tsv']

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',
 'application/json',
 'text/javascript',
 'application/javascript']

_RDF_N3

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

_RDF_POSSIBLE

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