@James O'Claire check Druid rollups
https://druid.apache.org/docs/latest/ingestion/rollup
It allows aggregations at ingestion time (counts, min/max, sum, quantiles), so it might even eliminate your need for a Python processing.
Pre-aggregating live data at ingestion time is a great use case of Druid.