singletonify

singleton pattern for python


Keywords
singleton, design-patterns
License
MIT
Install
pip install singletonify==0.2.4

Documentation

singletonify

Build Status PyPI

install

pip install singletonify

usage

@singleton(a=3)
class YourClass:
    def __init__(self, a): ...

assert YourClass() is YourClass()

why not other

There are many singleton libraries on pypi, but their all has problem: