I have built a new component using dash_component_boilerplate. Everything works fine and the component displays correctly.
I want to integrate it in my project with this type of tree structure:
| components
| pages
app.py
However, I can’t configure the path of the component to place it in the “components” folder. Do you have any idea?
To clarify, the component works correctly when I place it in the root but not in the components folder. So the path problem is internal to the component.
If you placed your .py file i.e. my_component.py in file components and then want to use it in any .py file i.e. in app.py or any file in pages folder you need to import your my_component.py as follows:
from components import my_component
and then call your objects from my component with my_component.my_function syntax or you can import your objects directly:
And I would like to integrate it in the page “page.py”. The program does not display any error but the page does not display… It loads endlessly.
The component is called and used like this: