pika.spec

AMQP Specification

This module implements the constants and classes that comprise AMQP protocol level constructs. It should rarely be directly referenced outside of Pika’s own internal use. .. note:: Auto-generated code by codegen.py, do not edit directly. Pull requests to this file without accompanying utils/codegen.py changes will be rejected.

class pika.spec.Connection[source]
INDEX: int | None = 10
NAME: str = 'Connection'
class Start(version_major=0, version_minor=9, server_properties=None, mechanisms='PLAIN', locales='en_US')[source]
INDEX: int | None = 655370
NAME: str = 'Connection.Start'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class StartOk(client_properties=None, mechanism='PLAIN', response=None, locale='en_US')[source]
INDEX: int | None = 655371
NAME: str = 'Connection.StartOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Secure(challenge=None)[source]
INDEX: int | None = 655380
NAME: str = 'Connection.Secure'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class SecureOk(response=None)[source]
INDEX: int | None = 655381
NAME: str = 'Connection.SecureOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Tune(channel_max=0, frame_max=0, heartbeat=0)[source]
INDEX: int | None = 655390
NAME: str = 'Connection.Tune'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class TuneOk(channel_max=0, frame_max=0, heartbeat=0)[source]
INDEX: int | None = 655391
NAME: str = 'Connection.TuneOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Open(virtual_host='/', capabilities='', insist=False)[source]
INDEX: int | None = 655400
NAME: str = 'Connection.Open'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class OpenOk(known_hosts='')[source]
INDEX: int | None = 655401
NAME: str = 'Connection.OpenOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Close(reply_code=None, reply_text='', class_id=None, method_id=None)[source]
INDEX: int | None = 655410
NAME: str = 'Connection.Close'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class CloseOk[source]
INDEX: int | None = 655411
NAME: str = 'Connection.CloseOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Blocked(reason='')[source]
INDEX: int | None = 655420
NAME: str = 'Connection.Blocked'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Unblocked[source]
INDEX: int | None = 655421
NAME: str = 'Connection.Unblocked'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class UpdateSecret(new_secret, reason)[source]
INDEX: int | None = 655430
NAME: str = 'Connection.UpdateSecret'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class UpdateSecretOk[source]
INDEX: int | None = 655431
NAME: str = 'Connection.UpdateSecretOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class pika.spec.Channel[source]
INDEX: int | None = 20
NAME: str = 'Channel'
class Open(out_of_band='')[source]
INDEX: int | None = 1310730
NAME: str = 'Channel.Open'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class OpenOk(channel_id='')[source]
INDEX: int | None = 1310731
NAME: str = 'Channel.OpenOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Flow(active=None)[source]
INDEX: int | None = 1310740
NAME: str = 'Channel.Flow'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class FlowOk(active=None)[source]
INDEX: int | None = 1310741
NAME: str = 'Channel.FlowOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Close(reply_code=None, reply_text='', class_id=None, method_id=None)[source]
INDEX: int | None = 1310760
NAME: str = 'Channel.Close'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class CloseOk[source]
INDEX: int | None = 1310761
NAME: str = 'Channel.CloseOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class pika.spec.Access[source]
INDEX: int | None = 30
NAME: str = 'Access'
class Request(realm='/data', exclusive=False, passive=True, active=True, write=True, read=True)[source]
INDEX: int | None = 1966090
NAME: str = 'Access.Request'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class RequestOk(ticket=1)[source]
INDEX: int | None = 1966091
NAME: str = 'Access.RequestOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class pika.spec.Exchange[source]
INDEX: int | None = 40
NAME: str = 'Exchange'
class Declare(ticket=0, exchange=None, type=ExchangeType.direct, passive=False, durable=False, auto_delete=False, internal=False, nowait=False, arguments=None)[source]
INDEX: int | None = 2621450
NAME: str = 'Exchange.Declare'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class DeclareOk[source]
INDEX: int | None = 2621451
NAME: str = 'Exchange.DeclareOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Delete(ticket=0, exchange=None, if_unused=False, nowait=False)[source]
INDEX: int | None = 2621460
NAME: str = 'Exchange.Delete'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class DeleteOk[source]
INDEX: int | None = 2621461
NAME: str = 'Exchange.DeleteOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Bind(ticket=0, destination=None, source=None, routing_key='', nowait=False, arguments=None)[source]
INDEX: int | None = 2621470
NAME: str = 'Exchange.Bind'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class BindOk[source]
INDEX: int | None = 2621471
NAME: str = 'Exchange.BindOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Unbind(ticket=0, destination=None, source=None, routing_key='', nowait=False, arguments=None)[source]
INDEX: int | None = 2621480
NAME: str = 'Exchange.Unbind'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class UnbindOk[source]
INDEX: int | None = 2621491
NAME: str = 'Exchange.UnbindOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class pika.spec.Queue[source]
INDEX: int | None = 50
NAME: str = 'Queue'
class Declare(ticket=0, queue='', passive=False, durable=False, exclusive=False, auto_delete=False, nowait=False, arguments=None)[source]
INDEX: int | None = 3276810
NAME: str = 'Queue.Declare'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class DeclareOk(queue=None, message_count=None, consumer_count=None)[source]
INDEX: int | None = 3276811
NAME: str = 'Queue.DeclareOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Bind(ticket=0, queue='', exchange=None, routing_key='', nowait=False, arguments=None)[source]
INDEX: int | None = 3276820
NAME: str = 'Queue.Bind'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class BindOk[source]
INDEX: int | None = 3276821
NAME: str = 'Queue.BindOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Purge(ticket=0, queue='', nowait=False)[source]
INDEX: int | None = 3276830
NAME: str = 'Queue.Purge'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class PurgeOk(message_count=None)[source]
INDEX: int | None = 3276831
NAME: str = 'Queue.PurgeOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Delete(ticket=0, queue='', if_unused=False, if_empty=False, nowait=False)[source]
INDEX: int | None = 3276840
NAME: str = 'Queue.Delete'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class DeleteOk(message_count=None)[source]
INDEX: int | None = 3276841
NAME: str = 'Queue.DeleteOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Unbind(ticket=0, queue='', exchange=None, routing_key='', arguments=None)[source]
INDEX: int | None = 3276850
NAME: str = 'Queue.Unbind'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class UnbindOk[source]
INDEX: int | None = 3276851
NAME: str = 'Queue.UnbindOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class pika.spec.Basic[source]
INDEX: int | None = 60
NAME: str = 'Basic'
class Qos(prefetch_size=0, prefetch_count=0, global_qos=False)[source]
INDEX: int | None = 3932170
NAME: str = 'Basic.Qos'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class QosOk[source]
INDEX: int | None = 3932171
NAME: str = 'Basic.QosOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Consume(ticket=0, queue='', consumer_tag='', no_local=False, no_ack=False, exclusive=False, nowait=False, arguments=None)[source]
INDEX: int | None = 3932180
NAME: str = 'Basic.Consume'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class ConsumeOk(consumer_tag=None)[source]
INDEX: int | None = 3932181
NAME: str = 'Basic.ConsumeOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Cancel(consumer_tag=None, nowait=False)[source]
INDEX: int | None = 3932190
NAME: str = 'Basic.Cancel'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class CancelOk(consumer_tag=None)[source]
INDEX: int | None = 3932191
NAME: str = 'Basic.CancelOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Publish(ticket=0, exchange='', routing_key='', mandatory=False, immediate=False)[source]
INDEX: int | None = 3932200
NAME: str = 'Basic.Publish'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Return(reply_code=None, reply_text='', exchange=None, routing_key=None)[source]
INDEX: int | None = 3932210
NAME: str = 'Basic.Return'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Deliver(consumer_tag=None, delivery_tag=None, redelivered=False, exchange=None, routing_key=None)[source]
INDEX: int | None = 3932220
NAME: str = 'Basic.Deliver'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Get(ticket=0, queue='', no_ack=False)[source]
INDEX: int | None = 3932230
NAME: str = 'Basic.Get'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class GetOk(delivery_tag=None, redelivered=False, exchange=None, routing_key=None, message_count=None)[source]
INDEX: int | None = 3932231
NAME: str = 'Basic.GetOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class GetEmpty(cluster_id='')[source]
INDEX: int | None = 3932232
NAME: str = 'Basic.GetEmpty'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Ack(delivery_tag=0, multiple=False)[source]
INDEX: int | None = 3932240
NAME: str = 'Basic.Ack'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Reject(delivery_tag=None, requeue=True)[source]
INDEX: int | None = 3932250
NAME: str = 'Basic.Reject'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class RecoverAsync(requeue=False)[source]
INDEX: int | None = 3932260
NAME: str = 'Basic.RecoverAsync'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Recover(requeue=False)[source]
INDEX: int | None = 3932270
NAME: str = 'Basic.Recover'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class RecoverOk[source]
INDEX: int | None = 3932271
NAME: str = 'Basic.RecoverOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Nack(delivery_tag=0, multiple=False, requeue=True)[source]
INDEX: int | None = 3932280
NAME: str = 'Basic.Nack'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class pika.spec.Tx[source]
INDEX: int | None = 90
NAME: str = 'Tx'
class Select[source]
INDEX: int | None = 5898250
NAME: str = 'Tx.Select'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class SelectOk[source]
INDEX: int | None = 5898251
NAME: str = 'Tx.SelectOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Commit[source]
INDEX: int | None = 5898260
NAME: str = 'Tx.Commit'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class CommitOk[source]
INDEX: int | None = 5898261
NAME: str = 'Tx.CommitOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class Rollback[source]
INDEX: int | None = 5898270
NAME: str = 'Tx.Rollback'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class RollbackOk[source]
INDEX: int | None = 5898271
NAME: str = 'Tx.RollbackOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class pika.spec.Confirm[source]
INDEX: int | None = 85
NAME: str = 'Confirm'
class Select(nowait=False)[source]
INDEX: int | None = 5570570
NAME: str = 'Confirm.Select'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class SelectOk[source]
INDEX: int | None = 5570571
NAME: str = 'Confirm.SelectOk'
property synchronous

