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
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
weather-chatbot
RSK World
weather-chatbot
Weather Chatbot - Python + Flask + OpenWeatherMap + OpenAI + Weather Forecast + Weather Alerts + Natural Language Processing
weather-chatbot
  • __pycache__
  • cache
  • logs
  • scripts
  • sessions
  • static
  • templates
  • tests
  • utils
  • .dockerignore778 B
  • .env.example1.5 KB
  • .gitignore2.4 KB
  • .pre-commit-config.yaml1 KB
  • API.md7.9 KB
  • CHANGELOG.md2.4 KB
  • CHECKLIST.md5.4 KB
  • CONTRIBUTING.md1.9 KB
  • Dockerfile1.4 KB
  • FEATURES.md7.1 KB
  • FINAL_CHECK.md6.7 KB
  • GITHUB_RELEASE_INSTRUCTIONS.md5.4 KB
  • INSTALL.md4 KB
  • LICENSE1.3 KB
  • MANIFEST.in553 B
  • Makefile2 KB
  • PROJECT_SUMMARY.md12.9 KB
  • README.md7.2 KB
  • RELEASE_NOTES_v1.0.0.md8.9 KB
  • VERIFICATION_REPORT.md9.2 KB
  • app.py22.2 KB
  • chatbot.py1.7 KB
  • config.py4.9 KB
  • docker-compose.yml2.2 KB
  • nginx.conf2.3 KB
  • pytest.ini549 B
  • requirements.txt1.9 KB
  • run.py3.1 KB
  • setup.py3.1 KB
  • weather_api.py578 B
ADVANCED_FEATURES.mdCONTRIBUTING.mddemo.htmlDockerfile.env.examplerun.py
CONTRIBUTING.md
Raw Download

CONTRIBUTING.md

# Contributing to Weather Chatbot
## ===============================

