zoonado.protocol.part
¶zoonado.protocol.part.
Part
(**kwargs)[source]¶Composable building block used to define Zookeeper protocol parts.
Behaves much like the Primitive
class but has named “sub parts”
stored in a parts
class attribute, that can hold any Part
or
Primitive
subclass.
render
(parts=None)[source]¶Returns a two-element tuple with the struct
format and values.
Iterates over the applicable sub-parts and calls render()
on them,
accumulating the format string and values.
Optionally takes a subset of parts to render, default behavior is to render all sub-parts belonging to the class.