cli_proton_python.formatter module¶
Clients output formatter module
-
class
cli_proton_python.formatter.
Formatter
(message)[source]¶ Bases:
object
Output formatter class for clients
-
static
format_dict
(in_data)[source]¶ formats dictionary
Parameters: in_data (dict) – input data Returns: input data string formated as dict Return type: str
-
static
format_float
(in_data)[source]¶ formats float value
Parameters: in_data (float) – input data Returns: input data string formated as float Return type: str
-
static
format_int
(in_data)[source]¶ formats integer value
Parameters: in_data (int, long) – input data Returns: input data string formated as int Return type: str
-
static
format_list
(in_data)[source]¶ formats list
Parameters: in_data (list) – input data Returns: input data string formated as list Return type: str
-
static
format_object
(in_data)[source]¶ formats general object
Parameters: in_data (None, bool, int, long, float, dict, list, str, unicode, bytes) – input data Returns: input data converted to string Return type: str
-
static
format_string
(in_data)[source]¶ formats string
Parameters: in_data (str, unicode, bytes) – input data Returns: input data string formated as string Return type: str
-
print_error
()[source]¶ print error information
Returns: prefix message with string indicating error Return type: str
-
print_message
()[source]¶ prints message in default upstream format
Returns: message to be printed in upstream format Return type: str
-
print_message_as_dict
()[source]¶ prints message in python dictionary form
Returns: message to be printed in dictionary format Return type: str
-
print_message_as_interop
()[source]¶ Print message in AMQP interoperable format
Returns: message to be printed in interoperable format Return type: str
-
print_message_as_json
()[source]¶ Print message in JSON form
Returns: message to be printed in JSON form Return type: str
-
static