Returns True when the argument is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

decode(encoded, offset=0)[source]

Decode the method from a binary format.

Parameters:
  • encoded (bytes) – The encoded method data

  • offset (int) – The offset to start decoding from

Return type:

Method

encode()[source]

Encode the method into a binary format.

Return type:

List[bytes]

get_body() bytes

Return the message body if it is set.

Return type:

str|unicode

get_properties() Properties

Return the properties if they are set.

Return type:

pika.frame.Properties

class pika.spec.BasicProperties(content_type=None, content_encoding=None, headers=None, delivery_mode=None, priority=None, correlation_id=None, reply_to=None, expiration=None, message_id=None, timestamp=None, type=None, user_id=None, app_id=None, cluster_id=None)[source]
CLASS

alias of Basic

INDEX: int | None = 60
NAME: str = 'BasicProperties'
FLAG_CONTENT_TYPE = 32768
FLAG_CONTENT_ENCODING = 16384
FLAG_HEADERS = 8192
FLAG_DELIVERY_MODE = 4096
FLAG_PRIORITY = 2048
FLAG_CORRELATION_ID = 1024
FLAG_REPLY_TO = 512
FLAG_EXPIRATION = 256
FLAG_MESSAGE_ID = 128
FLAG_TIMESTAMP = 64
FLAG_TYPE = 32
FLAG_USER_ID = 16
FLAG_APP_ID = 8
FLAG_CLUSTER_ID = 4
decode(encoded, offset=0)[source]
encode()[source]
pika.spec.has_content(methodNumber)[source]