2024-06-07 12:15:48 +00:00
|
|
|
from sqlalchemy import create_engine
|
|
|
|
from sqlmodel import Session
|
|
|
|
|
|
|
|
from aqi_data import aqi_data
|
|
|
|
from aqi_pie import aqi_pie
|
2024-06-07 13:03:58 +00:00
|
|
|
from hum_now import hum_now
|
|
|
|
from info import info
|
|
|
|
from rain import rain, rain_all
|
|
|
|
from temp_24 import tem_24
|
2024-06-07 14:11:11 +00:00
|
|
|
from temp_now import tem_now, tem_avg, tem_all
|
2024-06-07 12:15:48 +00:00
|
|
|
from wind import wind
|
|
|
|
|
|
|
|
engine = create_engine("mysql://root:123456@localhost:3306/weather") # 替换为您的数据库 URI
|
|
|
|
session = Session(engine)
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
rain(session)
|
2024-06-07 13:03:58 +00:00
|
|
|
rain_all(session)
|
2024-06-07 12:15:48 +00:00
|
|
|
tem_24(session)
|
|
|
|
tem_now(session)
|
2024-06-07 13:03:58 +00:00
|
|
|
tem_avg(session)
|
2024-06-07 14:11:11 +00:00
|
|
|
tem_all(session)
|
2024-06-07 12:15:48 +00:00
|
|
|
hum_now(session)
|
|
|
|
aqi_data(session)
|
|
|
|
info(session)
|
|
|
|
aqi_pie(session)
|
|
|
|
wind(session)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|