Beispiel #1
0
 def print_everything_from_db():
     print('---------------Weather---------------')
     for weather in Weather.select():
         print(weather.date, weather.avgtempC, weather.windspeedKmph,
               weather.weatherDesc, weather.precipMM, weather.humidity,
               weather.pressure)
     print('---------------Image---------------')
     for image in Image.select():
         print(image.date, image.filename)
     print('-----------------------------------')
Beispiel #2
0
 def get_images_from_duration(first_date_from_duration,
                              second_date_from_duration):
     return Image.select().where((Image.date >= first_date_from_duration) &
                                 (Image.date <= second_date_from_duration))
Beispiel #3
0
 def get_images_or_none_for_one_day(first_date_from_duration):
     return Image.select().where(Image.date == first_date_from_duration)