#NEWLINE# def list_wps_service_engines( app_class = None ) : #NEWLINE# #INDENT# '\n    Get all wps engines offered.\n\n    Args:\n      app_class (class, optional): The app class to include in the search for wps engines.\n\n    Returns:\n      (tuple): A tuple of WPS engine dictionaries.\n    ' #NEWLINE# wps_services_list = [ ] #NEWLINE# app_wps_services = None #NEWLINE# if ( app_class and issubclass ( app_class , TethysAppBase ) ) : #NEWLINE# #INDENT# app = app_class ( ) #NEWLINE# app_wps_services = app . wps_services ( ) #NEWLINE# #UNINDENT# if app_wps_services : #NEWLINE# #INDENT# for app_wps_service in app_wps_services : #NEWLINE# #INDENT# wps = WebProcessingService ( app_wps_service . endpoint , username = app_wps_service . username , password = app_wps_service . password , verbose = False , skip_caps = True ) #NEWLINE# activated_wps = activate_wps ( wps = wps , endpoint = app_wps_service . endpoint , name = app_wps_service . name ) #NEWLINE# if activated_wps : #NEWLINE# #INDENT# wps_services_list . append ( activated_wps ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# site_wps_services = WpsModel . objects . all ( ) #NEWLINE# for site_wps_service in site_wps_services : #NEWLINE# #INDENT# wps = WebProcessingService ( site_wps_service . endpoint , username = site_wps_service . username , password = site_wps_service . password , verbose = False , skip_caps = True ) #NEWLINE# activated_wps = activate_wps ( wps = wps , endpoint = site_wps_service . endpoint , name = site_wps_service . name ) #NEWLINE# if activated_wps : #NEWLINE# #INDENT# wps_services_list . append ( activated_wps ) #NEWLINE# #UNINDENT# #UNINDENT# return app_wps_services