frame

The frame module contains the object structure for mapping AMQP Classes and Methods on to Python objects. In addition frame contains the Dispatcher class which steps through the synchronous receipt order of frames received for Basic.Deliver and Basic.GetOk.

Note

This class level documentation is not intended for use by those using Pika in their applications. This documentation is for those who are extending Pika or otherwise working on the driver itself.

Frame objects that do the frame demarshaling and marshaling.

Frame

class pika.frame.Frame(frame_type, channel_number)[source]

Base Frame object mapping. Defines a behavior for all child classes for assignment of core attributes and implementation of the a core _marshal method which child classes use to create the binary AMQP frame.

_marshal(pieces)[source]

Create the full AMQP wire protocol frame data representation

Return type:str
marshal()[source]

To be ended by child classes

:raises NotImplementedError

Method

class pika.frame.Method(channel_number, method)[source]

Base Method frame object mapping. AMQP method frames are mapped on top of this class for creating or accessing their data and attributes.

marshal()[source]

Return the AMQP binary encoded value of the frame

Return type:str

Body

class pika.frame.Body(channel_number, fragment)[source]

Body frame object mapping class. AMQP content body frames are mapped on to this base class for getting/setting of attributes/data.

marshal()[source]

Return the AMQP binary encoded value of the frame

Return type:str

ProtocolHeader

class pika.frame.ProtocolHeader(major=None, minor=None, revision=None)[source]

AMQP Protocol header frame class which provides a pythonic interface for creating AMQP Protocol headers

marshal()[source]

Return the full AMQP wire protocol frame data representation of the ProtocolHeader frame

Return type:str

Frame Decoding

pika.frame.decode_frame(data_in)[source]

Receives raw socket data and attempts to turn it into a frame. Returns bytes used to make the frame and the frame

Parameters:data_in (str) – The raw data stream
Return type:tuple(bytes consumed, frame)
Raises :pika.exceptions.InvalidFrameError

Project Versions

Table Of Contents

Previous topic

exceptions

Next topic

heartbeat

This Page