Skip to content

Case study

Market data collector and sheet writer

Collects market data on a schedule and writes it straight into Google Sheets, so the analysis lives in the tool the client already used rather than in a file to import.

Overview

Market data, collected on a schedule, written directly into a Google Sheet. The delivery target is the point: the people using it already worked in spreadsheets, so the data arrives where the work happens instead of as a file somebody has to remember to import.

Complexities tackled

Writing into a live sheet is not writing a file. A sheet someone else has open has formulas, formatting and a cursor in it. Appending has to preserve what is there, which means writing ranges deliberately rather than replacing content, and batching updates rather than making a call per row.

Scheduled collection needs to be idempotent. A run that fires twice, or reruns after a failure, must not produce duplicate rows. Keying on the period being collected rather than on append order is what makes a rerun safe.

Stack

Python for collection, the Google Sheets API for delivery, run on a schedule.

Working on something similar?

Tell me what you are building and what is in the way. I will tell you honestly whether I am the right person for it.

Start a conversation

Last updated: