Tag: Python

Don’t deliberate, just Enumerate

Don’t deliberate, just Enumerate

A quick blog on for iterations in Python “How does one easily loop through an iterable and with index?”. This is a common question people who are just starting their Python may ask. One will quickly learn that Python only has the for loop which, by default does not give the user index. In this …

+ Read More

Deploying CFN with Boto3

Deploying CFN with Boto3

I have recently been involved with a project that required orchestrating the automating of various AWS Services to achieve the desired end output. To achieve this ‘Orchestration’ I decided to use AWS Step Machines as they easily wrap together and control the flow and data processing (State) between the tasks. The first step of this …

+ Read More

Retrieve User Credentials from Secrets Manager

Retrieve User Credentials from Secrets Manager

This blog post will cover off how to programatically retrieve a set of User Credentials from AWS Secrets Manager. Using the Boto3 Python SDK we can easily connect to the Secrets Manager and retrieve the specified secrets. Before beginning, ensure you have the following: Access to AWS Python 3 and Boto3 installed Create the secret …

+ Read More

Read Content From an S3 Bucket

Read Content From an S3 Bucket

It may not be obvious at first as to what the best method is to read the contents of a file that resides within an S3 bucket. If your attempts at this were anything like mine then you would have spent lots of time looking at the Boto3 S3 resource, and its various methods, only …

+ Read More

Finding Properties and Methods of Objects in Python

Finding Properties and Methods of Objects in Python

Having come from a PowerShell background and being spoiled with its simplicity, I realised there are a few things I take for granted which are not as simple in Python. One of these is to easily see what Methods and Properties are available on an object. PowerShell Get-Member PowerShell has an inbuilt cmdlet for exactly …

+ Read More

Finding Palindromes with Python

Finding Palindromes with Python

I have recently been playing around with Python and set my self the typical task that most devs get asked during interviews. “Here is s list of string, I want you to find me all the palindromes that are greater than length n”. Sound familiar? Well, with Python being very flexible and simple this tasked …

+ Read More