Skip to main content

AI-powered tool for structuring and auditing personal health logs

Project description

parsehealthlog

License: MIT Python 3.8+

📓 Transform health journal entries into structured, validated data 🏥

Documentation

Overview

parsehealthlog is a data extraction and curation tool that transforms unstructured health journal entries into structured, validated data ready for downstream analysis.

What it produces:

  • health_log.md — All processed entries (newest to oldest) with labs and exams integrated

The tool processes, validates, and enriches health log entries. Reports, summaries, and recommendations are left to downstream consumers of the structured data.

Features

  • Parallel processing of hundreds of journal entries
  • Lab result integration with automatic interpretation
  • Hash-based caching for efficient incremental rebuilds
  • Multi-model support via OpenRouter (GPT-4, Claude, etc.)
  • Profile-based configuration for managing multiple health logs

Quick Start

# Install uv (if needed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone and install
git clone https://github.com/tsilva/parsehealthlog.git
cd parsehealthlog
uv sync

# Configure
cp .env.example .env
# Edit .env with your OPENROUTER_API_KEY

# Create a profile (profiles/myprofile.yaml)
# health_log_path: /path/to/health.md
# output_path: /path/to/output

# Run
uv run python main.py --profile myprofile

Output Structure

OUTPUT_PATH/
├── health_log.md            # PRIMARY: All entries (newest to oldest)
└── entries/                 # INTERMEDIATE (kept for caching)
    ├── YYYY-MM-DD.raw.md
    ├── YYYY-MM-DD.processed.md
    └── YYYY-MM-DD.labs.md

Configuration

Environment Variables (.env)

Variable Required Description
OPENROUTER_API_KEY Yes Your OpenRouter API key

Profile Configuration (profiles/<name>.yaml)

Variable Required Description
health_log_path Yes Path to your markdown health log
output_path Yes Directory for generated output
model_id No Default LLM model (default: gpt-4o-mini)
max_workers No Parallel processing threads (default: 4)

See docs/pipeline.md for all configuration options.

Health Log Format

Your health log should be a markdown file with dated sections:

### 2024-01-15

Visited Dr. Smith for annual checkup. Blood pressure 120/80.
Started vitamin D 2000 IU daily.

### 2024-01-20

Feeling better after starting vitamin D. Energy levels improved.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parsehealthlog-0.1.6.tar.gz (455.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parsehealthlog-0.1.6-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file parsehealthlog-0.1.6.tar.gz.

File metadata

  • Download URL: parsehealthlog-0.1.6.tar.gz
  • Upload date:
  • Size: 455.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parsehealthlog-0.1.6.tar.gz
Algorithm Hash digest
SHA256 ea2f3246729790960aa38916f5c7f3134bbf58f9cb9894cdf5407c1f624347dd
MD5 fa919155297f78b04e7dbd12e1e259a2
BLAKE2b-256 6ad1d045f0ed62ba0d4aaf8cd82f1ba49e1346ca266c38b8be6c4f253f823a98

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsehealthlog-0.1.6.tar.gz:

Publisher: release.yml on tsilva/parsehealthlog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parsehealthlog-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: parsehealthlog-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parsehealthlog-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 bb4436a41ccae02e54670dd7c9d1a9e007af8659a63d34c8b9af7cda0002877e
MD5 83bb43a2f7209b63c9ba3805682805ee
BLAKE2b-256 37a137b1427223b31a5cf77ae94567fe35abb89cc0f4530d5df6b2f6385e8007

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsehealthlog-0.1.6-py3-none-any.whl:

Publisher: release.yml on tsilva/parsehealthlog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page