**Author:** RSK World (https://rskworld.in)
**Year:** 2026

Thank you for your interest in contributing to Weather Chatbot! This document provides guidelines and instructions for contributing.

## How to Contribute

### Reporting Bugs

1. Check if the bug has already been reported in the Issues section
2. Create a new issue with a clear title and description
3. Include steps to reproduce the bug
4. Include error messages and logs if applicable
5. Specify your environment (OS, Python version, etc.)

### Suggesting Features

1. Check if the feature has already been suggested
2. Create a new issue with the `enhancement` label
3. Describe the feature and its use case
4. Explain why it would be useful

### Pull Requests

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Write or update tests if needed
5. Ensure all tests pass (`pytest`)
6. Update documentation if needed
7. Commit your changes (`git commit -m 'Add amazing feature'`)
8. Push to your branch (`git push origin feature/amazing-feature`)
9. Open a Pull Request

## Code Style

- Follow PEP 8 style guide
- Use meaningful variable and function names
- Add docstrings to functions and classes
- Keep functions focused and single-purpose
- Write comments for complex logic

## Testing

- Write tests for new features
- Ensure all tests pass before submitting PR
- Aim for good test coverage
- Include both unit and integration tests

## Documentation

- Update README.md if adding new features
- Update API.md for API changes
- Add docstrings to new functions/classes
- Include examples in documentation

## Questions?

For questions, contact:
- Email: hello@rskworld.in
- Phone: +91 93305 39277
- Website: https://rskworld.in

---

**Ā© 2026 RSK World. All rights reserved.**
Dockerfile
Raw Download
Find: Go to:
# Weather Chatbot Dockerfile
# ==========================
#
# Author: RSK World (https://rskworld.in)
# Founded by: Molla Samser
# Designer & Tester: Rima Khatun
# Contact: +91 93305 39277, hello@rskworld.in, support@rskworld.in
# Location: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
# Year: 2026
#
# Description: Docker configuration for Weather Chatbot application

# Use Python 3.11 slim image
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV FLASK_APP=app.py
ENV FLASK_ENV=production

# Install system dependencies
RUN apt-get update && apt-get install -y \
    gcc \
    g++ \
    make \
    libffi-dev \
    libssl-dev \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements file
COPY requirements.txt .

# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt

# Copy application files
COPY . .

# Create necessary directories
RUN mkdir -p logs static/uploads cache sessions

# Set permissions
RUN chmod -R 755 /app

# Expose port
EXPOSE 5000

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
    CMD python -c "import requests; requests.get('http://localhost:5000/health')"

# Run the application
CMD ["python", "run.py"]
59 lines•1.4 KB
text
.env.example
Raw Download
Find: Go to:
# Weather Chatbot Environment Configuration
# ==========================================
#
# Author: RSK World (https://rskworld.in)
# Founded by: Molla Samser
# Designer & Tester: Rima Khatun
# Contact: +91 93305 39277, hello@rskworld.in, support@rskworld.in
# Location: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
# Year: 2026
#
# Copy this file to .env and fill in your actual API keys and configuration

# OpenWeatherMap API Key
# Get your free API key from: https://openweathermap.org/api
OPENWEATHER_API_KEY=your_openweathermap_api_key_here

# OpenAI API Key (Optional - for natural language processing)
# Get your API key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=your_openai_api_key_here

# Flask Configuration
SECRET_KEY=your_secret_key_here_for_flask_sessions
FLASK_ENV=development
FLASK_DEBUG=True

# Server Configuration
HOST=0.0.0.0
PORT=5000

# Logging Configuration
LOG_LEVEL=INFO
LOG_FILE=logs/weather_chatbot.log

# Rate Limiting
RATE_LIMIT_ENABLED=True
RATE_LIMIT_PER_MINUTE=30

# Weather API Configuration
WEATHER_UNITS=metric
WEATHER_LANGUAGE=en
DEFAULT_CITY=London

# Cache Configuration (optional)
CACHE_ENABLED=False
CACHE_TTL=300

# Database Configuration (optional - for chat history)
DATABASE_URL=sqlite:///weather_chatbot.db

# CORS Configuration
CORS_ORIGINS=*

# Security Configuration
SESSION_COOKIE_SECURE=False
SESSION_COOKIE_HTTPONLY=True
SESSION_COOKIE_SAMESITE=Lax
57 lines•1.5 KB
text
run.py
Raw Download
Find: Go to:
#!/usr/bin/env python3
"""
Weather Chatbot Runner
======================

Author: RSK World (https://rskworld.in)
Founded by: Molla Samser
Designer & Tester: Rima Khatun
Contact: +91 93305 39277, hello@rskworld.in, support@rskworld.in
Location: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
Year: 2026

Description: Entry point for the Weather Chatbot application
"""

import os
import sys
from app import app

def main():
    """Main entry point for the Weather Chatbot application"""
    
    # Print startup banner
    print("=" * 60)
    print("šŸŒ¤ļø  Weather Chatbot - RSK World")
    print("=" * 60)
    print("Author: RSK World (https://rskworld.in)")
    print("Founded by: Molla Samser")
    print("Designer & Tester: Rima Khatun")
    print("Contact: +91 93305 39277")
    print("Email: hello@rskworld.in, support@rskworld.in")
    print("Location: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India")
    print("Year: 2026")
    print("=" * 60)
    print("Features:")
    print("• Real-time weather data")
    print("• Weather forecasts")
    print("• Weather alerts")
    print("• Natural language processing")
    print("• Web interface")
    print("=" * 60)
    
    # Check environment variables
    openweather_key = os.getenv('OPENWEATHER_API_KEY')
    openai_key = os.getenv('OPENAI_API_KEY')
    
    if not openweather_key:
        print("āš ļø  Warning: OPENWEATHER_API_KEY not found in environment variables")
        print("   Get your free API key from: https://openweathermap.org/api")
        print("   Set it in your .env file or environment variables")
    else:
        print("āœ… OpenWeatherMap API key configured")
    
    if not openai_key:
        print("āš ļø  Warning: OPENAI_API_KEY not found (optional)")
        print("   Chatbot will work with keyword matching")
        print("   For enhanced NLP, get API key from: https://platform.openai.com/api-keys")
    else:
        print("āœ… OpenAI API key configured")
    
    print("=" * 60)
    
    # Get configuration
    host = os.getenv('HOST', '0.0.0.0')
    port = int(os.getenv('PORT', 5000))
    debug = os.getenv('FLASK_DEBUG', 'True').lower() == 'true'
    
    print(f"šŸš€ Starting Weather Chatbot on http://{host}:{port}")
    print("šŸ“± Web Interface: http://localhost:5000")
    print("šŸ”— API Endpoints:")
    print("   • GET  /health - Health check")
    print("   • POST /chat   - Chat interface")
    print("   • GET  /weather/<city> - Current weather")
    print("   • GET  /forecast/<city> - Weather forecast")
    print("   • GET  /alerts/<city> - Weather alerts")
    print("=" * 60)
    print("Press Ctrl+C to stop the server")
    print("=" * 60)
    
    try:
        # Start the Flask application
        app.run(host=host, port=port, debug=debug)
    except KeyboardInterrupt:
        print("\nšŸ‘‹ Weather Chatbot stopped by user")
        print("Ā© 2026 RSK World. All rights reserved.")
        sys.exit(0)
    except Exception as e:
        print(f"āŒ Error starting server: {e}")
        sys.exit(1)

if __name__ == '__main__':
    main()
93 lines•3.1 KB
python

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