How to Solve NameError: name 'edapi' is not defined

Solution: Import the 'edapi' module

# Add the following line to the top of your code
import edapi

 

For more information:
Python edapi