help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
travel-assistant-bot
/
.venv
/
Lib
/
site-packages
/
pip
/
_vendor
/
pygments
/
formatters
RSK World
travel-assistant-bot
Travel Assistant Bot - Python + Flask + OpenAI API + Travel Bot + Flight Search + Hotel Booking + Weather
formatters
  • __pycache__
  • __init__.py5.3 KB
  • _mapping.py4.1 KB
  • bbcode.py3.2 KB
  • groff.py5 KB
  • html.py34.8 KB
  • img.py22.7 KB
  • irc.py4.9 KB
  • latex.py18.9 KB
  • other.py4.9 KB
  • pangomarkup.py2.2 KB
  • rtf.py11.7 KB
  • svg.py7 KB
  • terminal.py4.6 KB
  • terminal256.py11.5 KB
RELEASE_NOTES.mddebug.py__init__.py
RELEASE_NOTES.md
Raw Download

RELEASE_NOTES.md

# Release Notes - Travel Assistant Bot v1.0.0

## 🎉 Initial Release - Version 1.0.0

**Release Date:** 2026-01-XX
**Tag:** v1.0.0

---

## 📋 Overview

Travel Assistant Bot is a comprehensive web application built with Flask that helps users plan their travel itineraries, search for flights and hotels, get weather information, and receive AI-powered travel recommendations.

---

## âœĻ Features

### Core Functionality
- **AI-Powered Chat Assistant** - Interactive chatbot using OpenAI API for travel assistance
- **Flight Search** - Search and compare flights between destinations
- **Hotel Search** - Find hotels in your destination city
- **Weather Information** - Get real-time weather data for any location (requires OpenWeather API key)
- **Travel Recommendations** - Get personalized recommendations based on preferences
- **Itinerary Management** - Create, save, and manage travel itineraries
- **Budget Calculator** - Calculate total trip costs
- **Share Itineraries** - Share travel plans via secure links

### User Features
- **User Authentication** - Register and login with JWT-based authentication
- **Multi-language Support** - English and Bengali (āĶŽāĶūāĶ‚āĶēāĶū) language support
- **Dark Mode** - Toggle between light and dark themes
- **Responsive Design** - Works on desktop and mobile devices

### Admin Features
- **Admin Dashboard** - Monitor and manage itineraries
- **Analytics** - Track usage metrics and events

---

## 🔧 Technical Details

### Technology Stack
- **Backend:** Python 3.x, Flask 3.0.0
- **Database:** SQLite3
- **AI Integration:** OpenAI API (optional)
- **Weather API:** OpenWeatherMap (optional)
- **Frontend:** HTML5, CSS3, JavaScript (ES6+)
- **Authentication:** JWT (JSON Web Tokens)

### Project Structure
```
travel-assistant-bot/
├── app.py # Main Flask application
├── auth.py # Authentication and authorization
├── db.py # Database operations
├── analytics.py # Analytics and event tracking
├── requirements.txt # Python dependencies
├── run.ps1 # PowerShell startup script
├── services/ # Service modules
│ ├── openai_service.py # OpenAI integration
│ ├── flight_service.py # Flight search service
│ ├── hotel_service.py # Hotel search service
│ ├── weather_service.py # Weather service
│ ├── recommendation_service.py # Recommendations
│ └── cache.py # Caching service
├── static/ # Static assets
│ ├── css/
│ │ └── style.css # Stylesheets
│ └── js/
│ └── app.js # JavaScript application
└── templates/ # HTML templates
├── index.html # Main page
├── admin.html # Admin dashboard
├── share.html # Shared itinerary view
├── readme.html # README page
└── license.html # License page
```

---

## 🐛 Fixes in This Release

### Critical Fixes
- ✅ **Flask 3.0 Compatibility** - Fixed deprecated `@app.before_first_request` decorator
- Replaced with module-level initialization for Flask 3.0.0 compatibility
- Ensures proper database and logging setup

### Code Improvements
- ✅ **Performance Optimization** - Optimized itinerary listing to avoid redundant database calls
- ✅ **Code Quality** - All files pass syntax checks and imports successfully
- ✅ **Error Handling** - Improved error handling throughout the application

---

## ðŸ“Ķ Installation

### Prerequisites
- Python 3.8 or higher
- pip (Python package manager)

### Setup Steps

1. **Clone the repository:**
```bash
git clone https://github.com/rskworld/travel-assistant-bot.git
cd travel-assistant-bot
```

2. **Install dependencies:**
```bash
pip install -r requirements.txt
```

3. **Set environment variables (optional):**
```bash
# Windows PowerShell
$env:OPENAI_API_KEY="your-openai-api-key"
$env:OPENWEATHER_API_KEY="your-openweather-api-key"
$env:JWT_SECRET="your-secret-key"
$env:PORT="5000"
```

4. **Run the application:**
```bash
# Windows PowerShell
.\run.ps1

# Or directly with Python
python app.py
```

5. **Access the application:**
- Open your browser and navigate to `http://localhost:5000`

---

## 🔑 Configuration

### Required Environment Variables
None (application works with default values)

### Optional Environment Variables
- `OPENAI_API_KEY` - OpenAI API key for AI chat functionality
- `OPENWEATHER_API_KEY` - OpenWeatherMap API key for weather data
- `JWT_SECRET` - Secret key for JWT token generation (default: "dev-secret-change")
- `PORT` - Port number for the Flask app (default: 5000)
- `RATE_LIMIT_PER_MIN` - API rate limit per minute (default: 120)

---

## 📝 API Endpoints

### Public Endpoints
- `GET /` - Main application page
- `GET /admin` - Admin dashboard
- `GET /readme` - README page
- `GET /license` - License page
- `GET /share/<token>` - View shared itinerary

### API Endpoints
- `POST /api/chat` - Chat with AI assistant
- `POST /api/flights` - Search flights
- `POST /api/hotels` - Search hotels
- `POST /api/weather` - Get weather information
- `POST /api/recommendations` - Get travel recommendations
- `POST /api/budget` - Calculate trip budget

### Authenticated Endpoints
- `POST /api/auth/register` - Register new user
- `POST /api/auth/login` - Login user
- `GET /api/itineraries` - List itineraries
- `POST /api/itineraries` - Create itinerary
- `DELETE /api/itineraries/<id>` - Delete itinerary
- `POST /api/itineraries/<id>/share` - Generate share link

### Admin Endpoints
- `GET /api/metrics` - Get analytics metrics (requires admin role)

---

## 🔒 Security Features

- JWT-based authentication
- Password hashing with SHA-256 and salt
- SQL injection prevention with parameterized queries
- Rate limiting protection
- CORS headers configuration
- Admin role-based access control

---

## 🌐 Browser Support

- Chrome (latest)
- Firefox (latest)
- Edge (latest)
- Safari (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)

---

## 📄 License

See [LICENSE.md](LICENSE.md) for license information.

---

## ðŸ‘Ĩ Credits

**Founder:** Molla Samser
**Designer & Tester:** Rima Khatun
**Website:** https://rskworld.in/contact.php
**Year:** 2026

---

## ðŸĪ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

---

## 📞 Support

For issues, questions, or support, please visit: https://rskworld.in/contact.php

---

## 🚀 Future Roadmap

- [ ] Integration with real flight booking APIs
- [ ] Integration with real hotel booking APIs
- [ ] Payment gateway integration
- [ ] Email notifications
- [ ] Mobile app version
- [ ] Additional language support
- [ ] Advanced analytics dashboard

---

**Thank you for using Travel Assistant Bot! 🎉**
.venv/Lib/site-packages/pip/_internal/commands/debug.py
Raw Download
Find: Go to:
import locale
import logging
import os
import sys
from optparse import Values
from types import ModuleType
from typing import Any, Dict, List, Optional

import pip._vendor
from pip._vendor.certifi import where
from pip._vendor.packaging.version import parse as parse_version

from pip._internal.cli import cmdoptions
from pip._internal.cli.base_command import Command
from pip._internal.cli.cmdoptions import make_target_python
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.configuration import Configuration
from pip._internal.metadata import get_environment
from pip._internal.utils.compat import open_text_resource
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import get_pip_version

logger = logging.getLogger(__name__)


def show_value(name: str, value: Any) -> None:
    logger.info("%s: %s", name, value)


def show_sys_implementation() -> None:
    logger.info("sys.implementation:")
    implementation_name = sys.implementation.name
    with indent_log():
        show_value("name", implementation_name)


def create_vendor_txt_map() -> Dict[str, str]:
    with open_text_resource("pip._vendor", "vendor.txt") as f:
        # Purge non version specifying lines.
        # Also, remove any space prefix or suffixes (including comments).
        lines = [
            line.strip().split(" ", 1)[0] for line in f.readlines() if "==" in line
        ]

    # Transform into "module" -> version dict.
    return dict(line.split("==", 1) for line in lines)


def get_module_from_module_name(module_name: str) -> Optional[ModuleType]:
    # Module name can be uppercase in vendor.txt for some reason...
    module_name = module_name.lower().replace("-", "_")
    # PATCH: setuptools is actually only pkg_resources.
    if module_name == "setuptools":
        module_name = "pkg_resources"

    try:
        __import__(f"pip._vendor.{module_name}", globals(), locals(), level=0)
        return getattr(pip._vendor, module_name)
    except ImportError:
        # We allow 'truststore' to fail to import due
        # to being unavailable on Python 3.9 and earlier.
        if module_name == "truststore" and sys.version_info < (3, 10):
            return None
        raise


