32 lines
678 B
Python
32 lines
678 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
|
|
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)
|
|
hum_now(session)
|
|
aqi_data(session)
|
|
info(session)
|
|
aqi_pie(session)
|
|
wind(session)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|