Skip to main content
Version: dev 🚧

avro_decoder

avro_decoder​

View source
avro_decoder(
raw_msg, cls
)

Decoder to decode avro encoded messages to pydantic model instance

Parameters:

NameTypeDescriptionDefault
raw_msgbytesAvro encoded bytes message received from Kafka topicrequired
clsType[pydantic.main.BaseModel]Pydantic class; This pydantic class will be used to construct instance of same classrequired

Returns:

TypeDescription
AnyAn instance of given pydantic class