Overview
Declaring singleton classes and singleton factories with different scopes of instantiation, striving for thread-safety and simplicity.
Free software: MIT license
Installation
pip install singletons
Quick Example
import singletons
@singletons.GlobalFactory
def my_uuid():
return uuid.uuid4()
# elsewhere...
my_uuid() # will return the global instance of a UUID object
Documentation
Development
To run the all tests run:
tox
Changelog
0.1.0 (2018-01-22)
First release on PyPI.
Metadata
Release files for singletons 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| singletons-0.2.0.tar.gz | 15.4 kB | Details |
Release files / singletons-0.2.0.tar.gz
| Download URL | singletons-0.2.0.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54ea32d23e767c93ae003262699125428935cbdd0e0fd87435fa61d50dda520b
|
|
BLAKE2b-256 checksum How to use checksums |
79153af3abbee649f8509c2850b3933426e9c4053c6e7f655e147ecb0dd1a564
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |