Common Parsing Utilities

Common Response

class CommonResponse(raw_response)

Base class for V1 & V2 responses.

Parameters:

raw_response (dict[str, Any])

property raw_http: str

Displays the result of the raw response as json string.

String Dict

StringDict

Basic JSON-compliant python dictionary.

Summary Helper

clean_out_string(out_string)

Clean up the string representation.

Return type:

str

Parameters:

out_string (str)

format_for_display(out_string=None, max_col_size=None)

Truncates line-items to the max width of their corresponding column.

Return type:

str

Parameters:
  • out_string (str | None)

  • max_col_size (int | None)

line_separator(column_sizes, separator)

Adds custom separators for console display in line-items-like fields.

Return type:

str

Parameters:
  • column_sizes (list[int])

  • separator (str)