Skip to content

gnosis/labs-api

Repository files navigation

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).