Unofficial Python client for the Renpho Health API — pull body composition data from Renpho smart scales.
Project description
renpho
Unofficial Python client for the Renpho Health API. Pull body composition measurements from Renpho smart scales programmatically.
Based on reverse-engineering from RenphoGarminSync-CLI.
Installation
pip install .
For .env file support (recommended for CLI usage):
pip install ".[dotenv]"
CLI Usage
- Create a
.envfile (or export the variables):
RENPHO_EMAIL=your@email.com
RENPHO_PASSWORD=your_plain_text_password
- Run the CLI:
renpho
This will log in, discover your scales, fetch all measurements, print the 5 most recent, and save everything to renpho_data/ as JSON and CSV.
Environment variables
| Variable | Required | Description |
|---|---|---|
RENPHO_EMAIL |
Yes | Your Renpho account email |
RENPHO_PASSWORD |
Yes | Your Renpho account password |
RENPHO_DEBUG |
No | Set to 1 to print API request/response details |
RENPHO_OUTPUT_DIR |
No | Output directory (default: renpho_data) |
Library Usage
from renpho import RenphoClient
client = RenphoClient("user@example.com", "password")
client.login()
# Fetch all measurements in one call
measurements = client.get_all_measurements()
for m in measurements:
print(m["weight"], m.get("bodyfat"), m.get("muscle"))
Step-by-step control
from renpho import RenphoClient, save_json, save_csv
client = RenphoClient("user@example.com", "password")
client.login()
# Get device/scale info
device_info = client.get_device_info()
scales = device_info["scale"]
# Fetch from a specific scale table
table = scales[0]
measurements = client.get_measurements(
table_name=table["tableName"],
user_id=client.user_id,
total_count=table["count"],
)
# Export
save_json(measurements, "my_data.json")
save_csv(measurements, "my_data.csv")
Error handling
from renpho import RenphoClient, RenphoAPIError
client = RenphoClient("user@example.com", "wrong_password")
try:
client.login()
except RenphoAPIError as e:
print(f"API error: {e}")
Available Metrics
Each measurement dict can contain these fields (availability depends on your scale model):
| Key | Description | Unit |
|---|---|---|
weight |
Weight | kg |
bmi |
BMI | |
bodyfat |
Body Fat | % |
water |
Body Water | % |
muscle |
Muscle Mass | % |
bone |
Bone Mass | % |
bmr |
Basal Metabolic Rate | kcal/day |
visfat |
Visceral Fat | level |
subfat |
Subcutaneous Fat | % |
protein |
Protein | % |
bodyage |
Body Age | years |
sinew |
Lean Body Mass | kg |
fatFreeWeight |
Fat Free Weight | kg |
heartRate |
Heart Rate | bpm |
cardiacIndex |
Cardiac Index | |
bodyShape |
Body Shape |
Project Structure
renpho-api/
├── pyproject.toml # Package config & dependencies
├── README.md
├── renpho/
│ ├── __init__.py # Public API exports
│ ├── client.py # RenphoClient class
│ ├── cli.py # CLI entry point
│ ├── constants.py # API endpoints, device types, metrics
│ ├── crypto.py # AES encryption/decryption
│ └── export.py # JSON/CSV export helpers
└── .gitignore
Project details
Release history Release notifications | RSS feed
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 renpho_api-0.1.0.tar.gz.
File metadata
- Download URL: renpho_api-0.1.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd22bd0ad40a05270d71bb2e97f9c8d91a8dcf04335ef95c1b95d9308d2c6683
|
|
| MD5 |
9e499d89f7367944b4dbf643fd53676c
|
|
| BLAKE2b-256 |
eba94be89f307524e0a83cd30e9119986e5b38f0743c0186e5ea0b0b025309d7
|
Provenance
The following attestation bundles were made for renpho_api-0.1.0.tar.gz:
Publisher:
release.yml on danvaneijck/renpho-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
renpho_api-0.1.0.tar.gz -
Subject digest:
bd22bd0ad40a05270d71bb2e97f9c8d91a8dcf04335ef95c1b95d9308d2c6683 - Sigstore transparency entry: 936665918
- Sigstore integration time:
-
Permalink:
danvaneijck/renpho-api@7df90d48a819a5a600d38b07ea1db3317d4b3d6f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/danvaneijck
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7df90d48a819a5a600d38b07ea1db3317d4b3d6f -
Trigger Event:
release
-
Statement type:
File details
Details for the file renpho_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: renpho_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ca95bed4c0ed675c0bcbb10f15f2d4b0f7b477724bc8ebb20e08c028d0a8ef5
|
|
| MD5 |
57122a8f8c97638e3acdf3b6fefbc3b4
|
|
| BLAKE2b-256 |
2c7c2b7da2784f4b79f6a96fc149104d01db066f3c1c3e963ec7e3aae5f4a437
|
Provenance
The following attestation bundles were made for renpho_api-0.1.0-py3-none-any.whl:
Publisher:
release.yml on danvaneijck/renpho-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
renpho_api-0.1.0-py3-none-any.whl -
Subject digest:
9ca95bed4c0ed675c0bcbb10f15f2d4b0f7b477724bc8ebb20e08c028d0a8ef5 - Sigstore transparency entry: 936665933
- Sigstore integration time:
-
Permalink:
danvaneijck/renpho-api@7df90d48a819a5a600d38b07ea1db3317d4b3d6f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/danvaneijck
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7df90d48a819a5a600d38b07ea1db3317d4b3d6f -
Trigger Event:
release
-
Statement type: