Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zensimilia/on-route-bot
Telegram bot will warn you about traffic jams on your route by schedule.
https://github.com/zensimilia/on-route-bot
aiogram apscheduler beautifulsoup python telegram-bot
Last synced: 5 days ago
JSON representation
Telegram bot will warn you about traffic jams on your route by schedule.
- Host: GitHub
- URL: https://github.com/zensimilia/on-route-bot
- Owner: zensimilia
- Created: 2021-02-12T14:14:41.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-27T20:46:07.000Z (3 months ago)
- Last Synced: 2024-08-27T21:55:46.122Z (3 months ago)
- Topics: aiogram, apscheduler, beautifulsoup, python, telegram-bot
- Language: Python
- Homepage: https://t.me/onroutebot
- Size: 214 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:```console
python -m venv env
source ./env/bin/activate
```> On Windows machines virtual env activates by command `env\Scripts\activate`
3. Install required python modules:
```console
pip install -r requirements.txt
```4. Set required [environment variables](#environment-variables) or fill in _.env_ file.
5. Run bot:
```console
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](https://docs.python.org/3/library/logging.config.html) 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
```console
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.