Skip to main content

Async Python client for the Woddle Smart Baby Scale API

Project description

pywoddle

Async Python client for the Woddle Smart Baby Scale API.

Installation

pip install pywoddle

Usage

import asyncio
from pywoddle import WoddleAuth, WoddleClient

async def main():
    auth = WoddleAuth(email="you@example.com", password="yourpassword")
    await auth.authenticate()

    client = WoddleClient(auth)

    # List babies on your account
    babies = await client.fetch_babies()
    for baby in babies:
        print(f"{baby.first_name} (due: {baby.due_date})")

    # Get recent activities (diapers, feedings, etc.)
    activities = await client.fetch_recent_activities()
    for activity in activities:
        print(f"{activity.baby_name}: {activity.activity_type}/{activity.sub_type} at {activity.log_time}")

    # List registered devices
    devices = await client.fetch_devices()
    for device in devices:
        print(f"{device.name} (serial: {device.device_id}, fw: {device.firmware_version})")

    await client.close()

asyncio.run(main())

API Reference

Authentication

  • WoddleAuth(email, password, session=None) — Create auth instance
  • await auth.authenticate() — Login and obtain JWT token
  • await auth.ensure_valid_token() — Re-authenticate if token expired
  • await auth.close() — Close the HTTP session

Client

  • WoddleClient(auth) — Create API client
  • await client.fetch_babies() — List all babies → list[WoddleBaby]
  • await client.fetch_baby_details(baby_id) — Get baby details → WoddleBaby
  • await client.fetch_recent_activities() — Recent activities → list[WoddleActivity]
  • await client.fetch_devices() — Registered devices → list[WoddleDevice]
  • await client.fetch_user_profile() — User profile → WoddleUserProfile
  • await client.close() — Close the HTTP session

Models

  • WoddleBabybaby_id, first_name, last_name, due_date, date_of_birth, gender
  • WoddleActivityactivity_id, baby_name, activity_type, sub_type, log_time
  • WoddleDevicedevice_id, name, firmware_version, possession
  • WoddleUserProfileuser_id, first_name, last_name, email, relationship, measurement

Exceptions

  • WoddleError — Base exception
  • WoddleAuthError — Authentication failures
  • WoddleApiError — API request errors (includes status_code attribute)

License

MIT

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

pywoddle-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

pywoddle-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file pywoddle-0.1.0.tar.gz.

File metadata

  • Download URL: pywoddle-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pywoddle-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9b45665293ea9473839f329304da7157405596e9199f940f50467e0bf69b2736
MD5 f85db9066d16e432f520ebe54362aa64
BLAKE2b-256 3459ba1b777762b54003823d4ad50f15c079bf1f63cd1243eef488b8873463c8

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on jlamendo/pywoddle

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

File details

Details for the file pywoddle-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pywoddle-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pywoddle-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ea7d1bb9774f7b3e0d0e5762e6c806e2117c5df5ab1643efdf1b5d5733e88c6
MD5 93f01a78635e1bf144cd0343eeb507c6
BLAKE2b-256 b189ac3959ca0f727b72ae1d52d9b1aa2c38e440cb4cadf1e4da12d5a4b4b71e

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on jlamendo/pywoddle

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