Serves a Streamlit app for graph database.
The command uses the following environment variables to configure the
database connection: METABOLIKE_DB_URI, METABOLIKE_DB_USER,
METABOLIKE_DB_PASSWORD, and METABOLIKE_DB_NAME.
Alternatively, you may save the variables in a file named "metabolike.env"
in the current directory.
Source code in metabolike/main.py
| @app.command()
def serve():
"""Serves a Streamlit app for graph database.
The command uses the following environment variables to configure the
database connection: METABOLIKE_DB_URI, METABOLIKE_DB_USER,
METABOLIKE_DB_PASSWORD, and METABOLIKE_DB_NAME.
Alternatively, you may save the variables in a file named "metabolike.env"
in the current directory.
"""
uvicorn.run(
"metabolike.api.main:app",
host="127.0.0.1",
port=8000,
log_level="info",
proxy_headers=True,
)
|