pywws.service.wetterarchivde¶
Upload weather data to wetter.com.
wetter.com is a web site gathering data mainly from stations in Germany. It’s referred to in pywws as wetterarchivde for historical reasons.
Register station: https://www.wetter.com/mein_wetter/login/
Additional dependency: http://docs.python-requests.org/
Example
weather.ini
configuration:[wetterarchivde] user_id = 12345 kennwort = ab1d3456i8 [logged] services = ['wetterarchivde', 'underground'] [live] services = ['wetterarchivde', 'underground']
Classes
ToService (context[, check_params]) |
-
class
pywws.service.wetterarchivde.
ToService
(context, check_params=True)[source]¶ Bases:
pywws.service.CatchupDataService
-
config
= {'kennwort': ('', True, 'pwd'), 'user_id': ('', True, 'id')}¶
-
fixed_data
= {'sid': 'pywws'}¶
-
interval
= datetime.timedelta(seconds=300)¶
-
logger
= <Logger pywws.service.wetterarchivde (WARNING)>¶
-
service_name
= 'wetterarchivde'¶
-
template
= '\n#live#\n#roundtime True#\n#idx "\'dtutc\': \'%Y%m%d%H%M\',"#\n#timezone local#\n#idx "\'dt\': \'%Y%m%d%H%M\',"#\n#hum_out "\'hu\': \'%.d\',"#\n#temp_out "\'te\': \'%.1f\',"#\n#rel_pressure "\'pr\': \'%.1f\',"#\n#wind_dir "\'wd\': \'%.0f\'," "" "winddir_degrees(x)"#\n#wind_ave "\'ws\': \'%.1f\',"#\n#wind_gust "\'wg\': \'%.1f\',"#\n#calc "rain_hour(data)" "\'pa\': \'%.1f\',"#\n'¶
-
session
()[source]¶ Context manager factory function for a batch of one or more uploads.
This makes it easy to ensure any resources such as an internet connection are properly closed after a batch of uploads. Use the
contextlib.contextmanager()
decorator when you implement this method.For a typical example, see the source code of the
pywws.service.openweathermap
module. If your upload can’t benefit from a session object yieldNone
, as inpywws.service.copy
.
-
Comments or questions? Please subscribe to the pywws mailing list http://groups.google.com/group/pywws and let us know.