In this article we review last week's Create an AWS Lambda Function code challenge.
bbelderbos: as per Real Python's article I set up my Lambda function to receive payload via API Gateway. The lambda retrieves a PR number (id) via a POST request and retrieves the associated .py files via the GH API. It stores them in /tmp and runs PEP8 against them. If good it returns 'ok', else it shows the violations.
TODOS: add a webhook for our Challenges repo to run this automatically. It would be nice to run unittests on test_*.py files. You could actually turn this into a simple CI which when done I will write an article about. Project here.
Keep Calm and Code in Python!
-- Bob and Julian
Do you want to get 250+ concise and applicable Python tips in an ebook that will cost you less than 10 bucks (future updates included), check it out here.
"The discussions are succinct yet thorough enough to give you a solid grasp of the particular problem. I just wish I would have had this book when I started learning Python." - Daniel H
"Bob and Julian are the masters at aggregating these small snippets of code that can really make certain aspects of coding easier." - Jesse B
"This is now my favourite first Python go-to reference." - Anthony L
"Do you ever go on one of those cooking websites for a recipe and have to scroll for what feels like an eternity to get to the ingredients and the 4 steps the recipe actually takes? This is the opposite of that." - Sergio S