python_weather/web/data/main.py

30 lines
616 B
Python
Raw Normal View History

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