API Reference¶
-
class
sprockets.mixins.avro.
Decoder
¶ Mix this in over a rejected Consumer for avro deserialization.
This mix-in implements the
body
property that will automatically deserialize avro datum values using a provided schema. You are required to implement theget_avro_schema()
method so that it returns the appropriateavro.schema.Schema
instance for this message type.See also:
rejected.consumer.Consumer
andrejected.consumer.SmartConsumer
-
body
¶ Return the fully deserialized message body.
-
get_avro_schema
()¶ Return the avro schema to use for this message.
Returns: the avro schema instance appropriate to this message Return type: avro.schema.Schema
-