Skip to main content

yazio-exporter

Export all your Yazio nutrition, body, and exercise data to JSON, CSV, or SQLite.

Features

  • Full data coverage — daily diary, consumed items (products + recipes), weight & body measurements, exercises, water intake, micronutrients (40+ vitamins & minerals), and user profile
  • Three output formats — JSON (pretty-printed), CSV (one file per data type), SQLite (normalized with foreign keys and indexes)
  • Built-in analytics — calorie stats, macro ratios, meal distribution, weight trend, calorie-weight correlation, top products
  • LLM-ready analysis — generates a compact prompt you can paste into ChatGPT, Claude, DeepSeek, or Gemini for personalized nutrition insights
  • Auto-discovery — scans your history automatically, no date range needed
  • Concurrent fetching — parallel API calls (up to 10 workers) for fast exports
  • One-shot export — export-all dumps everything in a single command

Requirements

  • Python 3.11+
  • A Yazio account with email/password login

Installation

From PyPI (recommended)

pip install yazio-exporter

With uv

uv tool install yazio-exporter

With pipx

pipx install yazio-exporter

From source

git clone https://github.com/aleksandr-bogdanov/yazio-exporter.git
cd yazio-exporter
uv sync

Quick start

# One command — exports everything to output/
yazio-exporter export-all you@email.com yourpassword

# Regenerate reports from existing exports
yazio-exporter report -d output/

# Or step by step:
yazio-exporter login you@email.com yourpassword
yazio-exporter days
yazio-exporter weight
yazio-exporter nutrients
yazio-exporter products
yazio-exporter summary -w weight.json
yazio-exporter report

All commands have sensible defaults — login saves to token.txt, other commands read from it, and each writes to its natural filename (days.json, weight.json, etc.).

CLI reference

login — Authenticate and save token

yazio-exporter login EMAIL PASSWORD [-o token.txt]
Flag Description
EMAIL Yazio account email (positional)
PASSWORD Yazio account password (positional)
-o, --output Token output file (default: token.txt)

Token file is created with 0600 permissions.

profile — Export user profile

yazio-exporter profile [-t token.txt] [-o profile.json] [--format json]
Flag Description
-t, --token Token file (default: token.txt)
-o, --output Output file (default: profile.json)
--format json, csv, or sqlite (default: json)

days — Export daily diary data

yazio-exporter days [-t token.txt] [-o days.json] [-f 2024-01-01] [-e 2024-12-31]
Flag Description
-t, --token Token file (default: token.txt)
-o, --output Output file (default: days.json)
--format json, csv, or sqlite (default: json)
-w, --what Data types to export, comma-separated (default: consumed,goals,exercises,water,daily_summary)
-f, --from-date Start date, YYYY-MM-DD (default: auto-discover)
-e, --end-date End date, YYYY-MM-DD (default: today)

Without --from-date/--end-date, auto-discovers all months with data.

weight — Export weight and body measurements

yazio-exporter weight [-t token.txt] [-o weight.json] [-f 2024-01-01] [-e 2024-12-31]
Flag Description
-t, --token Token file (default: token.txt)
-o, --output Output file (default: weight.json)
--format json, csv, or sqlite (default: json)
-f, --from-date Start date, YYYY-MM-DD (default: 365 days ago)
-e, --end-date End date, YYYY-MM-DD (default: today)

nutrients — Export nutrient history

yazio-exporter nutrients [-t token.txt] [-o nutrients.json] [-n vitamin.d,mineral.iron]
Flag Description
-t, --token Token file (default: token.txt)
-o, --output Output file (default: nutrients.json)
--format json, csv, or sqlite (default: json)
-n, --nutrients Specific nutrients, comma-separated (default: all)
-f, --from-date Start date, YYYY-MM-DD (default: 365 days ago)
-e, --end-date End date, YYYY-MM-DD (default: today)

Available nutrients:

  • Vitamins: vitamin.a, vitamin.b1, vitamin.b2, vitamin.b3, vitamin.b5, vitamin.b6, vitamin.b7, vitamin.b11, vitamin.b12, vitamin.c, vitamin.d, vitamin.e, vitamin.k
  • Minerals: mineral.calcium, mineral.iron, mineral.potassium, mineral.magnesium, mineral.phosphorus, mineral.zinc, mineral.copper, mineral.manganese, mineral.selenium, mineral.iodine, mineral.fluoride, mineral.chlorine, mineral.choline

products — Resolve product details from days export

yazio-exporter products [-t token.txt] [-f days.json] [-o products.json]
Flag Description
-t, --token Token file (default: token.txt)
-f, --from-file Days export JSON file (default: days.json)
-o, --output Output file (default: products.json)
--format json, csv, or sqlite (default: json)

summary — Generate analytics and statistics

yazio-exporter summary [-f days.json] [-w weight.json] [-p products.json]
Flag Description
-f, --from-file Days export JSON file (default: days.json)
-w, --weight Weight export JSON file
-p, --products Products export JSON file
--period daily, weekly, or monthly (default: daily)
--format json, csv, or table (default: table)

