Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
villeilkkala opened this issue Jan 14, 2021 · 0 comments

Comments

@villeilkkala
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant