gtfierro/hoddb

Mismatch between docs, default setup and Python example: missing endpoint and wrong port

Opened this issue · 0 comments

By default, the HodDB runs in port 47808, but the Python example has a port 47809. This can create a bit of confusion for the beginner.

Also the API routes are wrong (http://localhost:47809/v1/hoddb/select vs. http://localhost:47808/api/query). The docs don't reference /select or /parse endpoints.

I managed to get this working fine:

import requests

query_string = "SELECT ?x WHERE { ?x rdf:type brick:Zone_Temperature_Sensor };"

resp = requests.post("http://localhost:47808/api/query", query_string)
query = resp.json()
for row in query['Rows']:
    print(row)

In the example above I also had to replace the json={"query": query_string} with query_string. I'm making an issue instead of an pull request as I'm just starting, quite new to Python and the problem feels more like outdated docs than specific error.