How to Solve NameError: name 'Fernet' is not defined -- cryptography

Solution: Import the 'Fernet' module

To Solve the error, add the following line to the top of your code.

from cryptography.fernet import Fernet

 

For more information:
Python cryptography Fernet