python_weather/web/data/main.py
wobeitaoleshigexuruo ada0e97916 style: map
2024-06-07 22:11:11 +08:00

33 lines
708 B
Python

from sqlalchemy import create_engine
from sqlmodel import Session
from aqi_data import aqi_data
from aqi_pie import aqi_pie
from hum_now import hum_now
from info import info
from rain import rain, rain_all
from temp_24 import tem_24
from temp_now import tem_now, tem_avg, tem_all
from wind import wind
engine = create_engine("mysql://root:123456@localhost:3306/weather") # 替换为您的数据库 URI
session = Session(engine)
def main():
rain(session)
rain_all(session)
tem_24(session)
tem_now(session)
tem_avg(session)
tem_all(session)
hum_now(session)
aqi_data(session)
info(session)
aqi_pie(session)
wind(session)
if __name__ == '__main__':
main()