class documentation

class SingletonMeta(type): (source)

View In Hierarchy

Metaclass for implementing the Singleton design pattern. This metaclass ensures that only one instance of a class is created and provides a global point of access to that instance. Usage: class MyClass(metaclass=SingletonMeta): # class definition Note: This metaclass should be used as the metaclass of the class that needs to be a singleton.

Method __call__ Undocumented
Class Variable _instances Undocumented
def __call__(cls, *args, **kwargs): (source)

Undocumented

_instances: dict = (source)

Undocumented