Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
The Real Reason the Singleton Pattern Exists
Play lesson

Software Design in Python - The Real Reason the Singleton Pattern Exists

4.0 (1)
31 learners

What you'll learn

This course includes

  • 31.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. Singletons are often criticized for introducing global state and making code harder to test—but there’s more to the story. In this video, we explore the real problems with Singletons in Python, why module-level patterns are usually better, and where Singleton’s hidden strength can actually be useful. I’ll use a simple metaclass-based Singleton, discuss thread safety, and wrap up with a practical use case you might not expect. For more design patterns, check out this playlist: https://www.youtube.com/playlist?list=PLC0nd42SBTaNf0bVJVd9e2oBV-mcUuxS0 🔥 GitHub Repository: https://git.arjan.codes/2025/singleton. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses. 💬 Join my Discord server: https://discord.arjan.codes. ⌨️ Keyboard I’m using: https://amzn.to/49YM97v. 🔖 Chapters: 0:00 Intro 1:54 The Problem: Global Shared State 4:36 The Classic Singleton 7:26 The Real Pythonic Singleton 9:13 Problems With Singleton in Python 12:50 Controlled Instantiation 14:59 Final Thoughts #arjancodes #softwaredesign #python

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere