Unofficial Renpho Health API client for Python — pull body composition data from Renpho smart scales.
Project description
renpho-py — Renpho Health API client for Python
Unofficial Renpho Health API client for Python. Pull body composition measurements from Renpho smart scales programmatically.
Unofficial. Not affiliated with, endorsed by, or supported by Renpho. Use at your own risk and in line with Renpho's terms of service.
renpho-py is an independently maintained continuation of the abandoned
renpho-api (MIT). The import name
is unchanged, so migrating is a one-line swap — pip install renpho-py and your
existing from renpho import ... code keeps working. The underlying API was
reverse-engineered; protocol details are based on
RenphoGarminSync-CLI.
Installation
pip install renpho-py
For .env file support (recommended for CLI usage):
pip install "renpho-py[dotenv]"
Migrating from
renpho-api?pip uninstall renpho-api && pip install renpho-py. No code changes — you stillfrom renpho import RenphoClient.
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
# Use get_body_composition_measurements() for scales with impedance sensors
# (body fat, muscle, etc.) — the server-side count is unreliable for these.
# Fall back to get_measurements() for weight-only scales.
table = scales[0]
measurements = client.get_body_composition_measurements(
table_name=table["tableName"],
user_id=client.user_id,
)
if not measurements:
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")
Multiple Renpho accounts on one email
Some users end up with two Renpho accounts under the same email — for
example after the Google SSO migration created an orphan account, or after
re-registering. Each account has its own user ID and its own measurement
table, so the default get_all_measurements() will only return data from
the account you log in to.
If you know the other account's user ID, pass it in:
measurements = client.get_all_measurements(
extra_user_ids=["5975813831868809088"],
)
The library will probe every measurement table for that user ID, fetch
matching records, and dedupe by record id so you get a single combined
timeline.
How to find your other user ID:
Unfortunately there is no first-party API endpoint that lists "all accounts associated with this email" — Renpho treats accounts as independent even when emails collide. Options:
- Renpho support — email them and ask for your user ID(s) on file
- Inspect the iOS / Android app — sign in to the other account in the official app and look in Settings / Account / Help → Feedback pages (the user ID is sometimes visible there)
- Capture network traffic — proxy the official app through
mitmproxy, sign in, and look at any request body containing
userId(decrypt with the published AES-128 key — see the reverse-engineering write-up linked at the top of this README)
Once you have the ID, save it alongside your credentials and you won't need to discover it again.
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-py/
├── pyproject.toml # Package config & dependencies (dist name: renpho-py)
├── README.md
├── CHANGELOG.md
├── LICENSE # MIT (original + current attribution)
├── NOTICE
├── renpho/ # import name — unchanged for drop-in migration
│ ├── __init__.py # Public API exports
│ ├── py.typed # PEP 561 typing marker
│ ├── 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
├── tests/ # Unit tests
└── .github/workflows/ # CI + PyPI release automation (trusted publishing)
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_py-1.2.0.tar.gz.
File metadata
- Download URL: renpho_py-1.2.0.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4f3a80f3130aba284959a83e9f4fcb35113eac05a7b85dde695c11afcf65927
|
|
| MD5 |
08ace342198c10691b5e9534e7d096a8
|
|
| BLAKE2b-256 |
5c955b2dd7dbb4e0f9b6543c92a47c00eb25c2df720eff7ec72b43fb1616e5c1
|
Provenance
The following attestation bundles were made for renpho_py-1.2.0.tar.gz:
Publisher:
release.yml on ChocoTonic/renpho-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
renpho_py-1.2.0.tar.gz -
Subject digest:
d4f3a80f3130aba284959a83e9f4fcb35113eac05a7b85dde695c11afcf65927 - Sigstore transparency entry: 2064964911
- Sigstore integration time:
-
Permalink:
ChocoTonic/renpho-py@d514c31a5d817a8854baf051869e425f11b074f9 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/ChocoTonic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d514c31a5d817a8854baf051869e425f11b074f9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file renpho_py-1.2.0-py3-none-any.whl.
File metadata
- Download URL: renpho_py-1.2.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d2ef9ab611d30d24654ccce9e0d18e312db86ff2d97863d748e80d2e701e0ad
|
|
| MD5 |
94a51b033298e55a4472823663b438c6
|
|
| BLAKE2b-256 |
a37a55e91e28046d60bc0722f2f82fbbde8f86127b9e6fa8812e543aa67f4c24
|
Provenance
The following attestation bundles were made for renpho_py-1.2.0-py3-none-any.whl:
Publisher:
release.yml on ChocoTonic/renpho-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
renpho_py-1.2.0-py3-none-any.whl -
Subject digest:
9d2ef9ab611d30d24654ccce9e0d18e312db86ff2d97863d748e80d2e701e0ad - Sigstore transparency entry: 2064965029
- Sigstore integration time:
-
Permalink:
ChocoTonic/renpho-py@d514c31a5d817a8854baf051869e425f11b074f9 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/ChocoTonic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d514c31a5d817a8854baf051869e425f11b074f9 -
Trigger Event:
release
-
Statement type: