Weatherly is a sleek, fast, and responsive weather dashboard built with Streamlit, fetching real-time weather, air quality, and a 3-day forecast for any city β powered by WeatherAPI.com.
π Live Project: weatherly-smzufohbhuex5grhcavnd4.streamlit.app
π API keys are securely stored using
secrets.tomlβ no hardcoding.
- π Real-time weather for any city worldwide
- π Details: Temperature, humidity, UV index, cloud cover, wind speed/direction
- π« Air quality score (PM2.5-based) with emoji scale
- π 3-day forecast with dynamic weather icons
- β± Live local time + last updated timestamp
- π¨ Auto-switching weather icons (sunny, storm, fog, etc.)
| Component | Technology |
|---|---|
| Backend | Python |
| Frontend/UI | Streamlit |
| API | WeatherAPI (REST) |
| Secrets Mgmt | secrets.toml |
| Deployment | Streamlit Cloud π¨οΈ |
- Sign up at WeatherAPI.com and get your free API key.
- In your Streamlit app folder, create a
.streamlit/secrets.tomlfile:
[api] key = "your_weather_api_key_here"
β Never commit your API key to GitHub β keep it in secrets.toml.
$ git clone https://github.com/yourusername/weatherly.git $ cd weatherly $ pip install -r requirements.txt $ streamlit run app.py
Make sure:
Your secrets.toml is inside .streamlit/ folder
Your main file is named app.py (or update the run command)
βοΈ Deploy on Streamlit Cloud
-
Push your code to GitHub
-
Go to share.streamlit.io and connect your repo
-
Add your API key in App Settings β Secrets:
[api] key = "your_api_key"
- Deploy β youβre live!
π Example API Call
https://api.weatherapi.com/v1/forecast.json?key=YOUR_KEY&q=London&days=3&aqi=yes
Returns:
Current weather
PM2.5 air quality
3-day forecast
π Notes
Works best for cities with API coverage
PM2.5 Air Quality Scale:
π’ Excellent
π‘ Moderate
π Poor
π΄ Hazardous
Icons sourced from Google Weather Icons
π€ Author
Ameya Kulkarni
π License: MIT β free to use, modify, and share.
β If Weatherly helped you, drop a star!