add PDF export (FR10)

pdf_export.py builds a PDF report (summary stats, AGP chart, hypo/hyper
event summaries) via fpdf2 + matplotlib rather than plotly's kaleido, to
avoid bundling a Chromium build into the image just for this. The Export
page lets the user pick which sections to include and a date range, then
download the result to send to the hospital team.

This completes all ten functional requirements in
docs/requirements-reporting.md.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
2026-07-26 21:10:46 +02:00
co-authored by Claude Sonnet 5
parent 9929f44daa
commit fe6a471f17
4 changed files with 229 additions and 0 deletions
+2
View File
@@ -3,5 +3,7 @@ pandas>=2.2,<3.0
requests>=2.32,<3.0
plotly>=5.24,<6.0
python-dotenv>=1.0,<2.0
matplotlib>=3.9,<4.0
fpdf2>=2.7,<3.0
pytest>=8.0,<9.0
ruff>=0.6,<1.0