1 # reference implementation for an infoex-autowx custom Wx data provider
3 # global variable which will hold the Wx data to be uploaded to InfoEx
6 # the following data types are supported by infoex-autowx
7 wx_data
['precipitationGauge'] = None
8 wx_data
['tempPres'] = None
9 wx_data
['tempMaxHour'] = None
10 wx_data
['tempMinHour'] = None
12 wx_data
['baro'] = None
14 wx_data
['windSpeedNum'] = None
15 wx_data
['windDirectionNum'] = None
16 wx_data
['windGustSpeedNum'] = None
18 def get_custom_data():
19 # This function will be called by infoex-autowx, and the `wx_data`
20 # variable (a global variable within this program) will be returned.
22 # For example, maybe you will `import psycopg2` and grab your data
23 # from a local PostgreSQL database. Or maybe you will use the
24 # requests library to fetch a remote web page and parse out the data
25 # that's meaningful to your operation.
27 # Whatever your program needs to do to get its data can be done
28 # either here in this function directly, or elsewhere with
29 # modification to the global variable `wx_data`.