Build a CLI application with Python and Typer
CLI applications are ubiquitous and we are using them every day whether it be Git, Curl, or Pip. In this blog, I will show you how to build a Site Connectivity Checker using Python and Typer. Typer is a fantastic library for quickly building CLI apps using Python's standard type hints. It's written by the same author of FastAPI - Sebastián Ramírez. Overview Our application will make GET requests to the URLs provided by the users as a...
FastAPI: Build REST API in 5 minutes
Maybe we know FastAPI is a web framework of python. The meaning of its name expresses what is more special about this framework than others. The very new features of python async and await are here. The API is really fast like nodeJS and Go (They claimed). The more interesting thing is the implementation time of the REST API. The first endpoint will take at most five minutes to implement including the API docs. What I...
Fun with Factory Design Pattern and Python
What is the design pattern/ Software design pattern? When pattern word comes to us what do we think? When software engineers try to solve a problem, always try to find a pattern that they already used before or try to create a new one. Because it is very important for future uses and others can understand it well. That’s why design pattern comes and there are some patterns that are approved worldwide. These are very much logical...
Refactoring and Unit Test – Demystifying Gilded Rose
The Gilded Rose Kata is a very popular refactoring exercise that is intended for practicing your test case writing and refactoring skills. It represents the dreaded situation we have to face as software engineers when we have to work on a legacy codebase and add a new feature to it...
Managing Python Dependencies in Serverless
Bundle external Python dependencies in your Serverless projects with virtualenv and serverless-python-requirements plugin....
Threads; read-it
You might have heard from your senior developers the following Use threads for I/O stuff, it will be fasterSome seasoned dev that you love And yes they are absolutely right and you might have heard the following as well Nodejs is a single threaded, non blocking event driven, I/O optimised javascript runtimeSomeone from the internet Or something like this about Python GIL in python makes threads very inefficient Fact And you're like This article will dump everything that we know about threads...
Python-ing it better
Where I work; we are obsessed with python, we use it everyday and to us python is an art. Python does not force rules unto you. But there’s always a better way of doing it; to us, a pythonic way. This article will try to show off some cool tricks and good practices in python that you can use to level up in the art of python. Using built in functions Most of us start our coding...
Terra-forming Medialive Resources
We’ve all been there. Learning to use terraform, writing beautiful code to manage our cloud infrastructure; it’s all sunshine and rainbows. Until you realize you work with video and need to use Medialive resources. Now sure, you can create these resources from the aws console like a nomad and pass in the arn to make your CD pipeline do what it needs to do but unfortunately we are not nomads. We are engineers and hackers...
Some Cool New Features of Python 3.9
Python 3.9 is released on 5th October 2020 and is now available. It comes with some of the great features and lots of improvements. In this article, we will explore some of its cool features. To know more about what is coming with Python 3.9 visit this page. And if you wish to see the full changelog then go here. Dictionary Merge & Update Operators Two new operator Merge (|) and Update (|=) are added to the built-in class dict.Merge (|) creates a new dictionary...
From CSV to Google Sheet Using Python
Recently I have written a Python script for my Manager. The purpose the script was to read some JSON data, apply some business rules on them, generate a CSV(Comma Separated Value) file and upload it in a Google Spread Sheet. The sheet helped my manager to get insight of the JSON data so that he can take action based on it. The JSON data and business rules of the script are very specific for my manager....