ezmsg.qt.adapter#

TransformerAdapter - Wrap ezmsg-baseproc transformers as ez.Unit.

Classes

class TransformerAdapter(transformer)[source]#

Bases: Unit

Wraps a BaseProcessor instance as an ez.Unit.

This adapter allows ezmsg-baseproc processors (BaseTransformer, etc.) to be used in ProcessorGraph alongside native ez.Unit classes.

Mirrors key features of BaseTransformerUnit: - zero_copy=True for performance with large messages - Compatible with ezmsg’s pub/sub system

Note: This adapter does not support runtime settings updates. The transformer should be fully configured before being passed.

Parameters:

transformer (Any)

INPUT = InputStream:unlocated[Any]()#
OUTPUT = OutputStream:unlocated[Any](self.num_buffers=32, self.force_tcp=None, self.allow_local=None)#
__init__(transformer)[source]#

Create an adapter wrapping a transformer instance.

Parameters:

transformer (Any) – A BaseProcessor instance (or similar) with __acall__ method.

async process(msg)[source]#

Process incoming messages through the wrapped transformer.

Return type:

AsyncGenerator

Parameters:

msg (Any)