Best Python code snippet using localstack_python
URLDecode.py
Source:URLDecode.py
1# -*- coding: utf-8 -*-2###############################################################################3#4# URLDecode5# Removes URL encoding from the specified text string.6#7# Python versions 2.6, 2.7, 3.x8#9# Copyright 2014, Temboo Inc.10#11# Licensed under the Apache License, Version 2.0 (the "License");12# you may not use this file except in compliance with the License.13# You may obtain a copy of the License at14#15# http://www.apache.org/licenses/LICENSE-2.016#17# Unless required by applicable law or agreed to in writing,18# software distributed under the License is distributed on an19# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,20# either express or implied. See the License for the specific21# language governing permissions and limitations under the License.22#23#24###############################################################################25from temboo.core.choreography import Choreography26from temboo.core.choreography import InputSet27from temboo.core.choreography import ResultSet28from temboo.core.choreography import ChoreographyExecution29import json30class URLDecode(Choreography):31 def __init__(self, temboo_session):32 """33 Create a new instance of the URLDecode Choreo. A TembooSession object, containing a valid34 set of Temboo credentials, must be supplied.35 """36 super(URLDecode, self).__init__(temboo_session, '/Library/Utilities/Encoding/URLDecode')37 def new_input_set(self):38 return URLDecodeInputSet()39 def _make_result_set(self, result, path):40 return URLDecodeResultSet(result, path)41 def _make_execution(self, session, exec_id, path):42 return URLDecodeChoreographyExecution(session, exec_id, path)43class URLDecodeInputSet(InputSet):44 """45 An InputSet with methods appropriate for specifying the inputs to the URLDecode46 Choreo. The InputSet object is used to specify input parameters when executing this Choreo.47 """48 def set_Text(self, value):49 """50 Set the value of the Text input for this Choreo. ((required, string) The text that should be URL decoded.)51 """52 super(URLDecodeInputSet, self)._set_input('Text', value)53class URLDecodeResultSet(ResultSet):54 """55 A ResultSet with methods tailored to the values returned by the URLDecode Choreo.56 The ResultSet object is used to retrieve the results of a Choreo execution.57 """58 def getJSONFromString(self, str):59 return json.loads(str)60 def get_URLDecodedText(self):61 """62 Retrieve the value for the "URLDecodedText" output from this Choreo execution. ((string) The URL decoded text.)63 """64 return self._output.get('URLDecodedText', None)65class URLDecodeChoreographyExecution(ChoreographyExecution):66 def _make_result_set(self, response, path):...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!