pamqp.decode¶
Functions for decoding data of various types including field tables and arrays
-
pamqp.decode.
by_type
(value, data_type, offset=0)[source]¶ Decodes values using the specified type
- Parameters
- Return type
- Raises
ValueError – when the data type is unknown
-
pamqp.decode.
bit
(value, position)[source]¶ Decode a bit value, returning bytes consumed and the value.
-
pamqp.decode.
boolean
(value)[source]¶ Decode a boolean value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
byte_array
(value)[source]¶ Decode a byte_array value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
decimal
(value)[source]¶ Decode a decimal value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
double
(value)[source]¶ Decode a double value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
floating_point
(value)[source]¶ Decode a floating point value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
long_int
(value)[source]¶ Decode a long integer value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
long_uint
(value)[source]¶ Decode an unsigned long integer value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
long_long_int
(value)[source]¶ Decode a long-long integer value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
long_str
(value)[source]¶ Decode a string value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
octet
(value)[source]¶ Decode an octet value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
short_int
(value)[source]¶ Decode a short integer value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
short_uint
(value)[source]¶ Decode an unsigned short integer value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
short_short_int
(value)[source]¶ Decode a short-short integer value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
short_short_uint
(value)[source]¶ Decode a unsigned short-short integer value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
short_str
(value)[source]¶ Decode a string value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
timestamp
(value)[source]¶ Decode a timestamp value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
embedded_value
(value)[source]¶ Dynamically decode a value based upon the starting byte
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
field_array
(value)[source]¶ Decode a field array value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked
-
pamqp.decode.
field_table
(value)[source]¶ Decode a field array value, returning bytes consumed and the value.
- Parameters
value (
bytes
) – The binary value to decode- Return type
- Raises
ValueError – when the binary data can not be unpacked