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 instanceawait auth.authenticate()— Login and obtain JWT tokenawait auth.ensure_valid_token()— Re-authenticate if token expiredawait auth.close()— Close the HTTP session
Client
WoddleClient(auth)— Create API clientawait client.fetch_babies()— List all babies →list[WoddleBaby]await client.fetch_baby_details(baby_id)— Get baby details →WoddleBabyawait client.fetch_recent_activities()— Recent activities →list[WoddleActivity]await client.fetch_devices()— Registered devices →list[WoddleDevice]await client.fetch_user_profile()— User profile →WoddleUserProfileawait client.close()— Close the HTTP session
Models
WoddleBaby—baby_id,first_name,last_name,due_date,date_of_birth,genderWoddleActivity—activity_id,baby_name,activity_type,sub_type,log_timeWoddleDevice—device_id,name,firmware_version,possessionWoddleUserProfile—user_id,first_name,last_name,email,relationship,measurement
Exceptions
WoddleError— Base exceptionWoddleAuthError— Authentication failuresWoddleApiError— API request errors (includesstatus_codeattribute)
License
MIT
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 pywoddle-0.2.0.tar.gz.
File metadata
- Download URL: pywoddle-0.2.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f4e82d4ad7e280ccf7b3b49c6d6f156b8717c73d8ab4cf083d0866302703c9c
|
|
| MD5 |
e4187ae947fea3782a71762f039611c8
|
|
| BLAKE2b-256 |
06644d5da981cc8991b200a474d1199987edddf7b6cc48125edb4cb5adebe1e5
|
Provenance
The following attestation bundles were made for pywoddle-0.2.0.tar.gz:
Publisher:
publish.yml on jlamendo/pywoddle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pywoddle-0.2.0.tar.gz -
Subject digest:
9f4e82d4ad7e280ccf7b3b49c6d6f156b8717c73d8ab4cf083d0866302703c9c - Sigstore transparency entry: 1205555451
- Sigstore integration time:
-
Permalink:
jlamendo/pywoddle@ab1cfa10593d88c12b7e60f2390f69a62f4446d9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/jlamendo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab1cfa10593d88c12b7e60f2390f69a62f4446d9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pywoddle-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pywoddle-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.5 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 |
1e19a18c889530a25e38ebc1313271ad521562ea5b6496b1d9ff156f626265b2
|
|
| MD5 |
44691f91e0a11bc9cc1df09674dd66cb
|
|
| BLAKE2b-256 |
c018e1707df3c709563e41a8317980da93053ca05bd60b58744b0eecf389d5a1
|
Provenance
The following attestation bundles were made for pywoddle-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on jlamendo/pywoddle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pywoddle-0.2.0-py3-none-any.whl -
Subject digest:
1e19a18c889530a25e38ebc1313271ad521562ea5b6496b1d9ff156f626265b2 - Sigstore transparency entry: 1205555469
- Sigstore integration time:
-
Permalink:
jlamendo/pywoddle@ab1cfa10593d88c12b7e60f2390f69a62f4446d9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/jlamendo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab1cfa10593d88c12b7e60f2390f69a62f4446d9 -
Trigger Event:
release
-
Statement type: