jangada.serialization.SerializableMetatype.__getitem__#

SerializableMetatype.__getitem__(qualname: str) Type[Serializable]#

Get a registered Serializable subclass by qualified name.

Parameters:
qualnamestr

The fully qualified name of the class (e.g., ‘module.ClassName’).

Returns:
Type[Serializable]

The registered class.

Raises:
KeyError

If the qualified name is not registered or if called on a subclass instead of the Serializable base.

Notes

This method only works on the Serializable base class itself, not on subclasses. Attempting to use subscript notation on a subclass will raise a KeyError.

Examples

>>> class MyClass(Serializable):
...     pass
>>> qualname = get_full_qualified_name(MyClass)
>>> retrieved = Serializable[qualname]
>>> retrieved is MyClass
True