Health-Sync: How I Automated My Nutrition and Sports Tracking with Python and Obsidian
Since early 2025 I’ve been using Obsidian as my central hub for daily planning: training schedules, study blocks, nutrition targets, and reflections all live in structured daily notes. The system works well for planning, but tracking actual performance was still a manual process, copying numbers from Eetmeter, scrolling through Strava, pasting into markdown tables. It took time and was often incomplete.
So I built health-sync: a Python CLI tool that pulls data from the Eetmeter API (Voedingscentrum) and the Strava API, and writes it directly into my Obsidian vault.
What it does
Health-sync fetches two types of data:
Nutrition (Eetmeter): Daily macro intake broken down by meal (breakfast, lunch, dinner, snacks), with a comparison against my kcal and protein targets:
| Maaltijd | Kcal | Eiwit (g) | Vet (g) | KH (g) |
|------------|----------|-----------|---------|--------|
| Ontbijt | 484 | 13 | 20 | 59 |
| Lunch | 813 | 41 | 40 | 66 |
| Avondeten | 750 | 23 | 31 | 88 |
| Tussendoor | 421 | 17 | 7 | 69 |
| Totaal | 2468 | 95 | 97 | 282 |
Target vs werkelijk: 2468/3350 kcal (74%), Eiwit 95/150g (63%)
Sports (Strava): All activities for the day with distance, pace, elevation, calories, and gear:
Trailrun — 13,83 km — 1:41:54 — 7:22 /km
Hoogte 468 m | Calorieën 1.216 | Schoenen: Kiprun fast 2
Both sections are inserted into existing daily notes using invisible HTML comment markers. This makes the process idempotent, running the tool twice produces exactly the same result, and it never touches content outside its own markers.
Weekly reflections get a summary table with daily macros and a protein target check across all seven days.
The feedback loop
What makes this useful is the combination with my daily note workflow. Each morning I generate a daily note with planned training, calculated nutrition targets (based on activity level), and study blocks. At the end of the day, or the next morning, health-sync fills in the actuals.
This creates a simple feedback loop:
- Plan: daily note with targets (kcal, protein, training)
- Execute: log food in Eetmeter, activities tracked via Strava
- Review: health-sync writes actuals next to targets
- Reflect: weekly reflection shows patterns (am I consistently hitting protein targets? how’s my training volume?)
The weekly overview is particularly valuable. Seeing seven days side by side makes trends visible that individual days don’t reveal, like consistently undershooting protein on rest days, or a pattern of higher calorie intake mid-week.
Technical details
Health-sync is written in Python and uses:
- requests for the Eetmeter API (undocumented, reverse-engineered)
- stravalib for the Strava API (OAuth2 with automatic token refresh)
- Idempotent markdown manipulation with HTML comment markers invisible in Obsidian reading mode
Usage is straightforward:
# Sync today
python -m health_sync
# Sync a specific date range
python -m health_sync --from 2026-02-16 --to 2026-02-22
# Preview without modifying files
python -m health_sync --dry-run -v
The project is open source under the EUPL-1.2 license: github.com/hylke-rozema/health-sync
Why this matters
Quantified self tools are everywhere, but they usually live in their own silos. For instance Strava has its own dashboard, Eetmeter has its own overview. By pulling everything into Obsidian, the data lives where I already think and plan. There’s no context switch. The daily note becomes a single source of truth: what I planned, what I did, and how it compares.
It’s a small tool that saves maybe 10 minutes a day. But the consistency it enables, having complete, structured data every single day without manual effort, compounds over weeks and months into genuine insight about what works and what doesn’t.