pamqp.body
pamqp.body
The :py:mod:pamqp.body module contains the :py:class: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.
ContentBody
ContentBody carries the value for an AMQP message body frame
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
bytes
|
The value for the ContentBody frame |
required |
Source code in pamqp/body.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
__init__(value)
Create a new instance of a ContentBody object
Source code in pamqp/body.py
21 22 23 | |
__len__()
Return the length of the content body value
Source code in pamqp/body.py
25 26 27 | |
marshal()
Return the marshaled content body. This method is here for API compatibility, there is no special marshaling for the payload in a content frame.
Source code in pamqp/body.py
29 30 31 32 33 34 35 | |
unmarshal(data)
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:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
The content body data from the frame |
required |
Source code in pamqp/body.py
37 38 39 40 41 42 43 44 45 | |