Commit acb46cd3 authored by Libcat's avatar Libcat 👷
Browse files

修订每个文件的描述

parent 40700be1
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : apischemas.py
@Desc : 这里是各个接口的定义,类似于数据模型
'''
from decimal import Decimal
from re import L
from typing import List, Optional, Any
......
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : __init__.py
@Desc : 该文件夹下都是API功能接口的实现
'''
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : config.py
@Desc : 这里存放数据库的用户名、密码、地址
'''
host = "localhost"
user = "root"
password = "TRZ19971029"
......
......@@ -2,7 +2,7 @@
# -*- encoding: utf-8 -*-
'''
@File : database.py
@Desc : 这里定义数据库连接、用户名密码,以及初始化等操作
@Desc : 用于管理数据库连接等操作
'''
from playhouse.pool import PooledMySQLDatabase
......
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : init.py
@Desc : 用于建立数据库,在部署服务器之前运行一次,看到OK即可。
'''
from database import *
import pymysql
import sys
......
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : main.py
@Desc : 整个程序的主入口
运行方法:
1. pip3 install requirements.txt
2. uvicorn main:app --port 5000 --host 0.0.0.0 --reload
'''
import time
from fastapi import FastAPI, Request
from fastapi.staticfiles import StaticFiles
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment