Reputation: 193
I have some code running on my Raspberry Pi (client running Python) that gets my public IP-address every hour. Now I want my IP to send that string to App Engine datastore.
Unfortunatly I do not know how to post data from a client, and all the examples I tried to google seems to handle browser inputs, not posting with Python from a client.
Does anyone know a good tutorial, or have some example code that a novice like me can understand? Maybe some pointers?
Upvotes: 2
Views: 327
Reputation: 599600
You just need to send your data as an HTTP POST. As Tim says in the comments, the third-party requests library is a great way to do this, although you can do it with the built-in urllib2.
From the server point of view, getting data from a POST like this is exactly the same as getting it from a form submission.
Upvotes: 1