docs | |
---|---|
tests | |
package |
Declaring singleton classes and singleton factories with different scopes of instantiation, striving for thread-safety and simplicity.
- Free software: MIT license
pip install singletons
import singletons @singletons.GlobalFactory def my_uuid(): return uuid.uuid4() # elsewhere... my_uuid() # will return the global instance of a UUID object
https://python-singletons.readthedocs.io/
To run the all tests run:
tox