Skip to main content

Singleton Metaclass for comfy imports

Project description

PySingletonMeta

A lightweight singleton metaclass for clean and comfy imports.


Installation

pip install PySingletonMeta

Example

from pysingletonmeta import SingletonMeta

class StreamingService(metaclass=SingletonMeta):
    pass

a = StreamingService()
b = StreamingService()

assert a is b  # True

That’s all you need.

Project details


Download files

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

Source Distribution

pysingletonmeta-0.1.0.3.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file pysingletonmeta-0.1.0.3.tar.gz.

File metadata

  • Download URL: pysingletonmeta-0.1.0.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for pysingletonmeta-0.1.0.3.tar.gz
Algorithm Hash digest
SHA256 d991b8986feb8513f1ae31115e16760582e640e44e725d54a19f39ec97e01566
MD5 98aa84cd92538d2953130ad15563de00
BLAKE2b-256 7a08a03706ff2aaf82ad64f2caacb4cb4123cb714a727e77ee3dd24216b85e3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page