Skip to main content

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

  1. Create a .env file (or export the variables):
RENPHO_EMAIL=your@email.com
RENPHO_PASSWORD=your_plain_text_password
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

renpho_api-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

renpho_api-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

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

Hashes for renpho_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bd22bd0ad40a05270d71bb2e97f9c8d91a8dcf04335ef95c1b95d9308d2c6683
MD5 9e499d89f7367944b4dbf643fd53676c
BLAKE2b-256 eba94be89f307524e0a83cd30e9119986e5b38f0743c0186e5ea0b0b025309d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for renpho_api-0.1.0.tar.gz:

Publisher: release.yml on danvaneijck/renpho-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for renpho_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ca95bed4c0ed675c0bcbb10f15f2d4b0f7b477724bc8ebb20e08c028d0a8ef5
MD5 57122a8f8c97638e3acdf3b6fefbc3b4
BLAKE2b-256 2c7c2b7da2784f4b79f6a96fc149104d01db066f3c1c3e963ec7e3aae5f4a437

See more details on using hashes here.

Provenance

The following attestation bundles were made for renpho_api-0.1.0-py3-none-any.whl:

Publisher: release.yml on danvaneijck/renpho-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page