Withings API Python Client Implementation
python-dateutil: https://pypi.org/project/python-dateutil/1.4/requests-oauthlib: https://pypi.python.org/pypi/requests-oauthlib
fromwithingsimportWithingsfromwithingsimportWithingsAUTH# If first time authorizing userwith_auth=WithingsAUTH('developer client id',
'developer callback url')
auth_code=with_auth.authorize("user email address",
"user password")
# Pass in authorization code to use APIwithings=Withings('developer client id',
'developer client secret',
'developer callback url',
auth_code=auth_code)
# Start making callssleep=withings.get_sleep_detail_data(
last_update_date=datetime(year=2021, month=5, day=18))