Skip to content

pollinations/rest_pollen

Repository files navigation

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.