kakil / current-temperature

Find the current temperature of any city.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get Current Temperature for Any Place

Project Brief

What’s the temperature in the Rovaniemi right now?

Let’s find it out with Python.

Your task for this project is to create a Python program that gets any city name as input and outputs the current temperature for that city.

Expected Output

When the program is executed, the terminal asks the user to enter a city. Once the user enters the city, the program outputs the temperature of that city as shown in the demo below.

Environment Setup Instructions

  • Install the required libraries with: pip install requests
  • Create a free account and get an API key from https://openweathermap.org
  • Run the app with python main.py

Resources

Learn how to make an API GET request by city for Open Weather API: https://openweathermap.org/current#cityid

Learn how to use the Python requests library: https://pythonhow.com/how/requests-object/

Source: Daily Python Projects: https://dailypythonprojects.substack.com

About

Find the current temperature of any city.


Languages

Language:Python 100.0%