zospy.api.codecs.try_register_encoder

zospy.api.codecs.try_register_encoder#

zospy.api.codecs.try_register_encoder(encoder: Type[Python.Runtime.IPyObjectEncoder]) None#

Register encoder as Python.NET codec.

Parameters:
encoderType[Python.Runtime.IPyObjectEncoder]

A class implementing Python.Runtime.IPyObjectEncoder. The most viable way to do this from Python is creating a subclass of Python.Runtime.Codecs.RawProxyEncoder.

Raises:
TypeError

If the encoder cannot be registered because it is not of the correct type.