Skip to content

Commit

Permalink
safer nominatim
Browse files Browse the repository at this point in the history
  • Loading branch information
sborms committed Oct 24, 2023
1 parent b555a9c commit e74fe1b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webapp/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import streamlit as st
from geopy.distance import distance
from geopy.extra.rate_limiter import RateLimiter
from geopy.geocoders import Nominatim

geolocator = Nominatim(user_agent="address_finder_futsalfriend_app").geocode
geolocator = RateLimiter(
Nominatim(user_agent="address_finder_futsalfriend_app").geocode,
min_delay_seconds=1,
)


@st.cache_resource(show_spinner=False)
Expand Down

0 comments on commit e74fe1b

Please sign in to comment.