ovdashboard/api
2022-10-08 02:44:29 +02:00
..
.devcontainer add a "/file" router (static serve from WebDAV) 2022-09-18 21:59:02 +00:00
.vscode move main function, launch module directly 2022-09-17 19:13:59 +00:00
ovdashboard_api API readme 2022-10-08 02:44:29 +02:00
.gitignore empty "api" python project 2022-09-05 23:26:21 +02:00
poetry.lock correct usage of "duration" 2022-09-19 13:22:32 +00:00
pyproject.toml correct usage of "duration" 2022-09-19 13:22:32 +00:00
README.md API readme 2022-10-08 02:44:29 +02:00

OVDashboard API

This API enables the OVDashboard UI to run.

Quick Start

Preferably, use the docker image at TODO to run this API and its UI simultaneously. Refer to the main README for how to do that.

Running the API without a container

Install the ovdashboard_api python package, you can:

  • use uvicorn or another ASGI runner to start the app object ovdashboard_api:app
    Example: uvicorn 'ovdashboard_api:app'
  • run the provided ovdashboard-api script this is basically a shorthand for uvicorn
  • use gunicorn or another application server with ASGI workers (can be provided by uvicorn)
    Example: gunicorn 'ovdashboard_api:app' --worker-class uvicorn.workers.UvicornWorker

Configuration

The OVDashboard API is fully configured by environment variables or an .env file in the current working directory. Refer to the main README for the list of variables.

Dependencies

Refer to your distribution's manual for how to install these dependencies.

  • Python 3.9 with pip
    If python3 --version shows "Python 3.9" or later, and python3 -m pip does execute, you're good to go
  • git (recommended)
  • libmagic

Installation

If git is installed, install ovdashboard_api directly using this command:

python3 -m pip install 'git+https://TODO#egg=ovdashboard_api&subdirectory=api'

If installing git is not an option, just download and extract this repository's archive, then use the local path instead of the git+https URL for pip install.