def validate_api_key(api_key):
 api_key_db = ApiKey.get(api_key)
 if (not api_key_db.enabled):
  raise exceptions.ApiKeyDisabledError('API key is disabled.')
 LOG.audit(('API key with id "%s" is validated.' % api_key_db.id))
 return api_key_db

def validate_api_key ( api_key ) : api_key_db = ApiKey . get ( api_key ) if ( not api_key_db . enabled ) : raise exceptions . ApiKeyDisabledError ( 'API key is disabled.' ) LOG . audit ( ( 'API key with id "%s" is validated.' % api_key_db . id ) ) return api_key_db
validate the provided api key .