title: How to store RDF data to a triplestore in Fuseki SPARQL endpoint using RDFlib in python
body: <p>New Question:</p>
  
  <p>I firstly start the Fuseki Server to create a new dataset called 'address_act':</p>
  
  <pre><code>fuseki-server --update --mem /address_act
  </code></pre>
  
  <p>here are the code to get data of each address and then add it to a Triplestore (database) in Fuseki Server:</p>
  
  <pre><code>import requests
  import pandas as pd
  import numpy as np
  import re
  from rdflib import Graph, Literal, URIRef
  from rdflib.plugins.stores import sparqlstore
  
  query_endpoint = 'http://localhost:3030/address_act/query'
  update_endpoint = 'http://localhost:3030/address_act/update'
  store = sparqlstore.SPARQLUpdateStore()
  store.open((query_endpoint, update_endpoint))
  g = Graph(identifier = URIRef('http://www.example.com'))
  
  for i in range(1,3):
      results = []
      url = 'http://gnafld.net/address/?per_page=10&amp;page=' + str(i)
      page = requests.get(url)
      response = requests.get(url)
      response.raise_for_status()
      results = re.findall('\"Address ID: (GAACT[0-9]+)\"', response.text)
  
      for ad in results:
          ad_url = 'http://gnafld.net/address/' + ad
          ad_info = requests.get(ad_url).content
  
          g.parse(data=ad_info, format='turtle')
          store.add_graph(g)
  </code></pre>
  
  <p>It seems that the code works but when I browse <a href="http://localhost:3030/dataset.html?tab=info&amp;ds=/address_act" rel="nofollow noreferrer">http://localhost:3030/dataset.html?tab=info&amp;ds=/address_act</a>, It always shows that there is 0 triples in the graph.<a href="https://i.stack.imgur.com/o21Bp.png" rel="nofollow noreferrer">no triples in the graph</a> I wonder whether it inserts the triples into the dataset successfully. If yes, then where can I find those triples? If not, how can I add the triples into the default graph? Any help is highly appreciated.</p>