Skip to content

Abhinav08bhatt/strombit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stormbit.py

Solution for the weather-api challenge from roadmap.sh.

A command-line weather application built in Python that fetches real-time weather data using the Visual Crossing API.
Supports current weather, hourly forecast, 7-day forecast, and location handling with a simple menu-based interface.


How to run

Clone the repository and run:

git clone https://github.com/Abhinav08bhatt/stormbit.git
cd stormbit
python main.py

Required module:

pip install requests

Version Info:

Version 1.0 (latest)

Features

  • Current weather report
  • Hourly forecast for today
  • 7-day forecast
  • Location management:
    • Save a location
    • Set default location
    • View all saved locations

Supported actions (menu-based)

  • Save a new location (a)
  • View data of a saved location (b)
  • Change default location (c)
  • Present weather (d)
  • Weather of whole day (e)
  • Weather for next 7 days (f)

Data Structure used in version 1.0

saved_locations.json

{
    "default": "dehradun",
    "saved": ["mumbai","delhi"]
}

cache.json

Stores last successful response from the API.


API Used

Visual Crossing Weather API
(Free tier — requires an API key)


License

This project is open-source and available under the MIT license.