Skip to main content

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 %, muscle mass %, 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 from pip

You can simply install the package from PyPi

pip install withings2intervals

Installation from repository

  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. Build

    poetry build
    
  4. Install

    pip install dist/withings2intervals-<version>.whl
    

Setup

1. Create a Withings Developer App

  1. Go to the Withings Developer Portal.
  2. Sign in and create a new app:
    • App Name: Choose a name (e.g., "Withings Syncer").
    • Callback URL: Use http://localhost:80.
    • Save the app and copy the Client ID and Client Secret to the config.ini

2. Get your intervals.icu keys

  1. Go to the Intervals.icu settings page
  2. Scroll until you see Developer Settings
  3. Click on "API Key (view)"
  4. Click on "Generate"
  5. Copy the generated API key to the config.ini
  6. Copy also the "Athlete ID" to config.ini

3. Run initial authentication

  1. Run python withings2intervals.py
  2. Follow on screen instructions

Once the initial authentication is successfully completed your OAuth2 token will be saved locally and you will be able to run subsequent synchronizations.

Usage

Run the script with the following options:

  • Sync Today's Data:

    withings2intervals
    
  • Sync Data from a Specific Date:

    withings2intervals --start 2024-12-01
    
  • Force Resync:

    withings2intervals --start 2024-12-01 --force-resync
    
  • Verbose Debugging:

    withings2intervals -v
    

Acknowledgments

Metadata

Release files for withings2intervals 0.1.4

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

Source distribution (sdist)

Source distribution for withings2intervals 0.1.4
File Size Uploaded
withings2intervals-0.1.4.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for withings2intervals 0.1.4
File Interpreter ABI Platform
withings2intervals-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / withings2intervals-0.1.4.tar.gz

Download URL withings2intervals-0.1.4.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
21f7b055a9404e5a989038bbec9e24e94a224818f9306901b69f94b16fced9f4
BLAKE2b-256 checksum
How to use checksums
a995b2832aca74edba0de681de44405aff9a562a7bf286fac922a70cb11596fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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 Dec 24, 2024.

Transparency log

Release files / withings2intervals-0.1.4-py3-none-any.whl

Download URL withings2intervals-0.1.4-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
037350a8d260b73e9a81ad46b33f74d84a809ab25d8dad0dd4780b654c6f1735
BLAKE2b-256 checksum
How to use checksums
cb4148cfb7615774ea54864b04d499c164629e892d42206c6ae43e21c9caf3bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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 Dec 24, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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