-
Notifications
You must be signed in to change notification settings - Fork 118
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
Datastore access in Python? #272
Comments
It is available and possible, but not seamlessly integrated like other languages. You'll have to make an HTTP request to the datastore REST API at http://hook.io/datastore. I think @pyhedgehog has done some work on this already for Python. This is how the other languages access the datastore, through a prebuilt SDK we include which makes HTTP requests. Would be nice to get this fully integrated for Python. |
Thanks Marek.
However I'm stuck on how to supply the private key to my SET command when uploading JSON- anyone can help? |
@rw950431 Maybe try setting the |
Solved (to my satistaction at least). Theres probably neater and more pythonic ways to do it but I'm happy with this.
|
hook.io-sdk-python supports all these and many other functions from JS |
I'm trying to write code to run as a standalone service used to receive and process simple requests from a microcontroller. Perhaps I've misunderstood the SDK concept but it seemed like you needed to run it on your own endpoint device. Happy to learn more if I'm off the track here.. |
What do you mean by "endpoint device"? SDK can be used either inside hook or as client on any device connected to internet to create hook, access logs, setup environment/datastore/fs, configure subdomains and so on. |
This is a good discussion. It's long overdue that we merge Looking forward to getting the official python SDK out soon ( and integrated with all hook services ) |
@pyhedgehog - can you give a basic example of accessing the SDK inside a hook? I couldnt find any documentation about that. |
There are one problem about this - installing (and auto-installing like with Sorry, right now I have no spare time to write complete documentation. PRs would be great. But note that I've found first attempt of implementation somewhat un-pythonic and going to separate normal, stream and raw interfaces from each other. |
Is the datastore function available under Python? I've tried Hook['datastore'] and Hook.datastore without success..
The text was updated successfully, but these errors were encountered: