Coverage for src/kwai/api/__main__.py: 0%
5 statements
« prev ^ index » next coverage.py v7.6.10, created at 2024-01-01 00:00 +0000
« prev ^ index » next coverage.py v7.6.10, created at 2024-01-01 00:00 +0000
1"""Module for starting the api server.
3This will only start the api server. Use this when the frontend is not served
4by FastAPI or if the api server is running on another server.
5"""
7import uvicorn
9from kwai.api.app import APP_NAME
10from kwai.core.args import create_args
13args = create_args(APP_NAME)
14uvicorn.run(
15 "kwai.api.app.create_api",
16 host=args.host,
17 port=args.port,
18 factory=True,
19 reload=args.reload,
20)