https://github.com/alina1412/fastapi_tests_with_telegram_bot
telegram bot and fastapi handlers for a quiz
https://github.com/alina1412/fastapi_tests_with_telegram_bot
alembic docker docker-compose fastapi make poetry postgres pydantic pytest python sqlalchemy telegram-bot
Last synced: 3 months ago
JSON representation
telegram bot and fastapi handlers for a quiz
- Host: GitHub
- URL: https://github.com/alina1412/fastapi_tests_with_telegram_bot
- Owner: alina1412
- Created: 2024-08-30T06:06:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-19T16:58:04.000Z (9 months ago)
- Last Synced: 2025-09-19T18:46:03.981Z (9 months ago)
- Topics: alembic, docker, docker-compose, fastapi, make, poetry, postgres, pydantic, pytest, python, sqlalchemy, telegram-bot
- Language: Python
- Homepage:
- Size: 794 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
**About**\
FastApi service for answering quizzes (tests) with integration to telegram: answering to bot in a private chat. \
app (in progress)\.
project for handling with tests (quiz):\
-handlers for adding questions and answers (it can be several correct answers for one question, but for telegram it would be only one button)\
-admin handlers for getting info of tests (quiz)\
-handler for checking answer with correct answers\
-handler to see score of a player (with particular telegram chat id)

**Stack**\
FastApi, sqlalchemy, postgres, alembic, docker, poetry, pytest, telegram api
**Installation**
-creating virtual environment, .env\
```poetry install```
creating postgres from docker-compose:
```
make up
poetry run alembic -c alembic.ini revision --autogenerate
poetry run alembic -c alembic.ini upgrade head
```
running using poetry and make:
`make run`
http://localhost:8000/docs
Notes (not needed):\
enter docker container (why?):
-docker exec -it 47dece677d93 bash
in host console:
-psql -h 127.0.0.1 -p 5433 -U user postgres
alembic (if from scratch):
```
alembic init -t async migration
alembic revision --autogenerate -m 'initial'
```
for mysql:
pip install asyncmy, cryptography