def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def write():
	try:
		p = round(weather.pressure(),2)
		c = light.light()
		print('{"light": '+str(c)+', "pressure": '+str(p)+' }')
	except KeyboardInterrupt:
		pass