Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

No project description provided

Project description


singletonify
============

install
-------

.. code-block:: cmd

pip install singletonify

usage
-----

.. code-block:: py

@singleton
class YourClass:
pass

assert YourClass() is YourClass()

why not other
-------------

There are many singleton libraries on pypi, but their all has problem:


* `singleton <https://pypi.python.org/pypi/singleton>`_ - cannot use ``issubclass()`` or ``__mro__`` or ...
* `singleton-decorator <https://pypi.python.org/pypi/singleton-decorator>`_ - cannot use ``isinstance()`` .
* `singleton_factory <https://pypi.python.org/pypi/singleton_factory>`_ - wtf, why do people use ``dict()[hash(obj)] = obj`` ?
* `singletonmetaclasss <https://pypi.python.org/pypi/singletonmetaclasss/0.1>`_ - a little like this, but not a decorator.
* `singleton3 <https://pypi.python.org/pypi/singleton3>`_ - haha
* `pysingleton <https://pypi.python.org/pypi/pysingleton>`_ - ABANDONED.

Project details


Release history Release notifications

History Node

0.1.2.0

This version
History Node

0.1.1.0

History Node

0.1.0.1

History Node

0.1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
singletonify-0.1.1.0-py3.6.egg (3.2 kB) Copy SHA256 hash SHA256 Egg 3.6 Jan 13, 2018
singletonify-0.1.1.0.tar.gz (2.1 kB) Copy SHA256 hash SHA256 Source None Jan 13, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page