I want to review the URL routing for my appengine webapp:

routes = [
(r'/', CyberFazeHandler),
(r'/vi/(eyes|mouth|nose)', CyberFazeHandler),
(r'/realtime', RealtimeHandler),
('/serve/([^/]+)?', ServeHandler),
('/file/([0-9]+)', FileInfoHandler),
('/file/set/([0-9]+)', SetCategoryHandler),
('/file/([0-9]+)/success', AjaxSuccessHandler),
]

app = webapp2.WSGIApplication(routes,
debug=os.environ.get('SERVER_SOFTWARE', '').startswith('Dev'
))


Does it look alright to you? Can you recommend an improvement? Should I use the 'r prefix to my regexes?

Have you considered using named Route templates instead of capturing regular expressions? It could make the code more readable. Consider

Route("/task/refresh-user/<username>", RefreshUserHandler)


(r'/task/refresh-user/(.*)', RefreshUserHandler)

for example. (Of course, I don't know what kwargs RefreshUser actually wants, but you can change the angle-bracketed part to the appropriate name.)