Skip to content

wayphantomme/python-weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Œ Python Weather App

A simple command-line weather application built with Python that fetches real-time weather data from the OpenWeatherMap API. You can input any city name and instantly get the weather condition, temperature, date, and other useful info.


πŸš€ Features

  • Get real-time weather for any city

  • Displays:

    • Current date
    • Weather status (Clear, Clouds, Rain, etc.)
    • Temperature (Β°F or Β°C, based on your code)
  • Simple, lightweight, and beginner-friendly

  • Uses the requests library

  • Runs inside a Python virtual environment


πŸ§ͺ Example Output

Enter city: Los Angeles
Date: Monday, November 24, 2025
The weather in Los Angeles is: Clear
The temperature in Los Angeles is: 59Β°F

πŸ› οΈ Installation

1. Clone this repository

git clone https://github.com/wayphantomme/python-weather-app.git
cd python-weather-app

2. Create and activate virtual environment

python3 -m venv .venv
source .venv/bin/activate

3. Install dependencies

pip install requests

πŸ”‘ Setup API Key

This project uses the OpenWeatherMap API.

  1. Go to https://openweathermap.org/api
  2. Create a free account
  3. Get your API key
  4. Open app.py and replace:
api_key = "YOUR_API_KEY_HERE"

▢️ How to Run

python app.py

Then enter any city name when prompted.


πŸ“‚ Project Structure

python-weather-app/
β”‚
β”œβ”€β”€ app.py
β”œβ”€β”€ README.md
└── .gitignore

❗ Notes

  • Do not upload .venv to GitHub
  • Make sure your API key is not exposed in public repos
  • If using this repo publicly, consider using environment variables

πŸ“œ License

This project is free to use for learning and experimentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages