-
Install Python 3.11+
-
Install Poetry
-
Install dependencies
poetry install
-
Set up pre-commit hook
poetry run pre-commit install
-
Set up settings file.
cp example.env .env
-
Create postgres database
psql -c 'CREATE DATABASE rooms_api_108_test;'
-
Upgrade database schemas
poetry run alembic upgrade head
poetry run fastapi dev src/main.py
Check the DB_URL
setting in .env
file.
docker build . -t innohassle-rooms-api
docker run --rm -ti -d -p 80:80 --env-file .env innohassle-rooms-api
Send requests with X-Token
header (generated by src.api.auth.utils.create_jwt({'sub': 'tgbot'})
) to verify you are the bot.