Output Functions: Writing the Data Out
These functions can be imported from the ppc_robot_lib.reporting.output
module.
Writing Spreadsheets
- write_tables(tables)[source]
Writes collection of tables as a spreadsheet (Excel), or writes them to external service (Google Sheets). It prepares all the data, loads previously stored state, and delegates the output process to a specified adapter.
After the adapter completes (or fails with an exception), state is stored for further use for the current job.
This function can be called multiple times in a single report. You can
Notifications
- emit_notification(data: dict | str | NotificationData | NotificationException | type[NotificationException] | Callable[[...], NotificationException], *, text: str | None = None, code: int | None = None, category: int | None = None, score: int | None = None, text_plural: str | None = None, text_localized: bool | None = None, text_number: int | None = None, text_params: dict[str, Any] | list[Any] | None = None, level: NotificationLevel | None = None, details_table: DataFrame | None = None, entity_id_column: str | None = None)
In current task context emit a
Notification
.Note: Use aliases:
emit_error_notification
,emit_warning_notification
andemit_info_notification
, which explicitly defines notification level.