In this article, we’ll go over what a singleton pattern is and how to implement it using the example code written in Python. Photo by Annie Spratt on Unsplash Design patterns represent the best practices used in software engineering. They are tried and tested solutions to common problems that developers face and can be seen as a guideline to follow. There are a few categories that make up design patterns: Creational Structural Behavioral The singleton design falls into the Creational pattern.