Skip to main content
# singletonify

[![Build Status](https://travis-ci.com/Cologler/singletonify-python.svg?branch=master)](https://travis-ci.com/Cologler/singletonify-python)
[![PyPI](https://img.shields.io/pypi/v/singletonify.svg)](https://pypi.org/project/singletonify/)


## install

``` cmd
pip install singletonify
```

## usage

``` py
@singleton(a=3)
class YourClass:
def __init__(self, a): ...

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.


Metadata

Release files for singletonify 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for singletonify 0.2.4
File Size Uploaded Provenance
singletonify-0.2.4.tar.gz 2.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for singletonify 0.2.4
File Interpreter ABI Platform
singletonify-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 5.4 kB

Release files / singletonify-0.2.4.tar.gz

Download URL singletonify-0.2.4.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
05be9f3eefc9dcd93fc18eabc72468f586a317af6b216a821e7a1f2ea351f26f
BLAKE2b-256 checksum
How to use checksums
9761b297dab1cca05651aac73e93fd6e8083ae08bab7b549cb2d3f0ce7e92111
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.3

Release files / singletonify-0.2.4-py3-none-any.whl

Download URL singletonify-0.2.4-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2508c0630611f72061bb396427c9a2932d9909cc07ebaa479edef01f64dab336
BLAKE2b-256 checksum
How to use checksums
4b317aa2ad2a40cada659a46ad2441de4bda08cc2385c40ce7886b976f59b2ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.3

Security for singletonify 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page