Following on from this post, I thought it might be good to think about JavaScript Object Notation (JSON). Despite its name, JSON has evolved to be agnostic and is arguably…
Tag: Python
Interact with API in Python
Overview of REST Representational State Transfer (REST) is a client server communication pattern, which defines some constraints: Any service that adhere to this is known as a REST web service…
Multipass cloud-init
Multipass is pretty useful but what a pain this was to figure out, due to Ubuntu’s Node.js package not working with AWS-CDK. Multipass lets you manage VM in Ubuntu and…
Setup a Multipass CDK Environment
I want to be able to connect to the environment using Visual Studio Code, so first we need to create a SSH key: We need a configuration YAML, replace <generated…
Rainbows, decorators arguments & threads
Playing with Rainbow Hat I learned a few things about Python as a result I found out what a decorator is, the difference between args and kwargs and threads. I…
Python List Comprehension
I’ve been spending time with Python recently and am beginning to really like some of the language’s features. List comprehension creates a list by evaluating an expression on each item…
Using Threading rather than Thread
In an earlier post, I used Threads but the thread module in Python when I should be using threading. The documentation for threading says it builds upon the thread module (renamed _thread):…
Python’s with statement
Managing resources usually involves three steps – allocating, using, and releasing. You’re familiar with the try… finally pattern but Python also provides context managers.