Page 1 of 1

Python to Internet database

Posted: Tue Jan 10, 2017 4:46 pm
by Davies
hi all, im wanting to access info from a python script hosted on my raspberry through the internet.

the internet connection on the raspberry will be by mobile network, so i can not rely on IP addresses to get the information such as web.py as i cannot find a mobile network provider that will issue an ip that reaches the end client (apparently IP's are shared across mobile phones and each network has a limited amount.)

ive been looking at using the onedrive sdk but id much rather have a html type interface than an amended text document. if i was to purchase a web address from somewhere like go daddy, how would i have a python script interact with that?

ive googled far and wide but only seem to find information for web.py and other ip related providers

my intention will be to use a pi3, python 2.7 and i just want to see states of gpio pins.

Re: Python to Internet database

Posted: Wed Jan 11, 2017 1:36 pm
by topguy
Maybe a bit overkill but this is kind of what your are looking for.
http://homecircuits.eu/blog/platforms-f ... nsor-data/

Re: Python to Internet database

Posted: Thu Jan 12, 2017 7:08 pm
by Davies
they look awesome and i would love something like that but they dont seem to show python related code and id really like something to work with the code i have already.
im thinking have a raspberry at home host the web.py webserver then have the raspberry in its remote location sending the information back to the webserver.
so now im wondering how would i have two python scripts in different locations communicate without IP's. email is an option but real time would be nice

Re: Python to Internet database

Posted: Fri Jan 13, 2017 10:10 am
by topguy
dweet python library:
https://github.com/paddycarey/dweepy

The common factor for most of these services is that you post your data with web-service requests. In other words quite standard HTTP requests.

If your home Pi can be accessed from the internet (portforwarding in router) then your remote Pi can send its data to the web.py server via HTTP requests. You server stores the data in a local database (sqlite for example) and present the data when someone requests it.