souvik0306 commited on
Commit
56d1b19
·
verified ·
1 Parent(s): 649271c

Update weather.py

Browse files
Files changed (1) hide show
  1. weather.py +0 -2
weather.py CHANGED
@@ -1,7 +1,6 @@
1
  import requests
2
  import itertools
3
  from geopy.distance import geodesic
4
- from functools import lru_cache
5
 
6
  # Replace with your OpenWeather API key
7
  API_KEY = '9811dd1481209c64fba6cb2c90f27140'
@@ -19,7 +18,6 @@ def get_intermediate_points(start, end, num_points=4):
19
  return points
20
 
21
  # Fetch weather data for a given coordinate
22
- @lru_cache(maxsize=128)
23
  def fetch_weather(lat, lon):
24
  url = f'http://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={API_KEY}&units=metric'
25
  response = requests.get(url)
 
1
  import requests
2
  import itertools
3
  from geopy.distance import geodesic
 
4
 
5
  # Replace with your OpenWeather API key
6
  API_KEY = '9811dd1481209c64fba6cb2c90f27140'
 
18
  return points
19
 
20
  # Fetch weather data for a given coordinate
 
21
  def fetch_weather(lat, lon):
22
  url = f'http://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={API_KEY}&units=metric'
23
  response = requests.get(url)