skip to navigation
skip to content

singletons 0.2.2

Singleton metaclasses and singleton factories

Declaring singleton classes and singleton factories with different scopes of instantiation, striving for thread-safety and simplicity.

  • Free software: MIT license


pip install singletons

Quick Example

    import singletons

def my_uuid():
    return uuid.uuid4()

# elsewhere...
my_uuid()  # will return the global instance of a UUID object


To run the all tests run:




0.2.2 (2018-02-01)

  • Shows warning rather than giving exception when using greenthread singletons without a greenthread environment

0.2.1 (2018-01-29)

  • CI changes

0.2.0 (2018-01-23)

  • More tests
  • Usage examples added to documentation
  • Fixed issues revealed by tests

0.1.0 (2018-01-22)

  • First release on PyPI.
File Type Py Version Uploaded on Size
singletons-0.2.2.tar.gz (md5) Source 2018-02-01 15KB