from AppIndicators import Schemas from AppIndicators.Crud import create_category from Utils.DataBase.SqlAlchemyUtils import Session categories = [ {"title": "盈利能力"}, {"title": "收益质量"}, {"title": "现金流量"}, {"title": "资本结构"}, {"title": "偿债能力"}, {"title": "运营能力"}, {"title": "成长能力"}, {"title": "经营指标"}, {"title": "资质指标"}, {"title": "行业指标"}, {"title": "绿色指标"}, {"title": "司法指标"}, {"title": "合规指标"}, {"title": "舆情指标"}, {"title": "其他"} ] db = Session() for category in categories: schema = Schemas.CreateCategoryReqBody(**category) create_category(db=db, schema=schema) db.close()