Skip to content

SingletoneMeta

SingletoneMeta

Bases: ABCMeta

Metaclass for the singletone pattern.

__call__

__call__(*args, **kwargs)

Return the instance if it exists, otherwise create a new one. Instances are stored in a dictionary with the key being a tuple of the arguments and the class. In other words, it's possible to have only one instance with specific table name and child class.