Skip to content

Telegram bot will warn you about traffic jams on your route by schedule.

Notifications You must be signed in to change notification settings

zensimilia/on-route-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

on-route-bot

Telegram bot will warn you about traffic jams on your route by schedule.

Installation and run

  1. Clone repo.

  2. Create python virtual environment and activete it:

    python -m venv env
    source ./env/bin/activate

    On Windows machines virtual env activates by command env\Scripts\activate

  3. Install required python modules:

    pip install -r requirements.txt
  4. Set required environment variables or fill in .env file.

  5. Run bot:

    python bot.py

Configure

Environment variables

  • BOT_TOKEN - (str) Auth token to connect Bot to Telegram services.
  • DB_FILE - (str) Sqlite database filename with relative path. Default: store/data.sqlite.
  • DEBUG - (bool) Display debugging information in terminal session. Default: False.
  • LOG_CONFIG - (dict) Configuring the logging module from a dictionary for dictConfig() function. Default: see DEFAULT_CONFIG in utils/log.py.

Minimal requirements

Any OS with version of Python >= 3.8. Hardware specs: 1 core CPU, 512 Mb of RAM.

  • beautifulsoup4
  • python-dotenv
  • apscheduler
  • sqlalchemy
  • aiogram
  • pydantic
  • requests

Docker

docker-compose up -d

Use additional parameter --build after changes the source or pull updates from repo.

Development and contribution

  • Formatting: default is autopep8, but black allowed with -S param (don't format single quotes).

  • Linting: before commit check your code by pylint. Config at .pylintrc file.

About

Telegram bot will warn you about traffic jams on your route by schedule.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published