Telegram bot that shows the status of your favorite stations of Bicing, the Barcelona's public bike rental system.
Bicingbot is built with Python and uses the following libraries:
- Flask as HTTP server to publish the
BicingBot API callbacks. - Sqlite3 as database.
- Telegram python library to connect to
Telegram. - Bicing API to get Bicing Stations information
- Install Python3: https://www.python.org/ (tested with python 3.9)
- Create a new
virtualenvcalledbicingbot:
$ cd VIRTUALENVS_PATH
$ python venv bicingbot# If working with virtualenvwrapper
$ mkvirtualenv bicingbot- Activate the
virtualenv
# In Windows
$ source VIRTUALENVS_PATH/bicingbot/Scripts/activate# In Mac
$ source VIRTUALENVS_PATH/bicingbot/bin/activate# If working with virtualenvwrapper
$ workon bicingbot- Install dependencies
(bicingbot)$ pip install -r requirements.txt- Run
bicingbotserver:
(bicingbot)$ python bicingbot/bicingbot_app.pyNow, the bot is listening on http://localhost:5000
- Install development dependencies
(bicingbot)$ pip install -r requirements_dev.txt- Execute unit tests:
(bicingbot)$ pytest