Skip to main content

Quiz bots for TG and VK

Project description

Bots for quiz

Description

Build Status Maintainability GitHub Platform wemake-python-styleguide

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:

  • Tg bot
  • Vk bot - write a message "Новый вопрос" to the group

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quiz-bots-0.2.2.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

quiz_bots-0.2.2-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page