Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,8 +30,8 @@ future_string = (today + relativedelta(months=3)).strftime('%Y-%m-%d')
|
|
| 30 |
url = f"{base_url}earning_calendar?from={today_string}&to={future_string}&apikey={apiKey}"
|
| 31 |
|
| 32 |
# This decorator ensures that the call to the FMP API will only run once at the start of this app
|
| 33 |
-
# The data will be cached after
|
| 34 |
-
# Without this decorator, the API will be called each time
|
| 35 |
@st.cache_resource
|
| 36 |
def get_earnings_dates(url):
|
| 37 |
events = get_jsonparsed_data(url)
|
|
|
|
| 30 |
url = f"{base_url}earning_calendar?from={today_string}&to={future_string}&apikey={apiKey}"
|
| 31 |
|
| 32 |
# This decorator ensures that the call to the FMP API will only run once at the start of this app
|
| 33 |
+
# The data returned will be cached after the function runs
|
| 34 |
+
# Without this decorator, the API will be called each time you click something in the streamlit app
|
| 35 |
@st.cache_resource
|
| 36 |
def get_earnings_dates(url):
|
| 37 |
events = get_jsonparsed_data(url)
|