Python for the data job, and the boundary that is a file

A weekly analysis is a better fit for pandas than for PHP, and the integration should be the narrowest thing that works.

the boundary that works:
  PHP writes a CSV to object storage and emits an event
  Python reads it, writes a result CSV, emits an event
  PHP reads the result

what this avoids:
  a shared database schema
  a shared ORM model in two languages
  a deployment order between them

what it costs: latency, and a file format nobody owns.

A file with a documented schema is a weaker coupling than a shared table and is much easier to reason about during an incident, because the artefact is inspectable. The failure mode is the format drifting silently — a column added on one side and ignored on the other — so a header check on read is worth the six lines. The latency is real and is the reason this suits batch work and nothing interactive.