Autopep8 formatted code
Added if __name__ == "__main__" to help with deployment to nginx