DataUnion-app / rest_pollen

REST API wrapper for our backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rest-pollen

Dev setup

  1. Install node and pollinations-ipfs
  2. Install this repo
# Install dependencies
pip install -e ".[test]"

# Install pre-commit hooks
brew install pre-commit
pre-commit install -t pre-commit
  1. Add your jwt secret to .env

Start the server:

python rest_pollen/main.py

Working with Docker

Build the image

docker build -t rest .

Start the dockererized backend:

docker run -p 5000:5000 --env-file .env rest

Sending requests

python test/client.py

Testing

pytest test --cov

API docs

Start a server, then open the openapi docs. Can be viewed in swagger editor.

About

REST API wrapper for our backend


Languages

Language:Python 36.3%Language:JavaScript 23.3%Language:CSS 19.7%Language:HTML 19.4%Language:Batchfile 0.5%Language:Makefile 0.4%Language:Dockerfile 0.3%Language:Shell 0.1%