Skip to main content

Sync Withings data to Intervals.icu

Project description

Withings2Intervals

A Python script to sync wellness data from Withings to Intervals.icu.

This script is a fork of this Gist and has been enhanced with features such as:

  • Configurable start dates for syncing.
  • Prevention of duplicate syncing using a log file.
  • Added debugging support via a -v flag.
  • Refactored for better maintainability and extensibility.

Features

  • Fetches data from Withings using their API.
  • Uploads wellness data (weight, body fat, blood pressure, etc.) to Intervals.icu.
  • Tracks synced days to avoid duplicate uploads.
  • Supports a --force-resync option to re-upload data.
  • Debugging support with -v.

Installation

  1. Clone the Repository:

    git clone https://github.com/your-username/withings_syncer.git
    cd withings_syncer
    
  2. Install Dependencies with Poetry: Make sure you have Poetry installed.

    poetry install
    
  3. Set Up Configuration Files: Create a config.ini file with your API credentials:

    [Withings]
    client_id = YOUR_CLIENT_ID
    client_secret = YOUR_CLIENT_SECRET
    redirect_uri = http://localhost:80
    
    [Intervals]
    icu_api_key = YOUR_ICU_API_KEY
    icu_athlete_id = YOUR_ATHLETE_ID
    
    [Fields]
    weight_field = weight
    bodyfat_field = bodyFat
    diastolic_field = diastolic
    systolic_field = systolic
    muscle_field = MuscleMass
    temp_field = BodyTemperature
    
    [General]
    withings_config = ./withings.json
    

Usage

Run the script with the following options:

  • Sync Today's Data:

    python withings2intervals.py
    
  • Sync Data from a Specific Date:

    python withings2intervals.py --start 2024-12-01
    
  • Force Resync:

    python withings2intervals.py --force-resync
    
  • Verbose Debugging:

    python withings2intervals.py -v
    

Acknowledgments

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

withings2intervals-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

withings2intervals-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file withings2intervals-0.1.0.tar.gz.

File metadata

  • Download URL: withings2intervals-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for withings2intervals-0.1.0.tar.gz
Algorithm Hash digest
SHA256 63d0961fece23cc7731d5f98e416716f75bdd89ec6a96df41bdba5d2e7d13659
MD5 cecc9bda0e4192fea2c45b92d9b1ceec
BLAKE2b-256 f95ace5bc279f37d05869949b355e64bde98eb880e04099b35555338b201dcc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for withings2intervals-0.1.0.tar.gz:

Publisher: python-publish.yml on stezz/withings_syncer

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

File details

Details for the file withings2intervals-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for withings2intervals-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52456ecd57f31ffd3864e93dd08119685e534c55fa47f9d5137ff24653f95dd5
MD5 65f8e244547806485187e4196e3befe0
BLAKE2b-256 66c1ac8c99cb45e43ac33097a0020a9722ce73336986501a8fb3b7075403dfc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for withings2intervals-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on stezz/withings_syncer

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