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
-
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 -
Set Up Configuration Files: Create a
config.inifile 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
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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63d0961fece23cc7731d5f98e416716f75bdd89ec6a96df41bdba5d2e7d13659
|
|
| MD5 |
cecc9bda0e4192fea2c45b92d9b1ceec
|
|
| BLAKE2b-256 |
f95ace5bc279f37d05869949b355e64bde98eb880e04099b35555338b201dcc8
|
Provenance
The following attestation bundles were made for withings2intervals-0.1.0.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.0.tar.gz -
Subject digest:
63d0961fece23cc7731d5f98e416716f75bdd89ec6a96df41bdba5d2e7d13659 - Sigstore transparency entry: 157062035
- Sigstore integration time:
-
Permalink:
stezz/withings_syncer@e45cf305e934fd1c910a9fe4830cf65eb620b1e2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/stezz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e45cf305e934fd1c910a9fe4830cf65eb620b1e2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file withings2intervals-0.1.0-py3-none-any.whl.
File metadata
- Download URL: withings2intervals-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 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 |
52456ecd57f31ffd3864e93dd08119685e534c55fa47f9d5137ff24653f95dd5
|
|
| MD5 |
65f8e244547806485187e4196e3befe0
|
|
| BLAKE2b-256 |
66c1ac8c99cb45e43ac33097a0020a9722ce73336986501a8fb3b7075403dfc9
|
Provenance
The following attestation bundles were made for withings2intervals-0.1.0-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.0-py3-none-any.whl -
Subject digest:
52456ecd57f31ffd3864e93dd08119685e534c55fa47f9d5137ff24653f95dd5 - Sigstore transparency entry: 157062040
- Sigstore integration time:
-
Permalink:
stezz/withings_syncer@e45cf305e934fd1c910a9fe4830cf65eb620b1e2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/stezz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e45cf305e934fd1c910a9fe4830cf65eb620b1e2 -
Trigger Event:
release
-
Statement type: