kaskada.formatters

Module Contents

Functions

in_ipython()

Checks to see if running in an iPython environment

get_query_response_content(resp_obj)

generic_response_html_formatter(obj)

query_resource_response_html_formatter(obj)

generic_object_html_formatter(obj)

schema_html_formatter(obj)

data_type_html_formatter(obj)

response_delete_html_formatter(del_resp)

response_list_html_formatter(list_resp)

response_list_queries_html_formatter(list_resp)

proto_list_html_formatter(list_resp)

slice_request_html_formatter(obj)

query_metrics_html_formatter(obj)

query_response_html_formatter(obj)

query_v2_response_html_formatter(obj)

fenlmagic_query_result_html_formatter(obj)

entity_filter_html_formatter(obj)

analysis_html_formatter(obj)

fenl_diagnostics_html_formatter(obj)

convert_df_to_domonic(df[, max_rows, show_dimensions])

tab_panel(content_list[, title_to_set_active])

Creates a tab-panel for the passed content list.

output_custom_css_and_javascript()

Outputs our custom css and javascript to the current cell

cell_output_is_wrapped_in_iframe()

Based on the environment that the code is running inside of, the cell output may be

output_custom_css_and_javascript_if_output_wrapped_in_iframe()

Outputs our custom css and javascript to the cell output if the output for the cell

try_init()

Attributes

_LOGGER

_LOGGER[source]
in_ipython()[source]

Checks to see if running in an iPython environment

Return type:

bool

get_query_response_content(resp_obj)[source]
generic_response_html_formatter(obj)[source]
query_resource_response_html_formatter(obj)[source]
generic_object_html_formatter(obj)[source]
schema_html_formatter(obj)[source]
data_type_html_formatter(obj)[source]
response_delete_html_formatter(del_resp)[source]
response_list_html_formatter(list_resp)[source]
response_list_queries_html_formatter(list_resp)[source]
proto_list_html_formatter(list_resp)[source]
slice_request_html_formatter(obj)[source]
query_metrics_html_formatter(obj)[source]
query_response_html_formatter(obj)[source]
query_v2_response_html_formatter(obj)[source]
fenlmagic_query_result_html_formatter(obj)[source]
entity_filter_html_formatter(obj)[source]
analysis_html_formatter(obj)[source]
fenl_diagnostics_html_formatter(obj)[source]
convert_df_to_domonic(df, max_rows=None, show_dimensions=False)[source]
tab_panel(content_list, title_to_set_active='')[source]

Creates a tab-panel for the passed content list.

Parameters:
  • content_list (list of tuple of (str, Any)) – A list of tuples, where the the first value

  • title (in the tuple is the tab) –

  • contents. (and the second is the tab) –

  • str (title_to_set_active) – The name of the tab title to set active when the panel loads. If

  • unset

  • active. (the first tab will be set) –

Returns:

A div html element wrapping the tabs and content. Pass this value to str() to get the string html output.

Return type:

domonic.html.div

output_custom_css_and_javascript()[source]

Outputs our custom css and javascript to the current cell

cell_output_is_wrapped_in_iframe()[source]

Based on the environment that the code is running inside of, the cell output may be automatically wrapped in an iFrame. For example, in google colab: “the output of each cell is hosted in a separate iframe sandbox with limited access to the global notebook environment” In enviroments like these, we need to include our custom css & javascript in every output.

Returns:

True if the environment will automatically wrap the cell output in an iFrame, otherwise False.

Return type:

bool

output_custom_css_and_javascript_if_output_wrapped_in_iframe()[source]

Outputs our custom css and javascript to the cell output if the output for the cell will be wrapped in an iFrame. (i.e. in google colab)

try_init()[source]