Skip to content

Cologler/singletonify-python

Repository files navigation

singletonify

Build Status PyPI

install

pip install singletonify

usage

from singletonify import singleton

@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:

About

singleton pattern for python

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •