Skip to main content

Object Registry

Keep track of all instantiated objects of a class.

Installation

pip install object-registry

Getting started

For any class whose objects you want to track, inherit from ObjectRegistry upon definition.

from object_registry import ObjectRegistry

class MyClass(ObjectRegistry): ...

Instantiate objects of the derived class as usual. Each object will be automatically added to the registry.

obj = MyClass()

Use from_id to retrieve an object by its Python object ID.

object_id = id(obj)
retrieved_obj = MyClass.from_id(object_id)

Download files

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

Source Distribution

object_registry-0.3.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

object_registry-0.3.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file object_registry-0.3.0.tar.gz.

File metadata

  • Download URL: object_registry-0.3.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for object_registry-0.3.0.tar.gz
Algorithm Hash digest
SHA256 fdd58a824bc7b873fd156f11891933ef6fd6f9e6df0a3b90dc6898827b092d78
MD5 506f372210f97a66454ddf2b1dea635d
BLAKE2b-256 f689e03d6e99776981b23d66c02aa1a6c1cac77d37fffaa1a8e698c7631224b4

See more details on using hashes here.

File details

Details for the file object_registry-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for object_registry-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78fa638537fcedb1543cd9d6867482e6f1f952edd0c20ed8a95107fe49b4f489
MD5 7d53f05b5b3224b06b70a93b32fcf6d3
BLAKE2b-256 a9dd3b592ffbcd06c6bf8ac6613f6a9f2de068aaf133af83766a5c2b94ac91ea

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

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