You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
By default, the HodDB runs in port
47808
, but the Python example has a port47809
. 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:
In the example above I also had to replace the
json={"query": query_string}
withquery_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.The text was updated successfully, but these errors were encountered: