Skip to content

sailalithkanumuri8/gt_chatbot_backend

Repository files navigation

GT Chatbot Backend

A simple Flask backend with MongoDB integration for managing club data.

Setup

  1. Clone the repository

    git clone https://github.com/sailalithkanumuri8/gt_chatbot_backend.git
    cd gt_chatbot_backend
  2. Create virtual environment

    python3 -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install dependencies

    pip install flask pymongo python-dotenv pandas
  4. Create .env file

    echo "MONGODB_CLIENT=your_mongodb_connection_string_here" > .env

Usage

  1. Upload data to MongoDB

    python upload_clubs.py
  2. Start the Flask server

    python hello.py
  3. Test the API

    • Get all clubs: http://localhost:8001/clubs
    • Get specific club: http://localhost:8001/clubs/Finance%20Association

API Endpoints

  • GET /clubs - Returns all clubs
  • GET /clubs/<club_name> - Returns clubs matching the name (case-insensitive)

Files

  • hello.py - Flask application with API endpoints
  • upload_clubs.py - Script to upload CSV data to MongoDB
  • sample_clubs.csv - Sample club data
  • .env - MongoDB connection string (create this file)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published