How to Solve NameError: name 'Route' is not defined -- starlette

Solution: Import the 'Route' module

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

from starlette.routing import Route

 

For more information:
Python starlette Route