1

My projects is built like this: React frontend -> Flask server to interact, save to SQL etc.. -> Brownie project.

Now when trying to use a script from brownie in my flask file:

from brownieProject.scripts.deploy import get_account

I get an error where:

cannot import name 'Puzzle' from 'brownie'

The Puzzle is the name of my contract, and it seems to not recognize it if i try to use it in the Flask script. My question here is how can i use thos Brownie scripts outside of the brownie project? is it even how it's supposed to be? if not, how should i use it within a Flask venv so i could run dynamic scripts using my frontend?

Note: if i remove the Puzzle contract import from the deploy.py in brownieProjects.scripts i get it compiled, so it only fails to bring up the contract.

Thank You for the help!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.