Skip to content

Abeeha2006/Weather-App

Repository files navigation

Weather App - PM Accelerator Technical Assessment

Developer: Syeda Abeeha Zehra

Completed Features

Tech Assessment 1 ✅

  • ✅ Current weather by location (city, coordinates, postal code)
  • ✅ 5-day weather forecast
  • ✅ Clean weather data display
  • ✅ Info endpoint with developer details

Tech Assessment 2 ✅

  • ✅ CRUD operations with SQLite database
  • ✅ Date range validation
  • ✅ Location validation via geocoding
  • ✅ Export data as JSON and CSV

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Get a free API key from WeatherAPI.com:

  2. Set environment variable:

# Windows PowerShell
$env:WEATHER_API_KEY="your_key_here"
  1. Run the server:
uvicorn main:app --reload --port 8001
  1. Visit: http://127.0.0.1:8001/docs

API Endpoints

  • GET /weather?query=Toronto - Current weather
  • GET /forecast?query=Toronto - 5-day forecast
  • GET /info - Developer information
  • POST /records - Create weather record
  • GET /records - List all records
  • PUT /records/{id} - Update record
  • DELETE /records/{id} - Delete record
  • GET /export?format=json - Export as JSON
  • GET /export?format=csv - Export as CSV

Technologies Used

  • FastAPI
  • SQLAlchemy
  • SQLite
  • WeatherAPI.com
  • Nominatim (OpenStreetMap) for geocoding

About

Weather app for PM Accelerator internship application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages