# pamqp.body

The `pamqp.body` module contains the `Body` class which is used when unmarshalling body frames. When dealing with content frames, the message body will be returned from the library as an instance of the body class.

class pamqp.body.ContentBody(value: bytes)

  ContentBody carries the value for an AMQP message body frame

  Parameters

    value – The value for the ContentBody frame

  __init__(value: bytes)

    Create a new instance of a ContentBody object

  __len__() → int

    Return the length of the content body value

  marshal() → bytes

    Return the marshaled content body. This method is here for API compatibility, there is no special marshaling for the payload in a content frame.

  unmarshal(data: bytes) → None

    Apply the data to the object. This method is here for API compatibility, there is no special unmarshalling for the payload in a content frame.

    Parameters

      data – The content body data from the frame

  __weakref__

    list of weak references to the object (if defined)