titus.datatype.AvroRecord

class titus.datatype.AvroRecord(fields, name=None, namespace=None)[source]

Bases: titus.datatype.AvroContainer, titus.datatype.AvroMapping, titus.datatype.AvroCompiled

Avro “record” type for inhomogeneous collections of named (and required) fields.

__init__(fields, name=None, namespace=None)

Create an AvroRecord manually.

Parameters:
  • fields (list of titus.datatype.AvroField) – field names and types in order
  • name (string or NoneType) – name or an auto-generated name
  • namespace (string or NoneType) – namespace or no namespace
field(name)

Get one titus.datatype.AvroField object by name.

fields

Get the fields as a list of titus.datatype.AvroField objects.

fieldsDict

Get the fields as a dict from field names to titus.datatype.AvroField objects.

jsonNode(memo)