a little REST API built using flask. it provides an interface for frontend services (like the website and discord bot) so they can interact with the bancho.py database, with some specialised endpoints for fetching score screens, etc.
it is assumed that you have access to a running instance of bancho.py in order to deploy this service.
start by cloning this repository and making a copy of .env.example with the necessary config edits:
$ cp .env.example .env
$ nano .env # use any editor you like!in particular, the SECRET_KEY variable should be generated and stored securely. the flask documentations recommends the following command for generating one:
$ python -c 'import secrets; print(secrets.token_hex())'then launching the service is as simple as
$ docker compose up --build -dno separate configuration or bancho instance is needed to run the tests. just clone the repository and run:
$ docker compose -f docker-compose.test.yml up --build --exit-code-from flask