Eira / canyon-notifier

Apache License 2.0
0 stars 0 forks source link

Canyon notifier telegram bot

tests codecov linters

Telegram bot that shows actual catalog of available bicycles at canyon.com.

You can also subscribe to a newsletter when a particular model or family of bikes becomes available.

vas3k.club post vc.ru post


Pre-requirements

Local setup

$ git clone git@github.com:Eira/canyon-notifier.git
$ cd canyon-notifier
$ python3.9 -m venv venv
$ source venv/bin/activate
$ pip install -U poetry pip setuptools
$ poetry config virtualenvs.create false --local
$ poetry install

Create env file to override default config

cat > .env << EOF
throttling_time=10.0
debug=true
redis_dsn= redis://localhost:6379/1
amount_of_iterations=2
bot_token=5435048925:AAE0CdbhQL7baW-EZmtVZ0nbyNbEtCQWUcE
EOF

Local run Telegram bot

python -m app.bot_runner

Local run catalog updater

python -m app.catalog_updater

Local run subscription notifier

python -m app.subscription_notifier

Local run tests

$ pytest --cov=app

Local run linters

poetry run flake8 app/

poetry run mypy app/