---
title: "Discussion on \"Singleton class in Python\" | Hashnode"
description: "Discussion on \"Singleton class in Python\". Learn how to implement a Singleton class in Python using `__new__` method and metaclass for ensuring only one instance."
url: "https://hashnode.com/posts/singleton-class-in-python/6622359bb8f1af323d48e3ad"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Singleton class in Python](https://kapilg.hashnode.dev/singleton-class-in-python?utm_source=hashnode&utm_medium=feed)

Learn how to implement a Singleton class in Python using \`\_\_new\_\_\` method and metaclass for ensuring only one instance.

Apr 19, 2024 · 2 min read · kapilg.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#programming-ciovqvfcb008mb253jrczo9ye](https://hashnode.com/tag/programming-ciovqvfcb008mb253jrczo9ye)
-   [#singleton-design-pattern](https://hashnode.com/tag/singleton-design-pattern)
-   [#python-magic-method](https://hashnode.com/tag/python-magic-method)
-   [#metaclass](https://hashnode.com/tag/metaclass)

## Written by

[kapil Garg](https://hashnode.com/@kapilgarg)

@kapilgarg · Bangalore

  
[View profile](https://hashnode.com/@kapilgarg)

Lead Developer | Architect

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
