jobrienski / python-singletons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

docs Documentation Status
tests Travis-CI Build Status
package PyPI Package latest release Supported versions Supported implementations Commits since latest release

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

https://python-singletons.readthedocs.io/

Development

To run the all tests run:

tox

About

License:MIT License


Languages

Language:Python 100.0%