slickbet.pdf_export¶
PDF export for screener and backtest reports.
Builds printable A4 reports via ReportLab for screener predictions,
single-competition backtests, and multi-league aggregated backtests.
Output defaults to assets/predictions/ unless a custom path is given.
Functions¶
|
Export aggregated backtest results (from backtest-all) to a PDF file. |
|
Export backtest results to a PDF file. |
|
Export screener results to a PDF file. |
|
Get the full path for PDF output, creating directory if needed. |
Module Contents¶
- slickbet.pdf_export.export_backtest_all_to_pdf(league_summaries: list[dict[str, Any]], all_results: list[Any], league_type: str, weeks: int, output_path: str | None = None) str[source]¶
Export aggregated backtest results (from backtest-all) to a PDF file.
- Parameters:
league_summaries (list[dict]) – List of league summary dictionaries
all_results (list) – List of all prediction results
league_type (str) – Type of leagues tested (e.g., “major European”, “Persian Gulf”)
weeks (int) – Number of weeks tested
output_path (str or None, optional) – Optional output file path. If None, generates a filename.
- Returns:
str – Path to the generated PDF file
- slickbet.pdf_export.export_backtest_to_pdf(results: slickbet.backtest.BacktestResults, output_path: str | None = None) str[source]¶
Export backtest results to a PDF file.
- Parameters:
results (BacktestResults) – The backtest results
output_path (str or None, optional) – Optional output file path. If None, generates a filename.
- Returns:
str – Path to the generated PDF file
- slickbet.pdf_export.export_screener_to_pdf(result: slickbet.screener.ScreenerResult, predictions: list[slickbet.screener.BetPrediction], output_path: str | None = None) str[source]¶
Export screener results to a PDF file.
- Parameters:
result (ScreenerResult) – The screener result
predictions (list[BetPrediction]) – List of predictions to include
output_path (str or None, optional) – Optional output file path. If None, generates a filename.
- Returns:
str – Path to the generated PDF file
- slickbet.pdf_export.get_pdf_output_path(filename: str, output_path: str | None = None) str[source]¶
Get the full path for PDF output, creating directory if needed.
- Parameters:
filename (str) – Default filename if output_path is None
output_path (str or None, optional) – Optional custom output path (can be file or directory)
- Returns:
str – Full path to the PDF file