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

No project description provided

Project description



.. code-block:: cmd

pip install singletonify


.. code-block:: py

class YourClass:

assert YourClass() is YourClass()

why not other

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

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

Project details

Release history Release notifications

History Node

This version
History Node

History Node

History Node

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- (3.2 kB) Copy SHA256 hash SHA256 Egg 3.6 Jan 13, 2018
singletonify- (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