Skip to content

# `` sparqlstore_example

Simple examples showing how to use the SPARQLStore

Attributes:

- `HOST` –
- `count` –
- `dbo` –
- `dbr` –
- `graph` –
- `pop` –
- `sparql_store` –
- `st` –
- `update_store` –

## `` HOST `module-attribute`

    HOST = 'http://localhost:3030'

## `` count `module-attribute`

    count = 0

## `` dbo `module-attribute`

    dbo = Namespace('http://dbpedia.org/ontology/')

## `` dbr `module-attribute`

    dbr = Namespace('http://dbpedia.org/resource/')

## `` graph `module-attribute`

    graph = Graph(store=update_store, identifier='http://dbpedia.org')

## `` pop `module-attribute`

    pop = value(URIRef('http://dbpedia.org/resource/Berlin'), populationTotal)

## `` sparql_store `module-attribute`

    sparql_store = SPARQLStore(query_endpoint='http://fake-sparql-endpoint.com/repository/x', auth=('my_username', 'my_password'))

## `` st `module-attribute`

    st = SPARQLStore(query_endpoint='http://localhost:3030/db/sparql')

## `` update_store `module-attribute`

    update_store = SPARQLUpdateStore(query_endpoint='http://localhost:3030/db/sparql', update_endpoint='http://localhost:3030/db/update')