I am sending a bunch of sensor readings from my raspberrypi to a hosted php+mysql database using 3g network. I wrote the following code:
import requests
payload = {'reading1': 'xxxxxxx', 'reading2': 'xxxxxxx'}
r = requests.post("http://x.x.net/x.php", params=payload)
print r.status_code
My readings can be very frequent (around 1 reading per second). My question is, is this a good practice to write this post request? or should I store my readings in a variable and make the post request every 5 minutes. If the latter is better, how can I do it?