How to use _performAction method in pyatom

Best Python code snippet using pyatom_python

amazon_ses.py

Source: amazon_ses.py Github

copy

Full Screen

...43 signature = self._getSignature(dateValue)44 headers['X-Amzn-Authorization'] = 'AWS3-HTTPS AWSAccessKeyId=%s, Algorithm=HMACSHA256, Signature=%s' % (self._accessKeyID, signature)45 return headers46 47 def _performAction(self, actionName, params=None):48 if not params:49 params = {}50 params['Action'] = actionName 51 #https:/​/​email.us-east-1.amazonaws.com/​52 conn = httplib.HTTPSConnection('email.us-east-1.amazonaws.com')53 params = urllib.urlencode(params)54 conn.request('POST', '/​', params, self._getHeaders())55 response = conn.getresponse()56 responseResult = response.read()57 conn.close()58 return self._responseParser.parse(actionName, response.status, response.reason, responseResult)59 60 def verifyEmailAddress(self, emailAddress):61 params = { 'EmailAddress': emailAddress }62 return self._performAction('VerifyEmailAddress', params)63 64 def deleteVerifiedEmailAddress(self, emailAddress):65 params = { 'EmailAddress': emailAddress }66 return self._performAction('DeleteVerifiedEmailAddress', params)67 68 def getSendQuota(self):69 return self._performAction('GetSendQuota')70 71 def getSendStatistics(self):72 return self._performAction('GetSendStatistics')73 74 def listVerifiedEmailAddresses(self):75 return self._performAction('ListVerifiedEmailAddresses')76 77 def sendEmail(self, source, toAddresses, message, replyToAddresses=None, returnPath=None, ccAddresses=None, bccAddresses=None, headers={}):78 params = { 'Source': source }79 for objName, addresses in zip(["ToAddresses", "CcAddresses", "BccAddresses"], [toAddresses, ccAddresses, bccAddresses]):80 if addresses:81 if not isinstance(addresses, basestring) and getattr(addresses, '__iter__', False):82 for i, address in enumerate(addresses, 1):83 params['Destination.%s.member.%d' % (objName, i)] = address84 else:85 params['Destination.%s.member.1' % objName] = addresses 86 if not returnPath:87 returnPath = source88 params['ReturnPath'] = returnPath 89 params['Message.Subject.Charset'] = message.charset90 params['Message.Subject.Data'] = message.subject91 if message.bodyText:92 params['Message.Body.Text.Charset'] = message.charset93 params['Message.Body.Text.Data'] = message.bodyText94 if message.bodyHtml:95 params['Message.Body.Html.Charset'] = message.charset96 params['Message.Body.Html.Data'] = message.bodyHtml97 if headers:98 params.update(headers)99 return self._performAction('SendEmail', params)100class EmailMessage:101 def __init__(self):102 self.charset = 'UTF-8'103 self.subject = None104 self.bodyHtml = None105 self.bodyText = None 106class AmazonError(Exception):107 def __init__(self, errorType, code, message):108 self.errorType = errorType109 self.code = code110 self.message = message111 def __unicode__(self):112 return '%s %s %s' % (str(self.errorType), str(self.code), str(self.message))113 def __str__(self):...

Full Screen

Full Screen

boolean.py

Source: boolean.py Github

copy

Full Screen

...42 contours = glyph.contours43 subjectContours = contours[:1]44 clipContours = contours[1:]45 return subjectContours, clipContours46 def _performAction(self, glyph, action):47 subjectContours, clipContours = self._getContours(glyph)48 action(glyph, subjectContours, clipContours)49 def unionActionCallback(self, glyph):50 self._performAction(glyph, booleanOperations.union)51 def differenceActionCallback(self, glyph):52 self._performAction(glyph, booleanOperations.difference)53 def intersectionActionCallback(self, glyph):54 self._performAction(glyph, booleanOperations.intersection)55 def xorActionCallback(self, glyph):...

Full Screen

Full Screen

Blogs

Check out the latest blogs from LambdaTest on this topic:

Pair testing strategy in an Agile environment

Pair testing can help you complete your testing tasks faster and with higher quality. But who can do pair testing, and when should it be done? And what form of pair testing is best for your circumstance? Check out this blog for more information on how to conduct pair testing to optimize its benefits.

Your Favorite Dev Browser Has Evolved! The All New LT Browser 2.0

We launched LT Browser in 2020, and we were overwhelmed by the response as it was awarded as the #5 product of the day on the ProductHunt platform. Today, after 74,585 downloads and 7,000 total test runs with an average of 100 test runs each day, the LT Browser has continued to help developers build responsive web designs in a jiffy.

Do you possess the necessary characteristics to adopt an Agile testing mindset?

To understand the agile testing mindset, we first need to determine what makes a team “agile.” To me, an agile team continually focuses on becoming self-organized and cross-functional to be able to complete any challenge they may face during a project.

Starting & growing a QA Testing career

The QA testing career includes following an often long, winding road filled with fun, chaos, challenges, and complexity. Financially, the spectrum is broad and influenced by location, company type, company size, and the QA tester’s experience level. QA testing is a profitable, enjoyable, and thriving career choice.

Quick Guide To Drupal Testing

Dries Buytaert, a graduate student at the University of Antwerp, came up with the idea of developing something similar to a chat room. Moreover, he modified the conventional chat rooms into a website where his friends could post their queries and reply through comments. However, for this project, he thought of creating a temporary archive of posts.

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run pyatom automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful