QueueMessageFormat class

Definition

Encoding and decoding methods which can be used to modify how the queue service encodes and decodes queue messages. Set these to queueservice.encode_function and queueservice.decode_function to modify the behavior. The defaults are text_xmlencode and text_xmldecode, respectively.

Inheritance
builtins.object
QueueMessageFormat

Methods

binary_base64decode

Base64 decode to byte string.

binary_base64encode

Base64 encode byte strings.

nodecode

Do no decoding.

noencode

Do no encoding.

text_base64decode

Base64 decode to unicode text.

text_base64encode

Base64 encode unicode text.

text_xmldecode

XML decode to unicode text.

text_xmlencode

XML encode unicode text.

binary_base64decode

Base64 decode to byte string.

binary_base64decode(data)

Parameters

data
str
Required

Data to decode to a byte string.

Returns

Base64 decoded data.

Return type

str

binary_base64encode

Base64 encode byte strings.

binary_base64encode(data)

Parameters

data
str
Required

Binary string to encode.

Returns

Base64 encoded data.

Return type

str

nodecode

Do no decoding.

nodecode(data)

Parameters

data
str
Required

Data.

Returns

The data passed in is returned unmodified.

Return type

str

noencode

Do no encoding.

noencode(data)

Parameters

data
str
Required

Data.

Returns

The data passed in is returned unmodified.

Return type

str

text_base64decode

Base64 decode to unicode text.

text_base64decode(data)

Parameters

data
str
Required

String data to decode to unicode.

Returns

Base64 decoded string.

Return type

str

text_base64encode

Base64 encode unicode text.

text_base64encode(data)

Parameters

data
str
Required

String to encode.

Returns

Base64 encoded string.

Return type

str

text_xmldecode

XML decode to unicode text.

text_xmldecode(data)

Parameters

data
str
Required

Data to decode to unicode.

Returns

XML decoded data.

Return type

str

text_xmlencode

XML encode unicode text.

text_xmlencode(data)

Parameters

data
str
Required

Unicode string to encode

Returns

XML encoded data.

Return type

str