/fastapi-panel-data-app

A minimal example of a data visualization app with FastAPI and Panel

Primary LanguagePython

FastAPI Panel data-app example

A minimal example of a data visualization app with FastAPI and Panel. See also Fastapi integration section: https://panel.holoviz.org/user_guide/FastAPI.html

  • Clone repo:
$ git clone https://github.com/srmds/fastapi-panel-data-app
  • Create and activate virtual env:
$ cd fastapi-panel-data-app
$ python -m venv .venv  && source .venv/bin/activate
  • Install dependencies
$ python -m pip install --upgrade pip
$ pip install -r requirements.txt
  • Allow BOKEH_WS_ORIGIN
$ export BOKEH_ALLOW_WS_ORIGIN=127.0.0.1:5000
  • Export credentials
$ export SECRET=$(uuidgen)
$ export USER=test.e@mail.com
$ export PASS=$(uuidgen)
  • Run API:
$ uvicorn main:app --reload

or the custom homepage: http://127.0.0.1:8000