Skip to content

Ellipsize with style

Ellipsizes large Python objects to enhance output readability.

Useful for AWS outputs and similar data. Prevents printing excessive text.

config ellipsized with ellipsize(config, max_items_to_show=1, max_item_length=16)
```json
{
  "bounce_delay": 5,
 "credentials_file_name": "amazon-dash-p..",
 "dashboards": {"anna_english": {"absent": [{"image_grid": "amazon-dash-p..",
                                             "image_plot": "amazon-dash-p..",
                                             "summary": "Sick"},
                                            ..],
                                 "empty_image": "amazon-dash-p..",
                                 "summary": "Anna English"},
 "events": {"__DEFAULT__": {"actions": [{"autoclose": 10800,
                                         "default": 900,
                                         "type": "sheet"},
                                        ..],
                            "summary": "{button}"},
            "white": {"actions": [{"autoclose": 10800,
                                   "default": 900,
                                   "type": "sheet"},
                                  ..],
                      "summary": [{"before": "12:00:00",
                                   "image": "amazon-dash-p..",
                                   "summary": "Morning work-out"},
                                  ..]}},
 "latitude": "60.002228",
 "longitude": "30.296947",
 "openweathermap_key_file_name": "amazon-dash-p.."
}