OutdoorStats.py 657 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. class OutdoorStats(object):
  4. Temperature = 20.0
  5. bWindy = False
  6. Pressure = 0.0
  7. Humidity = 0.0
  8. WindSpeed = 0.0
  9. WindDegree = 0
  10. Clouds = 0.0
  11. bRaining = False
  12. bSnowing = False
  13. def getJson(self):
  14. return {
  15. "Temperature": self.Temperature,
  16. "bWindy": self.bWindy,
  17. "Pressure": self.Pressure,
  18. "Humidity": self.Humidity,
  19. "WindSpeed": self.WindSpeed,
  20. "WindDegree": self.WindDegree,
  21. "Clouds": self.Clouds,
  22. "bRaining": self.bRaining,
  23. "bSnowing": self.bSnowing
  24. }