Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.02 KB

README.md

File metadata and controls

46 lines (30 loc) · 1.02 KB

labs-api

APIs made by Gnosis Labs.

Available at https://labs-api.ai.gnosisdev.com/docs (documentation page is auto-generated by FastAPI).

Setup

Install the project dependencies with poetry, using Python 3.10:

python3.10 -m pip install poetry
python3.10 -m poetry install
python3.10 -m poetry shell

Create a .env file in the root of the repo with the following variables:

TAVILY_API_KEY=...
SQLALCHEMY_DB_URL=...

Running API locally

python labs_api/main.py

Tests

Tests are using pytest-postgresql for Postgres database. If you get pg_config executable not found error follow this tutorial.

pytest tests/

Releasing

After merging to main branch, docker image is built and published automatically, but

./restart_app_deployments.sh

is necessary to execute manually, after the image is pushed (DevOps are working on automating this).