I want to share data with dash multipage global value

I understand that using global variables is not good.
However, for large data, I think it would be faster to share data between pages using global variables. I get an error when I import a python file from another page.
does anyone know how?

Hi @Osako , when you say from another page, you are refering a page of your app? If so, this is not going to work due to circular imports.

You could create a utils.py and read the data into a variable big_data = "something big"

and then import this variable on each page of your app, where you need it via form utils import big_data

3 Likes

Thank you i will try!!!

Great, let us know the result :wink:

1 Like

Iā€™m sorry to reply late.
I was able to solve the problem! ! ! !
Thank you very much.

1 Like