API Real-Time Weather Data

Description of Project

Fetching latest weather information through an API in python
Libraries used:

  • Requests
  • datetime
Steps to fetch the data:
  • Endpoint URL where we're sending the request to
  • Query paramters
  • Look for the data associated with the city that the user types in
  • GET request to retrieve data from the request URL
  • Converting UNIX timestamp to datetime for sunrise / sunset
  • Print values