This Telegram bot allows users to conveniently find the cheapest flights and receive price alerts for their desired routes.
We all want the cheapest possible flight but getting cheap flights is no easy task.
This Telegram Bot uses Kiwi flight api to search flights and return the current cheapest flight for your desired routes and dates.
You can also save the flight result for the bot to track the flight price and the bot will notify you if the flight price has dropped.
- Live Flight Search (Oneway & Return Flight Search).
- Support for User input validation.
- Flight Tracking.
- KIWI API Support.
- Inline And Keyboard Markup support.
/start
- Initializes Bot welcome response./flight_alerts
- Show all saved flight alerts./reset
- Reset the flight search.
-
Get your Telegram Bot token from @BotFather.
-
Create an account on KIWI and get your flight search API KEY.
-
Configuration : edit the configuration by renaming the
.env.example file
and renaming it to.env
, then edit the required env variables.Env Variable Description Defaults BOT_USERNAME
Your Telegram Bot Username None BOT_TOKEN
Your Telegram Bot Token None KIWI_API_KEY
Your KIWI API key None DATABASE_PATH
Your database file path database\database.db
ADMINISTRATOR
Holds a list of telegram chat id's for admin rights []
This bot only supports a SQL database file. If you have an existing database file from previous use than edit your file path in your .env file. The default path is database\database.db which will be created automatically on the first call on the DB instance.
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
# For Linux or macOS:
source venv/bin/activate
# For Windows:
venv\Scripts\activate
- Install the dependencies using
requirements.txt
file:
pip install -r requirements.txt
- Use the following command to start the bot:
python bot.py
-
Build Docker Image with Environment Variables:
Replace your-image-name:your-tag with your desired image and tag.
docker build --build-arg ENV_FILE=.env -t your-image-name:your-tag
-
Run Docker Container
docker run -d -p 8080:80 --env-file .env your-image-name:your-tag
This project is licensed under the MIT License - see the LICENSE file for details.