https://github.com/pollinations/rest_pollen
REST API wrapper for our backend
https://github.com/pollinations/rest_pollen
Last synced: 11 months ago
JSON representation
REST API wrapper for our backend
- Host: GitHub
- URL: https://github.com/pollinations/rest_pollen
- Owner: pollinations
- Created: 2022-11-04T18:44:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-23T11:32:32.000Z (about 3 years ago)
- Last Synced: 2025-03-10T15:53:03.729Z (about 1 year ago)
- Language: Python
- Size: 1.09 MB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rest-pollen
## Dev setup
1. Install node and [pollinations-ipfs](github.com/pollinations/pollinations-ipfs)
2. Install this repo
```sh
# Install dependencies
pip install -e ".[test]"
# Install pre-commit hooks
brew install pre-commit
pre-commit install -t pre-commit
```
3. 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](http://localhost:5000/openapi.json). Can be viewed in [swagger editor](https://editor.swagger.io/).