Giter Site home page Giter Site logo

asvbkr / djh-box Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 82 KB

Простая обёртка Django для ботов ТамТам. Готово к размещению на Heroku

License: Apache License 2.0

Python 98.22% HTML 1.35% Batchfile 0.38% Procfile 0.05%

djh-box's Introduction

dj-empty

Простая обёртка Django для ботов ТамТам. Готово к размещению на Heroku (не обязательно). Код самого бота размещается в файле \TtBot\TtBot.py

В текущем виде представляет собой вполне работоспособный бот с минимальной демонстрационной функциональностью.

Инструкция:

  1. Клонировать текущий репозиторий, включая подмодули:
  2. При отсутствии, установить в используемый интерпретатор необходимые пакеты - см. requirements.txt
  3. Установить переменную среды TT_BOT_API_TOKEN - указать токен, полученный от @PrimeBot
  4. При необходимости:
    • Установить переменную среды TT_BOT_TRACE_REQUESTS - вывод информации о всех запросах. Возможные значения - True или False
    • Установить переменную среды TT_BOT_LOGGING_LEVEL - уровень логирования. Возможные значения - текстовые названия уровней из пакета logging. Например, DEBUG или WARNING
  5. Запустить на выполнение, например: python manage.py runserver 0.0.0.0:8000. Для работы в режиме webhooks всё готово
  6. Для работы в режиме longpolls:
    • Старт - в браузере открыть адрес запущенного приложения с окончанием /start_polling
    • Стоп - в браузере открыть адрес запущенного приложения с окончанием /stop_polling
  7. Бот с минимальной функциональностью готов.

A simple Django wrapper for TamTam bots. Ready to be hosted on Heroku (optional). The bot code is in the file \TtBot\TtBot.py

In its current form it is a fully functional bot with a minimum demo functionality.

Instruction:

  1. Clone current repository, including the submodules:
  2. install the required packages into the interpreter you are using - see requirements.txt
  3. Set the environment variable TT_BOT_API_TOKEN - specify the token, received from @PrimeBot
  4. If necessary:
    • Set the environment variable TT_BOT_TRACE_REQUESTS - display information about all queries. Possible values are True or False
    • Set environment variable TT_BOT_LOGGING_LEVEL - logging level. Possible values are text level names from the logging package. For example, DEBUG or WARNING
  5. Run, for example: python manage.py runserver 0.0.0.0:8000. For mode webhooks all ready
  6. To operate in a mode longpolls:
    • Start in the browser to open a running application from the end /start_polling the
    • Stop the browser to open a running application from the end /stop_polling
  7. Bot with minimal functionality is ready to use.

djh-box's People

Contributors

asvbkr avatar dependabot[bot] avatar

Stargazers

Andreiat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.