How to Solve NameError: name 'api' is not defined -- autofit

Solution: Import the 'api' module

# Add the following line to the top of your code
from autofit.app.restplus import api

 

For more information:
autofit api