pip install requests
import requests # Telling Python we want to use this power-up
# The "Waiter's" Address (A free API for current weather)
url = "https://api.open-meteo.com/v1/forecast?latitude=13.08&longitude=80.27¤t_weather=true"
# 1. Send the request
response = requests.get(url)
# 2. Convert the "mess" into a Python Dictionary
data = response.json()
# 3. Dig into the Dictionary to find the temperature
# (Based on the JSON structure the API provides)
current_temp = data["current_weather"]["temperature"]
print(f"The current temperature in Chennai is {current_temp}°C")
Informations
- Émission
- FréquenceToutes les 2 semaines
- Publiée29 janvier 2026 à 00:06 UTC
- Durée14 min
- Saison5
- Épisode4
- ClassificationTous publics
