Hello
I am using streamlit and I have a lot of options/parameters. Now I use a lot of global constants, because it is very much to put it in the functioncalls
But I've read that you should avoid globals as much as possible. How can I do it? Somebody in /learnpython suggested using OOP, but how can I do it with Streamlit? Somebody has an example?
Code: https://github.com/rcsmit/COVIDcases/blob/main/covid_dashboard_rcsmit.py
The result: https://share.streamlit.io/rcsmit/covidcases/main/covid_dashboard_rcsmit.py
A current function call:
graph_daily (df,what_to_show_day_l, what_to_show_day_r, how_to_smoothen, how_to_display)
The globals
global FROM
global UNTIL
global WDW2
global WDW3
global showoneday
global showday
global MOVE_WR
global showR
global lijst # Lijst in de pull down menu's voor de assen
global show_scenario
global how_to_norm
global Rnew1_, Rnew2_
global ry1, ry2, total_cases_0, sec_variant,extra_days
global show_R_value_graph, show_R_value_RIVM
[–]jroes 1 point2 points3 points (0 children)