Upload current temperature to is a Swedish web site that shows the current temperature in many places.

You receive the hash value from the admins during sign up. It looks like d3b07384d113edec49eaa6238ad5ff00.


ToService(context[, check_params])
class pywws.service.temperaturnu.ToService(context, check_params=True)[source]

Bases: pywws.service.LiveDataService

config = {'hash': ('', True, 'hash')}
logger = <Logger pywws.service.temperaturnu (WARNING)>
service_name = 'temperaturnu'
template = '#live##temp_out "\'t\': \'%.1f\',"#'

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 yield None, as in pywws.service.copy.

upload_data(session, prepared_data={})[source]

Upload one data set to the service.

Every data service class must implement this method.

  • session (object) – the object created by session(). This is typically used to communicate with the server and is automatically closed when a batch of uploads has finished.
  • prepared_data (dict) – a set of key: value pairs to upload. The keys and values must all be text strings.

Comments or questions? Please subscribe to the pywws mailing list and let us know.