Simple API for Twitch bot commands. Can be running in Docker.
$ git clone https://github.com/qzdn/tbc.git
$ cd tbc
$ cp .env.example .env # Paste your API keys in the .env file
$ uv venv -p 3.13
$ source .venv/bin/activate
$ uv sync --frozen --no-cache
$ uv run --env-file .env fastapi run main.py --host 0.0.0.0 --port 8000
$ firefox 127.0.0.1:8000$ git clone https://github.com/qzdn/tbc.git
$ cd tbc
$ cp .env.example .env # Paste your API keys in the .env file
$ docker build . -t tbc-image
$ docker run --env-file=.env --name tbc-container -d -p 80:10000 tbc-image
$ firefox 127.0.0.1- Open Dashboard
+ New->Web ServicePublic Git Repository-> https://github.com/qzdn/tbc- Name your web service
Language->Docker- Paste
Environment Variablesnames from.env.exampleand fill them with your keys [1, 2] Deploy Web Service- Wait until its build and run the service
Add new command !weather with this "Response type" field:
${customapi.https://tbc-rksp.onrender.com/weather?city=$(1:)&wind=true&humidity=true&pressure=true&precipitation=true}
Now type in your chat: !weather Moscow
Moscow: 6°C (feels like 6°C), overcast clouds | Wind: 1.27 m/s E | Humidity: 73% | Pressure: 764.4 mmHg
Check docs for info.