ringkjob
ringkjob

Reputation: 193

Send data to App Engine

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?

here's a drawing I made to explain it for myself

Upvotes: 2

Views: 327

Answers (1)

Daniel Roseman
Daniel Roseman

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

Related Questions