You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
371 B
Python
20 lines
371 B
Python
3 years ago
|
import pymssql
|
||
|
from fastapi import FastAPI
|
||
|
|
||
|
app = FastAPI()
|
||
|
|
||
|
|
||
|
@app.get('/')
|
||
|
def index():
|
||
|
return {'message': '你已经正确创建 FastApi 服务!'}
|
||
|
|
||
|
|
||
|
@app.get("/orderinfo-frontend/{data}")
|
||
|
async def say(data: str, q: int = None):
|
||
|
return {"data": data, "q": q}
|
||
|
|
||
|
|
||
|
# 按间距中的绿色按钮以运行脚本。
|
||
|
if __name__ == '__main__':
|
||
|
print(f'Hi world')
|