# -*- coding: utf-8 -*-
'''
    desc: web接口模块
    author: liukun
    date: 2020-04-05
'''
import sys
import pathlib
from fastapi import FastAPI
_project_root = str(pathlib.Path(__file__).resolve().parents[1])
sys.path.append(_project_root)
from webService.osUser.main import osUserApp
app = FastAPI()


@app.get("/")
def read_root():
    return {"Hello": "World"}

app.mount("/osuser", osUserApp)  # webService 每次新增加一个模块，都在这里使用app mount挂载一下

4ba1adc4b1170591eba113070d1eadf9d5a98540
<mask token>


@app.get('/')
def read_root():
    return {'Hello': 'World'}


<mask token>

<mask token>
sys.path.append(_project_root)
<mask token>


@app.get('/')
def read_root():
    return {'Hello': 'World'}


app.mount('/osuser', osUserApp)

<mask token>
_project_root = str(pathlib.Path(__file__).resolve().parents[1])
sys.path.append(_project_root)
<mask token>
app = FastAPI()


@app.get('/')
def read_root():
    return {'Hello': 'World'}


app.mount('/osuser', osUserApp)

<mask token>
import sys
import pathlib
from fastapi import FastAPI
_project_root = str(pathlib.Path(__file__).resolve().parents[1])
sys.path.append(_project_root)
from webService.osUser.main import osUserApp
app = FastAPI()


@app.get('/')
def read_root():
    return {'Hello': 'World'}


app.mount('/osuser', osUserApp)

# -*- coding: utf-8 -*-
'''
    desc: web接口模块
    author: liukun
    date: 2020-04-05
'''
import sys
import pathlib
from fastapi import FastAPI
_project_root = str(pathlib.Path(__file__).resolve().parents[1])
sys.path.append(_project_root)
from webService.osUser.main import osUserApp
app = FastAPI()


@app.get("/")
def read_root():
    return {"Hello": "World"}

app.mount("/osuser", osUserApp)  # webService 每次新增加一个模块，都在这里使用app mount挂载一下
