Unofficial Python client for the Renpho Health API. Pull body composition measurements from Renpho smart scales programmatically.
Based on reverse-engineering from RenphoGarminSync-CLI.
pip install renpho-apiFor .env file support (recommended for CLI usage):
pip install "renpho-api[dotenv]"- Create a
.envfile (or export the variables):
RENPHO_EMAIL=your@email.com
RENPHO_PASSWORD=your_plain_text_password
- Run the CLI:
renphoThis will log in, discover your scales, fetch all measurements, print the 5 most recent, and save everything to renpho_data/ as JSON and CSV.
| 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) |
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"))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")from renpho import RenphoClient, RenphoAPIError
client = RenphoClient("user@example.com", "wrong_password")
try:
client.login()
except RenphoAPIError as e:
print(f"API error: {e}")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 |
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
├── tests/ # Unit tests
└── .github/workflows/ # CI + PyPI release automation