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
-vflag. - 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-resyncoption 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
-
Clone the Repository:
git clone https://github.com/your-username/withings_syncer.git cd withings_syncer
-
Install Dependencies with Poetry: Make sure you have Poetry installed.
poetry install -
Build
poetry build -
Install
pip install dist/withings2intervals-<version>.whl
Setup
1. Create a Withings Developer App
- Go to the Withings Developer Portal.
- 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
- Go to the Intervals.icu settings page
- Scroll until you see Developer Settings
- Click on "API Key (view)"
- Click on "Generate"
- Copy the generated API key to the
config.ini - Copy also the "Athlete ID" to
config.ini
3. Run initial authentication
- Run
python withings2intervals.py - 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file withings2intervals-0.1.2.tar.gz.
File metadata
- Download URL: withings2intervals-0.1.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ce14aef17b0b1f358dff87d228352f0a58dbe0917843275345870c21567b699
|
|
| MD5 |
86fbc5ab336209757ef82b6c9621058e
|
|
| BLAKE2b-256 |
25c53294429e9ec9a24723028470b71f36a29181a5662d75241de65504c5f249
|
Provenance
The following attestation bundles were made for withings2intervals-0.1.2.tar.gz:
Publisher:
python-publish.yml on stezz/withings_syncer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
withings2intervals-0.1.2.tar.gz -
Subject digest:
4ce14aef17b0b1f358dff87d228352f0a58dbe0917843275345870c21567b699 - Sigstore transparency entry: 157077435
- Sigstore integration time:
-
Permalink:
stezz/withings_syncer@003832bf4fb024df95e8287a9253af1fc71e59ae -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/stezz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@003832bf4fb024df95e8287a9253af1fc71e59ae -
Trigger Event:
push
-
Statement type:
File details
Details for the file withings2intervals-0.1.2-py3-none-any.whl.
File metadata
- Download URL: withings2intervals-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddb295857cdad4509347883d1ad92d53f00f146ced4e883811829d32416a318a
|
|
| MD5 |
66ac5e9c796a09159ba4bb2febd872d5
|
|
| BLAKE2b-256 |
e048ab11a289c043a97d7fe6f0a43b3035a8b1d2858dfaf7f8c17c8743c865cb
|
Provenance
The following attestation bundles were made for withings2intervals-0.1.2-py3-none-any.whl:
Publisher:
python-publish.yml on stezz/withings_syncer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
withings2intervals-0.1.2-py3-none-any.whl -
Subject digest:
ddb295857cdad4509347883d1ad92d53f00f146ced4e883811829d32416a318a - Sigstore transparency entry: 157077436
- Sigstore integration time:
-
Permalink:
stezz/withings_syncer@003832bf4fb024df95e8287a9253af1fc71e59ae -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/stezz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@003832bf4fb024df95e8287a9253af1fc71e59ae -
Trigger Event:
push
-
Statement type: