Quiz bots for TG and VK
Project description
Bots for quiz
Description
This repository contains Vk and TG bots for the quiz. They get used to the questions and check the correctness of the answers to them.
Bot examples:
Table of content
Installation
-
Install using pip:
pip install quiz-bots
-
Create a bot in Telegram via BotFather, and get it API token.
-
Create redis account in Redislabs, and after that create cloud database (you can choose free plan). Get your endpoint database url and port.
-
Create VK's group, allow it send messages, and get access token for it.
-
Register environment variables in the operating system:
export TELEGRAM_TOKEN=telegram_token export DB_ENDPOINT=redis endpoint export DB_PASSWORD=redis_password export VK_GROUP_TOKEN=token_vkontakte
-
Put the question files in a folder(sample files are in the repository folder quiz_files_example) and export quiz content to Redis:
quiz-bots export_quiz_content [path_to_questions_folder]
How to use
Run TG bot:
quiz-bots tg-bot
Run VK bot:
quiz-bots vk-bot
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Project Goal
The code is written for educational purposes on online-course for web-developers dvmn.org.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for quiz_bots-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2f3ad8d1b1039c472860fcc2b49161ec7b0955f47c6eea8eff51294d4f0b8a0 |
|
MD5 | 8db1fe7cc4ca8a9de10bf465372d7814 |
|
BLAKE2b-256 | c7e4afd76539351efe8c3e3f2db116f6163fc54e26620c93a7725f2b76d98a40 |