Skip to main content

jk_oop

Introduction

A python module to assist with special object oriented aspects.

Information about this module can be found here:

How to use this module

Import

To import this module use the following statement:

import jk_oop

The Classes

Singleton (for inheritance)

This class implements a singleton with a static instantiation method.

Example:

class MySingleton(jk_oop.Singleton):

	__slots__ = (
		"value",
	)

	@jk_typing.checkFunctionSignature()
	def __initialize(self, someValue:int):
		print("Initializing MySingleton")
		self.value = someValue
	#

#

Usage:

# first use with initialization
myInst = MySingleton.getInstance(42)

# same use later
myInst = MySingleton.getInstance()

SingletonMeta (as metaclass)

This class implements a singleton. Initialization is done via constructor.

Example:

class MySingleton(metaclass=jk_oop.SingletonMeta):

	__slots__ = (
		"value",
	)

	@jk_typing.checkFunctionSignature()
	def __init__(self, someValue:int):
		print("Initializing MySingleton")
		self.value = someValue
	#

#

Usage:

# first use with initialization
myInst = MySingleton(42)

# same use later
myInst = MySingleton()

Author(s)

License

This software is provided under the following license:

  • Apache Software License 2.0

Metadata

Release files for jk_oop 0.2026.6.25

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

Source distribution (sdist)

Source distribution for jk_oop 0.2026.6.25
File Size Uploaded
jk_oop-0.2026.6.25.tar.gz 6.1 kB Details

Built distribution (wheel)

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

Total release size: 13.3 kB

Release files / jk_oop-0.2026.6.25.tar.gz

Download URL jk_oop-0.2026.6.25.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6241ff4f0449829d6e94bbf840284d9d586b5b2a5d53d6fe7f4b121760e528d1
BLAKE2b-256 checksum
How to use checksums
78ae2d3891b0df89dbf27f17f389c13c1363bae33d8957844191ff7b64e74ebd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Release files / jk_oop-0.2026.6.25-py3-none-any.whl

Download URL jk_oop-0.2026.6.25-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc8f31c73d56797b89f23c91bcc897eb177c72a105e0aab4b0d21621a04c608c
BLAKE2b-256 checksum
How to use checksums
086706ff8ba14d7b197b67ade37ebb28f73862724f4fbf1a9490498c55fb17a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Release history Release notifications | RSS feed

This release

0.2026.6.25 This release

2 release files

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