koios

module
v0.0.0-...-2709dfa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: BSD-2-Clause

README

Koios

Incremental recommender engine built with Golang & Redis

Koios (Coeus) was a Titan god of intelligence and farsight, meaning that, due to his inquisitive mind and desire to learn, he was with gained knowledge and understanding able to see beyond the obvious. He was also identified as a god of wisdom and heavenly oracles.

Quickstart

Following the guidelines of the Twelve Factor App (https://12factor.net/), environment variables are kept in a dotenv file at the root directory. When using Docker, the environment (such as the API_SECRET) is configured in the Docker Compose file. Note that the final image size of the Docker image is only 8.52MB in size thanks to a multi-staged build and UPX stripping.

docker build -t koios .
docker tag koios:latest koios:staging
docker-compose up

curl -H "Authorization: Bearer API_SECRET" "http://localhost:1323/api/rate?user=u1&item=i1&rating=0.88"

REST API Endpoints

  • /api/rate?user=[uid]&item=[itemid]&rating=[amount]
  • /api/recommend?user=[uid]
  • /api/update

The code was based on:

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL