- Calculate routes between two cities (distance, travel time, and arrival time)
- Show a 15-day weather forecast for a given location
- Save the user’s search history
- Interact through an intuitive menu
- Weather forecast - Fetches a detailed 15-day weather forecast using https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline
- Route calculation - Uses https://api.geoapify.com/v1/routing to calculate distance and travel duration
- Query history - Stores all user requests (weather and routes) in a local SQLite database
- State management - Manages user dialogs using
telebotstates .envconfiguration - Secure storage for API keys and bot token
git clone https://gitlab.skillbox.ru/sviatozar_prokhorov/python_basic_diploma
cd car-travel-botpip install -r requirements.txt BOT_TOKEN=your_telegram_bot_token
API_ROUTE_KEY=your_geoapify_api_key
API_WEATHER_KEY=your_visualcrossing_api_keypython main.py- Command /start
👋 Hello, Alex!
I am your Car Travel Bot 🚘🌍
Choose a command below to get started
- Command Help
You can: 1️⃣ View the weather at your destination 🌤️ 2️⃣ Find out the distance, travel time, and arrival time 🕒📍
- Example Route
📍 Route details:
🛣️ Distance: 8622.8 km
⏱️ Estimated travel time: 5 days, 5 hours, 19 minutes
🏁 Arrival time: 20.12.2025 05:19