DataBody Class

An AMQP message body of type Data. This represents a list of bytes sections.

Inheritance
DataBody

Constructor

DataBody(c_message, encoding='UTF-8')

Parameters

c_message
encoding
default value: UTF-8

Variables

type
MessageBodyType

The body type. This should always be DataType.

data
<xref:Generator>[bytes]

The data contained in the message body. This returns a generator to iterate over each section in the body, where each section will be a byte string.

Methods

append

Append a section to the body.

append

Append a section to the body.

append(data)

Parameters

data
str or bytes
Required

The data to append.

Attributes

data