pythonpython-reflex

How to import a class in pynecone?


I'm trying to import a class in another python class in my pynecone project. It's giving me error.

import Constants ---> Giving error 

ModuleNotFoundError: No module named 'Constants'

Edit: Folder structure:

enter image description here

From helloworld.py, I'm trying to import Constants. How can this be done?


Solution

  • The way it's being imported within the library is

    from pynecone import constants