Hi am new to flask, I want to call a function only once throughout the application. For example Menu. I should load menu related code only once then it should not call that function again. Is there any way to achieve it ?
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
I'm not sure this can help.
Flask has @app.before_first_request decorator, this portion of your code will run only once. May be you can use this to generate your Menu and use it later on.