PyQt5 Weather Application: Display Temperature & More

PyQt5 Weather App — A compact desktop client that fetches current weather by city using OpenWeatherMap and displays temperature and a short description in a clean PyQt5 interface.

<script src="https://gist.github.com/mmuckm/3509da2e2ff927e856c7c647b12862d3.js"></script>

PyQt5 Weather App

PyQt5 Weather App is a compact desktop client that fetches current weather by city using OpenWeatherMap and displays temperature and a short description in a minimal PyQt5 interface.

Features

  • Fetch current weather by city name
  • Convert Kelvin to Fahrenheit
  • Minimal, easy-to-read PyQt5 GUI
  • Clear separation of secrets via environment variables

Quick start

  1. Copy .env.example to .env and set your OpenWeatherMap API key:
    “`text
    OPENWEATHER_API_KEY=your_api_key_here

2.Create and activate a virtual environment

python -m venv .venv
# macOS / Linux
source .venv/bin/activate
# Windows
.venv\Scripts\activate

3. Install dependencies

pip install -r requirements.txt

4. Run the app:

python weather_app.py

License

This project is available under the MIT License.

Links

  • Full repo: https://github.com/mmuckm/Weather-App-API
  • Gist: https://gist.github.com/mmuckm/147800bce6e42d4e59ed1abf1521dd7e


Leave a Reply