.. _output_handlers_ref: Output Handlers =============== Output handlers write the results of a run, apart from the attribution itself, just as input handlers read its inputs. ``main()`` passes every run's ``AttributionResult`` to its output handlers before it plots or serves the dashboard: by default an ``ExcelOutputHandler`` built from the configuration, which writes the :ref:`Excel report `. ``main(..., output_handlers=[...])`` replaces that list, and ``output_handlers=()`` writes nothing. A handler of your own subclasses ``OutputHandlerInterface`` and implements ``output_result(*, result)``. .. automodule:: kaxanuk.attribution_analysis.output_handlers.output_handler_interface :members: :show-inheritance: .. automodule:: kaxanuk.attribution_analysis.output_handlers.excel_output_handler :members: :show-inheritance: Excel report ------------ ``write_excel_report()`` builds the workbook the Excel handler writes. It is also exported from the package root (``from kaxanuk.attribution_analysis import write_excel_report``). .. automodule:: kaxanuk.attribution_analysis.output_handlers.excel_report :members: write_excel_report, FILE_NAME_SUFFIX, STATISTIC_FORMATS :show-inheritance: Report text ----------- Every word of the report lives in one module, so a report in another language is a translation of it, not a change to the builder. .. automodule:: kaxanuk.attribution_analysis.output_handlers.excel_report_text :members: