State

State is a way to store information about the execution of your application in Overlock. The primary use case for this is to store information as your program executes so that if something does go wrong, as a developer, you will be able to find out if those variables could have been responsible for the problem.

Example

A python project may read from some sensors. In the case of a simple weather station, you may have the following:

sensor_data = get_readings()

process_data(sensor_data) # do something with that data.

Using the Overlock libraries, the code could be updated to store the values from the sensors, so that the variables can then be sent to the Overlock platform whenever a problem does occur.

sensor_data = get_readings()
ol.set_state(sensor_data) # Save to Overlock
process_data(sensor_data) # do something with that data.

Restrictions

State objects must be JSON serializable, but there are no special considerations other than this.