Deploy the API
Deploy
with docker
with docker-compose
version: "3.9"
services:
boaviztapi:
image: ghcr.io/boavizta/boaviztapi:latest
ports:
- "5000:5000"
boaviztapi-doc:
image: ghcr.io/boavizta/boaviztapi-doc:latest
environment:
- API_URL=http://boaviztapi_url.com
ports:
- "8080:8080"
with pip
boaviztapi pip package : https://pypi.org/project/boaviztapi/
from source
Prerequisite
Python 3, pipenv recommended
clone the repo
Setup pipenv
Install pipenv globally
Install dependencies and create a python virtual environment.
Launch a development server
Once in the pipenv environment
Development server uses uvicorn and fastapi, you can launch development server with the uvicorn
CLI.
CORS
By default, all origin are allowed. If you need to limit them set env value ALLOWED_ORIGINS
with the following format : ALLOWED_ORIGINS = '["url1", "url2", ...]'
Example : ALLOWED_ORIGINS='["https://datavizta.boavizta.org","https://boavizta.org"]'
SDK
python-sdk : https://pypi.org/project/boaviztapi-sdk/