Outputs to stdout.

export-all — Complete export pipeline

yazio-exporter export-all EMAIL PASSWORD [-o output/]
Flag Description
EMAIL Yazio account email (positional)
PASSWORD Yazio account password (positional)
-o, --output Output directory (default: output/)
--format json, csv, or sqlite (default: json)

Creates the output directory and writes: profile.json, days.json, weight.json, nutrients.json, products.json, summary.txt, analysis.md, llm_prompt.txt.

report — Generate analysis and LLM prompt from existing exports

yazio-exporter report [-d output/] [--start 2024-01-01] [--end 2024-12-31]
Flag Description
-d, --dir Directory with exported JSON files (default: output/)
--start Start date filter, YYYY-MM-DD (optional)
--end End date filter, YYYY-MM-DD (optional)

Reads days.json, weight.json, products.json, and profile.json from the directory and generates analysis.md (pre-computed statistics) and llm_prompt.txt (paste-ready LLM prompt).

LLM analysis

The export-all and report commands generate an llm_prompt.txt file — a compact, paste-ready prompt containing your nutrition data formatted for any LLM. Copy the contents and paste into ChatGPT, Claude, DeepSeek, or Gemini to get personalized insights:

# Generate from existing exports
yazio-exporter report -d output/

# Filter to a specific date range
yazio-exporter report -d output/ --start 2024-06-01 --end 2024-12-31

# Then paste llm_prompt.txt into your LLM of choice
cat output/llm_prompt.txt | pbcopy  # macOS

The prompt instructs the LLM to act as a sports nutritionist and analyze binge-recovery cycles, plateau mechanics, TDEE, trigger patterns, protein adequacy, food crutches, and more — all backed by your actual data.

An analysis.md file is also generated with pre-computed statistics (calorie averages, macro splits, weight trends, top foods) that you can reference directly or include alongside the LLM prompt for richer context.

Output examples

JSON (days)

{
  "2024-01-15": {
    "consumed": {
      "products": [
        {"product_id": "abc-123", "amount": 150, "daytime": "breakfast"}
      ],
      "recipe_portions": [],
      "simple_products": []
    },
    "goals": {"data": {"energy": 2000, "protein": 120}},
    "exercises": {"training": [], "custom_training": [], "activity": null},
    "water": {"water_intake": 2500},
    "daily_summary": {"meals": {"breakfast": {"nutrients": {"energy.energy": 450}}}}
  }
}

CSV (nutrients)

date,nutrient_id,value
2024-01-15,vitamin.d,15.2
2024-01-15,mineral.iron,8.5
2024-01-16,vitamin.d,12.0

SQLite schema

days(date, energy, carb, protein, fat, energy_goal)
consumed_items(id, date, product_id, amount, energy)
products(product_id, name, category, energy_per_100g, carb_per_100g, protein_per_100g, fat_per_100g)
recipes(recipe_id, name, portion_count, energy_per_portion, ...)
weight_log(date, weight, body_fat, waist, hip, chest)
nutrient_daily(id, date, nutrient_id, value)
exercises(id, date, exercise_type, duration_minutes, calories_burned)
water_intake(date, water_ml)
goals(date, energy_goal, protein_goal, fat_goal, carb_goal, water_goal, ...)
daily_summary(date, total_energy, breakfast_energy, lunch_energy, dinner_energy, snack_energy)
users(id, email, start_weight, current_weight, goal, sex, activity_degree)

Development

just setup          # uv sync --all-extras
just test           # run all tests
just test -v        # verbose
just lint           # ruff check src/ tests/
just fmt            # ruff format src/ tests/
just build          # uv build
just clean          # remove build artifacts

License

MIT

Metadata

Release files for yazio-exporter 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yazio-exporter 0.2.0
File Size Uploaded Provenance
yazio_exporter-0.2.0.tar.gz 81.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for yazio-exporter 0.2.0
File Interpreter ABI Platform
yazio_exporter-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 120.1 kB

Release files / yazio_exporter-0.2.0.tar.gz

Download URL yazio_exporter-0.2.0.tar.gz
Size 81.3 kB
Tags Source
SHA-256 checksum
How to use checksums
01a02bd49f39b87e0a05b568bbdc7176d2a59a8918cfb71426fa46f31b54ff40
BLAKE2b-256 checksum
How to use checksums
219ea00490639a14544827cd7c3deebb16ba15a0a28299373cf9b217259d21de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 14, 2026.

Transparency log

Release files / yazio_exporter-0.2.0-py3-none-any.whl

Download URL yazio_exporter-0.2.0-py3-none-any.whl
Size 38.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbadd34bda064cbb22cae0a8f7fe12c171d97a4ea35b9a87a0907e765ee5d4cf
BLAKE2b-256 checksum
How to use checksums
0e5d2a3d44d7c6c9068664a829617e1c5557797f4245e8b3335552b8eda59cc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 14, 2026.

Transparency log

Security for yazio-exporter 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for yazio_exporter-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page