def get_vendor_version_from_module(module_name: str) -> Optional[str]:
    module = get_module_from_module_name(module_name)
    version = getattr(module, "__version__", None)

    if module and not version:
        # Try to find version in debundled module info.
        assert module.__file__ is not None
        env = get_environment([os.path.dirname(module.__file__)])
        dist = env.get_distribution(module_name)
        if dist:
            version = str(dist.version)

    return version


def show_actual_vendor_versions(vendor_txt_versions: Dict[str, str]) -> None:
    """Log the actual version and print extra info if there is
    a conflict or if the actual version could not be imported.
    """
    for module_name, expected_version in vendor_txt_versions.items():
        extra_message = ""
        actual_version = get_vendor_version_from_module(module_name)
        if not actual_version:
            extra_message = (
                " (Unable to locate actual module version, using"
                " vendor.txt specified version)"
            )
            actual_version = expected_version
        elif parse_version(actual_version) != parse_version(expected_version):
            extra_message = (
                " (CONFLICT: vendor.txt suggests version should"
                f" be {expected_version})"
            )
        logger.info("%s==%s%s", module_name, actual_version, extra_message)


def show_vendor_versions() -> None:
    logger.info("vendored library versions:")

    vendor_txt_versions = create_vendor_txt_map()
    with indent_log():
        show_actual_vendor_versions(vendor_txt_versions)


def show_tags(options: Values) -> None:
    tag_limit = 10

    target_python = make_target_python(options)
    tags = target_python.get_sorted_tags()

    # Display the target options that were explicitly provided.
    formatted_target = target_python.format_given()
    suffix = ""
    if formatted_target:
        suffix = f" (target: {formatted_target})"

    msg = f"Compatible tags: {len(tags)}{suffix}"
    logger.info(msg)

    if options.verbose < 1 and len(tags) > tag_limit:
        tags_limited = True
        tags = tags[:tag_limit]
    else:
        tags_limited = False

    with indent_log():
        for tag in tags:
            logger.info(str(tag))

        if tags_limited:
            msg = f"...\n[First {tag_limit} tags shown. Pass --verbose to show all.]"
            logger.info(msg)


def ca_bundle_info(config: Configuration) -> str:
    levels = {key.split(".", 1)[0] for key, _ in config.items()}
    if not levels:
        return "Not specified"

    levels_that_override_global = ["install", "wheel", "download"]
    global_overriding_level = [
        level for level in levels if level in levels_that_override_global
    ]
    if not global_overriding_level:
        return "global"

    if "global" in levels:
        levels.remove("global")
    return ", ".join(levels)


class DebugCommand(Command):
    """
    Display debug information.
    """

    usage = """
      %prog <options>"""
    ignore_require_venv = True

    def add_options(self) -> None:
        cmdoptions.add_target_python_options(self.cmd_opts)
        self.parser.insert_option_group(0, self.cmd_opts)
        self.parser.config.load()

    def run(self, options: Values, args: List[str]) -> int:
        logger.warning(
            "This command is only meant for debugging. "
            "Do not use this with automation for parsing and getting these "
            "details, since the output and options of this command may "
            "change without notice."
        )
        show_value("pip version", get_pip_version())
        show_value("sys.version", sys.version)
        show_value("sys.executable", sys.executable)
        show_value("sys.getdefaultencoding", sys.getdefaultencoding())
        show_value("sys.getfilesystemencoding", sys.getfilesystemencoding())
        show_value(
            "locale.getpreferredencoding",
            locale.getpreferredencoding(),
        )
        show_value("sys.platform", sys.platform)
        show_sys_implementation()

        show_value("'cert' config value", ca_bundle_info(self.parser.config))
        show_value("REQUESTS_CA_BUNDLE", os.environ.get("REQUESTS_CA_BUNDLE"))
        show_value("CURL_CA_BUNDLE", os.environ.get("CURL_CA_BUNDLE"))
        show_value("pip._vendor.certifi.where()", where())
        show_value("pip._vendor.DEBUNDLED", pip._vendor.DEBUNDLED)

        show_vendor_versions()

        show_tags(options)

        return SUCCESS
202 linesâ€Ē6.6 KB
python
.venv/Lib/site-packages/pip/_internal/models/__init__.py
Raw Download
Find: Go to:
"""A package that contains models that represent entities.
"""
3 linesâ€Ē63 B
python
🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work âĪïļ

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer